diff --git a/jaxws-common/pom.xml b/jaxws-common/pom.xml deleted file mode 100644 index 0adf94449f..0000000000 --- a/jaxws-common/pom.xml +++ /dev/null @@ -1,419 +0,0 @@ - - - - 4.0.0 - - - jakarta.tck - project - 11.0.0-SNAPSHOT - - - jaxws-common - jar - - jaxws-common - jaxws-common - - - ${project.groupId} - libutil - - - ${project.groupId} - common - - - jakarta.xml.ws - jakarta.xml.ws-api - - - jakarta.annotation - jakarta.annotation-api - - - - - - - src/main/resources - - - src/main/java - - **/*.xml - - - **/build.xml - - - - - - - - maven-deploy-plugin - - true - - - - com.sun.xml.ws - jaxws-maven-plugin - - - service-addnumber - - wsgen - - compile - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.epr.AddNumbersImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr - - - - service-clientview - - wsgen - - compile - - com.sun.ts.tests.jaxws.sharedwebservices.rpclitservice.J2WRLSharedEndpointImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice - - - - - service-com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.server - - wsgen - - compile - - com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.server.EchoImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server - - - - - service-com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1 - - wsgen - - compile - - com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1.HandlerChainTestImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1 - - - - - service-com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2 - - wsgen - - compile - - com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2.HandlerChainTestImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2 - - - - - service-com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersImpl23001 - - wsgen - - compile - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersImpl23001 - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous - - - - - service-com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersImpl23002 - - wsgen - - compile - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersImpl23002 - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous - - - - - service-com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse - - wsgen - - compile - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse.AddNumbersImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse - - - - - service-document-AddNumbersImpl3 - - wsgen - - compile - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersImpl3 - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous - - - - - service-document-AddNumbersImpl4 - - wsgen - - compile - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersImpl4 - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous - - - - - service-document-action-AddNumbersImpl - - wsgen - - compile - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action.AddNumbersImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action - - - - - service-document-addressingfeature-AddressingFeatureTestImpl1 - - wsgen - - compile - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTestImpl1 - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature - - - - - service-document-addressingfeature-AddressingFeatureTestImpl2 - - wsgen - - compile - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTestImpl2 - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature - - - - - service-document-addressingfeature-AddressingFeatureTestImpl3 - - wsgen - - compile - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTestImpl3 - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature - - - - - service-document-addressingfeature-AddressingFeatureTestImpl4 - - wsgen - - compile - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTestImpl4 - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature - - - - - service-document-refps-AddNumbersImpl4 - - wsgen - - compile - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.refps.AddNumbersImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps - - - - - service-document-typesubstitution - - wsgen - - compile - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.typesubstitution.CarDealerImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution - - - - - service-document-webmethod - - wsgen - - compile - - com.sun.ts.tests.jaxws.ee.j2w.document.literal.webmethod.server.TestImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server - - - - - service-faultservice - - wsgen - - compile - - com.sun.ts.tests.jaxws.sharedwebservices.faultservice.SoapFaultTestImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/sharedwebservices/faultservice - - - - - service-marshalltest - - wsgen - - compile - - com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.server.MarshallTestImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server - - - - service-nosei - - wsgen - - compile - - com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.nosei.server.EchoImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server - - - - - service-sessionmaintaintest - - wsgen - - compile - - com.sun.ts.tests.jaxws.ee.j2w.document.literal.sessionmaintaintest.server.TestImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server - - - - - service-shared-doclitservice - - wsgen - - compile - - com.sun.ts.tests.jaxws.sharedwebservices.doclitservice.J2WDLSharedEndpointImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice - - - - - service-shared-simpleservice - - wsgen - - compile - - com.sun.ts.tests.jaxws.sharedwebservices.simpleservice.SimpleEndpointImpl - ${project.build.directory}/generated-sources/ - true - ${project.build.outputDirectory}/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/ - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/AnnotationUtils.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/AnnotationUtils.java deleted file mode 100644 index a97efebbcf..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/AnnotationUtils.java +++ /dev/null @@ -1,1040 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.lib.util.*; - -import java.lang.annotation.Annotation; -import jakarta.xml.ws.WebFault; -import jakarta.xml.ws.*; -import jakarta.jws.*; -import jakarta.jws.soap.*; -import java.lang.reflect.Field; -import jakarta.xml.bind.annotation.XmlElement; -import jakarta.xml.bind.annotation.XmlType; - -import java.lang.reflect.Method; - -public class AnnotationUtils { - - /** - * Private to prevent instantiation. - */ - private AnnotationUtils() { - super(); - } - - public static Method[] getMethods(Class c) { - return c.getDeclaredMethods(); - } - - public static Method getMethod(Class c, String methodName) { - Method[] methods = c.getDeclaredMethods(); - for (int i = 0; i < methods.length; i++) { - Method method = methods[i]; - if (methodName.equals(method.getName())) { - return method; - } - } - return null; - } - - public static boolean verifyXmlElement(XmlElement element, String name, - String namespace, boolean required, boolean nillable) { - boolean pass = true; - - TestUtil.logMsg("Verify XmlElement Params: " + element); - - if (element.name().equals(name)) { - TestUtil.logMsg("name match: " + name); - } else { - TestUtil.logErr("name non-match: " + name); - pass = false; - } - if (element.namespace().equals(namespace)) { - TestUtil.logMsg("namespace match: " + namespace); - } else { - TestUtil.logErr("namespace non-match: " + namespace); - pass = false; - } - if (element.required() == required) { - TestUtil.logMsg("required match: " + required); - } else { - TestUtil.logErr("required non-match: " + required); - pass = false; - } - if (element.nillable() == nillable) { - TestUtil.logMsg("nillable match: " + nillable); - } else { - TestUtil.logErr("nillable non-match: " + nillable); - pass = false; - } - return pass; - } - - public static boolean verifyXmlType(XmlType type, String name, - String namespace) { - boolean pass = true; - - TestUtil.logMsg("Verify XmlType Params: " + type); - - if (type.name().equals(name)) { - TestUtil.logMsg("name match: " + name); - } else { - TestUtil.logErr("name non-match: " + name); - pass = false; - } - if (type.namespace().equals(namespace)) { - TestUtil.logMsg("namespace match: " + namespace); - } else { - TestUtil.logErr("namespace non-match: " + namespace); - pass = false; - } - return pass; - } - - public static Annotation getAnnotationOnClass(Class theClass, - Class theAnnotationClass) { - try { - Annotation a = theClass.getAnnotation(theAnnotationClass); - if (a != null) { - System.out.println("Annotation on class (" + theClass - + ") is present for annotation (" + a + ")"); - return a; - } else { - System.out.println("Annotation on class (" + theClass - + ") is not present for annotation " - + theAnnotationClass.getName()); - return a; - } - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - public static Annotation getAnnotationOnField(Class theClass, String theField, - Class theAnnotationClass) { - try { - Field f = theClass.getDeclaredField(theField); - Annotation a = f.getAnnotation(theAnnotationClass); - if (a != null) { - System.out.println("Annotation on field (" + theField - + ") is present for annotation (" + a + ")"); - return a; - } else { - System.out.println("Annotation on field (" + theField - + ") is not present for annotation " - + theAnnotationClass.getName()); - return a; - } - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - public static boolean isAnnotationOnFieldPresent(Class theClass, - String theField, Class theAnnotationClass) { - try { - Field f = theClass.getDeclaredField(theField); - Annotation a = f.getAnnotation(theAnnotationClass); - if (a != null) { - System.out.println("Annotation on field (" + theField - + ") is present for annotation (" + a + ")"); - return true; - } else { - System.out.println("Annotation on field (" + theField - + ") is not present for annotation " - + theAnnotationClass.getName()); - return false; - } - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - public static String getWsdlLocation(Class c) { - String wsdlLocation = null; - if (c.isAnnotationPresent(jakarta.jws.WebService.class)) { - WebService ws = (jakarta.jws.WebService) c - .getAnnotation(jakarta.jws.WebService.class); - wsdlLocation = ws.wsdlLocation(); - } - return wsdlLocation; - } - - public static boolean verifyWebServiceAnnotation(Class c, String name, - String targetNamespace, String serviceName, String wsdlLocation, - String endpointInterface) { - boolean result = true; - if (c.isAnnotationPresent(jakarta.jws.WebService.class)) { - WebService ws = (jakarta.jws.WebService) c - .getAnnotation(jakarta.jws.WebService.class); - if (ws != null) { - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(ws.toString()); - if (ws.name() != null) { - if (!ws.name().equals("")) { - if (!name.equals(ws.name())) { - result = false; - TestUtil.logErr("Error with name attribute:"); - TestUtil.logErr("Expected=" + name); - TestUtil.logErr("Actual=" + ws.name()); - } - } else { - TestUtil.logTrace("name attribute was empty"); - } - } - if (ws.targetNamespace() != null) { - if (!ws.targetNamespace().equals("")) { - if (!targetNamespace.equals(ws.targetNamespace())) { - result = false; - TestUtil.logErr("Error with targetNamespace attribute:"); - TestUtil.logErr("Expected=" + targetNamespace); - TestUtil.logErr("Actual=" + ws.targetNamespace()); - } - } else { - TestUtil.logTrace("targetNamespace attribute was empty"); - } - } - if (ws.serviceName() != null) { - if (!ws.serviceName().equals("")) { - if (!serviceName.equals(ws.serviceName())) { - result = false; - TestUtil.logErr("Error with serviceName attribute:"); - TestUtil.logErr("Expected=" + serviceName); - TestUtil.logErr("Actual=" + ws.serviceName()); - } - } else { - TestUtil.logTrace("serviceName attribute was empty"); - } - } - if (ws.wsdlLocation() != null) { - if (!ws.wsdlLocation().equals("")) { - if (ws.wsdlLocation().indexOf(wsdlLocation) == -1) { - result = false; - TestUtil.logErr("Error with wsdlLocation attribute:"); - TestUtil.logErr("Expected attribute to contain=" + wsdlLocation); - TestUtil.logErr("Actual=" + ws.wsdlLocation()); - } - } else { - TestUtil.logTrace("wsdlLocation attribute was empty"); - } - } - if (ws.endpointInterface() != null) { - if (!ws.endpointInterface().equals("")) { - if (!endpointInterface.equals(ws.endpointInterface())) { - result = false; - TestUtil.logErr("Error with endpointInterface attribute:"); - TestUtil.logErr("Expected=" + endpointInterface); - TestUtil.logErr("Actual=" + ws.endpointInterface()); - } - } else { - TestUtil.logTrace("endpointInterface attribute was empty"); - } - } - } else { - TestUtil.logErr("WebService annotation returned was null"); - result = false; - } - } else { - TestUtil.logErr("WebService annotation for the class not found"); - result = false; - } - return result; - } - - public static boolean verifySOAPBindingAnnotationPerMethod(Class c, - String methodName, String style, String use, String parameterStyle) { - boolean result = true; - Method method = getMethod(c, methodName); - if (method == null) { - TestUtil.logErr("Method name not found for -> " + methodName); - return false; - } else - TestUtil.logMsg("Method name found for -> " + methodName); - if (method.isAnnotationPresent(jakarta.jws.soap.SOAPBinding.class)) { - SOAPBinding sb = (jakarta.jws.soap.SOAPBinding) method - .getAnnotation(jakarta.jws.soap.SOAPBinding.class); - if (sb != null) { - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(sb.toString()); - if (sb.style().name() != null) { - if (!style.equals(sb.style().name())) { - result = false; - TestUtil.logErr("Error with style attribute:"); - TestUtil.logErr("Expected=" + style); - TestUtil.logErr("Actual=" + sb.style().name()); - } - } - if (sb.use().name() != null) { - if (!use.equals(sb.use().name())) { - result = false; - TestUtil.logErr("Error with use attribute:"); - TestUtil.logErr("Expected=" + use); - TestUtil.logErr("Actual=" + sb.use().name()); - } - } - if (sb.parameterStyle().name() != null) { - if (!parameterStyle.equals(sb.parameterStyle().name())) { - result = false; - TestUtil.logErr("Error with parameterStyle attribute:"); - TestUtil.logErr("Expected=" + parameterStyle); - TestUtil.logErr("Actual=" + sb.parameterStyle().name()); - } - } - } else { - TestUtil - .logErr("SOAPBinding annotation for the method returned was null"); - result = false; - } - } else { - TestUtil.logMsg("SOAPBinding annotation for the method not found"); - TestUtil.logMsg("Verify SOAPBinding annotation at the class level ..."); - result = verifySOAPBindingAnnotation(c, style, use, parameterStyle); - if (!result) { - TestUtil.logMsg( - "The operation must have the defaults DOCUMENT/LITERAL/WRAPPED ..."); - if (style.equals("DOCUMENT") && use.equals("LITERAL") - && parameterStyle.equals("WRAPPED")) { - result = true; - TestUtil.logMsg( - "Operation name -> " + methodName + " is the default case"); - } - } - } - return result; - } - - public static boolean verifySOAPBindingAnnotation(Class c, String style, - String use, String parameterStyle) { - boolean result = true; - if (c.isAnnotationPresent(jakarta.jws.soap.SOAPBinding.class)) { - SOAPBinding sb = (jakarta.jws.soap.SOAPBinding) c - .getAnnotation(jakarta.jws.soap.SOAPBinding.class); - if (sb != null) { - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(sb.toString()); - if (sb.style().name() != null) { - if (!style.equals(sb.style().name())) { - result = false; - TestUtil.logErr("Error with style attribute:"); - TestUtil.logErr("Expected=" + style); - TestUtil.logErr("Actual=" + sb.style().name()); - } - } - if (sb.use().name() != null) { - if (!use.equals(sb.use().name())) { - result = false; - TestUtil.logErr("Error with use attribute:"); - TestUtil.logErr("Expected=" + use); - TestUtil.logErr("Actual=" + sb.use().name()); - } - } - if (sb.parameterStyle().name() != null) { - if (!parameterStyle.equals(sb.parameterStyle().name())) { - result = false; - TestUtil.logErr("Error with parameterStyle attribute:"); - TestUtil.logErr("Expected=" + parameterStyle); - TestUtil.logErr("Actual=" + sb.parameterStyle().name()); - } - } - } else { - TestUtil.logErr("SOAPBinding annotation returned was null"); - result = false; - } - } else { - TestUtil.logMsg("SOAPBinding annotation for the class not found"); - result = false; - } - return result; - } - - public static boolean verifySOAPBindingAnnotation(Class c, String methodName, - String style, String use, String parameterStyle) { - boolean result = true; - Method method = getMethod(c, methodName); - if (method == null) { - TestUtil.logErr("Method name not found for -> " + methodName); - return false; - } - - if (method.isAnnotationPresent(jakarta.jws.soap.SOAPBinding.class)) { - SOAPBinding sb = method.getAnnotation(jakarta.jws.soap.SOAPBinding.class); - if (sb != null) { - TestUtil.logMsg("Annotation:"); - TestUtil.logMsg(sb.toString()); - - if (sb.style().name() != null) { - if (!style.equals(sb.style().name())) { - result = false; - TestUtil.logErr("Error with style attribute:"); - TestUtil.logErr("Expected=" + style); - TestUtil.logErr("Actual=" + sb.style().name()); - } - } - if (sb.use().name() != null) { - if (!use.equals(sb.use().name())) { - result = false; - TestUtil.logErr("Error with use attribute:"); - TestUtil.logErr("Expected=" + use); - TestUtil.logErr("Actual=" + sb.use().name()); - } - } - if (sb.parameterStyle().name() != null) { - if (!parameterStyle.equals(sb.parameterStyle().name())) { - result = false; - TestUtil.logErr("Error with parameterStyle attribute:"); - TestUtil.logErr("Expected=" + parameterStyle); - TestUtil.logErr("Actual=" + sb.parameterStyle().name()); - } - } - } else { - result = false; - TestUtil - .logErr("The SOAPBinding annotation returned was null for method" - + methodName); - } - } else { - result = false; - TestUtil.logErr("SOAPBinding annotation not found"); - } - return result; - } - - public static boolean verifyOnewayAnnotation(Class c, String methodName) { - boolean result = true; - Method method = getMethod(c, methodName); - if (method == null) { - TestUtil.logErr("Method name not found for -> " + methodName); - return false; - } - if (methodName.equals(method.getName())) { - if (!method.isAnnotationPresent(jakarta.jws.Oneway.class)) { - result = false; - TestUtil.logErr("The Oneway annotation was not present"); - } - } - return result; - } - - public static boolean verifyWebResultAnnotation(Class c, String methodName, - String name, String targetNamespace) { - boolean result = true; - Method method = getMethod(c, methodName); - if (method == null) { - TestUtil.logErr("Method name not found for -> " + methodName); - return false; - } - if (methodName.equals(method.getName())) { - if (method.isAnnotationPresent(jakarta.jws.WebResult.class)) { - WebResult wr = method.getAnnotation(jakarta.jws.WebResult.class); - if (wr != null) { - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(wr.toString()); - if (wr.name() != null) { - if (!name.equals(wr.name())) { - result = false; - TestUtil.logErr("Error with name attribute:"); - TestUtil.logErr("Expected=" + name); - TestUtil.logErr("Actual=" + wr.name()); - } - } - if (wr.targetNamespace() != null) { - if (!wr.targetNamespace().equals("")) { - if (!targetNamespace.equals(wr.targetNamespace())) { - result = false; - TestUtil.logErr("Error with targetNamespace attribute:"); - TestUtil.logErr("Expected=" + targetNamespace); - TestUtil.logErr("Actual=" + wr.targetNamespace()); - } - } else { - TestUtil.logTrace("targetNamespace attribute was empty"); - } - } - } else { - result = false; - TestUtil.logErr("WebResult annotation returned was null"); - } - } else { - result = false; - TestUtil.logErr("WebResult annotation not found"); - } - } - return result; - } - - public static boolean verifyWebParamAnnotation(Class c, int paramIndex, - String methodName, String name, String targetNamespace, String mode, - boolean header) { - boolean result = true; - Method method = getMethod(c, methodName); - if (method == null) { - TestUtil.logErr("Method name not found for -> " + methodName); - return false; - } - if (methodName.equals(method.getName())) { - Annotation[][] aArray = method.getParameterAnnotations(); - for (int j = 0; j < aArray[paramIndex].length; j++) { - Annotation annotation = aArray[paramIndex][j]; - if (annotation instanceof jakarta.jws.WebParam) { - WebParam wp = (WebParam) annotation; - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(wp.toString()); - if (wp.name() != null) { - if (!wp.name().equals("")) { - if (!name.equals(wp.name())) { - result = false; - TestUtil.logErr("Error with name attribute:"); - TestUtil.logErr("Expected=" + name); - TestUtil.logErr("Actual=" + wp.name()); - } - } else { - TestUtil.logTrace("name attribute was empty"); - } - } - if (wp.targetNamespace() != null) { - if (!wp.targetNamespace().equals("")) { - if (!targetNamespace.equals(wp.targetNamespace())) { - result = false; - TestUtil.logErr("Error with targetNamespace attribute:"); - TestUtil.logErr("Expected=" + targetNamespace); - TestUtil.logErr("Actual=" + wp.targetNamespace()); - } - } else { - TestUtil.logTrace("targetNamespace attribute was empty"); - } - } - if (wp.mode() != null) { - if (!mode.equals(wp.mode().name())) { - result = false; - TestUtil.logErr("Error with mode attribute:"); - TestUtil.logErr("Expected=" + mode); - TestUtil.logErr("Actual=" + wp.mode()); - } - } - if (header != wp.header()) { - result = false; - TestUtil.logErr("Error with header attribute:"); - TestUtil.logErr("Expected=" + header); - TestUtil.logErr("Actual=" + wp.header()); - } - } else { - result = false; - TestUtil.logErr("WebParam annotation not found"); - } - } - } - return result; - } - - public static boolean verifyWebMethodAnnotation(Class c, String methodName, - String operationName, String action) { - boolean result = true; - Method method = getMethod(c, methodName); - if (method == null) { - TestUtil.logErr("Method name not found for -> " + methodName); - return false; - } - if (methodName.equals(method.getName())) { - if (method.isAnnotationPresent(jakarta.jws.WebMethod.class)) { - WebMethod wm = method.getAnnotation(jakarta.jws.WebMethod.class); - if (wm != null) { - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(wm.toString()); - if (wm.operationName() != null) { - if (!wm.operationName().equals("")) { - if (!operationName.equals(wm.operationName())) { - result = false; - TestUtil.logErr("Error with operationName attribute:"); - TestUtil.logErr("Expected=" + operationName); - TestUtil.logErr("Actual=" + wm.operationName()); - } - } else { - TestUtil.logTrace("operationName attribute was empty"); - } - } - if (wm.action() != null) { - if (!wm.action().equals("")) { - if (!action.equals(wm.action())) { - result = false; - TestUtil.logErr("Error with action attribute:"); - TestUtil.logErr("Expected=" + action); - TestUtil.logErr("Actual=" + wm.action()); - } - } else { - TestUtil.logTrace("action attribute was empty"); - } - } - } else { - result = false; - TestUtil.logErr("WebMethod annotation returned was null"); - } - } else { - result = false; - TestUtil.logErr("WebMethod annotation not found"); - } - } - return result; - } - - public static boolean verifyWebFaultAnnotation(Class c, String name, - String targetNamespace, String faultBean) { - boolean result = true; - if (c.isAnnotationPresent(jakarta.xml.ws.WebFault.class)) { - WebFault wf = (jakarta.xml.ws.WebFault) c - .getAnnotation(jakarta.xml.ws.WebFault.class); - if (wf != null) { - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(wf.toString()); - if (wf.name() != null) { - if (!wf.name().equals("")) { - if (!name.equals(wf.name())) { - result = false; - TestUtil.logErr("Error with name attribute:"); - TestUtil.logErr("Expected=" + name); - TestUtil.logErr("Actual=" + wf.name()); - } - } else { - TestUtil.logTrace("name attribute was empty"); - } - } - if (wf.targetNamespace() != null) { - if (!wf.targetNamespace().equals("")) { - if (!targetNamespace.equals(wf.targetNamespace())) { - result = false; - TestUtil.logErr("Error with targetNamespace attribute:"); - TestUtil.logErr("Expected=" + targetNamespace); - TestUtil.logErr("Actual=" + wf.targetNamespace()); - } - } else { - TestUtil.logTrace("targetNamespace attribute was empty"); - } - } - if (wf.faultBean() != null) { - if (!wf.faultBean().equals("")) { - if (!faultBean.equals(wf.faultBean())) { - result = false; - TestUtil.logErr("Error with faultBean attribute:"); - TestUtil.logErr("Expected=" + faultBean); - TestUtil.logErr("Actual=" + wf.faultBean()); - } - } else { - TestUtil.logTrace("faultBean attribute was empty"); - } - } - } else { - result = false; - TestUtil.logErr("WebFault annotation returned was null"); - } - } else { - result = false; - TestUtil.logErr("WebFault annotation for the class not found"); - } - return result; - } - - public static boolean verifyRequestWrapperAnnotation(Class c, - String methodName, String localName, String targetNamespace, - String className) { - boolean result = true; - Method method = getMethod(c, methodName); - if (method == null) { - TestUtil.logErr("Method name not found for -> " + methodName); - return false; - } - if (method.isAnnotationPresent(jakarta.xml.ws.RequestWrapper.class)) { - jakarta.xml.ws.RequestWrapper rw = (jakarta.xml.ws.RequestWrapper) method - .getAnnotation(jakarta.xml.ws.RequestWrapper.class); - if (rw != null) { - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(rw.toString()); - if (rw.localName() != null) { - if (!rw.localName().equals("")) { - if (!localName.equals(rw.localName())) { - result = false; - TestUtil.logErr("Error with localName attribute:"); - TestUtil.logErr("Expected=" + localName); - TestUtil.logErr("Actual=" + rw.localName()); - } - } else { - TestUtil.logTrace("localName attribute was empty"); - } - } - if (rw.targetNamespace() != null) { - if (!rw.targetNamespace().equals("")) { - if (!targetNamespace.equals(rw.targetNamespace())) { - result = false; - TestUtil.logErr("Error with targetNamespace attribute:"); - TestUtil.logErr("Expected=" + targetNamespace); - TestUtil.logErr("Actual=" + rw.targetNamespace()); - } - } else { - TestUtil.logTrace("targetNamespace attribute was empty"); - } - } - if (rw.className() != null) { - if (!rw.className().equals("")) { - if (!className.equals(rw.className())) { - result = false; - TestUtil.logErr("Error with className attribute:"); - TestUtil.logErr("Expected=" + className); - TestUtil.logErr("Actual=" + rw.className()); - } - } else { - TestUtil.logTrace("className attribute was empty"); - } - } - } else { - TestUtil.logErr("RequestWrapper annotation returned was null"); - result = false; - } - } else { - TestUtil.logErr("RequestWrapper annotation for the class not found"); - result = false; - } - return result; - } - - public static boolean verifyResponseWrapperAnnotation(Class c, - String methodName, String localName, String targetNamespace, - String className) { - boolean result = true; - Method method = getMethod(c, methodName); - if (method == null) { - TestUtil.logErr("Method name not found for -> " + methodName); - return false; - } - if (method.isAnnotationPresent(jakarta.xml.ws.ResponseWrapper.class)) { - jakarta.xml.ws.ResponseWrapper rw = (jakarta.xml.ws.ResponseWrapper) method - .getAnnotation(jakarta.xml.ws.ResponseWrapper.class); - if (rw != null) { - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(rw.toString()); - if (rw.localName() != null) { - if (!rw.localName().equals("")) { - if (!localName.equals(rw.localName())) { - result = false; - TestUtil.logErr("Error with localName attribute:"); - TestUtil.logErr("Expected=" + localName); - TestUtil.logErr("Actual=" + rw.localName()); - } - } else { - TestUtil.logTrace("localName attribute was empty"); - } - } - if (rw.targetNamespace() != null) { - if (!rw.targetNamespace().equals("")) { - if (!targetNamespace.equals(rw.targetNamespace())) { - result = false; - TestUtil.logErr("Error with targetNamespace attribute:"); - TestUtil.logErr("Expected=" + targetNamespace); - TestUtil.logErr("Actual=" + rw.targetNamespace()); - } - } else { - TestUtil.logTrace("targetNamespace attribute was empty"); - } - } - if (rw.className() != null) { - if (!rw.className().equals("")) { - if (!className.equals(rw.className())) { - result = false; - TestUtil.logErr("Error with className attribute:"); - TestUtil.logErr("Expected=" + className); - TestUtil.logErr("Actual=" + rw.className()); - } - } else { - TestUtil.logTrace("className attribute was empty"); - } - } - } else { - TestUtil.logErr("ResponseWrapper annotation returned was null"); - result = false; - } - } else { - TestUtil.logErr("ResponseWrapper annotation for the class not found"); - result = false; - } - return result; - } - - public static boolean verifyWebServiceClientAnnotation(Class c, String name, - String targetNamespace, String wsdlLocation) { - boolean result = true; - if (c.isAnnotationPresent(jakarta.xml.ws.WebServiceClient.class)) { - WebServiceClient wsc = (jakarta.xml.ws.WebServiceClient) c - .getAnnotation(jakarta.xml.ws.WebServiceClient.class); - if (wsc != null) { - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(wsc.toString()); - if (wsc.name() != null) { - if (!wsc.name().equals("")) { - if (!name.equals(wsc.name())) { - result = false; - TestUtil.logErr("Error with name attribute:"); - TestUtil.logErr("Expected=" + name); - TestUtil.logErr("Actual=" + wsc.name()); - } - } else { - TestUtil.logTrace("name attribute was empty"); - } - } - if (wsc.targetNamespace() != null) { - if (!wsc.targetNamespace().equals("")) { - if (!targetNamespace.equals(wsc.targetNamespace())) { - result = false; - TestUtil.logErr("Error with targetNamespace attribute:"); - TestUtil.logErr("Expected=" + targetNamespace); - TestUtil.logErr("Actual=" + wsc.targetNamespace()); - } - } else { - TestUtil.logTrace("targetNamespace attribute was empty"); - } - } - if (wsc.wsdlLocation() != null) { - if (!wsc.wsdlLocation().equals("")) { - if (wsc.wsdlLocation().indexOf(wsdlLocation) == -1) { - result = false; - TestUtil.logErr("Error with wsdlLocation attribute:"); - TestUtil.logErr("Expected attribute to contain=" + wsdlLocation); - TestUtil.logErr("Actual=" + wsc.wsdlLocation()); - } - } else { - TestUtil.logTrace("wsdlLocation attribute was empty"); - } - } - } else { - TestUtil.logErr("WebServiceClient annotation returned was null"); - result = false; - } - } else { - TestUtil.logErr("WebServiceClient annotation for the class not found"); - result = false; - } - return result; - } - - public static boolean verifyWebEndpointAnnotation(Class c, String methodName, - String name) { - boolean result = true; - Method method = getMethod(c, methodName); - if (method == null) { - TestUtil.logErr("Method name not found for -> " + methodName); - return false; - } - if (methodName.equals(method.getName())) { - if (method.isAnnotationPresent(jakarta.xml.ws.WebEndpoint.class)) { - WebEndpoint wep = method.getAnnotation(jakarta.xml.ws.WebEndpoint.class); - if (wep != null) { - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(wep.toString()); - if (wep.name() != null) { - if (!name.equals(wep.name())) { - result = false; - TestUtil.logErr("Error with name attribute:"); - TestUtil.logErr("Expected=" + name); - TestUtil.logErr("Actual=" + wep.name()); - } - } - } else { - result = false; - TestUtil.logErr("WebEndpoint annotation returned was null"); - } - } else { - result = false; - TestUtil.logErr("WebEndpoint annotation not found"); - } - } - return result; - } - - public static boolean verifyHandlerChainAnnotation(Class c, String file) { - boolean result = true; - if (c.isAnnotationPresent(jakarta.jws.HandlerChain.class)) { - HandlerChain hc = (jakarta.jws.HandlerChain) c - .getAnnotation(jakarta.jws.HandlerChain.class); - if (hc != null) { - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(hc.toString()); - if (hc.file() != null) { - if (file != null) { - if (!hc.file().equals(file)) { - result = false; - TestUtil.logErr("Error with file attribute:"); - TestUtil.logErr("Expected=" + file); - TestUtil.logErr("Actual=" + hc.file()); - } - } else { - if (hc.file().equals("")) { - result = false; - TestUtil.logErr("Error with file attribute:"); - TestUtil.logErr( - "An empty string was returned and it should not be empty"); - } - } - } else { - TestUtil.logTrace("file attribute returned a null"); - } - } else { - TestUtil.logErr("HandlerChain annotation returned was null"); - result = false; - } - } else { - TestUtil.logErr("HandlerChain annotation for the class not found"); - result = false; - } - return result; - } - - public static boolean verifyActionFaultActionAnnotation(Class c, - String methodName, boolean shouldExist, String inputName, - String outputName, String[][] faultArray) { - boolean result = true; - Method method = getMethod(c, methodName); - if (method == null) { - TestUtil.logErr("Method name not found for -> " + methodName); - return false; - } - if (methodName.equals(method.getName())) { - if (method.isAnnotationPresent(jakarta.xml.ws.Action.class)) { - if (shouldExist) { - Action action = method.getAnnotation(jakarta.xml.ws.Action.class); - if (action != null) { - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(action.toString()); - if (inputName != null) { - if (!action.input().equals("")) { - if (!inputName.equals(action.input())) { - result = false; - TestUtil.logErr("Error with input attribute:"); - TestUtil.logErr("Expected=" + inputName); - TestUtil.logErr("Actual=" + action.input()); - } - } else { - TestUtil.logTrace("input attribute was empty"); - } - } - if (outputName != null) { - if (!action.output().equals("")) { - if (!outputName.equals(action.output())) { - result = false; - TestUtil.logErr("Error with output attribute:"); - TestUtil.logErr("Expected=" + outputName); - TestUtil.logErr("Actual=" + action.output()); - } - } else { - TestUtil.logTrace("output attribute was empty"); - } - } - if (faultArray.length != 0) { - if (!verifyFaultActionAnnotation(action.fault(), faultArray)) { - result = false; - } - } - } else { - result = false; - TestUtil.logErr("Action annotation returned was null"); - } - } else { - result = false; - TestUtil.logErr( - "Action annotation should not exist but was found for method:" - + methodName); - } - } else { - if (shouldExist) { - result = false; - TestUtil.logErr( - "Action annotation should exist but was not found for method:" - + methodName); - } else { - TestUtil.logTrace( - "Action annotation should not exist and was not found for method:" - + methodName); - } - } - } - return result; - } - - private static boolean verifyFaultActionAnnotation(FaultAction[] faArray, - String[][] faultArray) { - boolean result = true; - if (faArray != null) { - if (faArray.length != 0) { - if (faArray.length == (faultArray.length)) { - for (int i = 0; i < faArray.length; i++) { - FaultAction fAction = faArray[i]; - TestUtil.logTrace("Annotation:"); - TestUtil.logTrace(fAction.toString()); - if (fAction.className() != null) { - String className = fAction.className().getName(); - TestUtil.logTrace("className attribute=" + className); - boolean found = false; - for (int j = 0; j < faultArray.length; j++) { - if (faultArray[j][0].equals(className)) { - found = true; - TestUtil.logTrace("className found:" + className); - if (!fAction.value().equals("")) { - if (!faultArray[j][1].equals(fAction.value())) { - result = false; - TestUtil.logErr("Error with value attribute:"); - TestUtil.logErr("Expected=" + faultArray[j][1]); - TestUtil.logErr("Actual=" + fAction.value()); - } else { - TestUtil.logTrace("value passed"); - } - } else { - TestUtil.logTrace("value attribute was empty"); - } - } - } - if (!found) { - result = false; - TestUtil.logErr("The className:" + className - + " was not found in the list of expected values"); - } - } else { - TestUtil.logTrace("className attribute was null"); - } - } - } else { - result = false; - TestUtil.logErr("Error with number of FaultAction annotations:"); - TestUtil.logErr("Expected=" + faultArray.length); - TestUtil.logErr("Actual=" + faArray.length); - } - } else { - result = false; - TestUtil.logErr("Error with number of FaultAction annotations:"); - TestUtil.logErr("Expected=" + faultArray.length); - TestUtil.logErr("Actual=" + faArray.length); - } - } else { - result = false; - TestUtil.logErr("FaultAction was null"); - } - return result; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/AttachmentHelper.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/AttachmentHelper.java deleted file mode 100644 index b64407e36a..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/AttachmentHelper.java +++ /dev/null @@ -1,674 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.awt.*; -import java.util.*; -import java.io.*; -import java.net.URL; -import java.awt.image.*; -import jakarta.xml.soap.AttachmentPart; -import javax.xml.transform.stream.StreamSource; -import javax.xml.transform.dom.DOMResult; -import jakarta.activation.DataHandler; -import javax.xml.transform.Source; - -public class AttachmentHelper { - public static Iterator getAttachments(Iterator iter) { - while (iter.hasNext()) { - Object obj = iter.next(); - if (!(obj instanceof AttachmentPart)) { - return null; - } - } - return iter; - } - - public static AttachmentPart getAttachment(java.net.URI ref, Iterator iter) { - if (iter == null || ref == null) { - System.out.println("null Iterator for AttachmentPart"); - return null; - } - while (iter.hasNext()) { - AttachmentPart tempAttachment = (AttachmentPart) iter.next(); - if (ref.isOpaque() && ref.getScheme().equals("cid")) { - String refId = ref.getSchemeSpecificPart(); - String cId = tempAttachment.getContentId(); - if (cId.equals("<" + refId + ">") || cId.equals(refId)) { - return tempAttachment; - } - } - } - return null; - } - - public static boolean compareStreamSource(StreamSource src1, - StreamSource src2, int length) throws Exception { - if (src1 == null || src2 == null) { - System.out.println("compareStreamSource - src1 or src2 null!"); - return false; - } - String in = getStringFromStreamSource(src1, length); - String out = getStringFromStreamSource(src2, length); - if (in == null) { - System.out.println("src1 is null"); - return false; - } - if (out == null) { - System.out.println("src2 is null"); - return false; - } - return in.equals(out); - } - - private static String getStringFromStreamSource(StreamSource src, int length) - throws Exception { - byte buf[] = null; - if (src == null) - return null; - InputStream is = src.getInputStream(); - if (is != null) { - buf = new byte[length]; - int count = readTheData(is, buf, length); - System.out.println("From inputstream: " + new String(buf, 0, count)); - return new String(buf, 0, count); - } else { - char buf1[] = new char[length]; - Reader r = src.getReader(); - if (r == null) - return null; - r.reset(); - int count = readTheData(r, buf1, length); - System.out.println("From Reader: " + new String(buf1, 0, count)); - return new String(buf1, 0, count); - } - } - - public static boolean compareImages(Image image1, Image image2) - throws IOException { - if (image1 == null || image2 == null) - return false; - - boolean matched = false; - BufferedImage bi = convertToBufferedImage(image1); - Rectangle rect = new Rectangle(0, 0, bi.getWidth(), bi.getHeight()); - Iterator iter1 = handlePixels(image1, rect); - Iterator iter2 = handlePixels(image2, rect); - - while (iter1.hasNext() && iter2.hasNext()) { - Pixel pixel = (Pixel) iter1.next(); - if (pixel.equals((Pixel) iter2.next())) { - matched = true; - } else { - matched = false; - } - } - if (matched) - return true; - return false; - } - - public static boolean compareImages(Image image1, Image image2, - Rectangle rect, String attach) { - boolean matched = compareImages(image1, image2, rect); - if (matched) - TestUtil.logMsg(attach + " image content is equal in attachment"); - else - TestUtil.logErr(attach + " image content is not equal in attachment"); - return matched; - } - - public static boolean compareImages(Image image1, Image image2, - Rectangle rect) { - if (image1 == null || image2 == null) - return false; - - boolean matched = false; - - Iterator iter1 = handlePixels(image1, rect); - Iterator iter2 = handlePixels(image2, rect); - - while (iter1.hasNext() && iter2.hasNext()) { - Pixel pixel = (Pixel) iter1.next(); - if (pixel.equals((Pixel) iter2.next())) { - matched = true; - } else { - matched = false; - } - } - if (matched) - return true; - return false; - } - - public static Iterator handlePixels(Image img, Rectangle rect) { - int x = rect.x; - int y = rect.y; - int w = rect.width; - int h = rect.height; - - int[] pixels = new int[w * h]; - PixelGrabber pg = new PixelGrabber(img, x, y, w, h, pixels, 0, w); - try { - pg.grabPixels(); - } catch (InterruptedException e) { - System.err.println("interrupted waiting for pixels!"); - return null; - } - if ((pg.getStatus() & ImageObserver.ABORT) != 0) { - System.err.println("image fetch aborted or errored"); - return null; - } - // System.out.println("handlePixels: x="+x+", y="+y+", width="+w+", - // height="+h); - ArrayList tmpList = new ArrayList(); - for (int j = 0; j < h; j++) { - for (int i = 0; i < w; i++) { - tmpList.add(handleSinglePixel(x + i, y + j, pixels[j * w + i])); - } - } - return tmpList.iterator(); - } - - private static Pixel handleSinglePixel(int x, int y, int pixel) { - int alpha = (pixel >> 24) & 0xff; - int red = (pixel >> 16) & 0xff; - int green = (pixel >> 8) & 0xff; - int blue = (pixel) & 0xff; - return new Pixel(alpha, red, green, blue); - } - - private static class Pixel { - private int a; - - private int r; - - private int g; - - private int b; - - Pixel(int a, int r, int g, int b) { - this.a = a; - this.r = r; - this.g = g; - this.b = b; - } - - protected boolean equals(Pixel p) { - if (p.a == a && p.r == r && p.g == g && p.b == b) - return true; - return false; - } - } - - private static BufferedImage convertToBufferedImage(Image image) - throws IOException { - if (image instanceof BufferedImage) { - return (BufferedImage) image; - - } else { - MediaTracker tracker = new MediaTracker( - null/* not sure how this is used */); - tracker.addImage(image, 0); - try { - tracker.waitForAll(); - } catch (InterruptedException e) { - throw new IOException(e.getMessage()); - } - BufferedImage bufImage = new BufferedImage(image.getWidth(null), - image.getHeight(null), BufferedImage.TYPE_INT_RGB); - - Graphics g = bufImage.createGraphics(); - g.drawImage(image, 0, 0, null); - return bufImage; - } - } - - public static Image getImageDoc(URL url) throws Exception { - System.out.println("getImageDoc: url=" + url); - Image image = null; - try { - System.out.println("Attempting to load image via URL ..."); - image = javax.imageio.ImageIO.read(url); - System.out.println("Complete loading image via URL ..."); - } catch (Exception e) { - System.out.println( - "Failed loading image via URL with exception: " + e.getMessage()); - System.out.println( - "Attempting to load image as a resource via ClassLoader ..."); - String file = url.getFile(); - file = file.substring(file.lastIndexOf("/") + 1); - System.out.println("file=" + file); - InputStream is = Thread.currentThread().getContextClassLoader() - .getResourceAsStream(file); - System.out.println("is=" + is); - image = javax.imageio.ImageIO.read(is); - is.close(); - } - return image; - } - - public static String getStringDoc(URL url) throws Exception { - System.out.println("getStringDoc: url=" + url); - String string = null; - try { - System.out.println("Attempting to load URL as String object ..."); - DataHandler dh = new DataHandler(url); - InputStream is = dh.getInputStream(); - ByteArrayOutputStream baos = readTheData(is); - string = new String(baos.toByteArray()); - baos.close(); - System.out.println("Complete loading URL as a String object ..."); - } catch (Exception e) { - System.out - .println("Failed loading URL as a String object with exception: " - + e.getMessage()); - System.out.println( - "Attempting to load resource via ClassLoader as String object ..."); - String file = url.getFile(); - file = file.substring(file.lastIndexOf("/") + 1); - System.out.println("file=" + file); - InputStream is = Thread.currentThread().getContextClassLoader() - .getResourceAsStream(file); - System.out.println("is=" + is); - ByteArrayOutputStream baos = readTheData(is); - string = new String(baos.toByteArray()); - is.close(); - baos.close(); - } - return string; - } - - public static StreamSource getSourceDoc(URL url) throws Exception { - System.out.println("getSourceDoc: url=" + url); - StreamSource streamSource = null; - try { - System.out.println("Attempting to load URL as StreamSource object ..."); - DataHandler dh = new DataHandler(url); - streamSource = new StreamSource(dh.getInputStream()); - System.out.println("Complete loading URL as a StreamSource object ..."); - } catch (Exception e) { - System.out.println( - "Failed loading URL as a StreamSource object with exception: " - + e.getMessage()); - System.out.println( - "Attempting to load resource via ClassLoader as StreamSource object ..."); - String file = url.getFile(); - file = file.substring(file.lastIndexOf("/") + 1); - System.out.println("file=" + file); - InputStream is = Thread.currentThread().getContextClassLoader() - .getResourceAsStream(file); - System.out.println("is=" + is); - streamSource = new StreamSource(is); - } - return streamSource; - } - - public static DataHandler getDataHandlerDoc(URL url) throws Exception { - System.out.println("getDataHandlerDoc: url=" + url); - DataHandler dh = null; - try { - System.out.println("Attempting to load URL as DataHandler object ..."); - dh = new DataHandler(url); - System.out.println("Complete loading URL as a DataHandler object ..."); - } catch (Exception e) { - System.out - .println("Failed loading URL as a DataHandler object with exception: " - + e.getMessage()); - System.out.println( - "Attempting to load resource via ClassLoader as DataHandler object ..."); - String file = url.getFile(); - file = file.substring(file.lastIndexOf("/") + 1); - System.out.println("file=" + file); - dh = new DataHandler( - Thread.currentThread().getContextClassLoader().getResource(file)); - System.out.println("is=" + dh.getInputStream()); - } - return dh; - } - - public static String validateAttachmentData(String expectedDoc, - String actualDoc, String whichAttachment) { - String result = null; - TestUtil.logMsg( - "Verifying data of attachment matches: [" + whichAttachment + "]"); - if (actualDoc != null) { - if (!actualDoc.equals(expectedDoc)) { - TestUtil.logMsg("Verification failed"); - result = "FAILURE: " + whichAttachment - + " String documents did not compare correctly"; - System.out.println("========================"); - System.out.println(whichAttachment + " comparison failed"); - System.out.println("expected:"); - System.out.println("------------------------"); - System.out.println(expectedDoc); - System.out.println("------------------------"); - System.out.println("actual:"); - System.out.println("------------------------"); - System.out.println(actualDoc); - System.out.println("------------------------"); - } - } else { - TestUtil.logMsg("Verification failed"); - result = "FAILURE: " + whichAttachment - + " actual String document was null"; - } - if (result == null) - TestUtil.logMsg("Verification passed"); - if (result != null) - result += "\n"; - return result; - } - - public static String validateAttachmentData(DataHandler expectedDoc, - DataHandler actualDoc, String whichAttachment) throws Exception { - InputStream is = expectedDoc.getInputStream(); - ByteArrayOutputStream baos = readTheData(is); - String strExpected = new String(baos.toByteArray()); - baos.close(); - is = actualDoc.getInputStream(); - baos = readTheData(is); - String strActual = new String(baos.toByteArray()); - baos.close(); - String result = validateAttachmentData(strExpected, strActual, - whichAttachment); - return result; - } - - public static String validateAttachmentData(Source expectedDoc, - Source actualDoc, String whichAttachment) throws Exception { - StringBuffer result = new StringBuffer(); - boolean debug = false; - ArrayList alExpected = null; - ArrayList alActual = null; - TestUtil.logMsg( - "Verifying data of attachment matches: [" + whichAttachment + "]"); - if (actualDoc != null) { - try { - TestUtil.logMsg("Transform actual XML document to a DOMResult"); - DOMResult dr = JAXWS_Util.getSourceAsDOMResult(actualDoc); - XMLUtils.startCapturedResults(); - XMLUtils.xmlDumpDOMNodes(dr.getNode()); - alActual = XMLUtils.getCapturedResults(); - XMLUtils.stopCapturedResults(); - } catch (Exception e) { - TestUtil.logMsg("Transform failed with exception: " + e.getMessage()); - result.append("FAILURE: " + whichAttachment - + " actual XML document was malformed (unexpected)"); - } - } else { - result.append( - "FAILURE: " + whichAttachment + " actual XML document was null"); - } - if (expectedDoc != null) { - if (result.length() == 0) { - try { - TestUtil.logMsg("Transform expected XML document to a DOMResult"); - DOMResult dr = JAXWS_Util.getSourceAsDOMResult(expectedDoc); - XMLUtils.startCapturedResults(); - XMLUtils.xmlDumpDOMNodes(dr.getNode()); - alExpected = XMLUtils.getCapturedResults(); - XMLUtils.stopCapturedResults(); - } catch (Exception e) { - TestUtil.logMsg("Transform failed with exception: " + e.getMessage()); - result.append("FAILURE: " + whichAttachment - + " expected XML document was malformed (unexpected)"); - } - } - } else { - result.append( - "FAILURE: " + whichAttachment + " expected XML document was null"); - } - if ((alActual != null) && (alExpected != null)) { - TestUtil - .logMsg("Verifying that all expected xml items are in the actual"); - - for (int i = 0; i < alExpected.size(); i++) { - int index = alActual.indexOf(alExpected.get(i)); - if (index == -1) { - result.append("Did not find expected value:" + alExpected.get(i) - + " in actual result "); - } - } - TestUtil - .logMsg("Verifying that all actual xml items are in the expected"); - for (int i = 0; i < alActual.size(); i++) { - int index = alExpected.indexOf(alActual.get(i)); - if (index == -1) { - result.append("Did not find actual value:" + alActual.get(i) - + " in expected result "); - } - } - } else { - if (result.length() == 0) - result - .append("Either the Actual or Expected results returned was null"); - } - if (result.length() > 0) { - TestUtil.logMsg("Verification failed"); - TestUtil.logMsg(result.toString()); - result.append("\n"); - return result.toString(); - } else - TestUtil.logMsg("Verification passed"); - return null; - } - - public static boolean validateAttachmentData(int count1, byte[] data1, - int count2, byte[] data2, String whichAttachment) { - int max = 0; - boolean debug = false; - TestUtil.logMsg( - "Verifying data of attachment matches: [" + whichAttachment + "]"); - if (debug) { - String str1 = new String(data1, 0, count1); - String str2 = new String(data2, 0, count2); - TestUtil.logMsg("validateAttachmentData: data1=" + str1); - TestUtil.logMsg("validateAttachmentData: data2=" + str2); - } - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos); - if (count2 > count1) { - TestUtil.logMsg( - "Data counts are different so check for and remove any trailing CR's"); - TestUtil.logMsg("Data count1=" + count1 + ", Data count2=" + count2); - for (int i = count1; i < count2; i++) { - if ((char) data2[i] != '\r') - break; - } - TestUtil - .logMsg("Removed " + (count2 - count1) + " trailing CR's from data2"); - count2 = count1; - } - if (count1 != count2) { - TestUtil.logErr( - whichAttachment + " data count is not equal in request and response"); - TestUtil.logErr("Request data count = " + count1); - TestUtil.logErr("Response data count = " + count2); - if (count2 > count1) - max = count1; - else - max = count2; - ps.printf("data1[%d]=0x%x data2[%d]=0x%x", max - 1, data1[max - 1], - max - 1, data2[max - 1]); - TestUtil.logErr(baos.toString()); - baos.reset(); - if (count2 > count1) { - for (int i = count1; i < count2; i++) { - ps.printf("Extra data was: data2[%d]=0x%x|0%o", i, data2[i], - data2[i]); - TestUtil.logErr(baos.toString()); - baos.reset(); - } - } else { - for (int i = count2; i < count1; i++) { - ps.printf("Extra data was: data1[%d]=0x%x|0%o", i, data1[i], - data1[i]); - TestUtil.logErr(baos.toString()); - baos.reset(); - } - } - TestUtil.logMsg("Verification failed"); - return false; - } - for (int i = 0; i < count1; i++) { - if (data1[i] != data2[i]) { - TestUtil.logErr( - whichAttachment + " data content is not equal in attachment"); - TestUtil.logErr("Failed at byte " + i + ", data1[" + i + "]=" + data1[i] - + ", data2[" + i + "]=" + data2[i]); - return false; - } - } - TestUtil.logMsg("Verification passed"); - TestUtil.logMsg(whichAttachment + " data count [" + count1 - + "] and content is equal in attachment"); - return true; - } - - public static String validateAttachmentData(Image image1, Image image2, - String whichAttachment) throws IOException { - String result = null; - TestUtil.logMsg( - "Verifying data of attachment matches: [" + whichAttachment + "]"); - if (image2 != null) { - if (!compareImages(image1, image2, new Rectangle(0, 0, 100, 120))) { - System.out.println(whichAttachment + " comparison failed"); - result = "FAILURE: " + whichAttachment - + " Image documents did not compare correctly"; - } - } else { - result = "FAILURE: " + whichAttachment - + " actual Image document was null"; - } - if (result != null) { - TestUtil.logMsg("Verification failed"); - TestUtil.logMsg(result); - result += "\n"; - } else - TestUtil.logMsg("Verification passed"); - return result; - } - - public static void dumpByteArrays(byte[] b1, int c1, byte[] b2, int c2, - String whichAttachment) { - System.out.println("in dumpByteArrays"); - boolean error_found = false; - StringBuffer s1 = new StringBuffer(); - StringBuffer s2 = new StringBuffer(); - int nexti = 0; - for (int i = 0; i < c1; i++) { - if (i > c1 || i > c2) { - nexti = i; - break; - } - s1.append((char) b1[i]); - s2.append((char) b2[i]); - if (b1[i] != b2[i]) { - if (!error_found) { - System.out.println("FAILURE begins at (index=" + i + ")"); - System.out.printf( - "byte1[%d]=0x%x|0%o|%d, byte2[%d]=0x%x|0%o|%d, count1=%d, count2=%d\n", - i, b1[i], b1[i], b1[i], i, b2[i], b2[i], b2[i], c1, c2); - error_found = true; - } - nexti = i + 1; - break; - } - } - int i = nexti; - int count = 0; - while (i < c1 && count < 10) { - s1.append((char) b1[i++]); - count++; - } - i = nexti; - count = 0; - while (i < c2 && count < 10) { - s2.append((char) b2[i++]); - count++; - } - System.out.println("--------------------------------------------"); - System.out.println("doc1 upto point of error (Expected " + whichAttachment - + " document)\n" + s1.toString()); - System.out.println("--------------------------------------------"); - System.out.println("doc2 upto point of error (Actual " + whichAttachment - + " document)\n" + s2.toString()); - System.out.println( - "========================================================================"); - } - - public static ByteArrayOutputStream readTheData(InputStream is) - throws Exception { - byte[] buf = new byte[1024]; - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - int count = 0; - try { - while ((count = is.read(buf, 0, buf.length)) > 0) { - baos.write(buf, 0, count); - } - } finally { - is.close(); - baos.close(); - } - return baos; - } - - public static int readTheData(InputStream is, byte[] data, int length) - throws Exception { - int count = 0; - int tmpcount = 0; - try { - while (tmpcount != -1) { - tmpcount = is.read(data, count, length - count); - if (tmpcount != -1) - count += tmpcount; - if (tmpcount == 0) - break; - } - } finally { - is.close(); - } - return count; - } - - public static int readTheData(Reader r, char[] data, int length) - throws Exception { - int count = 0; - int tmpcount = 0; - try { - while (tmpcount != -1) { - tmpcount = r.read(data, count, length - count); - if (tmpcount != -1) - count += tmpcount; - if (tmpcount == 0) - break; - } - } finally { - r.close(); - } - return count; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/Constants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/Constants.java deleted file mode 100644 index 19998fbd34..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/Constants.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -public class Constants { - - // Standard namespace URI's - public static final String NSURI_SOAP11_ENVELOPE = "http://schemas.xmlsoap.org/soap/envelope/"; - - public static final String NSURI_SOAP11_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/"; - - public static final String NSURI_SOAP11_ACTOR_NEXT = "http://schema.xmlsoap.org/soap/actor/next"; - - public static final String NSURI_SOAP12_ENVELOPE = "http://www.w3.org/2003/05/soap-envelope"; - - public static final String NSURI_SOAP12_ENCODING = "http://www.w3.org/2003/05/soap-encoding"; - - public static final String NSURI_SOAP12_ROLE_NEXT = "http://www.w3.org/2003/05/soap-envelope/role/next"; - - public static final String NSURI_SOAP12_ROLE_NONE = "http://www.w3.org/2003/05/soap-envelope/role/none"; - - public static final String NSURI_SOAP12_ROLE_ULTIMATE_RECEIVER = "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"; - - public static final String NSURI_WSDL_SOAP = "http://schemas.xmlsoap.org/wsdl/soap/"; - - public static final String NSURI_HTTP_BINDING = "http://www.w3.org/2004/08/wsdl/http"; - - public static final String NSURI_SOAP11HTTP_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http"; - - public static final String NSURI_SOAP12HTTP_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/"; - - public static final String NSURI_SOAP11HTTP_MTOM_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true"; - - public static final String NSURI_SOAP12HTTP_MTOM_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true"; - - public static final String URI_ENVELOPE = "http://schemas.xmlsoap.org/soap/envelope/"; - - public static final String URI_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/"; - - public static final String URI_BINDING_HTTP = "http://schemas.xmlsoap.org/wsdl/soap/http"; - - public static final String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/"; - - public static final String URI_HTTP = "http://schemas.xmlsoap.org/soap/http/"; - - public static final String URI_SOAP_ACTOR_NEXT = "http://schema.xmlsoap.org/soap/actor/next"; - - public static final String XSD = "http://www.w3.org/2001/XMLSchema"; - - public static final String XSI = "http://www.w3.org/2001/XMLSchema-instance"; - - public static final String NSURI_SCHEMA_XSD = "http://www.w3.org/2001/XMLSchema"; - - public static final String NSURI_SCHEMA_XSI = "http://www.w3.org/2001/XMLSchema-instance"; - - // Standard SOAP Element Tags - public static final String TAG_ENVELOPE = "Envelope"; - - public static final String TAG_HEADER = "Header"; - - public static final String TAG_BODY = "Body"; - - // Standard Attribute Tags - public static final String ATTR_ACTOR = "actor"; - - public static final String ATTR_MUST_UNDERSTAND = "mustUnderstand"; - - public static final String ATTR_ENCODING_STYLE = "encodingStyle"; - - // Invalid URL's used for negative testing - public static final String BAD_ABSOLUTE_URL = "bogus:/foobar"; - - public static final String BAD_RELATIVE_URL = "/foobar"; - - // Handler constants for message direction and message scope - public final static String INBOUND = "Inbound"; - - public final static String OUTBOUND = "Outbound"; - - public final static String INOUTBOUND = "InOutbound"; - - public final static String APPLICATION = "APPLICATION"; - - public final static String HANDLER = "HANDLER"; - - public final static String EXPECTED_HTTP_BINDING = NSURI_HTTP_BINDING; - - public final static String EXPECTED_SOAP11HTTP_BINDING = NSURI_SOAP11HTTP_BINDING; - - public final static String EXPECTED_SOAP12HTTP_BINDING = NSURI_SOAP12HTTP_BINDING; - - public final static String EXPECTED_SOAP11HTTP_MTOM_BINDING = NSURI_SOAP11HTTP_MTOM_BINDING; - - public final static String EXPECTED_SOAP12HTTP_MTOM_BINDING = NSURI_SOAP12HTTP_MTOM_BINDING; -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/HTTPSOAPHandler.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/HTTPSOAPHandler.java deleted file mode 100644 index 8d75c77608..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/HTTPSOAPHandler.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.soap.SOAPHandler; -import jakarta.xml.ws.handler.MessageContext; -import javax.xml.namespace.QName; -import java.util.Set; - -public abstract class HTTPSOAPHandler - implements SOAPHandler { - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("entering HTTPSOAPHandler:handleMessage"); - boolean outbound = (Boolean) context - .get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); - - if (outbound) { - System.out.println("Direction=outbound"); - processOutboundMessage(context); - } else { - System.out.println("Direction=inbound"); - processInboundMessage(context); - } - - System.out.println("exiting HTTPSOAPHandler:handleMessage"); - return true; - } - - public void close(MessageContext context) { - } - - public boolean handleFault(SOAPMessageContext context) { - return true; - } - - public Set getHeaders() { - return null; - } - - protected void processOutboundMessage(SOAPMessageContext context) { - } - - protected void processInboundMessage(SOAPMessageContext context) { - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/HandlerTracker.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/HandlerTracker.java deleted file mode 100644 index 9939757763..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/HandlerTracker.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; - -import java.util.*; - -public final class HandlerTracker { - - // Messages for LogicalHandler and SOAPHandler tests - private static Vector messages1 = new Vector(); - - // Messages for MessageContext tests - private static Vector messages2 = new Vector(); - - // Messages for SOAPMessageContext tests - private static Vector messages3 = new Vector(); - - // Messages for LogicalMessageContext tests - private static Vector messages4 = new Vector(); - - // Message Handlers - private static Vector handlers = new Vector(); - - // Throwables - private static Vector throwables = new Vector(); - - // Store key <-> value information - private static Map map = new Hashtable(); - - public static Object get(String key) { - return map.get(key); - } - - public static void put(String key, Object value) { - map.put(key, value); - } - - public static boolean clearMap() { - map = new Hashtable(); - return true; - } - - public static String getId(Handler handler) { - return handler.getClass().getName(); - } - - public static String getIdNameOnly(Handler handler) { - String name = getId(handler); - int i = name.lastIndexOf("."); - if (i >= 0) { - name = name.substring(i + 1); - } - return name; - } - - public static void reportInit(Handler handler, String methodName) { - TestUtil.logTrace( - "HandlerTracker: " + getIdNameOnly(handler) + "." + methodName + "()"); - if (!handlers.contains(handler)) - handlers.add(handler); - messages1.add(getIdNameOnly(handler) + "." + methodName + "()"); - } - - public static void reportDestroy(Handler handler, String methodName) { - TestUtil.logTrace( - "HandlerTracker: " + getIdNameOnly(handler) + "." + methodName + "()"); - messages1.add(getIdNameOnly(handler) + "." + methodName + "()"); - } - - public static void reportGetHeaders(Handler handler) { - TestUtil.logTrace( - "HandlerTracker: " + getIdNameOnly(handler) + ".getHeaders()"); - messages1.add(getIdNameOnly(handler) + ".getHeaders()"); - } - - public static void reportHandleFault(Handler handler) { - TestUtil.logTrace( - "HandlerTracker: " + getIdNameOnly(handler) + ".handleFault()"); - messages1.add(getIdNameOnly(handler) + ".handleFault()"); - } - - public static void reportClose(Handler handler) { - TestUtil.logTrace("HandlerTracker: " + getIdNameOnly(handler) + ".close()"); - messages1.add(getIdNameOnly(handler) + ".close()"); - } - - public static void reportComment(Handler handler, String comment) { - TestUtil - .logTrace("HandlerTracker: " + getIdNameOnly(handler) + " " + comment); - messages1.add(getIdNameOnly(handler) + " " + comment); - } - - public static void reportHandleMessage(Handler handler, String direction) { - TestUtil.logTrace("HandlerTracker: " + getIdNameOnly(handler) - + ".handleMessage().do" + direction + "()"); - messages1 - .add(getIdNameOnly(handler) + ".handleMessage().do" + direction + "()"); - } - - public static void reportPut(Handler h, String p, String v) { - TestUtil.logTrace("HandlerTracker: reportPut()=" + getIdNameOnly(h) - + ".MessageContext.put(" + p + "," + v + ")"); - messages2 - .add(getIdNameOnly(h) + ".MessageContext.put(" + p + "," + v + ")"); - } - - public static void reportSetScope(Handler h, String p, String s) { - TestUtil.logTrace("HandlerTracker: reportSetScope()=" + getIdNameOnly(h) - + ".MessageContext.setPropertyScope(" + p + "," + s + ")"); - messages2.add(getIdNameOnly(h) + ".MessageContext.setPropertyScope(" + p - + "," + s + ")"); - } - - public static void reportProperties(Handler h, String d, String p, String v) { - TestUtil.logTrace("HandlerTracker: reportProperties()=" + d - + getIdNameOnly(h) + ".MessageContext.getProperty(" + p + ")=" + v); - messages2.add( - d + getIdNameOnly(h) + ".MessageContext.getProperty(" + p + ")=" + v); - } - - public static void reportGet(Handler h, String p, String v) { - TestUtil.logTrace("HandlerTracker: reportGet()=" + getIdNameOnly(h) - + ".MessageContext.getProperty(" + p + ")=" + v); - messages2 - .add(getIdNameOnly(h) + ".MessageContext.getProperty(" + p + ")=" + v); - } - - public static void reportGetScope(Handler h, String p, String v) { - TestUtil.logTrace("HandlerTracker: reportGetScope()=" + getIdNameOnly(h) - + ".MessageContext.getPropertyScope(" + p + ")=" + v); - messages2.add( - getIdNameOnly(h) + ".MessageContext.getPropertyScope(" + p + ")=" + v); - } - - public static void reportSMCGetMessage(Handler h, String direction, - String s) { - TestUtil.logTrace("HandlerTracker: reportSMCGetMessage()=" + direction - + getIdNameOnly(h) + ".SOAPMessageContext.getMessage()=" + s); - messages3.add( - direction + getIdNameOnly(h) + ".SOAPMessageContext.getMessage()=" + s); - } - - public static void reportSMCSetMessage(Handler h, String direction) { - messages3.add(direction + getIdNameOnly(h) - + ".SOAPMessageContext.setMessage() was called"); - } - - public static void reportSMCGetRoles(Handler h, String direction, - java.util.Set set) { - Object[] o = set.toArray(); - StringBuffer s = new StringBuffer("|"); - for (int i = 0; i <= o.length - 1; i++) { - s.append(o[i]); - } - s.append("|"); - messages3.add( - direction + getIdNameOnly(h) + ".SOAPMessageContext.getRoles()=" + s); - } - - public static void reportSMCGetHeaders(Handler h, String direction, - Object[] o) { - StringBuffer s = new StringBuffer("|"); - for (int i = 0; i <= o.length - 1; i++) { - s.append(o[i]); - } - s.append("|"); - messages3.add( - direction + getIdNameOnly(h) + ".SOAPMessageContext.getHeaders()=" + s); - } - - public static void reportLMCGetMessage(Handler h, String direction, - String s) { - TestUtil.logTrace("HandlerTracker: reportLMCGetMessage()=" + direction - + getIdNameOnly(h) + ".LogicalMessageContext.getMessage()=" + s); - messages4.add(direction + getIdNameOnly(h) - + ".LogicalMessageContext.getMessage()=" + s); - } - - public static void reportThrowable(Handler handler, Throwable t) { - TestUtil.logTrace("HandlerTracker: reportThrowable(): " - + getIdNameOnly(handler) + " " + t); - throwables.add(getIdNameOnly(handler)); - throwables.add(t.toString()); - StackTraceElement[] ste = t.getStackTrace(); - for (int i = 0; i < ste.length; i++) { - throwables.add(ste[i].toString()); - } - } - - public static void purge() { - messages1.clear(); - messages2.clear(); - messages3.clear(); - messages4.clear(); - throwables.clear(); - } - - // Return handler test messages - public static String[] getArrayMessages1() { - String[] result = new String[messages1.size()]; - for (int i = 0; i < messages1.size(); i++) { - result[i] = (String) messages1.elementAt(i); - } - return result; - } - - // Return handler test messages - public static List getListMessages1() { - return messages1; - } - - // Return Handler test messages - public static String getMessages1() { - StringBuffer result = new StringBuffer(); - for (int i = 0; i < messages1.size(); i++) { - if (i + 1 == messages1.size()) - result.append((String) messages1.elementAt(i)); - else - result.append((String) messages1.elementAt(i) + "\n"); - } - return result.toString(); - } - - // Return MessageContext test messages - public static String[] getArrayMessages2() { - String[] result = new String[messages2.size()]; - for (int i = 0; i < messages2.size(); i++) { - result[i] = (String) messages2.elementAt(i); - } - return result; - } - - // Return MessageContext test messages - public static List getListMessages2() { - return messages2; - } - - // Return MessageContext test messages - public static String getMessages2() { - StringBuffer result = new StringBuffer(); - for (int i = 0; i < messages2.size(); i++) { - if (i + 1 == messages2.size()) - result.append((String) messages2.elementAt(i)); - else - result.append((String) messages2.elementAt(i) + "\n"); - } - return result.toString(); - } - - // Return SOAPMessageContext test messages - public static String[] getArrayMessages3() { - String[] result = new String[messages3.size()]; - for (int i = 0; i < messages3.size(); i++) { - result[i] = (String) messages3.elementAt(i); - } - return result; - } - - // Return SOAPMessageContext test messages - public static List getListMessages3() { - return messages3; - } - - // Return SOAPMessageContext test messages - public static String getMessages3() { - StringBuffer result = new StringBuffer(); - for (int i = 0; i < messages3.size(); i++) { - if (i + 1 == messages3.size()) - result.append((String) messages3.elementAt(i)); - else - result.append((String) messages3.elementAt(i) + "\n"); - } - return result.toString(); - } - - // Return LogicalMessageContext test messages - public static String[] getArrayMessages4() { - String[] result = new String[messages4.size()]; - for (int i = 0; i < messages4.size(); i++) { - result[i] = (String) messages4.elementAt(i); - } - return result; - } - - // Return LogicalMessageContext test messages - public static List getListMessages4() { - return messages4; - } - - // Return LogicalMessageContext test messages - public static String getMessages4() { - StringBuffer result = new StringBuffer(); - for (int i = 0; i < messages4.size(); i++) { - if (i + 1 == messages4.size()) - result.append((String) messages4.elementAt(i)); - else - result.append((String) messages4.elementAt(i) + "\n"); - } - return result.toString(); - } - - // Return Throwables - public static String[] getArrayThrowables() { - String[] result = new String[throwables.size()]; - for (int i = 0; i < throwables.size(); i++) { - result[i] = (String) throwables.elementAt(i); - } - return result; - } - - // Return Message Handlers - public static List getHandlerMessages() { - return handlers; - } - - // Clear Message Handlers vector - public static void clearHandlers() { - handlers.clear(); - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/Handler_Util.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/Handler_Util.java deleted file mode 100644 index d54769c98b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/Handler_Util.java +++ /dev/null @@ -1,3758 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.transform.Source; -import javax.xml.transform.dom.DOMResult; - -import java.util.*; - -import com.sun.ts.lib.util.*; - -public final class Handler_Util { - - private static boolean traceFlag = false; - - public static void setTraceFlag(boolean b) { - traceFlag = b; - } - - public static void setTraceFlag(String s) { - traceFlag = Boolean.valueOf(s).booleanValue(); - // traceFlag = new Boolean(s).booleanValue();; - } - - public static boolean getTraceFlag(boolean b) { - return traceFlag; - } - - public static String getDirection(MessageContext context) { - boolean result = false; - if (context instanceof LogicalMessageContext) { - TestUtil.logTrace("MESSAGE_OUTBOUND_PROPERTY=" - + context.get(LogicalMessageContext.MESSAGE_OUTBOUND_PROPERTY)); - result = ((Boolean) context - .get(LogicalMessageContext.MESSAGE_OUTBOUND_PROPERTY)).booleanValue(); - } else { - TestUtil.logTrace("MESSAGE_OUTBOUND_PROPERTY=" - + context.get(SOAPMessageContext.MESSAGE_OUTBOUND_PROPERTY)); - result = ((Boolean) context - .get(SOAPMessageContext.MESSAGE_OUTBOUND_PROPERTY)).booleanValue(); - } - - TestUtil.logTrace("MESSAGE_OUTBOUND_PROPERTY=" + result); - String direction = null; - if (result) { - direction = Constants.OUTBOUND; - TestUtil.logTrace("direction = (outbound) - " + direction); - } else { - direction = Constants.INBOUND; - TestUtil.logTrace("direction = (inbound) - " + direction); - } - return direction; - } - - public static boolean checkForMsg(Handler handler, MessageContext context, - String whichMsg) { - boolean foundIt = false; - TestUtil.logTrace("--------------------------------------------"); - TestUtil.logTrace("Checking if this is a '" + whichMsg + "' message"); - try { - if (context instanceof LogicalMessageContext) { - LogicalMessage lm = ((LogicalMessageContext) context).getMessage(); - if (lm != null) { - Source source = lm.getPayload(); - if (source != null) { - String msg = JAXWS_Util - .getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(source)); - TestUtil.logTrace("msg=" + msg); - TestUtil.logTrace("whichMsg=" + whichMsg); - - if (msg.indexOf(whichMsg) > -1) { - foundIt = true; - } - } else { - TestUtil.logTrace( - "LogicalHandlerBase(checkForMsg): No message payload was present"); - } - } else { - TestUtil.logTrace( - "LogicalHandlerBase(checkForMsg): No message was present"); - } - } else { - SOAPMessage soapmsg = ((SOAPMessageContext) context).getMessage(); - // JAXWS_Util.dumpSOAPMessageWOA(soapmsg); - String msg = JAXWS_Util.getMsgAsString(soapmsg); - if (msg != null) { - if (msg.indexOf(whichMsg) > -1) { - foundIt = true; - } - } - } - } catch (Exception e) { - if (handler != null) { - HandlerTracker.reportThrowable(handler, e); - } else { - e.printStackTrace(); - } - } - TestUtil.logTrace("foundIt=" + foundIt); - TestUtil.logTrace("--------------------------------------------"); - return foundIt; - } - - public static boolean checkForMsg(MessageContext context, String whichMsg) { - return checkForMsg(null, context, whichMsg); - } - - public static void dumpMsg(MessageContext context) { - boolean foundIt = false; - TestUtil.logTrace("--------------------------------------------"); - if (context instanceof LogicalMessageContext) { - try { - LogicalMessage lm = ((LogicalMessageContext) context).getMessage(); - if (lm != null) { - Source source = lm.getPayload(); - if (source != null) { - String msg = JAXWS_Util - .getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(source)); - TestUtil.logTrace("msg=" + msg); - } else { - TestUtil.logTrace( - "LogicalHandlerBase(checkForMsg): No message payload was present"); - } - } else { - TestUtil.logTrace( - "LogicalHandlerBase(checkForMsg): No message was present"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - } else { - try { - SOAPMessage soapmsg = ((SOAPMessageContext) context).getMessage(); - String msg = JAXWS_Util.getMsgAsString(soapmsg); - TestUtil.logTrace("msg=" + msg); - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - } - TestUtil.logTrace("--------------------------------------------"); - return; - } - - public static void initTestUtil(Handler handler, String host, String port, - String flag) { - /* - * System.out.println("initTestUtil:handler="+handler); - * System.out.println("initTestUtil:host="+host); - * System.out.println("initTestUtil:port="+port); - * System.out.println("initTestUtil:flag="+flag); - */ - initTestUtil(host, port, flag); - } - - public static void initTestUtil(String impl, String host, String port, - String flag) { - /* - * System.out.println("initTestUtil:impl="+impl); - * System.out.println("initTestUtil:host="+host); - * System.out.println("initTestUtil:port="+port); - * System.out.println("initTestUtil:flag="+flag); - */ - initTestUtil(host, port, flag); - } - - public static void initTestUtil(String host, String port, String flag) { - if ((host != null) && (!host.equals(""))) { - if ((port != null) && (!port.equals(""))) { - if ((flag != null) && (!flag.equals(""))) { - Properties p = new Properties(); - p.setProperty("harness.host", host); - p.setProperty("harness.log.port", port); - p.setProperty("harness.log.traceflag", flag); - try { - TestUtil.init(p); - } catch (Exception e) { - System.out.println(e.getMessage()); - } - } else { - System.out.println( - "Can't init TestUtil, harnesslogtraceflag was either null or empty"); - } - } else { - System.out.println( - "Can't init TestUtil, harnesslogport was either null or empty"); - } - } else { - System.out.println( - "Can't init TestUtil, harnessloghost was either null or empty"); - } - } - - public static String getValueFromMsg(Handler handler, MessageContext context, - String name) { - String value = ""; - TestUtil - .logTrace("Getting the value for item '" + name + "' from the message"); - try { - if (context instanceof LogicalMessageContext) { - LogicalMessage lm = ((LogicalMessageContext) context).getMessage(); - if (lm != null) { - Source source = lm.getPayload(); - if (source != null) { - DOMResult dr = JAXWS_Util.getSourceAsDOMResult(source); - if (dr != null) { - String tmp = XMLUtils.getNodeValue_(dr.getNode(), name); - if (traceFlag) { - TestUtil.logTrace("name=" + name); - TestUtil.logTrace("value=" + tmp); - } - if (tmp != null) { - value = tmp; - } - } - } else { - TestUtil.logErr( - "LogicalHandlerBase(getValueFromMsg): No message payload was present"); - } - } else { - TestUtil.logTrace( - "LogicalHandlerBase(getValueFromMsg): No message was present"); - } - } else { - SOAPMessage soapmsg = ((SOAPMessageContext) context).getMessage(); - String tmp = XMLUtils.getNodeValue_(soapmsg.getSOAPPart(), name); - if (traceFlag) { - TestUtil.logTrace("name=" + name); - TestUtil.logTrace("value=" + tmp); - } - if (tmp != null) { - value = tmp; - } - } - } catch (Exception e) { - HandlerTracker.reportThrowable(handler, e); - } - - return value; - } - - public static String getMessageAsString(MessageContext context) { - String msg = ""; - if (context instanceof LogicalMessageContext) { - LogicalMessage lm = ((LogicalMessageContext) context).getMessage(); - if (lm != null) { - try { - Source source = lm.getPayload(); - if (source != null) { - msg = JAXWS_Util - .getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(source)); - } else { - TestUtil.logTrace( - "LogicalHandlerBase(getMessageAsString): No message payload was present"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - } else { - TestUtil.logTrace( - "LogicalHandlerBase(getMessageAsString): No message was present"); - } - } else { - try { - SOAPMessage soapmsg = ((SOAPMessageContext) context).getMessage(); - msg = JAXWS_Util.getMsgAsString(soapmsg); - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - } - return msg; - } - - public static List removeHandler(List l, Class c) { - TestUtil.logTrace("removing client-side handler:" + c); - List lh = new ArrayList(); - Iterator i = l.iterator(); - while (i.hasNext()) { - Object o = i.next(); - if (!c.isInstance(o)) { - lh.add(l.get(l.indexOf(o))); - } - } - return lh; - } - - public static void clearHandlers(List l) { - Iterator i = l.iterator(); - while (i.hasNext()) { - Binding b = (Binding) i.next(); - clearHandlers(b); - } - } - - public static void clearHandlers(Binding b) { - TestUtil.logMsg("Clearing client-side handlers on binding:" + b); - b.setHandlerChain(new ArrayList()); - List handlerList = b.getHandlerChain(); - TestUtil.logTrace("HandlerChain=" + handlerList); - TestUtil.logTrace("HandlerChain size = " + handlerList.size()); - } - - public static boolean VerifyCloseCallBacks(String who, List calls, - String contextType, boolean exception, String direction) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - - TestUtil.logMsg( - "Testing that close() was called and the order in which it was called"); - if (exception) { - TestUtil.logMsg("Testing the close callbacks for exceptions"); - int close6 = calls.indexOf(who + contextType + "Handler6.close()"); - int close4 = calls.indexOf(who + contextType + "Handler4.close()"); - int close5 = calls.indexOf(who + contextType + "Handler5.close()"); - TestUtil.logTrace("close6=" + close6); - TestUtil.logTrace("close4=" + close4); - TestUtil.logTrace("close5=" + close5); - if (who.equals("Client")) { - if (direction.equals(Constants.INBOUND)) { - if (close6 == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - } else { - if (close6 > -1) { - TestUtil.logErr(who + contextType + "Handler6.close() was called"); - pass = false; - } - } - if (close4 == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (close5 == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - if (close6 > -1) { - if (close4 > -1) { - if (close6 > close4) { - TestUtil.logErr("The close method for handler " + who - + contextType + "Handler4 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler6"); - pass = false; - } - if (close5 > -1) { - if (close4 > close5) { - TestUtil.logErr("The close method for handler " + who - + contextType + "Handler5 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler4"); - pass = false; - } - } - } - if (close5 > -1) { - if (close6 > close5) { - TestUtil.logErr("The close method for handler " + who - + contextType + "Handler5 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler6"); - pass = false; - } - } - } else if (close4 > -1) { - if (close5 > -1) { - if (close4 > close5) { - TestUtil.logErr("The close method for handler " + who - + contextType + "Handler5 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler4"); - pass = false; - } - } - } else { - TestUtil.logErr("The close method for handler " + who + contextType - + "Handler4 was not found"); - pass = false; - - } - } else { - // server - if (close6 == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (close4 == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (direction.equals(Constants.INBOUND)) { - if (close5 > -1) { - TestUtil.logErr(who + contextType + "Handler5.close() was called"); - pass = false; - } - } else { - if (close5 == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - } - - if (close6 > -1) { - if (close4 > -1) { - if (close6 < close4) { - TestUtil.logErr("The close method for handler " + who - + contextType + "Handler4 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler6"); - pass = false; - } - if (close5 > -1) { - if (close4 < close5) { - TestUtil.logErr("The close method for handler " + who - + contextType + "Handler5 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler4"); - pass = false; - } - } - } - if (close5 > -1) { - if (close6 < close5) { - TestUtil.logErr("The close method for handler " + who - + contextType + "Handler5 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler6"); - pass = false; - } - } - } else if (close4 > -1) { - if (close5 > -1) { - if (close4 < close5) { - TestUtil.logErr("The close method for handler " + who - + contextType + "Handler5 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler4"); - pass = false; - } - } - } else { - TestUtil.logErr("The close method for handler " + who + contextType - + "Handler4 was not found"); - pass = false; - - } - } - } else { - TestUtil.logMsg("Testing the close callbacks for regular situations"); - int close6 = calls.indexOf(who + contextType + "Handler6.close()"); - int close3 = calls.indexOf(who + contextType + "Handler3.close()"); - int close2 = calls.indexOf(who + contextType + "Handler2.close()"); - int close1 = calls.indexOf(who + contextType + "Handler1.close()"); - int close5 = calls.indexOf(who + contextType + "Handler5.close()"); - TestUtil.logTrace("close6=" + close6); - TestUtil.logTrace("close3=" + close3); - TestUtil.logTrace("close2=" + close2); - TestUtil.logTrace("close1=" + close1); - TestUtil.logTrace("close5=" + close5); - if (close6 == -1) { - TestUtil.logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (close3 == -1) { - TestUtil.logErr(who + contextType + "Handler3.close() was not called"); - pass = false; - } - if (close2 == -1) { - TestUtil.logErr(who + contextType + "Handler2.close() was not called"); - pass = false; - } - if (close1 == -1) { - TestUtil.logErr(who + contextType + "Handler1.close() was not called"); - pass = false; - } - if (close5 == -1) { - TestUtil.logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - if (who.equals("Client")) { - if (close1 > close5) { - TestUtil.logErr("The close method for handler " + who + contextType - + "Handler5 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler1"); - pass = false; - } - if (close2 > close1) { - TestUtil.logErr("The close method for handler " + who + contextType - + "Handler1 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler2"); - pass = false; - } - if (close3 > close2) { - TestUtil.logErr("The close method for handler " + who + contextType - + "Handler2 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler3"); - pass = false; - } - if (close6 > close3) { - TestUtil.logErr("The close method for handler " + who + contextType - + "Handler3 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler6"); - pass = false; - } - } else { - if (close6 < close3) { - TestUtil.logErr("The close method for handler " + who + contextType - + "Handler6 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler3"); - pass = false; - } - if (close3 < close2) { - TestUtil.logErr("The close method for handler " + who + contextType - + "Handler3 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler2"); - pass = false; - } - if (close2 < close1) { - TestUtil.logErr("The close method for handler " + who + contextType - + "Handler2 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler1"); - pass = false; - } - if (close1 < close5) { - TestUtil.logErr("The close method for handler " + who + contextType - + "Handler1 was not called"); - TestUtil.logErr("after the close method for handler " + who - + contextType + "Handler5"); - pass = false; - } - } - } - return pass; - } - - public static boolean VerifyHandlerExceptionCallBacks(String who, - String contextType, boolean remoteException, String direction, - List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("contextType=" + contextType); - TestUtil.logTrace("remoteException=" + remoteException); - TestUtil.logTrace("direction=" + direction); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - - if (who.equals("Client")) { - if (direction.equals(Constants.OUTBOUND)) { - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - } else { - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - } - } else { - // server - if (remoteException) { - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler5.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.handleFault()") == -1) { - TestUtil.logErr( - who + contextType + "Handler6.handleFault() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.handleFault()") == -1) { - TestUtil.logErr( - who + contextType + "Handler4.handleFault() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.handleFault()") == -1) { - TestUtil.logErr( - who + contextType + "Handler5.handleFault() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler5.handleMessage().doOutbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doOutbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doOutbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was called"); - pass = false; - } - } else { - if (direction.equals(Constants.OUTBOUND)) { - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doOutbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was called"); - pass = false; - } - } else { - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doInbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was called"); - pass = false; - } - } - } - } - if (!VerifyCloseCallBacks(who, calls, contextType, true, direction)) { - pass = false; - } - - return pass; - } - - public static boolean VerifyHandlerInitCallBacks(String who, - String contextType, List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - if (who.equals("Client")) { - TestUtil.logMsg("Testing handlers went through init phase"); - if (calls.indexOf(who + contextType + "Handler5.myInit()") > -1) { - TestUtil.logErr(who + contextType + "Handler5.myInit() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler1.myInit()") > -1) { - TestUtil.logErr(who + contextType + "Handler1.myInit() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler2.myInit()") > -1) { - TestUtil.logErr(who + contextType + "Handler2.myInit() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler3.myInit()") > -1) { - TestUtil.logErr(who + contextType + "Handler3.myInit() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.myInit()") > -1) { - TestUtil.logErr(who + contextType + "Handler6.myInit() was called"); - pass = false; - } - - } - return pass; - } - - public static boolean VerifyHandlerInitCallBacks2(String who, - String contextType, List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - if (who.equals("Client")) { - TestUtil.logMsg("Testing handlers went through init phase"); - if (calls.indexOf(who + contextType + "Handler5.myInit()") == -1) { - TestUtil.logErr(who + contextType + "Handler5.myInit() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler1.myInit()") == -1) { - TestUtil.logErr(who + contextType + "Handler1.myInit() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler2.myInit()") > -1) { - TestUtil.logErr(who + contextType + "Handler2.myInit() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler3.myInit()") > -1) { - TestUtil.logErr(who + contextType + "Handler3.myInit() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.myInit()") > -1) { - TestUtil.logErr(who + contextType + "Handler6.myInit() was called"); - pass = false; - } - - } - return pass; - } - - public static boolean VerifyHandlerInitCallBacks3(String who, - String contextType, List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - if (who.equals("Client")) { - TestUtil.logMsg("Testing handlers went through init phase"); - if (calls.indexOf(who + contextType + "Handler2.myInit()") > -1) { - TestUtil.logErr(who + contextType + "Handler2.myInit() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler3.myInit()") > -1) { - TestUtil.logErr(who + contextType + "Handler3.myInit() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.myInit()") > -1) { - TestUtil.logErr(who + contextType + "Handler6.myInit() was called"); - pass = false; - } - - } - return pass; - } - - public static boolean VerifyHandlerCallBacks(String who, String contextType, - List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - if (who.equals("Client")) { - if (!VerifyHandlerInitCallBacks(who, contextType, calls)) { - pass = false; - } - } - if (!VerifyOutboundInboundCallBacks(who, contextType, calls)) { - pass = false; - } - if (!VerifyCloseCallBacks(who, calls, contextType, false, "")) { - pass = false; - } - return pass; - } - - public static boolean VerifyHandlerCallBacks2(String who, String contextType, - List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - if (who.equals("Client")) { - if (!VerifyHandlerInitCallBacks2(who, contextType, calls)) { - pass = false; - } - } - if (!VerifyOutboundInboundCallBacks(who, contextType, calls)) { - pass = false; - } - if (!VerifyCloseCallBacks(who, calls, contextType, false, "")) { - pass = false; - } - return pass; - } - - public static boolean VerifyHandlerCallBacks3(String who, String contextType, - List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - if (who.equals("Client")) { - if (!VerifyHandlerInitCallBacks3(who, contextType, calls)) { - pass = false; - } - } - if (!VerifyOutboundInboundCallBacks(who, contextType, calls)) { - pass = false; - } - if (!VerifyCloseCallBacks(who, calls, contextType, false, "")) { - pass = false; - } - return pass; - } - - public static boolean VerifyOutboundInboundCallBacks(String who, - String contextType, List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logMsg("Testing the order of the outbound phase"); - - int outhandler4 = calls - .indexOf(who + contextType + "Handler4.handleMessage().doInbound()"); - if (outhandler4 > -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was called and should not have"); - pass = false; - } - int outhandler5 = calls - .indexOf(who + contextType + "Handler5.handleMessage().doOutbound()"); - if (outhandler5 == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - int outhandler1 = calls - .indexOf(who + contextType + "Handler1.handleMessage().doOutbound()"); - if (outhandler1 == -1) { - TestUtil.logErr(who + contextType - + "Handler1.handleMessage().doOutbound() was not called"); - pass = false; - } - int outhandler2 = calls - .indexOf(who + contextType + "Handler2.handleMessage().doOutbound()"); - if (outhandler2 == -1) { - TestUtil.logErr(who + contextType - + "Handler2.handleMessage().doOutbound() was not called"); - pass = false; - } - int outhandler3 = calls - .indexOf(who + contextType + "Handler3.handleMessage().doOutbound()"); - if (outhandler3 == -1) { - TestUtil.logErr(who + contextType - + "Handler3.handleMessage().doOutbound() was not called"); - pass = false; - } - int outhandler6 = calls - .indexOf(who + contextType + "Handler6.handleMessage().doOutbound()"); - if (outhandler6 == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (outhandler5 > outhandler1) { - TestUtil.logErr(who + contextType - + "Handler1.handleMessage().doOutbound() was not called after " + who - + contextType + "Handler5.handleMessage().doOutbound()"); - pass = false; - } - if (outhandler1 > outhandler2) { - TestUtil.logErr(who + contextType - + "Handler2.handleMessage().doOutbound() was not called after " + who - + contextType + "Handler1.handleMessage().doOutbound()"); - pass = false; - } - if (outhandler2 > outhandler3) { - TestUtil.logErr(who + contextType - + "Handler3.handleMessage().doOutbound() was not called after " + who - + contextType + "Handler2.handleMessage().doOutbound()"); - pass = false; - } - if (outhandler3 > outhandler6) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called after " + who - + contextType + "Handler3.handleMessage().doOutbound()"); - pass = false; - } - - TestUtil.logMsg("Testing the order of the inbound phase"); - - int inhandler4 = calls - .indexOf(who + contextType + "Handler4.handleMessage().doInbound()"); - if (inhandler4 > -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was called and should not have"); - pass = false; - } - int inhandler6 = calls - .indexOf(who + contextType + "Handler6.handleMessage().doInbound()"); - if (inhandler6 == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - int inhandler3 = calls - .indexOf(who + contextType + "Handler3.handleMessage().doInbound()"); - if (inhandler3 == -1) { - TestUtil.logErr(who + contextType - + "Handler3.handleMessage().doInbound() was not called"); - pass = false; - } - int inhandler2 = calls - .indexOf(who + contextType + "Handler2.handleMessage().doInbound()"); - if (inhandler2 == -1) { - TestUtil.logErr(who + contextType - + "Handler2.handleMessage().doInbound() was not called"); - pass = false; - } - int inhandler1 = calls - .indexOf(who + contextType + "Handler1.handleMessage().doInbound()"); - if (inhandler1 == -1) { - TestUtil.logErr(who + contextType - + "Handler1.handleMessage().doInbound() was not called"); - pass = false; - } - int inhandler5 = calls - .indexOf(who + contextType + "Handler5.handleMessage().doInbound()"); - if (inhandler5 == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was not called"); - pass = false; - } - if (inhandler6 > inhandler3) { - TestUtil.logErr(who + contextType - + "Handler3.handleMessage().doInbound() was not called after " + who - + contextType + "Handler6.handleMessage().doInbound()"); - pass = false; - } - if (inhandler3 > inhandler2) { - TestUtil.logErr(who + contextType - + "Handler2.handleMessage().doInbound() was not called after " + who - + contextType + "Handler3.handleMessage().doInbound()"); - pass = false; - } - if (inhandler2 > inhandler1) { - TestUtil.logErr(who + contextType - + "Handler1.handleMessage().doInbound() was not called after " + who - + contextType + "Handler2.handleMessage().doInbound()"); - pass = false; - } - if (inhandler1 > inhandler5) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was not called after " + who - + contextType + "Handler1.handleMessage().doInbound()"); - pass = false; - } - - TestUtil - .logMsg("Testing the order of the inbound verses outbound messages"); - if (who.equals("Client")) { - if (outhandler6 > inhandler6) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called after " + who - + contextType + "Handler6.handleMessage().doOutbound()"); - pass = false; - } - } else { - if (outhandler6 < inhandler6) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called after " - + who + contextType + "Handler6.handleMessage().doInbound()"); - pass = false; - } - } - return pass; - } - - public static boolean VerifyHandleMessageFalseCallBacks(String who, - String contextType, List calls, String direction) { - boolean pass = true; - String packageName = null; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - if (who.equals("Client")) { - if (direction.equals(Constants.OUTBOUND)) { - int i = calls.indexOf( - who + contextType + "Handler5.handleMessage().doOutbound()"); - if (i == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doOutbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was called"); - pass = false; - } - int j = calls.lastIndexOf( - who + contextType + "Handler5.handleMessage().doInbound()"); - if (i == j) { - TestUtil.logErr("The call to " + who + contextType - + "Handler5.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - } else { - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler5.handleMessage().doInbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - } - } else { - // server - if (direction.equals(Constants.OUTBOUND)) { - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler5.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doOutbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - } else { - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler5.handleMessage().doInbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") > -1) { - TestUtil.logErr(who + contextType + "Handler5.close() was called"); - pass = false; - } - } - } - return pass; - } - - public static boolean VerifyMessageContextCallBacks(String who, - String contextType, List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - JAXWS_Util.dumpList(calls); - - if (calls.indexOf(who + contextType + "Handler1.MessageContext.put(OUTBOUND" - + who + contextType - + "CrossHandlerPropSetByHandler1,SetByHandler1)") == -1) { - TestUtil.logErr(who + contextType + "Handler1.MessageContext.put(OUTBOUND" - + who + contextType - + "CrossHandlerPropSetByHandler1,SetByHandler1) was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler1.MessageContext.put(OUTBOUND" - + who + contextType - + "MessageScopeAppPropSetByHandler1,SetByHandler1)") == -1) { - TestUtil.logErr(who + contextType + "Handler1.MessageContext.put(OUTBOUND" - + who + contextType - + "MessageScopeAppPropSetByHandler1,SetByHandler1) was not found"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler1.MessageContext.setPropertyScope(OUTBOUND" - + who + contextType - + "MessageScopeAppPropSetByHandler1,APPLICATION)") == -1) { - TestUtil.logErr(who + contextType - + "Handler1.MessageContext.setPropertyScope(OUTBOUND" + who - + contextType - + "MessageScopeAppPropSetByHandler1,APPLICATION) was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler1.MessageContext.put(OUTBOUND" - + who + contextType - + "MessageScopeHandlerPropSetByHandler1,SetByHandler1)") == -1) { - TestUtil.logErr(who + contextType + "Handler1.MessageContext.put(OUTBOUND" - + who + contextType - + "MessageScopeAppPropSetByHandler1,SetByHandler1) was not found"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler1.MessageContext.setPropertyScope(OUTBOUND" - + who + contextType - + "MessageScopeHandlerPropSetByHandler1,HANDLER)") == -1) { - TestUtil.logErr(who + contextType - + "Handler1.MessageContext.setPropertyScope(OUTBOUND" + who - + contextType - + "MessageScopeHandlerPropSetByHandler1,HANDLER) was not found"); - pass = false; - } - if (who.equals("Client")) { - if (calls - .indexOf(who + contextType + "Handler2.MessageContext.getProperty(" - + who + "To" + who + "Prop)=client") == -1) { - TestUtil - .logErr(who + contextType + "Handler2.MessageContext.getProperty(" - + who + "To" + who + "Prop)=client was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler2.MessageContext.put(" + who - + "To" + who + "Prop,clientOUTBOUNDClient" + contextType - + "Handler2)") == -1) { - TestUtil.logErr(who + contextType + "Handler2.MessageContext.put(" + who - + "To" + who + "Prop,clientOUTBOUNDClient" + contextType - + "Handler2) was not found"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler2.MessageContext.setPropertyScope(" + who - + "To" + who + "Prop,APPLICATION)") == -1) { - TestUtil.logErr( - who + contextType + "Handler2.MessageContext.setPropertyScope(" - + who + "To" + who + "Prop,APPLICATION) was not found"); - pass = false; - } - } else { - if (calls.indexOf(who + contextType - + "Handler2.MessageContext.put(Handler" + who - + "HandlerProp,INBOUNDServer" + contextType + "Handler2)") == -1) { - TestUtil.logErr(who + contextType + "Handler2.MessageContext.put(" - + "Handler" + who + "HandlerProp,INBOUNDServer" + contextType - + "Handler2) was not found"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler2.MessageContext.setPropertyScope(Handler" - + who + "HandlerProp,APPLICATION)") == -1) { - TestUtil.logErr( - who + contextType + "Handler2.MessageContext.setPropertyScope(" - + "Handler" + who + "HandlerProp,APPLICATION) was not found"); - pass = false; - } - } - - if (calls.indexOf(who + contextType - + "Handler3.MessageContext.getProperty(OUTBOUND" + who + contextType - + "CrossHandlerPropSetByHandler1)=SetByHandler1") == -1) { - TestUtil.logErr(who + contextType - + "Handler3.MessageContext.getProperty(OUTBOUND" + who + contextType - + "CrossHandlerPropSetByHandler1)=SetByHandler1 was not found"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler3.MessageContext.getProperty(OUTBOUND" + who + contextType - + "MessageScopeAppPropSetByHandler1)=SetByHandler1") == -1) { - TestUtil.logErr(who + contextType - + "Handler3.MessageContext.getProperty(OUTBOUND" + who + contextType - + "MessageScopeAppPropSetByHandler1)=SetByHandler1 was not found"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler3.MessageContext.getProperty(OUTBOUND" + who + contextType - + "MessageScopeHandlerPropSetByHandler1)=SetByHandler1") == -1) { - TestUtil.logErr(who + contextType - + "Handler3.MessageContext.getProperty(OUTBOUND" + who + contextType - + "MessageScopeHandlerPropSetByHandler1)=SetByHandler1 was not found"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler3.MessageContext.getPropertyScope(OUTBOUND" + who - + contextType + "CrossHandlerPropSetByHandler1)=HANDLER") == -1) { - TestUtil.logErr(who + contextType - + "Handler3.MessageContext.getPropertyScope(OUTBOUND" + who - + contextType - + "CrossHandlerPropSetByHandler1)=HANDLER was not found"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler3.MessageContext.getPropertyScope(OUTBOUND" - + who + contextType - + "MessageScopeAppPropSetByHandler1)=APPLICATION") == -1) { - TestUtil.logErr(who + contextType - + "Handler3.MessageContext.getPropertyScope(OUTBOUND" + who - + contextType - + "MessageScopeAppPropSetByHandler1)=APPLICATION was not found"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler3.MessageContext.getPropertyScope(OUTBOUND" - + who + contextType - + "MessageScopeHandlerPropSetByHandler1)=HANDLER") == -1) { - TestUtil.logErr(who + contextType - + "Handler3.MessageContext.getPropertyScope(OUTBOUND" + who - + contextType - + "MessageScopeHandlerPropSetByHandler1)=HANDLER was not found"); - pass = false; - } - - if (calls.indexOf(who + contextType + "Handler3.MessageContext.put(INBOUND" - + who + contextType - + "CrossHandlerPropSetByHandler3,SetByHandler3)") == -1) { - TestUtil.logErr(who + contextType + "Handler3.MessageContext.put(OUTBOUND" - + who + contextType - + "CrossHandlerPropSetByHandler3,SetByHandler3) was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler3.MessageContext.put(INBOUND" - + who + contextType - + "MessageScopeAppPropSetByHandler3,SetByHandler3)") == -1) { - TestUtil.logErr(who + contextType + "Handler3.MessageContext.put(OUTBOUND" - + who + contextType - + "MessageScopeAppPropSetByHandler3,SetByHandler3) was not found"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler3.MessageContext.setPropertyScope(INBOUND" + who + contextType - + "MessageScopeAppPropSetByHandler3,APPLICATION)") == -1) { - TestUtil.logErr(who + contextType - + "Handler3.MessageContext.setPropertyScope(OUTBOUND" + who - + contextType - + "MessageScopeAppPropSetByHandler3,APPLICATION) was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler3.MessageContext.put(INBOUND" - + who + contextType - + "MessageScopeHandlerPropSetByHandler3,SetByHandler3)") == -1) { - TestUtil.logErr(who + contextType + "Handler3.MessageContext.put(OUTBOUND" - + who + contextType - + "MessageScopeHandlerPropSetByHandler3,SetByHandler3) was not found"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler3.MessageContext.setPropertyScope(INBOUND" + who + contextType - + "MessageScopeHandlerPropSetByHandler3,HANDLER)") == -1) { - TestUtil.logErr(who + contextType - + "Handler3.MessageContext.setPropertyScope(OUTBOUND" + who - + contextType - + "MessageScopeHandlerPropSetByHandler3,HANDLER) was not found"); - pass = false; - } - if (who.equals("Client")) { - if (calls.indexOf(who + contextType - + "Handler2.MessageContext.getProperty(" + who + "To" + who - + "Prop)=clientOUTBOUNDClient" + contextType + "Handler2") == -1) { - TestUtil - .logErr(who + contextType + "Handler2.MessageContext.getProperty(" - + who + "To" + who + "Prop)=clientOUTBOUNDClient" + contextType - + "Handler2 was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler2.MessageContext.put(" + who - + "To" + who + "Prop,clientOUTBOUNDClient" + contextType - + "Handler2INBOUNDClient" + contextType + "Handler2)") == -1) { - TestUtil.logErr(who + contextType + "Handler2.MessageContext.put(" + who - + "To" + who + "Prop,clientOUTBOUNDClient" + contextType - + "Handler2INBOUNDClient" + contextType - + "Handler2) was not found"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler2.MessageContext.setPropertyScope(" + who - + "To" + who + "Prop,APPLICATION)") == -1) { - TestUtil.logErr( - who + contextType + "Handler2.MessageContext.setPropertyScope(" - + who + "To" + who + "Prop,APPLICATION) was not found"); - pass = false; - } - } else { - if (calls.indexOf(who + contextType - + "Handler2.MessageContext.put(Handler" + who - + "HandlerProp,INBOUNDServer" + contextType - + "Handler2serverOUTBOUNDServer" + contextType + "Handler2)") == -1) { - TestUtil.logErr(who + contextType + "Handler2.MessageContext.put(" - + "Handler" + who + "HandlerProp,INBOUNDServer" + contextType - + "Handler2serverOUTBOUNDServer" + contextType - + "Handler2) was not found"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler2.MessageContext.setPropertyScope(Handler" - + who + "HandlerProp,APPLICATION)") == -1) { - TestUtil.logErr( - who + contextType + "Handler2.MessageContext.setPropertyScope(" - + "Handler" + who + "HandlerProp,APPLICATION) was not found"); - pass = false; - } - } - - if (calls.indexOf(who + contextType - + "Handler1.MessageContext.getProperty(INBOUND" + who + contextType - + "CrossHandlerPropSetByHandler3)=SetByHandler3") == -1) { - TestUtil.logErr(who + contextType - + "Handler1.MessageContext.getProperty(INBOUND" + who + contextType - + "CrossHandlerPropSetByHandler3)=SetByHandler3 was not found"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler1.MessageContext.getProperty(INBOUND" + who + contextType - + "MessageScopeAppPropSetByHandler3)=SetByHandler3") == -1) { - TestUtil.logErr(who + contextType - + "Handler1.MessageContext.getProperty(INBOUND" + who + contextType - + "MessageScopeAppPropSetByHandler3)=SetByHandler3 was not found"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler1.MessageContext.getProperty(INBOUND" + who + contextType - + "MessageScopeHandlerPropSetByHandler3)=SetByHandler3") == -1) { - TestUtil.logErr(who + contextType - + "Handler1.MessageContext.getProperty(INBOUND" + who + contextType - + "MessageScopeHandlerPropSetByHandler3)=SetByHandler3 was not found"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler1.MessageContext.getPropertyScope(INBOUND" + who + contextType - + "CrossHandlerPropSetByHandler3)=HANDLER") == -1) { - TestUtil.logErr( - who + contextType + "Handler1.MessageContext.getPropertyScope(INBOUND" - + who + contextType - + "CrossHandlerPropSetByHandler3)=HANDLER was not found"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler1.MessageContext.getPropertyScope(INBOUND" + who + contextType - + "MessageScopeAppPropSetByHandler3)=APPLICATION") == -1) { - TestUtil.logErr( - who + contextType + "Handler1.MessageContext.getPropertyScope(INBOUND" - + who + contextType - + "MessageScopeAppPropSetByHandler3)=APPLICATION was not found"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler1.MessageContext.getPropertyScope(INBOUND" + who + contextType - + "MessageScopeHandlerPropSetByHandler3)=HANDLER") == -1) { - TestUtil.logErr( - who + contextType + "Handler1.MessageContext.getPropertyScope(INBOUND" - + who + contextType - + "MessageScopeHandlerPropSetByHandler3)=HANDLER was not found"); - pass = false; - } - - return pass; - } - - public static boolean VerifyLogicalOrSOAPMessageContextCallBacks(String who, - String contextType, List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - - JAXWS_Util.dumpList(calls); - - if (calls.indexOf("Inbound" + who + contextType + "Handler2." + contextType - + "MessageContext.getMessage()=null") != -1) { - TestUtil.logErr("Inbound" + who + contextType + "Handler2." + contextType - + "MessageContext.getMessage()=null was called"); - pass = false; - } - if (calls.indexOf("Outbound" + who + contextType + "Handler2." + contextType - + "MessageContext.getMessage()=null") != -1) { - TestUtil.logErr("Outbound" + who + contextType + "Handler2." + contextType - + "MessageContext.getMessage()=null was called"); - pass = false; - } - - if (contextType.equals("SOAP")) { - if (calls.indexOf("Inbound" + who + contextType + "Handler2." - + contextType + "MessageContext.setMessage() was called") == -1) { - TestUtil.logErr("Inbound" + who + contextType + "Handler2." - + contextType + "MessageContext.setMessage() was not called"); - pass = false; - } - if (calls.indexOf("Inbound" + who + contextType + "Handler2." - + contextType + "MessageContext.getRoles()=null") != -1) { - TestUtil.logErr("Inbound" + who + contextType + "Handler2." - + contextType + "MessageContext.getRoles()=null was called"); - pass = false; - } - if (calls.indexOf("Inbound" + who + contextType + "Handler2." - + contextType + "MessageContext.getHeaders()=||") == -1) { - TestUtil.logErr("Inbound" + who + contextType + "Handler2." - + contextType + "MessageContext.getHeaders()=|| was not returned"); - pass = false; - } - if (calls.indexOf("Outbound" + who + contextType + "Handler2." - + contextType + "MessageContext.setMessage() was called") == -1) { - TestUtil.logErr("Outbound" + who + contextType + "Handler2." - + contextType + "MessageContext.setMessage() was not called"); - pass = false; - } - if (calls.indexOf("Outbound" + who + contextType + "Handler2." - + contextType + "MessageContext.getRoles()=null") != -1) { - TestUtil.logErr("Outbound" + who + contextType + "Handler2." - + contextType + "MessageContext.getRoles()=null was called"); - pass = false; - } - if (calls.indexOf("Outbound" + who + contextType + "Handler2." - + contextType + "MessageContext.getHeaders()=||") == -1) { - TestUtil.logErr("Outbound" + who + contextType + "Handler2." - + contextType + "MessageContext.getHeaders()=|| was not returned"); - pass = false; - } - } - return pass; - } - - public static boolean VerifyStandardMessageContextPropertiesCallBacks( - String who, String contextType, List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - - JAXWS_Util.dumpList(calls); - - if (who.equals("Client")) { - - if (JAXWS_Util.looseIndexOf(calls, - "OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)") == -1) { - TestUtil.logErr("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[0] - expected attachment was not found"); - pass = false; - } - if (JAXWS_Util.looseIndexOf(calls, - "OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[1]") != -1) { - TestUtil.logErr("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[1] - an unexpected attachment was found"); - pass = false; - } - if (JAXWS_Util.looseIndexOf(calls, "OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[0]") == -1) { - TestUtil.logErr("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[0] - expected attachment was not found"); - pass = false; - } - if (JAXWS_Util.looseIndexOf(calls, "OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[1]") != -1) { - TestUtil.logErr("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[1] - an unexpected attachment was found"); - - pass = false; - } - if (calls.indexOf("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_RESPONSE_HEADERS)=null") == -1) { - TestUtil.logErr("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_RESPONSE_HEADERS)=null was not found"); - pass = false; - } - if (calls.indexOf("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_RESPONSE_HEADERS)=null") == -1) { - TestUtil.logErr("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_RESPONSE_HEADERS)=null was not found"); - pass = false; - } - if (calls.indexOf("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_REQUEST)=null") == -1) { - TestUtil.logErr("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_REQUEST)=null was not found"); - pass = false; - } - if (calls.indexOf("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_REQUEST)=null") == -1) { - TestUtil.logErr("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_REQUEST)=null was not found"); - pass = false; - } - if (calls.indexOf("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_RESPONSE)=null") == -1) { - TestUtil.logErr("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_RESPONSE)=null was not found"); - pass = false; - } - if (calls.indexOf("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_RESPONSE)=null") == -1) { - TestUtil.logErr("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_RESPONSE)=null was not found"); - pass = false; - } - if (calls.indexOf("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_CONTEXT)=null") == -1) { - TestUtil.logErr("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_CONTEXT)=null was not found"); - pass = false; - } - if (calls.indexOf("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_CONTEXT)=null") == -1) { - TestUtil.logErr("OutboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_CONTEXT)=null was not found"); - pass = false; - } - - if (JAXWS_Util.looseIndexOf(calls, - "InboundClient" + contextType + "Handler2.MessageContext.getProperty(" - + contextType - + "MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[0]") == -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[0] - expected attachment was not found"); - pass = false; - } - if (JAXWS_Util.looseIndexOf(calls, - "InboundClient" + contextType + "Handler2.MessageContext.getProperty(" - + contextType - + "MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[1]") != -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[1] - an unexpected attachment was found"); - pass = false; - } - if (JAXWS_Util.looseIndexOf(calls, "InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[0]") == -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[0] - expected attachment was not found"); - pass = false; - } - if (JAXWS_Util.looseIndexOf(calls, "InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[1]") != -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[1] - an unexpected attachment was found"); - pass = false; - } - - if (calls.indexOf( - "InboundClient" + contextType + "Handler2.MessageContext.getProperty(" - + contextType + "MessageContext.HTTP_RESPONSE_CODE)=200") == -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_RESPONSE_CODE)=200 was not found"); - pass = false; - } - if (calls.indexOf("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_RESPONSE_CODE)=200") == -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_RESPONSE_CODE)=200 was not found"); - pass = false; - } - if (calls.indexOf("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_REQUEST_HEADERS)=null") == -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_REQUEST_HEADERS)=null was not found"); - pass = false; - } - if (calls.indexOf("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_REQUEST_HEADERS)=null") == -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_REQUEST_HEADERS)=null was not found"); - pass = false; - } - if (calls.indexOf("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_RESPONSE_HEADERS)=null") != -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_RESPONSE_HEADERS)=null was found"); - pass = false; - } - if (calls.indexOf("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_RESPONSE_HEADERS)=null") != -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_RESPONSE_HEADERS)=null was found"); - pass = false; - } - if (calls.indexOf( - "InboundClient" + contextType + "Handler2.MessageContext.getProperty(" - + contextType + "MessageContext.SERVLET_REQUEST)=null") == -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_REQUEST)=null was not found"); - pass = false; - } - if (calls.indexOf("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_REQUEST)=null") == -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_REQUEST)=null was not found"); - pass = false; - } - if (calls.indexOf( - "InboundClient" + contextType + "Handler2.MessageContext.getProperty(" - + contextType + "MessageContext.SERVLET_RESPONSE)=null") == -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_RESPONSE)=null was not found"); - pass = false; - } - if (calls.indexOf("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_RESPONSE)=null") == -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_RESPONSE)=null was not found"); - pass = false; - } - if (calls.indexOf( - "InboundClient" + contextType + "Handler2.MessageContext.getProperty(" - + contextType + "MessageContext.SERVLET_CONTEXT)=null") == -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_CONTEXT)=null was not found"); - pass = false; - } - if (calls.indexOf("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_CONTEXT)=null") == -1) { - TestUtil.logErr("InboundClient" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_CONTEXT)=null was not found"); - pass = false; - } - - } else { - // server - if (JAXWS_Util.looseIndexOf(calls, - "InboundServer" + contextType + "Handler2.MessageContext.getProperty(" - + contextType - + "MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[0]") == -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[0] - expected attachment was not found"); - pass = false; - } - if (JAXWS_Util.looseIndexOf(calls, - "InboundServer" + contextType + "Handler2.MessageContext.getProperty(" - + contextType - + "MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[1]") != -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[1] - an unexpected attachment was found"); - pass = false; - } - if (JAXWS_Util.looseIndexOf(calls, "InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[0]") == -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[0] - expected attachment was not found"); - pass = false; - } - if (JAXWS_Util.looseIndexOf(calls, "InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[1]") != -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)=key[1] - an unexpected attachment was found"); - pass = false; - } - - if (calls.indexOf("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_REQUEST_METHOD)=POST") == -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_REQUEST_METHOD)=POST was not found"); - pass = false; - } - if (calls.indexOf("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_REQUEST_METHOD)=POST") == -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_REQUEST_METHOD)=POST was not found"); - pass = false; - } - if (calls.indexOf("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_REQUEST_HEADERS)=null") != -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_REQUEST_HEADERS)=null was found"); - pass = false; - } - if (calls.indexOf("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_REQUEST_HEADERS)=null") != -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_REQUEST_HEADERS)=null was found"); - pass = false; - } - if (calls.indexOf("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_RESPONSE_HEADERS)=null") == -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_RESPONSE_HEADERS)=null was not found"); - pass = false; - } - if (calls.indexOf("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_RESPONSE_HEADERS)=null") == -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_RESPONSE_HEADERS)=null was not found"); - pass = false; - } - if (calls.indexOf( - "InboundServer" + contextType + "Handler2.MessageContext.getProperty(" - + contextType + "MessageContext.SERVLET_REQUEST)=null") != -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_REQUEST)=null was found"); - pass = false; - } - if (calls.indexOf("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_REQUEST)=null") != -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_REQUEST)=null was found"); - pass = false; - } - if (calls.indexOf( - "InboundServer" + contextType + "Handler2.MessageContext.getProperty(" - + contextType + "MessageContext.SERVLET_RESPONSE)=null") != -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_RESPONSE)=null was found"); - pass = false; - } - if (calls.indexOf("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_RESPONSE)=null") != -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_RESPONSE)=null was found"); - pass = false; - } - if (calls.indexOf( - "InboundServer" + contextType + "Handler2.MessageContext.getProperty(" - + contextType + "MessageContext.SERVLET_CONTEXT)=null") != -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_CONTEXT)=null was found"); - pass = false; - } - if (calls.indexOf("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_CONTEXT)=null") != -1) { - TestUtil.logErr("InboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_CONTEXT)=null was found"); - pass = false; - } - - if (JAXWS_Util.looseIndexOf(calls, - "OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[0]") == -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[0] - expected attachment was not found"); - pass = false; - } - if (JAXWS_Util.looseIndexOf(calls, - "OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[1]") != -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[1] - an unexpected attachment was found"); - pass = false; - } - if (JAXWS_Util.looseIndexOf(calls, "OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[0]") == -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[0] - expected attachment was not found"); - pass = false; - } - if (JAXWS_Util.looseIndexOf(calls, "OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[1]") != -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS)=key[1] - an unexpected attachment was found"); - pass = false; - } - if (calls.indexOf("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_REQUEST_METHOD)=POST") == -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_REQUEST_METHOD)=POST was not found"); - pass = false; - } - if (calls.indexOf("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_REQUEST_METHOD)=POST") == -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_REQUEST_METHOD)=POST was not found"); - pass = false; - } - if (calls.indexOf("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_REQUEST_HEADERS)=null") != -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.HTTP_REQUEST_HEADERS)=null was found"); - pass = false; - } - if (calls.indexOf("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_REQUEST_HEADERS)=null") != -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.HTTP_REQUEST_HEADERS)=null was found"); - pass = false; - } - if (calls.indexOf("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_REQUEST)=null") != -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_REQUEST)=null was found"); - pass = false; - } - if (calls.indexOf("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_REQUEST)=null") != -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_REQUEST)=null was found"); - pass = false; - } - if (calls.indexOf("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_RESPONSE)=null") != -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_RESPONSE)=null was found"); - pass = false; - } - if (calls.indexOf("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_RESPONSE)=null") != -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_RESPONSE)=null was found"); - pass = false; - } - if (calls.indexOf("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_CONTEXT)=null") != -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(" + contextType - + "MessageContext.SERVLET_CONTEXT)=null was found"); - pass = false; - } - if (calls.indexOf("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_CONTEXT)=null") != -1) { - TestUtil.logErr("OutboundServer" + contextType - + "Handler2.MessageContext.getProperty(MessageContext.SERVLET_CONTEXT)=null was found"); - pass = false; - } - } - return pass; - } - - public static boolean VerifyHandleFaultFalseCallBacks(String who, - String contextType, List calls, String direction) { - boolean pass = true; - String packageName = null; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - if (who.equals("Client")) { - if (direction.equals(Constants.OUTBOUND)) { - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6 Throwing an outbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler6 Throwing an outbound SOAPFaultException was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.handleFault()") == -1) { - TestUtil.logErr( - who + contextType + "Handler4.handleFault() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.handleFault()") > -1) { - TestUtil - .logErr(who + contextType + "Handler5.handleFault() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - } - } else { - // server - if (direction.equals(Constants.INBOUND)) { - // inbound - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler5.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler5 Throwing an inbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler5 Throwing an inbound SOAPFaultException was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.handleFault()") == -1) { - TestUtil.logErr( - who + contextType + "Handler4.handleFault() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.handleFault()") > -1) { - TestUtil - .logErr(who + contextType + "Handler4.handleFault() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - } - } - return pass; - } - - public static boolean VerifyHandleMessageExceptionCallBacks(String who, - String contextType, List calls, String direction) { - boolean pass = true; - String packageName = null; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - if (who.equals("Client")) { - if (direction.equals(Constants.OUTBOUND)) { - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doOutbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4 Throwing an outbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler4 Throwing an outinbound SOAPFaultException was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - } else { - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4 Throwing an inbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler4 Throwing an inbound SOAPFaultException was not found"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler5.handleMessage().doInbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - - } - } else { - // server - if (direction.equals(Constants.INBOUND)) { - // inbound - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4 Throwing an inbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler4 Throwing an inbound SOAPFaultException was not found"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler5.handleMessage().doInbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - } else { - // outbound - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler5.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doOutbound()") > -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4 Throwing an outbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler4 Throwing an outbound SOAPFaultException was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - } - } - return pass; - } - - public static boolean VerifyHandleFaultRuntimeExceptionCallBacks(String who, - String contextType, List calls, String direction) { - boolean pass = true; - String packageName = null; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - if (who.equals("Client")) { - if (direction.equals(Constants.OUTBOUND)) { - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6 Throwing an outbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler6 Throwing an outbound SOAPFaultException was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.handleFault()") == -1) { - TestUtil.logErr( - who + contextType + "Handler4.handleFault() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4 Throwing an inbound RuntimeException") == -1) { - TestUtil.logErr(who + contextType - + "Handler4 Throwing an inbound RuntimeException was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - } - } else { - // server - if (direction.equals(Constants.INBOUND)) { - // inbound - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler5.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler5 Throwing an inbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler5 Throwing an inbound SOAPFaultException was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.handleFault()") == -1) { - TestUtil.logErr( - who + contextType + "Handler4.handleFault() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4 Throwing an outbound RuntimeException") == -1) { - TestUtil.logErr(who + contextType - + "Handler4 Throwing an outbound RuntimeException was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - } - } - return pass; - } - - public static boolean VerifyHandleFaultSOAPFaultExceptionCallBacks(String who, - String contextType, List calls, String direction) { - boolean pass = true; - String packageName = null; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - if (who.equals("Client")) { - if (direction.equals(Constants.OUTBOUND)) { - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6 Throwing an outbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler6 Throwing an outbound SOAPFaultException was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.handleFault()") == -1) { - TestUtil.logErr( - who + contextType + "Handler4.handleFault() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4 Throwing an inbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler4 Throwing an inbound SOAPFaultException was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - } - } else { - // server - if (direction.equals(Constants.INBOUND)) { - // inbound - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler5.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler5 Throwing an inbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler5 Throwing an inbound SOAPFaultException was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.handleFault()") == -1) { - TestUtil.logErr( - who + contextType + "Handler4.handleFault() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4 Throwing an outbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler4 Throwing an outbound SOAPFaultException was not found"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler4.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler4.close() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler5.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler5.close() was not called"); - pass = false; - } - } - } - return pass; - } - - public static boolean VerifyLogicalVerseSOAPHandlerOrder(List calls) { - boolean pass = true; - - TestUtil.logTrace("The complete list of callbacks are the following:"); - JAXWS_Util.dumpList(calls); - - TestUtil.logTrace( - "Getting just the handleMessage().doOutbound/doInbound messages"); - List inHandlers = new Vector(); - List outHandlers = new Vector(); - TestUtil.logTrace("\n"); - TestUtil - .logTrace("The list of doOutbound/doInbound callbacks are as follows:"); - if (!calls.isEmpty()) { - Iterator i = calls.iterator(); - while (i.hasNext()) { - Object o = i.next(); - if (o != null) { - if (o instanceof String) { - String item = (String) o; - if (item.indexOf("handleMessage().doInbound") > -1) { - TestUtil.logTrace(item); - inHandlers.add(item); - } else if (item.indexOf("handleMessage().doOutbound") > -1) { - TestUtil.logTrace(item); - outHandlers.add(item); - } - } else { - TestUtil.logErr( - "An unexpected object was returned while iterating through"); - TestUtil.logErr("the list of callbacks, expected String got:" + o); - } - } else { - TestUtil.logErr("A null object was returned while iterating through"); - TestUtil.logErr("the list of callbacks"); - } - } - } - - if (outHandlers.size() > 0) { - TestUtil.logTrace("The list of doOutbound callbacks are as follows:"); - JAXWS_Util.dumpList(outHandlers); - - int lastLogical = JAXWS_Util.looseLastIndexOf(outHandlers, - "LogicalHandler"); - int firstSOAP = JAXWS_Util.looseIndexOf(outHandlers, "SOAPHandler"); - TestUtil.logTrace("lastLogical=" + lastLogical); - TestUtil.logTrace("firstSOAP=" + firstSOAP); - if ((lastLogical == -1) || (firstSOAP == -1)) { - TestUtil.logErr( - "Both Logical and SOAP request handlers were not in the Callback string"); - pass = false; - } - - if (lastLogical > firstSOAP) { - TestUtil.logErr( - "The first SOAPHandler (" + outHandlers.get(firstSOAP) + ")"); - TestUtil.logErr("for an outbound message did not occur after the"); - TestUtil.logErr( - "last LogicalHandler (" + outHandlers.get(lastLogical) + ")"); - pass = false; - } - } else { - TestUtil.logErr("The list of handleMessage() callbacks was empty"); - pass = false; - } - - if (inHandlers.size() > 0) { - TestUtil.logTrace("The list of doInbound callbacks are as follows:"); - JAXWS_Util.dumpList(inHandlers); - - int lastSOAP = JAXWS_Util.looseLastIndexOf(inHandlers, "SOAPHandler"); - int firstLogical = JAXWS_Util.looseIndexOf(inHandlers, "LogicalHandler"); - TestUtil.logTrace("lastSOAP=" + lastSOAP); - TestUtil.logTrace("firstLogical=" + firstLogical); - if ((lastSOAP == -1) || (firstLogical == -1)) { - TestUtil.logErr( - "Both Logical and SOAP response handlers were not in the Callback string"); - pass = false; - } - if (lastSOAP > firstLogical) { - TestUtil.logErr( - "The first LogicalHandler (" + inHandlers.get(firstLogical) + ")"); - TestUtil.logErr("for an inbound message did not occur after the"); - TestUtil.logErr("last SOAPHandler (" + inHandlers.get(lastSOAP) + ")"); - pass = false; - } - } else { - TestUtil.logErr("The list of handleMessage() callbacks was empty"); - pass = false; - } - return pass; - - } - - public static boolean VerifySOAPVerseLogicalHandlerOrder(List calls) { - boolean pass = true; - - TestUtil.logTrace("The complete list of callbacks are the following:"); - JAXWS_Util.dumpList(calls); - - TestUtil.logTrace( - "Getting just the handleMessage().doOutbound/doInbound messages"); - List inHandlers = new Vector(); - List outHandlers = new Vector(); - TestUtil.logTrace("\n"); - TestUtil - .logTrace("The list of doOutbound/doInbound callbacks are as follows:"); - if (!calls.isEmpty()) { - Iterator i = calls.iterator(); - while (i.hasNext()) { - Object o = i.next(); - if (o != null) { - if (o instanceof String) { - String item = (String) o; - if (item.indexOf("handleMessage().doInbound") > -1) { - TestUtil.logTrace(item); - inHandlers.add(item); - } else if (item.indexOf("handleMessage().doOutbound") > -1) { - TestUtil.logTrace(item); - outHandlers.add(item); - } - } else { - TestUtil.logErr( - "An unexpected object was returned while iterating through"); - TestUtil.logErr("the list of callbacks, expected String got:" + o); - } - } else { - TestUtil.logErr("A null object was returned while iterating through"); - TestUtil.logErr("the list of callbacks"); - } - } - } - - if (outHandlers.size() > 0) { - TestUtil.logTrace("The list of doOutbound callbacks are as follows:"); - JAXWS_Util.dumpList(outHandlers); - - int lastLogical = JAXWS_Util.looseLastIndexOf(outHandlers, - "LogicalHandler"); - int firstSOAP = JAXWS_Util.looseIndexOf(outHandlers, "SOAPHandler"); - TestUtil.logTrace("lastLogical=" + lastLogical); - TestUtil.logTrace("firstSOAP=" + firstSOAP); - if ((lastLogical == -1) || (firstSOAP == -1)) { - TestUtil.logErr( - "Both Logical and SOAP request handlers were not in the Callback string"); - pass = false; - } - - if (lastLogical > firstSOAP) { - TestUtil.logErr( - "The first SOAPHandler (" + outHandlers.get(firstSOAP) + ")"); - TestUtil.logErr("for an outbound message did not occur after the"); - TestUtil.logErr( - "last LogicalHandler (" + outHandlers.get(lastLogical) + ")"); - pass = false; - } - } else { - TestUtil.logErr("The list of handleMessage() callbacks was empty"); - pass = false; - } - - if (inHandlers.size() > 0) { - TestUtil.logTrace("The list of doInbound callbacks are as follows:"); - JAXWS_Util.dumpList(inHandlers); - - int lastSOAP = JAXWS_Util.looseLastIndexOf(inHandlers, "SOAPHandler"); - int firstLogical = JAXWS_Util.looseIndexOf(inHandlers, "LogicalHandler"); - TestUtil.logTrace("lastSOAP=" + lastSOAP); - TestUtil.logTrace("firstLogical=" + firstLogical); - if ((lastSOAP == -1) || (firstLogical == -1)) { - TestUtil.logErr( - "Both Logical and SOAP response handlers were not in the Callback string"); - pass = false; - } - if (lastSOAP > firstLogical) { - TestUtil.logErr( - "The first LogicalHandler (" + inHandlers.get(firstLogical) + ")"); - TestUtil.logErr("for an inbound message did not occur after the"); - TestUtil.logErr("last SOAPHandler (" + inHandlers.get(lastSOAP) + ")"); - pass = false; - } - } else { - TestUtil.logErr("The list of handleMessage() callbacks was empty"); - pass = false; - } - return pass; - - } - - public static boolean VerifyServerToClientHandlerExceptionCallBacks( - String who, String contextType, String direction, List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("contextType=" + contextType); - TestUtil.logTrace("direction=" + direction); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - - if (who.equals("Client")) { - if (direction.equals(Constants.OUTBOUND)) { - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.handleFault()") == -1) { - TestUtil.logErr( - who + contextType + "Handler6.handleFault() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6 received SOAPFault from Inbound Server" + contextType - + "Handler6") == -1) { - TestUtil.logErr(who + contextType - + "Handler6 received SOAPFault from Inbound Server" + contextType - + "Handler6 was not found"); - pass = false; - } - } else { - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.handleFault()") == -1) { - TestUtil.logErr( - who + contextType + "Handler6.handleFault() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6 received SOAPFault from Outbound Server" + contextType - + "Handler6") == -1) { - TestUtil.logErr(who + contextType - + "Handler6 received SOAPFault from Outbound Server" + contextType - + "Handler6 was not found"); - pass = false; - } - } - if (!VerifyCloseCallBacks(who, calls, contextType, true, - Constants.INBOUND)) { - pass = false; - } - } else { - // server - if (direction.equals(Constants.INBOUND)) { - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6 Throwing an inbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler6 Throwing an inbound SOAPFaultException was not called"); - pass = false; - } - if (calls.indexOf(who + contextType + "Handler6.close()") == -1) { - TestUtil - .logErr(who + contextType + "Handler6.close() was not called"); - pass = false; - } - } else { - if (calls.indexOf( - who + contextType + "Handler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler4.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + contextType + "Handler5.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler4.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler4.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who + contextType - + "Handler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + contextType - + "Handler6 Throwing an outbound SOAPFaultException") == -1) { - TestUtil.logErr(who + contextType - + "Handler6 Throwing an outbound SOAPFaultException was not called"); - pass = false; - } - if (!VerifyCloseCallBacks(who, calls, contextType, true, - Constants.OUTBOUND)) { - pass = false; - } - } - } - return pass; - } - - public static boolean VerifyOneWayCallbacks(String who, String direction, - List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("direction=" + direction); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - - if (who.equals("Client")) { - if (direction.equals(Constants.OUTBOUND)) { - if (calls.indexOf( - who + "LogicalHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler3.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler3.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "SOAPHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "SOAPHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "SOAPHandler3.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler3.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler3.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler3.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler2.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler2.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler1.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler3.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler3.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler2.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler2.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler1.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler1.close() was not called"); - pass = false; - } - - } - } else { - // server - if (direction.equals(Constants.INBOUND)) { - if (calls - .indexOf(who + "SOAPHandler3.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler3.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "SOAPHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "SOAPHandler1.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler3.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler3.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler1.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler1.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler2.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler2.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler3.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler3.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler1.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler2.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler2.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler3.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler3.close() was not called"); - pass = false; - } - } - } - return pass; - } - - public static boolean VerifyOneWaySOAPFaultCallbacks(String who, - String direction, String contextType, List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("direction=" + direction); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - - if (who.equals("Client")) { - if (direction.equals(Constants.OUTBOUND)) { - if (calls.indexOf( - who + "LogicalHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (contextType.equals("SOAP")) { - if (calls.indexOf( - who + "LogicalHandler3.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler3.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "SOAPHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "SOAPHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "SOAPHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "SOAPHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who - + "SOAPHandler2 Throwing an outbound SOAPFaultException") == -1) { - TestUtil.logErr(who - + "SOAPHandler2 Throwing an outbound SOAPFaultException was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler2.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler2.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler1.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler3.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler3.close() was not called"); - pass = false; - } - } else { - if (calls.indexOf(who - + "LogicalHandler2 Throwing an outbound SOAPFaultException") == -1) { - TestUtil.logErr(who - + "LogicalHandler2 Throwing an outbound SOAPFaultException was not called"); - pass = false; - } - } - if (calls.indexOf(who + "LogicalHandler2.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler2.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler1.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler1.close() was not called"); - pass = false; - } - - } - } else { - // server - if (direction.equals(Constants.INBOUND)) { - if (calls - .indexOf(who + "SOAPHandler3.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler3.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "SOAPHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (!contextType.equals("SOAP")) { - if (calls.indexOf( - who + "SOAPHandler1.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who - + "SOAPHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler3.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler3.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who - + "LogicalHandler2 Throwing an inbound SOAPFaultException") == -1) { - TestUtil.logErr(who - + "LogicalHandler2 Throwing an inbound SOAPFaultException was not called"); - pass = false; - - } - if (calls.indexOf(who + "LogicalHandler2.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler2.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler3.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler3.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler1.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler1.close() was not called"); - pass = false; - } - } else { - if (calls.indexOf(who - + "SOAPHandler2 Throwing an inbound SOAPFaultException") == -1) { - TestUtil.logErr(who - + "SOAPHandler2 Throwing an inbound SOAPFaultException was not called"); - pass = false; - } - } - if (calls.indexOf(who + "SOAPHandler2.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler2.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler3.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler3.close() was not called"); - pass = false; - } - } - } - return pass; - } - - public static boolean VerifyOneWayHandleMessageFalseCallbacks(String who, - String direction, String contextType, List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("direction=" + direction); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - - if (who.equals("Client")) { - if (direction.equals(Constants.OUTBOUND)) { - if (calls.indexOf( - who + "LogicalHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (contextType.equals("SOAP")) { - if (calls.indexOf( - who + "LogicalHandler3.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler3.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "SOAPHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "SOAPHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "SOAPHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "SOAPHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "SOAPHandler2 HandleMessage returns false") == -1) { - TestUtil.logErr(who - + "SOAPHandler2 HandleMessage returns false was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler2.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler2.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler1.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler3.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler3.close() was not called"); - pass = false; - } - } else { - if (calls.indexOf( - who + "LogicalHandler2 HandleMessage returns false") == -1) { - TestUtil.logErr(who - + "LogicalHandler2 HandleMessage returns false was not called"); - pass = false; - } - } - if (calls.indexOf(who + "LogicalHandler2.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler2.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler1.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler1.close() was not called"); - pass = false; - } - - } - } else { - // server - if (direction.equals(Constants.INBOUND)) { - if (calls - .indexOf(who + "SOAPHandler3.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler3.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "SOAPHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (!contextType.equals("SOAP")) { - if (calls.indexOf( - who + "SOAPHandler1.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who - + "SOAPHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler3.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler3.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler2 HandleMessage returns false") == -1) { - TestUtil.logErr(who - + "LogicalHandler2 HandleMessage returns false was not called"); - pass = false; - - } - if (calls.indexOf(who + "LogicalHandler2.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler2.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler3.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler3.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler1.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler1.close() was not called"); - pass = false; - } - } else { - if (calls.indexOf( - who + "SOAPHandler2 HandleMessage returns false") == -1) { - TestUtil.logErr(who - + "SOAPHandler2 HandleMessage returns false was not called"); - pass = false; - } - } - if (calls.indexOf(who + "SOAPHandler2.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler2.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler3.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler3.close() was not called"); - pass = false; - } - } - } - return pass; - } - - public static boolean VerifyHandlerDoesNotGetCalled(String who, - List calls) { - boolean pass = true; - - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - TestUtil.logTrace("who=" + who); - TestUtil.logTrace("\n"); - - TestUtil.logTrace("The complete list of callbacks are:"); - JAXWS_Util.dumpList(calls); - - if (calls - .indexOf(who + "LogicalHandler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - who + "LogicalHandler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "LogicalHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - who + "LogicalHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (who.equals("Server")) { - if (calls.indexOf( - who + "LogicalHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf( - who + "LogicalHandler3.handleMessage().doOutbound()") == -1) { - TestUtil.logErr(who - + "LogicalHandler3.handleMessage().doOutbound() was not called"); - pass = false; - } - } - if (calls - .indexOf(who + "LogicalHandler6.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - who + "LogicalHandler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "SOAPHandler5.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler5.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "SOAPHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (who.equals("Server")) { - if (calls - .indexOf(who + "SOAPHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "SOAPHandler3.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler3.handleMessage().doOutbound() was not called"); - pass = false; - } - } - if (calls - .indexOf(who + "SOAPHandler6.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler6.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (who.equals("Server")) { - if (calls - .indexOf(who + "SOAPHandler3.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler3.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "SOAPHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - } - if (calls.indexOf(who + "SOAPHandler1.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler5.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "SOAPHandler5.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "LogicalHandler6.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "LogicalHandler6.handleMessage().doInbound() was not called"); - pass = false; - } - if (who.equals("Server")) { - if (calls - .indexOf(who + "LogicalHandler3.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "LogicalHandler3.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "LogicalHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "LogicalHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - } - if (calls - .indexOf(who + "LogicalHandler1.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "LogicalHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls - .indexOf(who + "LogicalHandler5.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - who + "LogicalHandler5.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler6.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler6.close() was not called"); - pass = false; - } - if (who.equals("Server")) { - if (calls.indexOf(who + "SOAPHandler3.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler3.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler2.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler2.close() was not called"); - pass = false; - } - } - if (calls.indexOf(who + "SOAPHandler1.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "SOAPHandler5.close()") == -1) { - TestUtil.logErr(who + "SOAPHandler5.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler6.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler6.close() was not called"); - pass = false; - } - if (who.equals("Server")) { - if (calls.indexOf(who + "LogicalHandler3.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler3.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler2.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler2.close() was not called"); - pass = false; - } - } - if (calls.indexOf(who + "LogicalHandler1.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf(who + "LogicalHandler5.close()") == -1) { - TestUtil.logErr(who + "LogicalHandler5.close() was not called"); - pass = false; - } - if (calls.indexOf( - who + "SNPSNBCLogicalHandler.handleMessage().doOutbound()") > -1) { - TestUtil.logErr(who - + "SNPSNBCLogicalHandler.handleMessage().doOutbound() was called"); - pass = false; - } - if (calls.indexOf( - who + "SNPSNBCSOAPHandler.handleMessage().doOutbound()") > -1) { - TestUtil.logErr( - who + "SNPSNBCSOAPHandler.handleMessage().doOutbound() was called"); - pass = false; - } - if (calls.indexOf( - who + "SNPSNBCLogicalHandler.handleMessage().doInbound()") > -1) { - TestUtil.logErr( - who + "SNPSNBCLogicalHandler.handleMessage().doInbound() was called"); - pass = false; - } - if (calls - .indexOf(who + "SNPSNBCSOAPHandler.handleMessage().doInbound()") > -1) { - TestUtil.logErr( - who + "SNPSNBCSOAPHandler.handleMessage().doInbound() was called"); - pass = false; - } - if (calls.indexOf(who + "SNPSNBCLogicalHandler.close()") > -1) { - TestUtil.logErr(who + "SNPSNBCLogicalHandler.close() was called"); - pass = false; - } - if (calls.indexOf(who + "SNPSNBCSOAPHandler.close()") > -1) { - TestUtil.logErr(who + "SNPSNBCSOAPHandler.close() was called"); - pass = false; - } - - if (calls.indexOf( - who + "PNPSNBCLogicalHandler.handleMessage().doOutbound()") > -1) { - TestUtil.logErr(who - + "PNPSNBCLogicalHandler.handleMessage().doOutbound() was called"); - pass = false; - } - if (calls.indexOf( - who + "PNPSNBCSOAPHandler.handleMessage().doOutbound()") > -1) { - TestUtil.logErr( - who + "PNPSNBCSOAPHandler.handleMessage().doOutbound() was called"); - pass = false; - } - if (calls.indexOf( - who + "PNPSNBCLogicalHandler.handleMessage().doInbound()") > -1) { - TestUtil.logErr( - who + "PNPSNBCLogicalHandler.handleMessage().doInbound() was called"); - pass = false; - } - if (calls - .indexOf(who + "PNPSNBCSOAPHandler.handleMessage().doInbound()") > -1) { - TestUtil.logErr( - who + "PNPSNBCSOAPHandler.handleMessage().doInbound() was called"); - pass = false; - } - if (calls.indexOf(who + "PNPSNBCLogicalHandler.close()") > -1) { - TestUtil.logErr(who + "PNPSNBCLogicalHandler.close() was called"); - pass = false; - } - if (calls.indexOf(who + "PNPSNBCSOAPHandler.close()") > -1) { - TestUtil.logErr(who + "PNPSNBCSOAPHandler.close() was called"); - pass = false; - } - - return pass; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/JAXWS_Data.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/JAXWS_Data.java deleted file mode 100644 index c724b1a24b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/JAXWS_Data.java +++ /dev/null @@ -1,2723 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.*; -import java.math.*; -import java.text.SimpleDateFormat; -import javax.xml.namespace.QName; -import javax.xml.datatype.*; - -public final class JAXWS_Data { - - private static DatatypeFactory dtfactory = null; - - private static TimeZone defaultTZ = TimeZone.getDefault(); - - static { - try { - dtfactory = DatatypeFactory.newInstance(); - } catch (DatatypeConfigurationException e) { - TestUtil.logMsg("Could not configure DatatypeFactory object"); - TestUtil.printStackTrace(e); - } - } - - // ================================================================== - // Java Primitive Data Types - Single-Dimensional Array Data - // ================================================================== - - public final static boolean boolean_data[] = { false, true }; - - public final static List list_boolean_data = (List) convertToListPrimArray( - boolean_data); - - public final static Boolean Boolean_data[] = { Boolean.valueOf(false), - Boolean.valueOf(true), null }; - - public final static Boolean Boolean_nonull_data[] = { Boolean.valueOf(false), - Boolean.valueOf(true), }; - - public final static List list_Boolean_data = (List) Arrays - .asList(Boolean_data); - - public final static List list_Boolean_nonull_data = (List) Arrays - .asList(Boolean_nonull_data); - - public final static char char_data[] = { Character.MIN_VALUE, 0, - Character.MAX_VALUE }; - - public final static List list_char_data = (List) convertToListPrimArray( - char_data); - - public final static Character Character_data[] = { - Character.valueOf(Character.MIN_VALUE), Character.valueOf((char) 0), - Character.valueOf(Character.MAX_VALUE), null }; - - public final static Character Character_nonull_data[] = { - Character.valueOf(Character.MIN_VALUE), Character.valueOf((char) 0), - Character.valueOf(Character.MAX_VALUE), }; - - public final static List list_Character_data = (List) Arrays - .asList(Character_data); - - public final static List list_Character_nonull_data = (List) Arrays - .asList(Character_nonull_data); - - public final static byte byte_data[] = { Byte.MIN_VALUE, 0, Byte.MAX_VALUE }; - - public final static List list_byte_data = (List) convertToListPrimArray( - byte_data); - - public final static byte byte_data2[] = { 0, Byte.MAX_VALUE, Byte.MIN_VALUE }; - - public final static List list_byte_data2 = (List) convertToListPrimArray( - byte_data2); - - public final static Byte Byte_data[] = { Byte.valueOf(Byte.MIN_VALUE), - Byte.valueOf((byte) 0), Byte.valueOf(Byte.MAX_VALUE), null }; - - public final static Byte Byte_nonull_data[] = { Byte.valueOf(Byte.MIN_VALUE), - Byte.valueOf((byte) 0), Byte.valueOf(Byte.MAX_VALUE), }; - - public final static List list_Byte_data = (List) Arrays - .asList(Byte_data); - - public final static List list_Byte_nonull_data = (List) Arrays - .asList(Byte_nonull_data); - - public final static short short_data[] = { Short.MIN_VALUE, 0, - Short.MAX_VALUE }; - - public final static List list_short_data = (List) convertToListPrimArray( - short_data); - - public final static Short Short_data[] = { Short.valueOf(Short.MIN_VALUE), - Short.valueOf((short) 0), Short.valueOf(Short.MAX_VALUE), null }; - - public final static Short Short_nonull_data[] = { - Short.valueOf(Short.MIN_VALUE), Short.valueOf((short) 0), - Short.valueOf(Short.MAX_VALUE), }; - - public final static List list_Short_data = (List) Arrays - .asList(Short_data); - - public final static List list_Short_nonull_data = (List) Arrays - .asList(Short_nonull_data); - - public final static int int_data[] = { Integer.MIN_VALUE, 0, - Integer.MAX_VALUE }; - - public final static List list_int_data = (List) convertToListPrimArray( - int_data); - - public final static Integer Integer_data[] = { - Integer.valueOf(Integer.MIN_VALUE), Integer.valueOf(0), - Integer.valueOf(Integer.MAX_VALUE), null }; - - public final static Integer Integer_nonull_data[] = { - Integer.valueOf(Integer.MIN_VALUE), Integer.valueOf(0), - Integer.valueOf(Integer.MAX_VALUE), }; - - public final static List list_Integer_data = (List) Arrays - .asList(Integer_data); - - public final static List list_Integer_nonull_data = (List) Arrays - .asList(Integer_nonull_data); - - public final static long long_data[] = { Long.MIN_VALUE, 0, Long.MAX_VALUE }; - - public final static List list_long_data = (List) convertToListPrimArray( - long_data); - - public final static Long Long_data[] = { Long.valueOf(Long.MIN_VALUE), - Long.valueOf(0L), Long.valueOf(Long.MAX_VALUE), null }; - - public final static Long Long_nonull_data[] = { Long.valueOf(Long.MIN_VALUE), - Long.valueOf(0L), Long.valueOf(Long.MAX_VALUE), }; - - public final static List list_Long_data = (List) Arrays - .asList(Long_data); - - public final static List list_Long_nonull_data = (List) Arrays - .asList(Long_nonull_data); - - public final static float float_data[] = { Float.MIN_VALUE, 0, - Float.MAX_VALUE }; - - public final static List list_float_data = (List) convertToListPrimArray( - float_data); - - public final static Float Float_data[] = { Float.valueOf(Float.MIN_VALUE), - Float.valueOf((float) 0), Float.valueOf(Float.MAX_VALUE), null }; - - public final static Float Float_nonull_data[] = { - Float.valueOf(Float.MIN_VALUE), Float.valueOf((float) 0), - Float.valueOf(Float.MAX_VALUE), }; - - public final static List list_Float_data = (List) Arrays - .asList(Float_data); - - public final static List list_Float_nonull_data = (List) Arrays - .asList(Float_nonull_data); - - public final static double double_data[] = { Double.MIN_VALUE, 0, - Double.MAX_VALUE }; - - public final static List list_double_data = (List) convertToListPrimArray( - double_data); - - public final static Double Double_data[] = { Double.valueOf(Double.MIN_VALUE), - Double.valueOf(0), Double.valueOf(Double.MAX_VALUE), null }; - - public final static Double Double_nonull_data[] = { - Double.valueOf(Double.MIN_VALUE), Double.valueOf(0), - Double.valueOf(Double.MAX_VALUE), }; - - public final static List list_Double_data = (List) Arrays - .asList(Double_data); - - public final static List list_Double_nonull_data = (List) Arrays - .asList(Double_nonull_data); - - // ================================================================== - // Java Primitive Data Types - Multi-Dimensional Array Data - // ================================================================== - - public final static boolean boolean_multi_data[][] = { boolean_data, - boolean_data, }; - - public final static Boolean Boolean_multi_data[][] = { Boolean_data, - Boolean_data, }; - - public final static char char_multi_data[][] = { char_data, char_data, }; - - public final static Character Character_multi_data[][] = { Character_data, - Character_data, }; - - public final static byte byte_multi_data[][] = { byte_data, byte_data, }; - - public final static Byte Byte_multi_data[][] = { Byte_data, Byte_data, }; - - public final static short short_multi_data[][] = { short_data, short_data, }; - - public final static Short Short_multi_data[][] = { Short_data, Short_data, }; - - public final static int int_multi_data[][] = { int_data, int_data, }; - - public final static Integer Integer_multi_data[][] = { Integer_data, - Integer_data, }; - - public final static long long_multi_data[][] = { long_data, long_data, }; - - public final static Long Long_multi_data[][] = { Long_data, Long_data, }; - - public final static float float_multi_data[][] = { float_data, float_data, }; - - public final static Float Float_multi_data[][] = { Float_data, Float_data, }; - - public final static double double_multi_data[][] = { double_data, - double_data, }; - - public final static Double Double_multi_data[][] = { Double_data, - Double_data, }; - - // ================================================================== - // Java Standard Value Classes - Single-Dimensional Array Data - // ================================================================== - - public final static String String_data[] = { "String1", "String2", "String3", - "", null }; - - public final static String String_nonull_data[] = { "String1", "String2", - "String3", }; - - public final static List list_String_data = (List) Arrays - .asList(String_data); - - public final static List list_String_nonull_data = (List) Arrays - .asList(String_nonull_data); - - public final static Date Date_data[] = { - new GregorianCalendar(6, 5, 1, 10, 0, 0).getTime(), - new GregorianCalendar(9, 10, 25, 1, 30, 0).getTime(), - new GregorianCalendar(96, 5, 1, 2, 0, 30).getTime(), - new GregorianCalendar(99, 10, 25, 3, 15, 15).getTime(), - new GregorianCalendar(996, 5, 1, 6, 6, 6).getTime(), - new GregorianCalendar(999, 10, 25, 7, 7, 7).getTime(), - new GregorianCalendar(1996, 5, 1, 8, 8, 8).getTime(), - new GregorianCalendar(1999, 10, 25, 9, 9, 9).getTime(), null }; - - public final static Date Date_nonull_data[] = { - new GregorianCalendar(6, 5, 1, 10, 0, 0).getTime(), - new GregorianCalendar(9, 10, 25, 1, 30, 0).getTime(), - new GregorianCalendar(96, 5, 1, 2, 0, 30).getTime(), - new GregorianCalendar(99, 10, 25, 3, 15, 15).getTime(), - new GregorianCalendar(996, 5, 1, 6, 6, 6).getTime(), - new GregorianCalendar(999, 10, 25, 7, 7, 7).getTime(), - new GregorianCalendar(1996, 5, 1, 8, 8, 8).getTime(), - new GregorianCalendar(1999, 10, 25, 9, 9, 9).getTime(), }; - - public final static List list_Date_data = (List) Arrays - .asList(Date_data); - - public final static List list_Date_nonull_data = (List) Arrays - .asList(Date_nonull_data); - - public final static GregorianCalendar GregorianCalendar_data[] = { - new GregorianCalendar(6, 5, 1, 10, 0, 0), - new GregorianCalendar(9, 10, 25, 1, 30, 0), - new GregorianCalendar(96, 5, 1, 2, 0, 30), - new GregorianCalendar(99, 10, 25, 3, 15, 15), - new GregorianCalendar(996, 5, 1, 6, 6, 6), - new GregorianCalendar(999, 10, 25, 7, 7, 7), - new GregorianCalendar(1996, 5, 1, 8, 8, 8), - new GregorianCalendar(1999, 10, 25, 9, 9, 9), null }; - - public final static GregorianCalendar GregorianCalendar_nonull_data[] = { - new GregorianCalendar(6, 5, 1, 10, 0, 0), - new GregorianCalendar(9, 10, 25, 1, 30, 0), - new GregorianCalendar(96, 5, 1, 2, 0, 30), - new GregorianCalendar(99, 10, 25, 3, 15, 15), - new GregorianCalendar(996, 5, 1, 6, 6, 6), - new GregorianCalendar(999, 10, 25, 7, 7, 7), - new GregorianCalendar(1996, 5, 1, 8, 8, 8), - new GregorianCalendar(1999, 10, 25, 9, 9, 9), }; - - public final static List list_GregorianCalendar_data = (List) Arrays - .asList(GregorianCalendar_data); - - public final static List list_GregorianCalendar_nonull_data = (List) Arrays - .asList(GregorianCalendar_nonull_data); - - public final static XMLGregorianCalendar XMLGregorianCalendar_data[] = { - dtfactory.newXMLGregorianCalendar(6, 5, 1, 10, 0, 0, 0, 0), - dtfactory.newXMLGregorianCalendar(9, 10, 25, 1, 30, 0, 0, 0), - dtfactory.newXMLGregorianCalendar(96, 5, 1, 2, 0, 30, 0, 0), - dtfactory.newXMLGregorianCalendar(99, 10, 25, 3, 15, 15, 0, 0), - dtfactory.newXMLGregorianCalendar(996, 5, 1, 6, 6, 6, 0, 0), - dtfactory.newXMLGregorianCalendar(999, 10, 25, 7, 7, 7, 0, 0), - dtfactory.newXMLGregorianCalendar(1996, 5, 1, 8, 8, 8, 0, 0), - dtfactory.newXMLGregorianCalendar(1999, 10, 25, 9, 9, 9, 0, 0), null }; - - public final static XMLGregorianCalendar XMLGregorianCalendar_nonull_data[] = { - dtfactory.newXMLGregorianCalendar(6, 5, 1, 10, 0, 0, 0, 0), - dtfactory.newXMLGregorianCalendar(9, 10, 25, 1, 30, 0, 0, 0), - dtfactory.newXMLGregorianCalendar(96, 5, 1, 2, 0, 30, 0, 0), - dtfactory.newXMLGregorianCalendar(99, 10, 25, 3, 15, 15, 0, 0), - dtfactory.newXMLGregorianCalendar(996, 5, 1, 6, 6, 6, 0, 0), - dtfactory.newXMLGregorianCalendar(999, 10, 25, 7, 7, 7, 0, 0), - dtfactory.newXMLGregorianCalendar(1996, 5, 1, 8, 8, 8, 0, 0), - dtfactory.newXMLGregorianCalendar(1999, 10, 25, 9, 9, 9, 0, 0), }; - - public final static List list_XMLGregorianCalendar_data = (List) Arrays - .asList(XMLGregorianCalendar_data); - - public final static List list_XMLGregorianCalendar_nonull_data = (List) Arrays - .asList(XMLGregorianCalendar_nonull_data); - - public final static Duration Duration_data[] = { - dtfactory.newDuration(true, 1999, 10, 25, 9, 9, 9), - dtfactory.newDuration(false, 1999, 10, 25, 9, 9, 9), - dtfactory.newDuration(10000), - dtfactory.newDurationDayTime(true, 1, 9, 9, 9), - dtfactory.newDurationDayTime(false, 1, 9, 9, 9), - dtfactory.newDurationDayTime(1000L), - dtfactory.newDurationYearMonth(true, 1999, 10), - dtfactory.newDurationYearMonth(false, 1999, 10), - dtfactory.newDurationYearMonth(1000L), null }; - - public final static List list_Duration_data = (List) Arrays - .asList(Duration_data); - - public final static BigInteger BigInteger_data[] = { - new BigInteger("3512359"), new BigInteger("3512360"), null }; - - public final static BigInteger BigInteger_nonull_data[] = { - new BigInteger("3512359"), new BigInteger("3512360"), }; - - public final static List list_BigInteger_data = (List) Arrays - .asList(BigInteger_data); - - public final static List list_BigInteger_nonull_data = (List) Arrays - .asList(BigInteger_nonull_data); - - public final static BigDecimal BigDecimal_data[] = { - new BigDecimal("3512359.1456"), new BigDecimal("3512360.1456"), null }; - - public final static BigDecimal BigDecimal_nonull_data[] = { - new BigDecimal("3512359.1456"), new BigDecimal("3512360.1456"), }; - - public final static List list_BigDecimal_data = (List) Arrays - .asList(BigDecimal_data); - - public final static List list_BigDecimal_nonull_data = (List) Arrays - .asList(BigDecimal_nonull_data); - - // ================================================================== - // Java Standard Value Classes - Multi-Dimensional Array Data - // ================================================================== - - public final static String String_multi_data[][] = { String_data, - String_data, }; - - public final static Date Date_multi_data[][] = { Date_data, Date_data, }; - - public final static GregorianCalendar GregorianCalendar_multi_data[][] = { - GregorianCalendar_data, GregorianCalendar_data, }; - - public final static XMLGregorianCalendar XMLGregorianCalendar_multi_data[][] = { - XMLGregorianCalendar_data, XMLGregorianCalendar_data, }; - - public final static BigInteger BigInteger_multi_data[][] = { BigInteger_data, - BigInteger_data, }; - - public final static BigDecimal BigDecimal_multi_data[][] = { BigDecimal_data, - BigDecimal_data, }; - - // ================================================================== - // Java Other Data Types - Single and Multi Array Data - // ================================================================== - public final static QName QName_data[] = { new QName("someLocalPart"), - new QName("http://someURI.org/", "someLocalPart"), null }; - - public final static QName QName_nonull_data[] = { new QName("someLocalPart"), - new QName("http://someURI.org/", "someLocalPart"), }; - - public final static List list_QName_data = (List) Arrays - .asList(QName_data); - - public final static List list_QName_nonull_data = (List) Arrays - .asList(QName_nonull_data); - - public final static QName QName_multi_data[][] = { QName_data, QName_data, }; - - // ================================================================== - // Various utility classes used for dumping/comparing data - // ================================================================== - - public static void dumpListValues(List c) { - System.out.println("JAXWS_Data:dumpListValues - List size=" + c.size()); - int i = 0; - for (Object o : c) { - System.out.println(i + "=" + o); - i++; - } - } - - public static void dumpArrayValues(Object o, String t, String m) { - System.out.println(m); - dumpArrayValues(o, t); - } - - public static void dumpArrayValues(Object o, String t) { - System.out.println("JAXWS_Data:dumpArrayValues"); - System.out.println("Dumping " + t + " array, size=" + getArraySize(o, t)); - if (t.equals("boolean")) { - boolean[] v = (boolean[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("Boolean")) { - Boolean[] v = (Boolean[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("char")) { - char[] v = (char[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("Character")) { - Character[] v = (Character[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("byte")) { - byte[] v = (byte[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("Byte")) { - Byte[] v = (Byte[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("short")) { - short[] v = (short[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("Short")) { - Short[] v = (Short[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("int")) { - int[] v = (int[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("Integer")) { - Integer[] v = (Integer[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("long")) { - long[] v = (long[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("Long")) { - Long[] v = (Long[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("float")) { - float[] v = (float[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("Float")) { - Float[] v = (Float[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("double")) { - double[] v = (double[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("Double")) { - Double[] v = (Double[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("String")) { - String[] v = (String[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("Date")) { - Date[] v = (Date[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("Calendar")) { - Calendar[] v = (Calendar[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("XMLGregorianCalendar")) { - XMLGregorianCalendar[] v = (XMLGregorianCalendar[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("BigInteger")) { - BigInteger[] v = (BigInteger[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("BigDecimal")) { - BigDecimal[] v = (BigDecimal[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } else if (t.equals("QName")) { - QName[] v = (QName[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + v[i]); - } - } - - public static void dumpMultiArrayValues(Object o, String t, String m) { - System.out.println(m); - dumpMultiArrayValues(o, t); - } - - public static void dumpMultiArrayValues(Object o, String t) { - System.out.println("JAXWS_Data:dumpMultiArrayValues"); - System.out.println( - "Dumping " + t + " multiarray, size=" + getMultiArraySize(o, t)); - if (t.equals("boolean")) { - boolean[][] v = (boolean[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("Boolean")) { - Boolean[][] v = (Boolean[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("char")) { - char[][] v = (char[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("Character")) { - Character[][] v = (Character[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("byte")) { - byte[][] v = (byte[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("Byte")) { - Byte[][] v = (Byte[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("short")) { - short[][] v = (short[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("Short")) { - Short[][] v = (Short[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("int")) { - int[][] v = (int[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("Integer")) { - Integer[][] v = (Integer[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("long")) { - long[][] v = (long[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("Long")) { - Long[][] v = (Long[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("float")) { - float[][] v = (float[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("Float")) { - Float[][] v = (Float[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("double")) { - double[][] v = (double[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("Double")) { - Double[][] v = (Double[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("String")) { - String[][] v = (String[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("Date")) { - Date[][] v = (Date[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("Calendar")) { - Calendar[][] v = (Calendar[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("XMLGregorianCalendar")) { - XMLGregorianCalendar[][] v = (XMLGregorianCalendar[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("BigInteger")) { - BigInteger[][] v = (BigInteger[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("BigDecimal")) { - BigDecimal[][] v = (BigDecimal[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } else if (t.equals("QName")) { - QName[][] v = (QName[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - System.out.println("- " + v[i][k]); - } - } - } - - public static int getArraySize(Object o, String t) { - System.out.println("JAXWS_Data:getArraySize"); - if (t.equals("boolean")) { - return ((boolean[]) o).length; - } else if (t.equals("Boolean")) { - return ((Boolean[]) o).length; - } else if (t.equals("char")) { - return ((char[]) o).length; - } else if (t.equals("Character")) { - return ((Character[]) o).length; - } else if (t.equals("byte")) { - return ((byte[]) o).length; - } else if (t.equals("Byte")) { - return ((Byte[]) o).length; - } else if (t.equals("short")) { - return ((short[]) o).length; - } else if (t.equals("Short")) { - return ((Short[]) o).length; - } else if (t.equals("int")) { - return ((int[]) o).length; - } else if (t.equals("Integer")) { - return ((Integer[]) o).length; - } else if (t.equals("long")) { - return ((long[]) o).length; - } else if (t.equals("Long")) { - return ((Long[]) o).length; - } else if (t.equals("float")) { - return ((float[]) o).length; - } else if (t.equals("Float")) { - return ((Float[]) o).length; - } else if (t.equals("double")) { - return ((double[]) o).length; - } else if (t.equals("Double")) { - return ((Double[]) o).length; - } else if (t.equals("String")) { - return ((String[]) o).length; - } else if (t.equals("Date")) { - return ((Date[]) o).length; - } else if (t.equals("Calendar")) { - return ((Calendar[]) o).length; - } else if (t.equals("XMLGregorianCalendar")) { - return ((XMLGregorianCalendar[]) o).length; - } else if (t.equals("BigInteger")) { - return ((BigInteger[]) o).length; - } else if (t.equals("BigDecimal")) { - return ((BigDecimal[]) o).length; - } else if (t.equals("QName")) { - return ((QName[]) o).length; - } - return -1; - } - - public static String getMultiArraySize(Object o, String t) { - System.out.println("JAXWS_Data:getMultiArraySize"); - if (t.equals("boolean")) { - boolean[][] m = (boolean[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("Boolean")) { - Boolean[][] m = (Boolean[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("char")) { - char[][] m = (char[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("Character")) { - Character[][] m = (Character[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("byte")) { - byte[][] m = (byte[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("Byte")) { - Byte[][] m = (Byte[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("short")) { - short[][] m = (short[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("Short")) { - Short[][] m = (Short[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("int")) { - int[][] m = (int[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("Integer")) { - Integer[][] m = (Integer[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("long")) { - long[][] m = (long[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("Long")) { - Long[][] m = (Long[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("float")) { - float[][] m = (float[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("Float")) { - Float[][] m = (Float[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("double")) { - double[][] m = (double[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("Double")) { - Double[][] m = (Double[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("String")) { - String[][] m = (String[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("Date")) { - Date[][] m = (Date[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("Calendar")) { - Calendar[][] m = (Calendar[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("XMLGregorianCalendar")) { - XMLGregorianCalendar[][] m = (XMLGregorianCalendar[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("BigInteger")) { - BigInteger[][] m = (BigInteger[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("BigDecimal")) { - BigDecimal[][] m = (BigDecimal[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } else if (t.equals("QName")) { - QName[][] m = (QName[][]) o; - return ("[" + m.length + "][" + m[0].length + "]"); - } - return "unknown"; - } - - public static boolean compareValues(boolean e, boolean r) { - boolean pass = true; - - if (r != e) { - System.out.println("Value Mismatch: expected " + e + ", received " + r); - pass = false; - } - return pass; - } - - public static boolean compareValues(byte e, byte r) { - boolean pass = true; - - if (r != e) { - System.out.println("Value Mismatch: expected " + e + ", received " + r); - pass = false; - } - return pass; - } - - public static boolean compareValues(short e, short r) { - boolean pass = true; - - if (r != e) { - System.out.println("Value Mismatch: expected " + e + ", received " + r); - pass = false; - } - return pass; - } - - public static boolean compareValues(int e, int r) { - boolean pass = true; - - if (r != e) { - System.out.println("Value Mismatch: expected " + e + ", received " + r); - pass = false; - } - return pass; - } - - public static boolean compareValues(long e, long r) { - boolean pass = true; - - if (r != e) { - System.out.println("Value Mismatch: expected " + e + ", received " + r); - pass = false; - } - return pass; - } - - public static boolean compareValues(float e, float r) { - boolean pass = true; - - if (r != e) { - System.out.println("Value Mismatch: expected " + e + ", received " + r); - pass = false; - } - return pass; - } - - public static boolean compareValues(double e, double r) { - boolean pass = true; - - if (r != e) { - System.out.println("Value Mismatch: expected " + e + ", received " + r); - pass = false; - } - return pass; - } - - public static boolean compareValues(Object e, Object r, String t) { - boolean pass = true; - - if ((r == null && e != null) || (r != null && e == null)) { - pass = false; - } - if (t.equals("Boolean")) { - Boolean exp = (Boolean) e; - Boolean rec = (Boolean) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("Character")) { - Character exp = (Character) e; - Character rec = (Character) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("Byte")) { - Byte exp = (Byte) e; - Byte rec = (Byte) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("Short")) { - Short exp = (Short) e; - Short rec = (Short) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("Integer")) { - Integer exp = (Integer) e; - Integer rec = (Integer) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("Long")) { - Long exp = (Long) e; - Long rec = (Long) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("Float")) { - Float exp = (Float) e; - Float rec = (Float) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("Double")) { - Double exp = (Double) e; - Double rec = (Double) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("String")) { - String exp = (String) e; - String rec = (String) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("Date")) { - Date exp = (Date) e; - Date rec = (Date) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("Calendar")) { - Calendar exp = (Calendar) e; - Calendar rec = (Calendar) r; - if (rec == exp) - return true; - if (!compareCalendars(rec, exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("XMLGregorianCalendar")) { - XMLGregorianCalendar exp = (XMLGregorianCalendar) e; - XMLGregorianCalendar rec = (XMLGregorianCalendar) r; - if (rec == exp) - return true; - if (!compareXMLGregorianCalendars(rec, exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("BigInteger")) { - BigInteger exp = (BigInteger) e; - BigInteger rec = (BigInteger) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("BigDecimal")) { - BigDecimal exp = (BigDecimal) e; - BigDecimal rec = (BigDecimal) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } else if (t.equals("QName")) { - QName exp = (QName) e; - QName rec = (QName) r; - if (rec == exp) - return true; - if (!rec.equals(exp)) { - System.out - .println("Value Mismatch: expected " + exp + ", received " + rec); - pass = false; - } - } - return pass; - } - - public static List convertToListPrimArray(boolean[] v1) { - Boolean[] v2 = new Boolean[v1.length]; - for (int i = 0; i < v1.length; i++) - v2[i] = v1[i]; - return (List) Arrays.asList(v2); - } - - public static List convertToListPrimArray(char[] v1) { - Character[] v2 = new Character[v1.length]; - for (int i = 0; i < v1.length; i++) - v2[i] = v1[i]; - return (List) Arrays.asList(v2); - } - - public static List convertToListPrimArray(byte[] v1) { - Byte[] v2 = new Byte[v1.length]; - for (int i = 0; i < v1.length; i++) - v2[i] = v1[i]; - return (List) Arrays.asList(v2); - } - - public static List convertToListPrimArray(short[] v1) { - Short[] v2 = new Short[v1.length]; - for (int i = 0; i < v1.length; i++) - v2[i] = v1[i]; - return (List) Arrays.asList(v2); - } - - public static List convertToListPrimArray(int[] v1) { - Integer[] v2 = new Integer[v1.length]; - for (int i = 0; i < v1.length; i++) - v2[i] = v1[i]; - return (List) Arrays.asList(v2); - } - - public static List convertToListPrimArray(long[] v1) { - Long[] v2 = new Long[v1.length]; - for (int i = 0; i < v1.length; i++) - v2[i] = v1[i]; - return (List) Arrays.asList(v2); - } - - public static List convertToListPrimArray(float[] v1) { - Float[] v2 = new Float[v1.length]; - for (int i = 0; i < v1.length; i++) - v2[i] = v1[i]; - return (List) Arrays.asList(v2); - } - - public static List convertToListPrimArray(double[] v1) { - Double[] v2 = new Double[v1.length]; - for (int i = 0; i < v1.length; i++) - v2[i] = v1[i]; - return (List) Arrays.asList(v2); - } - - public static Object convertListToArray(List a, String t) { - Object result = null; - if (t.equals("boolean")) { - boolean[] b1 = new boolean[a.size()]; - Boolean[] b2 = a.toArray(new Boolean[a.size()]); - for (int i = 0; i < b2.length; i++) { - b1[i] = b2[i].booleanValue(); - } - result = b1; - } else if (t.equals("Boolean")) { - Boolean[] b1 = a.toArray(new Boolean[a.size()]); - result = b1; - } else if (t.equals("char")) { - char[] b1 = new char[a.size()]; - Character[] b2 = a.toArray(new Character[a.size()]); - for (int i = 0; i < b2.length; i++) { - b1[i] = b2[i].charValue(); - } - result = b1; - } else if (t.equals("Character")) { - Character[] b1 = a.toArray(new Character[a.size()]); - result = b1; - } else if (t.equals("byte")) { - byte[] b1 = new byte[a.size()]; - Byte[] b2 = a.toArray(new Byte[a.size()]); - for (int i = 0; i < b2.length; i++) { - b1[i] = b2[i].byteValue(); - } - result = b1; - } else if (t.equals("Byte")) { - Byte[] b1 = a.toArray(new Byte[a.size()]); - result = b1; - } else if (t.equals("short")) { - short[] b1 = new short[a.size()]; - Short[] b2 = a.toArray(new Short[a.size()]); - for (int i = 0; i < b2.length; i++) { - b1[i] = b2[i].shortValue(); - } - result = b1; - } else if (t.equals("Short")) { - Short[] b1 = a.toArray(new Short[a.size()]); - result = b1; - } else if (t.equals("int")) { - int[] b1 = new int[a.size()]; - Integer[] b2 = a.toArray(new Integer[a.size()]); - for (int i = 0; i < b2.length; i++) { - b1[i] = b2[i].intValue(); - } - result = b1; - } else if (t.equals("Integer")) { - Integer[] b1 = a.toArray(new Integer[a.size()]); - result = b1; - } else if (t.equals("long")) { - long[] b1 = new long[a.size()]; - Long[] b2 = a.toArray(new Long[a.size()]); - for (int i = 0; i < b2.length; i++) { - b1[i] = b2[i].longValue(); - } - result = b1; - } else if (t.equals("Long")) { - Long[] b1 = a.toArray(new Long[a.size()]); - result = b1; - } else if (t.equals("float")) { - float[] b1 = new float[a.size()]; - Float[] b2 = a.toArray(new Float[a.size()]); - for (int i = 0; i < b2.length; i++) { - b1[i] = b2[i].floatValue(); - } - result = b1; - } else if (t.equals("Float")) { - Float[] b1 = a.toArray(new Float[a.size()]); - result = b1; - } else if (t.equals("double")) { - double[] b1 = new double[a.size()]; - Double[] b2 = a.toArray(new Double[a.size()]); - for (int i = 0; i < b2.length; i++) { - b1[i] = b2[i].doubleValue(); - } - result = b1; - } else if (t.equals("Double")) { - Double[] b1 = a.toArray(new Double[a.size()]); - result = b1; - } else if (t.equals("String")) { - String[] b1 = a.toArray(new String[a.size()]); - result = b1; - } else if (t.equals("Date")) { - Date[] b1 = a.toArray(new Date[a.size()]); - result = b1; - } else if (t.equals("Calendar")) { - Calendar[] b1 = a.toArray(new Calendar[a.size()]); - result = b1; - } else if (t.equals("XMLGregorianCalendar")) { - XMLGregorianCalendar[] b1 = a.toArray(new XMLGregorianCalendar[a.size()]); - result = b1; - } else if (t.equals("BigInteger")) { - BigInteger[] b1 = a.toArray(new BigInteger[a.size()]); - result = b1; - } else if (t.equals("BigDecimal")) { - BigDecimal[] b1 = a.toArray(new BigDecimal[a.size()]); - result = b1; - } else if (t.equals("QName")) { - QName[] b1 = a.toArray(new QName[a.size()]); - result = b1; - } - return result; - } - - public static boolean compareArrayValues(Object e, List a, String t) { - return compareArrayValues(e, convertListToArray(a, t), t); - } - - public static boolean compareArrayValues(List b, List a, String t) { - return compareArrayValues(convertListToArray(b, t), - convertListToArray(a, t), t); - } - - public static boolean compareArrayValues(Object e, Object r, String t) { - System.out.println("JAXWS_Data:compareArrayValues"); - boolean pass = true; - - if (t.equals("boolean")) { - boolean[] exp = (boolean[]) e; - boolean[] rec = (boolean[]) r; - dumpArrayValues(exp, "boolean", "Expected"); - dumpArrayValues(rec, "boolean", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] != exp[i]) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("Boolean")) { - Boolean[] exp = (Boolean[]) e; - Boolean[] rec = (Boolean[]) r; - dumpArrayValues(exp, "Boolean", "Expected"); - dumpArrayValues(rec, "Boolean", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("char")) { - char[] exp = (char[]) e; - char[] rec = (char[]) r; - dumpArrayValues(exp, "char", "Expected"); - dumpArrayValues(rec, "char", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] != exp[i]) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("Character")) { - Character[] exp = (Character[]) e; - Character[] rec = (Character[]) r; - dumpArrayValues(exp, "Character", "Expected"); - dumpArrayValues(rec, "Character", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("byte")) { - byte[] exp = (byte[]) e; - byte[] rec = (byte[]) r; - dumpArrayValues(exp, "byte", "Expected"); - dumpArrayValues(rec, "byte", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] != exp[i]) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("Byte")) { - Byte[] exp = (Byte[]) e; - Byte[] rec = (Byte[]) r; - dumpArrayValues(exp, "Byte", "Expected"); - dumpArrayValues(rec, "Byte", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("short")) { - short[] exp = (short[]) e; - short[] rec = (short[]) r; - dumpArrayValues(exp, "short", "Expected"); - dumpArrayValues(rec, "short", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] != exp[i]) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("Short")) { - Short[] exp = (Short[]) e; - Short[] rec = (Short[]) r; - dumpArrayValues(exp, "Short", "Expected"); - dumpArrayValues(rec, "Short", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("int")) { - int[] exp = (int[]) e; - int[] rec = (int[]) r; - dumpArrayValues(exp, "int", "Expected"); - dumpArrayValues(rec, "int", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] != exp[i]) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("Integer")) { - Integer[] exp = (Integer[]) e; - Integer[] rec = (Integer[]) r; - dumpArrayValues(exp, "Integer", "Expected"); - dumpArrayValues(rec, "Integer", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("long")) { - long[] exp = (long[]) e; - long[] rec = (long[]) r; - dumpArrayValues(exp, "long", "Expected"); - dumpArrayValues(rec, "long", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] != exp[i]) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("Long")) { - Long[] exp = (Long[]) e; - Long[] rec = (Long[]) r; - dumpArrayValues(exp, "Long", "Expected"); - dumpArrayValues(rec, "Long", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("float")) { - float[] exp = (float[]) e; - float[] rec = (float[]) r; - dumpArrayValues(exp, "float", "Expected"); - dumpArrayValues(rec, "float", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] != exp[i]) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("Float")) { - Float[] exp = (Float[]) e; - Float[] rec = (Float[]) r; - dumpArrayValues(exp, "Float", "Expected"); - dumpArrayValues(rec, "Float", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("double")) { - double[] exp = (double[]) e; - double[] rec = (double[]) r; - dumpArrayValues(exp, "double", "Expected"); - dumpArrayValues(rec, "double", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] != exp[i]) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("Double")) { - Double[] exp = (Double[]) e; - Double[] rec = (Double[]) r; - dumpArrayValues(exp, "Double", "Expected"); - dumpArrayValues(rec, "Double", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("String")) { - String[] exp = (String[]) e; - String[] rec = (String[]) r; - dumpArrayValues(exp, "String", "Expected"); - dumpArrayValues(rec, "String", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("Date")) { - Date[] exp = (Date[]) e; - Date[] rec = (Date[]) r; - dumpArrayValues(exp, "Date", "Expected"); - dumpArrayValues(rec, "Date", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("Calendar")) { - Calendar[] exp = (Calendar[]) e; - Calendar[] rec = (Calendar[]) r; - dumpArrayValues(exp, "Calendar", "Expected"); - dumpArrayValues(rec, "Calendar", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!compareCalendars(rec[i], exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("XMLGregorianCalendar")) { - XMLGregorianCalendar[] exp = (XMLGregorianCalendar[]) e; - XMLGregorianCalendar[] rec = (XMLGregorianCalendar[]) r; - dumpArrayValues(exp, "XMLGregorianCalendar", "Expected"); - dumpArrayValues(rec, "XMLGregorianCalendar", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!compareXMLGregorianCalendars(rec[i], exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("BigInteger")) { - BigInteger[] exp = (BigInteger[]) e; - BigInteger[] rec = (BigInteger[]) r; - dumpArrayValues(exp, "BigInteger", "Expected"); - dumpArrayValues(rec, "BigInteger", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("BigDecimal")) { - BigDecimal[] exp = (BigDecimal[]) e; - BigDecimal[] rec = (BigDecimal[]) r; - dumpArrayValues(exp, "BigDecimal", "Expected"); - dumpArrayValues(rec, "BigDecimal", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } else if (t.equals("QName")) { - QName[] exp = (QName[]) e; - QName[] rec = (QName[]) r; - dumpArrayValues(exp, "QName", "Expected"); - dumpArrayValues(rec, "QName", "Received"); - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!rec[i].equals(exp[i])) { - System.out.println( - "Array Mismatch: expected " + exp[i] + ", received " + rec[i]); - pass = false; - } - } - } - return pass; - } - - public static void dumpDate(Object o, String m, String t) { - System.out.println(m); - System.out.println("JAXWS_Data:dumpDate"); - if (o == null) { - System.out.println("- null"); - return; - } - if (t.equals("YM")) { - XMLGregorianCalendar v = (XMLGregorianCalendar) o; - System.out.println("- " + v.getYear() + v.getMonth()); - } else if (t.equals("Y")) { - XMLGregorianCalendar v = (XMLGregorianCalendar) o; - System.out.println("- " + v.getYear()); - } else if (t.equals("MD")) { - XMLGregorianCalendar v = (XMLGregorianCalendar) o; - System.out.println("- " + v.getMonth() + v.getDay()); - } else if (t.equals("M")) { - XMLGregorianCalendar v = (XMLGregorianCalendar) o; - System.out.println("- " + v.getMonth()); - } else if (t.equals("D")) { - XMLGregorianCalendar v = (XMLGregorianCalendar) o; - System.out.println("- " + v.getDay()); - } - } - - public static boolean compareDate(Object e, Object r, String t) { - System.out.println("JAXWS_Data:compareDate"); - boolean pass = true; - - XMLGregorianCalendar exp = (XMLGregorianCalendar) e; - XMLGregorianCalendar rec = (XMLGregorianCalendar) r; - if (rec == exp) - return true; - if (rec == null || exp == null) { - dumpDate(exp, "Expected", t); - dumpDate(rec, "Received", t); - System.out - .println("Date Mismatch: expected " + exp + ", received " + rec); - return false; - } else if (t.equals("YM")) { - dumpDate(exp, "Expected", "YM"); - dumpDate(rec, "Received", "YM"); - if (rec.getYear() != exp.getYear() || rec.getMonth() != exp.getMonth()) { - System.out.println("Date Mismatch: expected YearMonth " + exp.getYear() - + exp.getMonth() + ", received YearMonth " + rec.getYear() - + rec.getMonth()); - pass = false; - } - } else if (t.equals("Y")) { - dumpDate(exp, "Expected", "Y"); - dumpDate(rec, "Received", "Y"); - if (rec.getYear() != exp.getYear()) { - System.out.println("Date Mismatch: expected Year " + exp.getYear() - + ", received Year " + rec.getYear()); - pass = false; - } - } else if (t.equals("MD")) { - dumpDate(exp, "Expected", "MD"); - dumpDate(rec, "Received", "MD"); - if (rec.getMonth() != exp.getMonth() || rec.getDay() != exp.getDay()) { - System.out.println( - "Date Mismatch: expected MonthDay " + exp.getMonth() + exp.getDay() - + ", received MonthDay " + rec.getMonth() + rec.getDay()); - pass = false; - } - } else if (t.equals("D")) { - dumpDate(exp, "Expected", "D"); - dumpDate(rec, "Received", "D"); - if (rec.getDay() != exp.getDay()) { - System.out.println("Date Mismatch: expected Day " + exp.getDay() - + ", received Day " + rec.getDay()); - pass = false; - } - } else if (t.equals("M")) { - dumpDate(exp, "Expected", "M"); - dumpDate(rec, "Received", "M"); - if (rec.getMonth() != exp.getMonth()) { - System.out.println("Date Mismatch: expected Month " + exp.getMonth() - + ", received Month " + rec.getMonth()); - pass = false; - } - } - return pass; - } - - public static boolean compareMultiArrayValues(Object e, Object r, String t) { - System.out.println("JAXWS_Data:compareMultiArrayValues"); - boolean pass = true; - - if (t.equals("boolean")) { - boolean[][] exp = (boolean[][]) e; - boolean[][] rec = (boolean[][]) r; - dumpMultiArrayValues(exp, "boolean", "Expected"); - dumpMultiArrayValues(rec, "boolean", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] != exp[i][k]) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("Boolean")) { - Boolean[][] exp = (Boolean[][]) e; - Boolean[][] rec = (Boolean[][]) r; - dumpMultiArrayValues(exp, "Boolean", "Expected"); - dumpMultiArrayValues(rec, "Boolean", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("char")) { - char[][] exp = (char[][]) e; - char[][] rec = (char[][]) r; - dumpMultiArrayValues(exp, "char", "Expected"); - dumpMultiArrayValues(rec, "char", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] != exp[i][k]) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("Character")) { - Character[][] exp = (Character[][]) e; - Character[][] rec = (Character[][]) r; - dumpMultiArrayValues(exp, "Character", "Expected"); - dumpMultiArrayValues(rec, "Character", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("byte")) { - byte[][] exp = (byte[][]) e; - byte[][] rec = (byte[][]) r; - dumpMultiArrayValues(exp, "byte", "Expected"); - dumpMultiArrayValues(rec, "byte", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] != exp[i][k]) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("Byte")) { - Byte[][] exp = (Byte[][]) e; - Byte[][] rec = (Byte[][]) r; - dumpMultiArrayValues(exp, "Byte", "Expected"); - dumpMultiArrayValues(rec, "Byte", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("short")) { - short[][] exp = (short[][]) e; - short[][] rec = (short[][]) r; - dumpMultiArrayValues(exp, "short", "Expected"); - dumpMultiArrayValues(rec, "short", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] != exp[i][k]) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("Short")) { - Short[][] exp = (Short[][]) e; - Short[][] rec = (Short[][]) r; - dumpMultiArrayValues(exp, "Short", "Expected"); - dumpMultiArrayValues(rec, "Short", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("int")) { - int[][] exp = (int[][]) e; - int[][] rec = (int[][]) r; - dumpMultiArrayValues(exp, "int", "Expected"); - dumpMultiArrayValues(rec, "int", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] != exp[i][k]) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("Integer")) { - Integer[][] exp = (Integer[][]) e; - Integer[][] rec = (Integer[][]) r; - dumpMultiArrayValues(exp, "Integer", "Expected"); - dumpMultiArrayValues(rec, "Integer", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("long")) { - long[][] exp = (long[][]) e; - long[][] rec = (long[][]) r; - dumpMultiArrayValues(exp, "long", "Expected"); - dumpMultiArrayValues(rec, "long", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] != exp[i][k]) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("Long")) { - Long[][] exp = (Long[][]) e; - Long[][] rec = (Long[][]) r; - dumpMultiArrayValues(exp, "Long", "Expected"); - dumpMultiArrayValues(rec, "Long", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("float")) { - float[][] exp = (float[][]) e; - float[][] rec = (float[][]) r; - dumpMultiArrayValues(exp, "float", "Expected"); - dumpMultiArrayValues(rec, "float", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] != exp[i][k]) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("Float")) { - Float[][] exp = (Float[][]) e; - Float[][] rec = (Float[][]) r; - dumpMultiArrayValues(exp, "Float", "Expected"); - dumpMultiArrayValues(rec, "Float", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("double")) { - double[][] exp = (double[][]) e; - double[][] rec = (double[][]) r; - dumpMultiArrayValues(exp, "double", "Expected"); - dumpMultiArrayValues(rec, "double", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] != exp[i][k]) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("Double")) { - Double[][] exp = (Double[][]) e; - Double[][] rec = (Double[][]) r; - dumpMultiArrayValues(exp, "Double", "Expected"); - dumpMultiArrayValues(rec, "Double", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("String")) { - String[][] exp = (String[][]) e; - String[][] rec = (String[][]) r; - dumpMultiArrayValues(exp, "String", "Expected"); - dumpMultiArrayValues(rec, "String", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("Date")) { - Date[][] exp = (Date[][]) e; - Date[][] rec = (Date[][]) r; - dumpMultiArrayValues(exp, "Date", "Expected"); - dumpMultiArrayValues(rec, "Date", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("Calendar")) { - Calendar[][] exp = (Calendar[][]) e; - Calendar[][] rec = (Calendar[][]) r; - dumpMultiArrayValues(exp, "Calendar", "Expected"); - dumpMultiArrayValues(rec, "Calendar", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!compareCalendars(rec[i][k], exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("XMLGregorianCalendar")) { - XMLGregorianCalendar[][] exp = (XMLGregorianCalendar[][]) e; - XMLGregorianCalendar[][] rec = (XMLGregorianCalendar[][]) r; - dumpMultiArrayValues(exp, "XMLGregorianCalendar", "Expected"); - dumpMultiArrayValues(rec, "XMLGregorianCalendar", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!compareXMLGregorianCalendars(rec[i][k], exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("BigInteger")) { - BigInteger[][] exp = (BigInteger[][]) e; - BigInteger[][] rec = (BigInteger[][]) r; - dumpMultiArrayValues(exp, "BigInteger", "Expected"); - dumpMultiArrayValues(rec, "BigInteger", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("BigDecimal")) { - BigDecimal[][] exp = (BigDecimal[][]) e; - BigDecimal[][] rec = (BigDecimal[][]) r; - dumpMultiArrayValues(exp, "BigDecimal", "Expected"); - dumpMultiArrayValues(rec, "BigDecimal", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } else if (t.equals("QName")) { - QName[][] exp = (QName[][]) e; - QName[][] rec = (QName[][]) r; - dumpMultiArrayValues(exp, "QName", "Expected"); - dumpMultiArrayValues(rec, "QName", "Received"); - if (rec.length != exp.length) { - System.out.println("Multi Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i].length != exp[i].length) { - System.out.println("Multi Array Size MisMatch: expected " - + exp[i].length + ", received " + rec[i].length); - pass = false; - } else { - for (int k = 0; k < rec[i].length; k++) { - if (rec[i][k] == exp[i][k]) - continue; - if ((rec[i][k] == null && exp[i][k] != null) - && (rec[i][k] != null && exp[i][k] == null)) { - pass = false; - } else if (!rec[i][k].equals(exp[i][k])) { - System.out.println("Array Mismatch: expected " + exp[i][k] - + ", received " + rec[i][k]); - pass = false; - } - } - } - } - } - return pass; - } - - public static String returnArrayValues(Object o, String t) { - String values = null; - if (t.equals("boolean")) { - boolean[] v = (boolean[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("Boolean")) { - Boolean[] v = (Boolean[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("char")) { - char[] v = (char[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("Character")) { - Character[] v = (Character[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("byte")) { - byte[] v = (byte[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("Byte")) { - Byte[] v = (Byte[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("short")) { - short[] v = (short[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("Short")) { - Short[] v = (Short[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("int")) { - int[] v = (int[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("Integer")) { - Integer[] v = (Integer[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("long")) { - long[] v = (long[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("Long")) { - Long[] v = (Long[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("float")) { - float[] v = (float[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("Float")) { - Float[] v = (Float[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("double")) { - double[] v = (double[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("Double")) { - Double[] v = (Double[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("String")) { - String[] v = (String[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("Date")) { - Date[] v = (Date[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("Calendar")) { - Calendar[] v = (Calendar[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("XMLGregorianCalendar")) { - XMLGregorianCalendar[] v = (XMLGregorianCalendar[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("BigInteger")) { - BigInteger[] v = (BigInteger[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("BigDecimal")) { - BigDecimal[] v = (BigDecimal[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } else if (t.equals("QName")) { - QName[] v = (QName[]) o; - for (int i = 0; i < v.length; i++) - values += ", " + v[i]; - } - return values; - } - - public static String returnMultiArrayValues(Object o, String t) { - String values = null; - if (t.equals("boolean")) { - boolean[][] v = (boolean[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("Boolean")) { - Boolean[][] v = (Boolean[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("char")) { - char[][] v = (char[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("Character")) { - Character[][] v = (Character[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("byte")) { - byte[][] v = (byte[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("Byte")) { - Byte[][] v = (Byte[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("short")) { - short[][] v = (short[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("Short")) { - Short[][] v = (Short[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("int")) { - int[][] v = (int[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("Integer")) { - Integer[][] v = (Integer[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("long")) { - long[][] v = (long[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("Long")) { - Long[][] v = (Long[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("float")) { - float[][] v = (float[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("Float")) { - Float[][] v = (Float[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("double")) { - double[][] v = (double[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("Double")) { - Double[][] v = (Double[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("String")) { - String[][] v = (String[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("Date")) { - Date[][] v = (Date[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("Calendar")) { - Calendar[][] v = (Calendar[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("XMLGregorianCalendar")) { - XMLGregorianCalendar[][] v = (XMLGregorianCalendar[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("BigInteger")) { - BigInteger[][] v = (BigInteger[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("BigDecimal")) { - BigDecimal[][] v = (BigDecimal[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } else if (t.equals("QName")) { - QName[][] v = (QName[][]) o; - for (int i = 0; i < v.length; i++) { - for (int k = 0; k < v[i].length; k++) - values += ", " + v[i][k]; - } - } - return values; - } - - public static TimeZone getDefaultTimeZone() { - return (defaultTZ); - } - - public static boolean compareXMLGregorianCalendars(XMLGregorianCalendar cal1, - XMLGregorianCalendar cal2) { - if (cal1.compare(cal2) == DatatypeConstants.EQUAL) { - TestUtil.logMsg( - "XMLGregorianCalendar COMPARISON 1 - XMLGregorianCalendar's ARE EQUAL"); - return true; - } else { - TestUtil.logMsg( - "XMLGregorianCalendar COMPARISON 1 - XMLGregorianCalendar's ARE NOT EQUAL"); - return false; - } - } - - public static boolean compareCalendars(Calendar cal1, Calendar cal2) { - SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS z"); - df.setTimeZone(TimeZone.getTimeZone("GMT")); - String str1 = df.format(cal1.getTime()); - String str2 = df.format(cal2.getTime()); - // Try comparison method 1 - if (str1.equals(str2)) { - TestUtil.logMsg("CALENDAR COMPARISON 1 - CALENDARS ARE EQUAL"); - return true; - } else { - // Try alternate comparison method 2 - if (compareCalendars2(cal1, cal2)) { - TestUtil.logMsg("CALENDAR COMPARISON 2 - CALENDARS ARE EQUAL"); - return true; - } else { - // Just bail but do not error - comparing dates are funky - TestUtil.logMsg("CALENDAR COMPARISON - SKIPPING"); - return true; - } - } - } - - public static boolean compareCalendars2(Calendar cal1, Calendar cal2) { - SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS z"); - - TimeZone tmpzone1 = cal1.getTimeZone(); - tmpzone1.setID("Custom"); - df.setTimeZone(tmpzone1); - String str1 = df.format(cal1.getTime()); - - TimeZone tmpzone2 = cal2.getTimeZone(); - tmpzone2.setID("Custom"); - df.setTimeZone(tmpzone2); - String str2 = df.format(cal2.getTime()); - return str1.equals(str2); - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/JAXWS_Util.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/JAXWS_Util.java deleted file mode 100644 index 4a2fc80bba..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/JAXWS_Util.java +++ /dev/null @@ -1,1115 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.*; -import java.lang.reflect.*; -import java.net.*; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; - -import jakarta.xml.ws.handler.soap.*; -import jakarta.xml.soap.*; -import java.io.*; -import javax.naming.*; - -import org.w3c.dom.Node; -import org.xml.sax.*; -import javax.xml.parsers.*; -import javax.xml.transform.*; -import javax.xml.transform.dom.*; -import javax.xml.transform.sax.SAXSource; -import javax.xml.transform.stream.StreamSource; - -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; - -import jakarta.xml.soap.SOAPMessage; - -public final class JAXWS_Util { - public static final String SOAP11 = "soap11"; - - public static final String SOAP12 = "soap12"; - - private static MessageFactory mfactorySOAP11 = null; - - private static MessageFactory mfactorySOAP12 = null; - - private static SOAPFactory sfactorySOAP11 = null; - - private static SOAPFactory sfactorySOAP12 = null; - - private static boolean debug = false; - - private static Context nctx = null; - - private static String content = null; - - public static Object doJNDILookup(String name) throws NamingException { - System.out.println("JAXWS_Util:doJNDILookup"); - if (nctx == null) { - System.out.println("Create JAXWS naming context..."); - nctx = new InitialContext(); - System.out.println("List all names in JAXWS naming context..."); - NamingEnumeration list = nctx.list(""); - while (list.hasMore()) { - NameClassPair nc = (NameClassPair) list.next(); - System.out.println(nc); - } - } - return nctx.lookup(name); - } - - /************************************************************************* - * Porting wrapper methods - *************************************************************************/ - public static String getURLFromProp(String urlProp) throws Exception { - return TestUtil.getProperty(urlProp); - } - - /**************************************************************************/ - // Logging methods below should be null methods (implementation specific). - - public static void setSOAPLogging(java.lang.Object stub, - java.io.OutputStream s) throws Exception { - boolean enableSoapLogging = Boolean - .parseBoolean(TestUtil.getProperty("EnableSoapLogging")); - boolean debug = false; - if (!enableSoapLogging) - return; - System.out.println("DEBUG: setSOAPLogging - NOT USED"); - } - - public static void setSOAPLogging(java.lang.Object stub) throws Exception { - setSOAPLogging(stub, System.out); - } - - /************************************************************************* - * jakarta.xml.ws.Service.create and service.getPort wrapper methods - *************************************************************************/ - - public static jakarta.xml.ws.Service getService(QName sname) throws Exception { - TestUtil.logMsg("JAXWS_Util:getService(QName)"); - jakarta.xml.ws.Service service = null; - TestUtil.logMsg("QNAME=" + sname); - TestUtil.logMsg("Creating Service via jakarta.xml.ws.Service.create(QName)"); - service = jakarta.xml.ws.Service.create(sname); - if (service == null) - TestUtil - .logErr("FATAL: jakarta.xml.ws.Service.create(QName) returned a null"); - return service; - } - - public static jakarta.xml.ws.Service getService(URL wsdlurl, QName sname) - throws Exception { - TestUtil.logMsg("JAXWS_Util:getService(URL, QName)"); - jakarta.xml.ws.Service service = null; - if (wsdlurl != null) - TestUtil.logMsg("URL=" + wsdlurl.toString()); - TestUtil.logMsg("QName=" + sname); - TestUtil - .logMsg("Creating Service via jakarta.xml.ws.Service.create(URL, QName)"); - service = jakarta.xml.ws.Service.create(wsdlurl, sname); - if (service == null) - TestUtil.logErr( - "FATAL: jakarta.xml.ws.Service.create(URL, QName) returned a null"); - return service; - } - - public static jakarta.xml.ws.Service getService(Class siClass) - throws Exception { - TestUtil.logMsg("JAXWS_Util:getService(Class)"); - jakarta.xml.ws.Service service = null; - TestUtil.logMsg("siClass=" + siClass.getName()); - service = (jakarta.xml.ws.Service) siClass.newInstance(); - if (service == null) - TestUtil - .logErr("FATAL: JAXWS_Util.getService(Class) returned service=null"); - return service; - } - - public static jakarta.xml.ws.Service getService(URL wsdlurl, QName siName, - Class siClass) throws Exception { - TestUtil.logMsg("JAXWS_Util:getService(URL, QName, Class)"); - jakarta.xml.ws.Service service = null; - if (wsdlurl != null) - TestUtil.logMsg("URL=" + wsdlurl.toString()); - TestUtil.logMsg("siName=" + siName); - Modules.ensureReadable(JAXWS_Util.class, siClass); - Modules.ensureReadable(JAXWS_Util.class, siClass.getSuperclass()); - TestUtil.logMsg("siClass=" + siClass.getName()); - Constructor ctr = siClass.getConstructor(URL.class, QName.class); - service = (jakarta.xml.ws.Service) ctr.newInstance(wsdlurl, siName); - if (service == null) - TestUtil.logErr( - "FATAL: JAXWS_Util.getService(URL, QName, Class) returned service=null"); - return service; - } - - public static Object getPort(URL wsdlurl, QName siName, Class siClass, - QName portName, Class seiClass) throws Exception { - TestUtil.logMsg("JAXWS_Util.getPort(URL, QName, Class, QName, Class)"); - Object stub = getPort(wsdlurl, siName, siClass, portName, seiClass, null); - return stub; - } - - // Addressing getPort call - public static Object getPort(URL wsdlurl, QName siName, Class siClass, - QName portName, Class seiClass, WebServiceFeature[] wsf) - throws Exception { - TestUtil.logMsg( - "JAXWS_Util.getPort(URL, QName, Class, QName, Class, WebServiceFeature[])"); - if (wsdlurl != null) - TestUtil.logMsg("URL=" + wsdlurl.toString()); - TestUtil.logMsg("siName=" + siName); - TestUtil.logMsg("siClass=" + siClass.getName()); - TestUtil.logMsg("portName=" + portName); - TestUtil.logMsg("seiClass=" + seiClass.getName()); - if (wsf != null) { - TestUtil.logMsg("wsf.length=" + wsf.length); - for (int i = 0; i < wsf.length; i++) { - TestUtil.logMsg("wsf[" + i + "]=" + wsf[i].toString()); - } - } - Constructor ctr = siClass.getConstructor(URL.class, QName.class); - jakarta.xml.ws.Service svc = (jakarta.xml.ws.Service) ctr.newInstance(wsdlurl, - siName); - TestUtil.logMsg("Get stub/proxy for seiClass -> " + seiClass.getName() - + ", port ->" + portName); - Object stub = null; - if (wsf != null) - stub = svc.getPort(portName, seiClass, wsf); - else - stub = svc.getPort(portName, seiClass); - if (stub == null) { - if (wsf != null) - TestUtil.logErr( - "FATAL: JAXWS_Util.getPort(URL, QName, Class, QName, Class, WebServiceFeature[]) returned stub/proxy=null"); - else - TestUtil.logErr( - "FATAL: JAXWS_Util.getPort(URL, QName, Class, QName, Class) returned stub/proxy=null"); - } else - TestUtil.logMsg("Obtained stub/proxy=" + stub); - return stub; - } - - public static Object getPort(jakarta.xml.ws.Service svc, QName port, - Class seiClass) throws Exception { - TestUtil.logMsg("JAXWS_Util.getPort(jakarta.xml.ws.Service, QName, Class)"); - Object stub = getPort(svc, port, seiClass, null); - return stub; - } - - // Addressing getPort call - public static Object getPort(jakarta.xml.ws.Service svc, QName port, - Class seiClass, WebServiceFeature[] wsf) throws Exception { - TestUtil.logMsg( - "JAXWS_Util.getPort(jakarta.xml.ws.Service, QName, Class, WebServiceFeature[])"); - TestUtil.logMsg("Get stub/proxy for port qname=" + port); - Object stub = null; - if (wsf != null) - stub = svc.getPort(port, seiClass, wsf); - else - stub = svc.getPort(port, seiClass); - if (stub == null) { - if (wsf != null) - TestUtil.logErr( - "FATAL: JAXWS_Util.getPort(jakarta.xml.ws.Service, QName, Class, WebServiceFeature[]) returned stub/proxy=null"); - else - TestUtil.logErr( - "FATAL: JAXWS_Util.getPort(jakarta.xml.ws.Service, QName, Class) returned stub/proxy=null"); - } else - TestUtil.logMsg("Obtained stub/proxy=" + stub); - return stub; - } - - public static void setTargetEndpointAddress(Object stub, String url) - throws Exception { - BindingProvider bindingprovider = (BindingProvider) stub; - java.util.Map context = bindingprovider.getRequestContext(); - TestUtil.logMsg("Set target endpoint address to=" + url + " ..."); - context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url); - JAXWS_Util.setSOAPLogging(stub); - } - - public static String getTargetEndpointAddress(Object stub) throws Exception { - BindingProvider bindingprovider = (BindingProvider) stub; - java.util.Map context = bindingprovider.getRequestContext(); - String url = (String) context - .get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY); - TestUtil.logMsg("Get target endpoint address=" + url); - return url; - } - - public static void dumpTargetEndpointAddress(Object stub) throws Exception { - BindingProvider bindingprovider = (BindingProvider) stub; - java.util.Map context = bindingprovider.getRequestContext(); - String url = (String) context - .get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY); - TestUtil.logMsg("Dump target endpoint address=" + url); - } - - public static void setUserNameAndPassword(Object stub, String username, - String password) throws Exception { - BindingProvider bindingprovider = (BindingProvider) stub; - java.util.Map context = bindingprovider.getRequestContext(); - context.put(BindingProvider.USERNAME_PROPERTY, username); - context.put(BindingProvider.PASSWORD_PROPERTY, password); - } - - /************************************************************************* - * Other methods - *************************************************************************/ - - public static void dumpWSDLLocation(jakarta.xml.ws.Service service) { - TestUtil.logMsg("service wsdl loc=" + service.getWSDLDocumentLocation()); - } - - public static void dumpServiceName(jakarta.xml.ws.Service service) { - TestUtil.logMsg("service name=" + service.getServiceName()); - } - - public static void dumpPorts(jakarta.xml.ws.Service service) { - for (Iterator iterator = service.getPorts(); iterator.hasNext();) { - QName name = (QName) iterator.next(); - TestUtil.logMsg("port:" + name.toString()); - } - } - - public static String getMessageEncoding(SOAPMessage msg) - throws SOAPException { - String encoding = "utf-8"; - if (msg.getProperty(SOAPMessage.CHARACTER_SET_ENCODING) != null) { - encoding = msg.getProperty(SOAPMessage.CHARACTER_SET_ENCODING).toString(); - } - return encoding; - } - - public static void printSOAPMessage(SOAPMessage msg, PrintWriter writer) { - writer.println(returnSOAPMessageAsString(msg)); - } - - public static void printSOAPMessage(SOAPMessage msg, PrintStream out) { - out.println("" + returnSOAPMessageAsString(msg)); - } - - public static void dumpSOAPMessage(SOAPMessage msg, boolean output) { - if (msg == null) { - TestUtil.logMsg("SOAP Message is null"); - return; - } - if (output) { - TestUtil.logMsg(""); - TestUtil.logMsg("--------------------"); - TestUtil.logMsg("DUMP OF SOAP MESSAGE"); - TestUtil.logMsg("--------------------"); - try { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - msg.writeTo(baos); - TestUtil.logMsg(baos.toString(getMessageEncoding(msg))); - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - } else { - System.out.println("\n--------------------\nDUMP OF SOAP MESSAGE" - + "\n--------------------"); - try { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - msg.writeTo(baos); - System.out.println(baos.toString(getMessageEncoding(msg))); - } catch (Exception e) { - e.printStackTrace(System.err); - } - } - } - - public static void dumpSOAPMessage(SOAPMessage msg) { - dumpSOAPMessage(msg, true); - } - - public static String returnSOAPMessageAsString(SOAPMessage msg) { - if (msg == null) { - TestUtil.logMsg("SOAP Message is null"); - return null; - } - ByteArrayOutputStream baos = null; - String s = null; - try { - baos = new ByteArrayOutputStream(); - msg.writeTo(baos); - s = baos.toString(getMessageEncoding(msg)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - return s; - } - - public static void dumpSOAPMessageWOA(SOAPMessage msg) { - dumpSOAPMessageWOA(msg, true); - } - - public static void dumpSOAPMessageWOA(SOAPMessage msg, boolean output) { - ByteArrayOutputStream baos = null; - if (msg == null) { - TestUtil.logMsg("SOAP Message is null"); - return; - } - if (output) { - TestUtil.logMsg(""); - TestUtil.logMsg("------------------------"); - TestUtil.logMsg("DUMP OF SOAP MESSAGE WOA"); - TestUtil.logMsg("------------------------"); - try { - baos = new ByteArrayOutputStream(); - msg.writeTo(baos); - MessageFactory mf = MessageFactory.newInstance(); - SOAPMessage tmpMsg = mf.createMessage(msg.getMimeHeaders(), - new ByteArrayInputStream(baos.toString().getBytes())); - tmpMsg.removeAllAttachments(); - tmpMsg.saveChanges(); - baos.close(); - baos = new ByteArrayOutputStream(); - tmpMsg.writeTo(baos); - TestUtil.logMsg(baos.toString(getMessageEncoding(tmpMsg))); - } catch (Exception e) { - TestUtil.printStackTrace(e); - } finally { - try { - baos.close(); - } catch (Exception e) { - } - } - } else { - System.out.println("\n------------------------\nDUMP OF SOAP " - + "MESSAGE WOA\n------------------------"); - try { - baos = new ByteArrayOutputStream(); - msg.writeTo(baos); - MessageFactory mf = MessageFactory.newInstance(); - SOAPMessage tmpMsg = mf.createMessage(msg.getMimeHeaders(), - new ByteArrayInputStream(baos.toString().getBytes())); - tmpMsg.removeAllAttachments(); - tmpMsg.saveChanges(); - baos.close(); - baos = new ByteArrayOutputStream(); - tmpMsg.writeTo(baos); - System.out.println(baos.toString(getMessageEncoding(tmpMsg))); - } catch (Exception e) { - e.printStackTrace(System.err); - } finally { - try { - baos.close(); - } catch (Exception e) { - } - } - } - } - - public static boolean SOAPElementContentsEqual(SOAPElement request, - SOAPElement response) { - String requestContent = getSOAPElementContent("Request", request); - String responseContent = getSOAPElementContent("Response", response); - TestUtil.logMsg("Comparing request and response SOAPElement content"); - if (requestContent.equals(responseContent)) { - TestUtil.logMsg( - "Request and Response SOAPElement content is equal (expected)"); - return true; - } else { - TestUtil.logErr( - "Request and Response SOAPElement content is not equal (unexpected)"); - return false; - } - } - - public static String getSOAPElementContent(String which, SOAPElement se) { - content = null; - TestUtil.logMsg("Dumping SOAPElement " + which + " Content"); - _GetSOAPElementContent(se); - return content; - } - - private static void _GetSOAPElementContent(SOAPElement se) { - jakarta.xml.soap.Name name = se.getElementName(); - if (name.getURI() == null || name.getURI().equals("")) { - TestUtil.logMsg(" Element=" + name.getLocalName()); - content += name.getLocalName(); - } else { - TestUtil - .logMsg(" Element=" + name.getLocalName() + " URI=" + name.getURI()); - content += name.getLocalName() + " " + name.getURI(); - } - Iterator i = se.getAllAttributes(); - while (i.hasNext()) { - Object o = i.next(); - if (o instanceof jakarta.xml.soap.Name) { - jakarta.xml.soap.Name attr = (jakarta.xml.soap.Name) o; - if (attr.getURI() == null || attr.getURI().equals("")) { - TestUtil.logMsg(" AttrName=" + attr.getLocalName() + " AttrValue=" - + se.getAttributeValue(attr)); - // content += " "+attr.getLocalName()+" "+ - // se.getAttributeValue(attr); - } else { - TestUtil.logMsg(" AttrName=" + attr.getLocalName() + " URI=" - + attr.getURI() + " AttrValue=" + se.getAttributeValue(attr)); - // content += " "+attr.getLocalName()+" "+ - // attr.getURI()+" "+se.getAttributeValue(attr); - } - } - } - i = se.getChildElements(); - while (i.hasNext()) { - Object o = i.next(); - if (o instanceof jakarta.xml.soap.Name) { - jakarta.xml.soap.Name elem = (jakarta.xml.soap.Name) o; - if (elem.getURI() == null || elem.getURI().equals("")) { - TestUtil.logMsg(" Element=" + elem.getLocalName()); - content += " " + elem.getLocalName(); - } else { - TestUtil.logMsg( - " Element=" + elem.getLocalName() + " URI=" + elem.getURI()); - content += " " + elem.getLocalName() + " " + elem.getURI(); - } - } else if (o instanceof jakarta.xml.soap.Text) { - jakarta.xml.soap.Text text = (jakarta.xml.soap.Text) o; - TestUtil.logMsg(" Text=" + text.getValue()); - content += " " + text.getValue(); - } else { - SOAPElement se2 = (SOAPElement) o; - _GetSOAPElementContent(se2); - } - } - } - - public static SOAPFault createSOAPFault(String soapVer) throws Exception { - jakarta.xml.soap.SOAPFault soapFault = null; - try { - // Create a soap message factory instance. - TestUtil.logMsg("Create a SOAP MessageFactory instance - " + soapVer); - jakarta.xml.soap.MessageFactory mfactory = getMessageFactory(soapVer); - - // Create a soap message. - TestUtil.logMsg("Create a SOAPMessage"); - jakarta.xml.soap.SOAPMessage soapmsg = mfactory.createMessage(); - - // Retrieve the soap part from the soap message.. - TestUtil.logMsg("Get SOAP Part"); - jakarta.xml.soap.SOAPPart sp = soapmsg.getSOAPPart(); - - // Retrieve the envelope from the soap part. - TestUtil.logMsg("Get SOAP Envelope"); - jakarta.xml.soap.SOAPEnvelope envelope = sp.getEnvelope(); - - // Retrieve the soap body from the envelope. - TestUtil.logMsg("Get SOAP Body"); - jakarta.xml.soap.SOAPBody body = envelope.getBody(); - - // Add a soap fault to the soap body. - soapFault = body.addFault(); - } catch (Exception e) { - TestUtil.logErr("Exception caught: " + e); - return null; - } - return soapFault; - } - - public static SOAPFault createSOAPFault(String soapVer, - javax.xml.namespace.QName faultCode, String faultActor, - String faultString, jakarta.xml.soap.Name name) throws Exception { - jakarta.xml.soap.SOAPFault soapFault = null; - try { - // Create a soap message factory instance. - TestUtil.logMsg("Create a SOAP MessageFactory instance - " + soapVer); - jakarta.xml.soap.MessageFactory mfactory = getMessageFactory(soapVer); - - // Create a soap message. - TestUtil.logMsg("Create a SOAPMessage"); - jakarta.xml.soap.SOAPMessage soapmsg = mfactory.createMessage(); - - // Retrieve the soap part from the soap message.. - TestUtil.logMsg("Get SOAP Part"); - jakarta.xml.soap.SOAPPart sp = soapmsg.getSOAPPart(); - - // Retrieve the envelope from the soap part. - TestUtil.logMsg("Get SOAP Envelope"); - jakarta.xml.soap.SOAPEnvelope envelope = sp.getEnvelope(); - - // Retrieve the soap body from the envelope. - TestUtil.logMsg("Get SOAP Body"); - jakarta.xml.soap.SOAPBody body = envelope.getBody(); - - // Add a soap fault to the soap body. - soapFault = body.addFault(); - soapFault.setFaultCode(faultCode); - soapFault.setFaultActor(faultActor); - soapFault.setFaultString(faultString); - jakarta.xml.soap.Detail detail = soapFault.addDetail(); - detail.addDetailEntry(name); - } catch (Exception e) { - TestUtil.logErr("Exception caught: " + e); - return null; - } - return soapFault; - } - - public static MessageFactory getMessageFactory(String soapVer) - throws Exception { - System.out.println("JAXWS_Util:getMessageFactory"); - if (soapVer.equals(SOAP11)) { - if (mfactorySOAP11 == null) - mfactorySOAP11 = MessageFactory.newInstance(); - return mfactorySOAP11; - } else { - if (mfactorySOAP12 == null) - mfactorySOAP12 = MessageFactory - .newInstance(SOAPConstants.SOAP_1_2_PROTOCOL); - return mfactorySOAP12; - } - } - - public static SOAPFactory getSOAPFactory(String soapVer) throws Exception { - System.out.println("JAXWS_Util:getSOAPFactory"); - if (soapVer.equals(SOAP11)) { - if (sfactorySOAP11 == null) - sfactorySOAP11 = SOAPFactory.newInstance(); - return sfactorySOAP11; - } else { - if (sfactorySOAP12 == null) - sfactorySOAP12 = SOAPFactory - .newInstance(SOAPConstants.SOAP_1_2_PROTOCOL); - return sfactorySOAP12; - } - } - - public static SOAPMessage createEmtpySOAPMessage(String soapVer) { - try { - SOAPMessage message = getMessageFactory(soapVer).createMessage(); - return message; - } catch (Exception e) { - return null; - } - } - - public static SOAPMessage makeSOAPMessage(String msg) { - try { - Source srcMsg = makeSource(msg, "StreamSource"); - MessageFactory factory = MessageFactory.newInstance(); - SOAPMessage message = factory.createMessage(); - message.getSOAPPart().setContent((Source) srcMsg); - message.saveChanges(); - return message; - } catch (Exception e) { - return null; - } - } - - public static Source makeSource(String msg, String type) { - Reader reader = new StringReader(msg); - if (type.equals("StreamSource")) - return new StreamSource(reader); - else if (type.equals("DOMSource")) - return new DOMSource(createDOMNode(reader)); - else if (type.equals("SAXSource")) - return new SAXSource(new InputSource(reader)); - else - return null; - } - - public static Node createDOMNode(Reader reader) { - - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - dbf.setValidating(false); - try { - DocumentBuilder builder = dbf.newDocumentBuilder(); - try { - return builder.parse(new InputSource(reader)); - } catch (SAXException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } catch (ParserConfigurationException pce) { - IllegalArgumentException iae = new IllegalArgumentException( - pce.getMessage()); - iae.initCause(pce); - throw iae; - } - return null; - } - - public static String getDOMResultAsString(DOMResult dr) throws Exception { - DOMSource ds = new DOMSource(dr.getNode()); - Transformer transformer = TransformerFactory.newInstance().newTransformer(); - transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - transformer.setOutputProperty(OutputKeys.METHOD, "xml"); - Writer out = new StringWriter(); - StreamResult streamResult = new StreamResult(); - streamResult.setWriter(out); - transformer.transform(ds, streamResult); - return streamResult.getWriter().toString(); - } - - public static DOMResult getSourceAsDOMResult(Source s) throws Exception { - Transformer transformer = TransformerFactory.newInstance().newTransformer(); - transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - DOMResult result = new DOMResult(); - transformer.transform(s, result); - return result; - } - - public static String getSourceAsString(Source s) throws Exception { - DOMResult dr = getSourceAsDOMResult(s); - return getDOMResultAsString(dr); - } - - public static String getSOAPMessageAsString(SOAPMessage message) { - return getMsgAsString(message); - } - - public static String getMsgAsString(SOAPMessage message) { - String msg = null; - try { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - message.writeTo(baos); - msg = baos.toString(getMessageEncoding(message)); - } catch (Exception e) { - e.printStackTrace(); - } - return msg; - } - - public static int looseIndexOf(List s, String searchStr) { - int index = -1; - int currentIndex = -1; - TestUtil.logTrace("In looseIndexOf"); - TestUtil.logTrace("List.size()=" + s.size()); - TestUtil.logTrace("List.isEmpty()=" + s.isEmpty()); - if (!s.isEmpty()) { - Iterator i = s.iterator(); - while (i.hasNext()) { - currentIndex++; - String item = (String) i.next(); - if (item != null) { - TestUtil.logTrace("item=|" + item + "|"); - TestUtil.logTrace("searchStr=" + searchStr); - if (item.indexOf(searchStr) != -1) { - TestUtil.logTrace("found item"); - index = currentIndex; - break; - } - } else { - TestUtil.logErr("A null object was returned while iterating through"); - TestUtil.logErr("the list of callbacks"); - } - } - } - return index; - } - - public static int looseLastIndexOf(List s, String searchStr) { - TestUtil.logTrace("In looseLastIndexOf"); - TestUtil.logTrace("List.size()=" + s.size()); - TestUtil.logTrace("List.isEmpty()=" + s.isEmpty()); - int lastIndex = -1; - int currentIndex = -1; - if (!s.isEmpty()) { - Iterator i = s.iterator(); - while (i.hasNext()) { - currentIndex++; - String item = (String) i.next(); - if (item != null) { - TestUtil.logTrace("item=|" + item + "|"); - TestUtil.logTrace("searchStr=" + searchStr); - if (item.indexOf(searchStr) != -1) { - TestUtil.logTrace("found item"); - lastIndex = currentIndex; - } - } else { - TestUtil.logErr("A null object was returned while iterating through"); - TestUtil.logErr("the list of callbacks"); - } - } - } - return lastIndex; - } - - public static void dumpList(List s) { - TestUtil.logTrace("------------------------------------"); - TestUtil.logTrace("Dumping List"); - TestUtil.logTrace("------------------------------------"); - TestUtil.logTrace("\n"); - TestUtil.logTrace("List.size()=" + s.size()); - TestUtil.logTrace("List.isEmpty()=" + s.isEmpty()); - if (!s.isEmpty()) { - Iterator i = s.iterator(); - while (i.hasNext()) { - Object o = i.next(); - if (o != null) { - if (o instanceof String) { - TestUtil.logTrace((String) o); - } else { - TestUtil.logTrace( - "An unexpected object was returned while iterating through"); - TestUtil - .logTrace("the list of callbacks, expected String got:" + o); - } - } else { - TestUtil - .logTrace("A null object was returned while iterating through"); - TestUtil.logTrace("the list of callbacks"); - } - } - } - } - - public static List getMessagesStartingFrom(List calls, - String searchItem) { - boolean pass = true; - - TestUtil.logTrace("The complete list of messages are the following:"); - dumpList(calls); - - TestUtil.logTrace("Getting all messages after " + searchItem); - List messages = new Vector(); - TestUtil.logTrace("\n"); - TestUtil.logTrace("The first item found is:"); - if (!calls.isEmpty()) { - boolean found = false; - Iterator i = calls.iterator(); - while (i.hasNext()) { - Object o = i.next(); - if (o != null) { - if (o instanceof String) { - String item = (String) o; - if (found == false) { - if (item.indexOf(searchItem) > -1) { - TestUtil.logTrace(item); - found = true; - } - } - if (found) { - messages.add(item); - } - } else { - TestUtil.logErr( - "An unexpected object was returned while iterating through"); - TestUtil.logErr("the list of callbacks, expected String got:" + o); - } - } else { - TestUtil.logErr("A null object was returned while iterating through"); - TestUtil.logErr("the list of callbacks"); - } - } - } - return messages; - - } - - public static boolean doesMethodExist(Class c, String methodName) { - boolean found = false; - Method[] methods = c.getDeclaredMethods(); - for (int i = 0; i < methods.length; i++) { - Method method = methods[i]; - if (methodName.equals(method.getName())) { - found = true; - } - } - return found; - } - - public static Method getMethod(Class c, String methodName) { - TestUtil.logTrace("in getMethod"); - Method result = null; - for (Method method : c.getDeclaredMethods()) { - String m = method.getName(); - TestUtil.logTrace("method=" + m); - if (methodName.equals(m)) { - result = method; - TestUtil.logTrace("found:" + methodName); - } - } - return result; - } - - public static Class getMethodReturnType(Class c, String methodName) { - Class result = null; - Method m = getMethod(c, methodName); - if (m != null) { - TestUtil - .logTrace("The method:" + methodName + " was found for class:" + c); - TestUtil.logTrace("now returning the return type"); - result = m.getReturnType(); - } else { - TestUtil.logTrace( - "The method:" + methodName + " was not found for class:" + c); - } - return result; - } - - public static Class getMethodParameterType(Class c, String methodName, - int location) { - Class result = null; - Method m = getMethod(c, methodName); - if (m != null) { - TestUtil - .logTrace("The method:" + methodName + " was found for class:" + c); - Class[] pTypes = m.getParameterTypes(); - if (location <= pTypes.length) { - TestUtil.logTrace("Found specified parameter, now returning it"); - result = pTypes[location]; - } else { - TestUtil.logTrace("The method:" + methodName - + " did not contain a parameter in position " + location); - } - } else { - TestUtil.logTrace( - "The method:" + methodName + " was not found for class:" + c); - } - return result; - } - - public static boolean doesExceptionExistForAllMethods(Class c, - String exceptionName) { - boolean result = true; - for (Method method : c.getDeclaredMethods()) { - String m = method.getName(); - TestUtil.logTrace("method=" + m); - int count = 0; - String eName = ""; - for (Class c1 : method.getExceptionTypes()) { - eName = c1.getName(); - TestUtil.logTrace("exception name=" + eName); - if (eName.equals(exceptionName)) { - count++; - } - } - if (count == 0) { - TestUtil.logErr("The method:" + m + " did not declare " + exceptionName - + " on all of it's methods"); - result = false; - } - } - return result; - } - - public static boolean validateURL(String theURL) { - boolean valid = false; - URL url = null; - URLConnection urlConnection = null; - TestUtil.logMsg("validateURL: -> " + theURL); - try { - url = new URL(theURL); - Object o = url.openConnection().getContent(); - valid = true; - TestUtil.logMsg("validateURL passed"); - } catch (Exception e) { - TestUtil.logMsg("validateURL failed"); - } - return valid; - } - - public static int getFreePort() { - int port = -1; - ServerSocket soc = null; - int minPort = -1; - int maxPort = -1; - - try { - minPort = Integer.parseInt(TestUtil.getProperty("port.range.min", "-1")); - - } catch (Exception e) { - } - - try { - maxPort = Integer.parseInt(TestUtil.getProperty("port.range.max", "-1")); - - } catch (Exception e) { - } - - TestUtil.logMsg("minPort=" + minPort); - TestUtil.logMsg("maxPort=" + maxPort); - - SecurityManager sec = System.getSecurityManager(); - - if (minPort == -1 || minPort > maxPort) { // usual case: port range is - // not specified in - // interview - if (sec != null) { - try { - sec.checkListen(0); - } catch (SecurityException secex) { - TestUtil.logErr("Security configuration does not allow to " - + "wait for the connection on ports 1024-... ", secex); - - return -1; - } - } - try { - soc = new ServerSocket(0); - port = soc.getLocalPort(); - } catch (IOException e) { - TestUtil.logErr( - "Unable to get a free port because of an exception: " + e, e); - return -1; - } finally { - try { - soc.close(); - } catch (Exception e) { - } - } - return port; - } else if (minPort == maxPort && minPort != -1) { - return minPort; - } else { // special case: port range is specified in interview for - // some reason - for (port = minPort; port <= maxPort; port++) { - try { - if (sec != null) { - sec.checkListen(port); - } - soc = new ServerSocket(port); - soc.close(); - return port; - } catch (java.io.IOException e) { - } catch (SecurityException e) { - } finally { - try { - soc.close(); - } catch (Exception e) { - } - } - } - TestUtil.logErr("Ports in range [" + minPort + "," + maxPort + "] are " - + "not available on local machine " - + "or security configuration does not allow " - + "to wait for the connection on these ports."); - return -1; // can not find out a free port - } - } - - public static void dumpHTTPHeaders(SOAPMessageContext context) { - dumpHTTPHeaders(context, false); - } - - public static void dumpHTTPHeaders(SOAPMessageContext context, - boolean output) { - - Map> mreq = (Map>) context - .get(SOAPMessageContext.HTTP_REQUEST_HEADERS); - Map> mresp = (Map>) context - .get(SOAPMessageContext.HTTP_RESPONSE_HEADERS); - StringBuffer sbreq = new StringBuffer(); - int cnt = 0; - Iterator iterator = null; - try { - if (mreq != null) { - if (mreq.size() > 0) { - iterator = mreq.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - List list = (List) mreq.get(key); - Iterator i = list.iterator(); - String values = ""; - while (i.hasNext()) - values = (String) i.next() + " "; - sbreq.append("" + key + "=" + values); - cnt++; - } - } - } else - sbreq.append("http_request_headers are null"); - } catch (Exception e) { - } - StringBuffer sbresp = new StringBuffer(); - cnt = 0; - iterator = null; - try { - if (mresp != null) { - if (mresp.size() > 0) { - iterator = mresp.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - List list = (List) mresp.get(key); - Iterator i = list.iterator(); - String values = ""; - while (i.hasNext()) - values = (String) i.next() + " "; - sbresp.append("" + key + "=" + values); - cnt++; - } - } - } else - sbresp.append("http_response_headers are null"); - } catch (Exception e) { - } - - if (output) { - TestUtil.logMsg(""); - TestUtil.logMsg("--------------------"); - TestUtil.logMsg("DUMP OF HTTP Headers"); - TestUtil.logMsg("--------------------"); - TestUtil.logMsg("HTTP_REQUEST_HEADERS=" + sbreq.toString()); - TestUtil.logMsg("HTTP_RESPONSE_HEADERS=" + sbresp.toString()); - } else { - System.out.println("\n--------------------\nDUMP OF HTTP Headers" - + "\n--------------------"); - System.out.println("HTTP_REQUEST_HEADERS=" + sbreq.toString()); - System.out.println("HTTP_RESPONSE_HEADERS=" + sbresp.toString()); - } - } - - public static Map> convertKeysToLowerCase( - Map> in) { - - HashMap out = new HashMap(); - if (in != null) { - for (Map.Entry> e : in.entrySet()) { - if (e.getKey() != null) - out.put(e.getKey().toLowerCase(), e.getValue()); - else - out.put(e.getKey(), e.getValue()); - } - } - return out; - } - - public static void setSOAPACTIONURI(Object o, String action) { - BindingProvider bp = (BindingProvider) o; - java.util.Map requestContext = bp.getRequestContext(); - if (requestContext == null) { - TestUtil.logErr("setSOAPACTIONURI:getRequestContext() returned null"); - } else { - requestContext.put(BindingProvider.SOAPACTION_URI_PROPERTY, action); - requestContext.put(BindingProvider.SOAPACTION_USE_PROPERTY, true); - TestUtil.logMsg("SOAPACTION_USE_PROPERTY being set to: " - + requestContext.get(BindingProvider.SOAPACTION_USE_PROPERTY)); - TestUtil.logMsg("SOAPACTION_URI_PROPERTY being set to: " - + requestContext.get(BindingProvider.SOAPACTION_URI_PROPERTY)); - } - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/LogicalHandlerBase.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/LogicalHandlerBase.java deleted file mode 100644 index 2e35dd7bc9..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/LogicalHandlerBase.java +++ /dev/null @@ -1,696 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.Iterator; -import java.util.Map; -import java.util.List; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.LogicalMessage; - -import jakarta.activation.DataHandler; - -import jakarta.annotation.PreDestroy; -import jakarta.annotation.PostConstruct; - -public class LogicalHandlerBase - implements jakarta.xml.ws.handler.LogicalHandler { - private int destroyCalled = 0; - - private int doingHandlerWork = 0; - - private static final String NAMESPACEURI = "http://handlerservice.org/wsdl"; - - private static final String PORT_NAME1 = "handlerservice.portname.1"; - - private String whichHandlerType = null; - - private String handlerName = null; - - public void setWhichHandlerType(String w) { - this.whichHandlerType = w; - } - - public String getWhichHandlerType() { - return this.whichHandlerType; - } - - public void setHandlerName(String h) { - this.handlerName = h; - } - - public String getHandlerName() { - return this.handlerName; - } - - public void preinvoke() { - doingHandlerWork++; - if (destroyCalled > 0) - HandlerTracker.reportThrowable(this, new Exception( - "Violation of Handler Lifecycle - Handler used after destroy called")); - } - - public void postinvoke() { - doingHandlerWork = 0; - } - - @PostConstruct - public void myInit() { - System.out.println("in " + this + ":myInit"); - HandlerTracker.reportInit(this, "myInit"); - } - - @PreDestroy - public void myDestroy() { - System.out.println("in " + this + ":myDestroy"); - if (doingHandlerWork > 0) - HandlerTracker.reportThrowable(this, new Exception( - "Violation of Handler Lifecycle - destroy called during handler usage")); - - destroyCalled++; - HandlerTracker.reportDestroy(this, "myDestroy"); - } - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - - try { - preinvoke(); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - String direction = Handler_Util.getDirection(context); - HandlerTracker.reportHandleMessage(this, direction); - if (Handler_Util.checkForMsg(this, context, "LogicalTest")) { - if (Handler_Util.checkForMsg(this, context, "MessageContextTest")) { - doLogicalMessageContext(context, direction); - doMessageContext(context, direction); - } else if (Handler_Util.checkForMsg(this, context, - "ContextPropertiesTest")) { - doContextProperties(context, direction); - } - } - } else { - TestUtil.logTrace("found GetTrackerData message, handler will ignore"); - } - } catch (Exception e) { - HandlerTracker.reportThrowable(this, e); - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - - public void close(MessageContext context) { - TestUtil.logTrace("in " + this + ":close"); - try { - preinvoke(); - HandlerTracker.reportClose(this); - } finally { - postinvoke(); - } - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + this + ":handleFault"); - TestUtil.logTrace("in " + this + ":handleFault"); - try { - preinvoke(); - HandlerTracker.reportHandleFault(this); - } finally { - postinvoke(); - } - TestUtil.logTrace("exiting " + this + ":handleFault"); - System.out.println("exiting " + this + ":handleFault"); - return true; - } - - private void doContextProperties(LogicalMessageContext context, - String direction) { - TestUtil.logTrace("in doLogicalMessageContext"); - TestUtil.logTrace("direction=" + direction); - TestUtil.logTrace("handlerName=" + handlerName); - if (handlerName.equals("ClientLogicalHandler2") - || handlerName.equals("ServerLogicalHandler2")) { - Map m1 = null; - String attachmentProp = ""; - if (direction.equals(Constants.OUTBOUND)) { - m1 = (Map) context - .get(LogicalMessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); - attachmentProp = "LogicalMessageContext.OUTBOUND_MESSAGE_ATTACHMENTS"; - } else { - m1 = (Map) context - .get(LogicalMessageContext.INBOUND_MESSAGE_ATTACHMENTS); - attachmentProp = "LogicalMessageContext.INBOUND_MESSAGE_ATTACHMENTS"; - } - int cnt = 0; - Iterator iterator = null; - String sTmp = ""; - try { - if (m1 != null) { - if (m1.size() > 0) { - iterator = m1.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logTrace("request attachments key[" + cnt + "]=" + key); - sTmp = "key[" + cnt + "]=" + key; - HandlerTracker.reportProperties(this, direction, attachmentProp, - sTmp); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - HandlerTracker.reportProperties(this, direction, attachmentProp, - "empty"); - } - } else { - TestUtil.logTrace("null"); - HandlerTracker.reportProperties(this, direction, attachmentProp, - "null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - - if (direction.equals(Constants.OUTBOUND)) { - m1 = (Map) context - .get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); - attachmentProp = "MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS"; - } else { - m1 = (Map) context - .get(MessageContext.INBOUND_MESSAGE_ATTACHMENTS); - attachmentProp = "MessageContext.INBOUND_MESSAGE_ATTACHMENTS"; - } - cnt = 0; - iterator = null; - try { - if (m1 != null) { - if (m1.size() > 0) { - iterator = m1.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logTrace("request attachments key[" + cnt + "]=" + key); - sTmp = "key[" + cnt + "]=" + key; - HandlerTracker.reportProperties(this, direction, attachmentProp, - sTmp); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - HandlerTracker.reportProperties(this, direction, attachmentProp, - "empty"); - } - } else { - TestUtil.logTrace("null"); - HandlerTracker.reportProperties(this, direction, attachmentProp, - "null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - - String ss = (String) context - .get(LogicalMessageContext.HTTP_REQUEST_METHOD); - if (ss != null) { - HandlerTracker.reportProperties(this, direction, - "LogicalMessageContext.HTTP_REQUEST_METHOD", ss); - } else { - HandlerTracker.reportProperties(this, direction, - "LogicalMessageContext.HTTP_REQUEST_METHOD", "null"); - } - ss = (String) context.get(MessageContext.HTTP_REQUEST_METHOD); - if (ss != null) { - HandlerTracker.reportProperties(this, direction, - "MessageContext.HTTP_REQUEST_METHOD", ss); - } else { - HandlerTracker.reportProperties(this, direction, - "MessageContext.HTTP_REQUEST_METHOD", "null"); - } - Integer ii = (Integer) context - .get(LogicalMessageContext.HTTP_RESPONSE_CODE); - if (ii != null) { - HandlerTracker.reportProperties(this, direction, - "LogicalMessageContext.HTTP_RESPONSE_CODE", ii.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "LogicalMessageContext.HTTP_RESPONSE_CODE", "null"); - } - ii = (Integer) context.get(MessageContext.HTTP_RESPONSE_CODE); - if (ii != null) { - HandlerTracker.reportProperties(this, direction, - "MessageContext.HTTP_RESPONSE_CODE", ii.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "MessageContext.HTTP_RESPONSE_CODE", "null"); - } - - Map> m2 = (Map>) context - .get(LogicalMessageContext.HTTP_REQUEST_HEADERS); - StringBuffer sb = new StringBuffer(); - cnt = 0; - iterator = null; - try { - if (m2 != null) { - if (m2.size() > 0) { - iterator = m2.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logTrace("request headers key[" + cnt + "]=" + key); - sb.append("key[" + cnt + "]=" + key + "|"); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - sb.append("empty"); - } - } else { - TestUtil.logTrace("null"); - sb.append("null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - HandlerTracker.reportProperties(this, direction, - "LogicalMessageContext.HTTP_REQUEST_HEADERS", sb.toString()); - - m2 = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - sb = new StringBuffer(); - cnt = 0; - iterator = null; - try { - if (m2 != null) { - if (m2.size() > 0) { - iterator = m2.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logTrace("request headers key[" + cnt + "]=" + key); - sb.append("key[" + cnt + "]=" + key + "|"); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - sb.append("empty"); - } - } else { - TestUtil.logTrace("null"); - sb.append("null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - HandlerTracker.reportProperties(this, direction, - "MessageContext.HTTP_REQUEST_HEADERS", sb.toString()); - - m2 = (Map>) context - .get(LogicalMessageContext.HTTP_RESPONSE_HEADERS); - sb = new StringBuffer(); - cnt = 0; - iterator = null; - try { - if (m2 != null) { - if (m2.size() > 0) { - iterator = m2.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logTrace("response headers key[" + cnt + "]=" + key); - sb.append("key[" + cnt + "]=" + key + "|"); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - sb.append("empty"); - } - } else { - TestUtil.logTrace("null"); - sb.append("null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - HandlerTracker.reportProperties(this, direction, - "LogicalMessageContext.HTTP_RESPONSE_HEADERS", sb.toString()); - - m2 = (Map>) context - .get(MessageContext.HTTP_RESPONSE_HEADERS); - sb = new StringBuffer(); - cnt = 0; - try { - if (m2 != null) { - if (m2.size() > 0) { - iterator = m2.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logTrace("response headers key[" + cnt + "]=" + key); - sb.append("key[" + cnt + "]=" + key + "|"); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - sb.append("empty"); - } - } else { - TestUtil.logTrace("null"); - sb.append("null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - HandlerTracker.reportProperties(this, direction, - "MessageContext.HTTP_RESPONSE_HEADERS", sb.toString()); - - Object oo = context.get(LogicalMessageContext.SERVLET_REQUEST); - if (oo != null) { - HandlerTracker.reportProperties(this, direction, - "LogicalMessageContext.SERVLET_REQUEST", oo.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "LogicalMessageContext.SERVLET_REQUEST", "null"); - } - oo = context.get(MessageContext.SERVLET_REQUEST); - if (oo != null) { - HandlerTracker.reportProperties(this, direction, - "MessageContext.SERVLET_REQUEST", oo.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "MessageContext.SERVLET_REQUEST", "null"); - } - oo = context.get(LogicalMessageContext.SERVLET_RESPONSE); - if (oo != null) { - HandlerTracker.reportProperties(this, direction, - "LogicalMessageContext.SERVLET_RESPONSE", oo.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "LogicalMessageContext.SERVLET_RESPONSE", "null"); - } - oo = context.get(MessageContext.SERVLET_RESPONSE); - if (oo != null) { - HandlerTracker.reportProperties(this, direction, - "MessageContext.SERVLET_RESPONSE", oo.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "MessageContext.SERVLET_RESPONSE", "null"); - } - oo = context.get(LogicalMessageContext.SERVLET_CONTEXT); - if (oo != null) { - HandlerTracker.reportProperties(this, direction, - "LogicalMessageContext.SERVLET_CONTEXT", oo.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "LogicalMessageContext.SERVLET_CONTEXT", "null"); - } - oo = context.get(MessageContext.SERVLET_CONTEXT); - if (oo != null) { - HandlerTracker.reportProperties(this, direction, - "MessageContext.SERVLET_CONTEXT", oo.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "MessageContext.SERVLET_CONTEXT", "null"); - } - - } - } - - private void doLogicalMessageContext(LogicalMessageContext context, - String direction) { - TestUtil.logTrace("in doLogicalMessageContext"); - TestUtil.logTrace("direction=" + direction); - TestUtil.logTrace("handlerName=" + handlerName); - if (handlerName.equals("ClientLogicalHandler2") - || handlerName.equals("ServerLogicalHandler2")) { - TestUtil.logTrace("calling context.getMessage()"); - LogicalMessage lm = context.getMessage(); - if (lm != null) { - HandlerTracker.reportLMCGetMessage(this, direction, "returned nonnull"); - } else { - HandlerTracker.reportLMCGetMessage(this, direction, "returned null"); - } - } - } - - private void doMessageContext(LogicalMessageContext context, - String direction) { - String whichDirection = direction.toUpperCase(); - TestUtil.logTrace("in doMessageContext"); - TestUtil.logTrace("whichDirection=" + whichDirection); - TestUtil.logTrace("handlerName=" + handlerName); - if (handlerName.equals("ClientLogicalHandler2") - || handlerName.equals("ServerLogicalHandler2")) { - HandlerTracker.reportComment(this, - "BeginMessageContextCallbackInvocations"); - TestUtil.logTrace("whichHandlerType=" + whichHandlerType); - - // set a property that the everyone will add to. - - if (whichHandlerType.equals("Client")) { - HandlerTracker.reportGet(this, - whichHandlerType + "To" + whichHandlerType + "Prop", - (String) context - .get(whichHandlerType + "To" + whichHandlerType + "Prop")); - - String tmp = (String) context - .get(whichHandlerType + "To" + whichHandlerType + "Prop"); - tmp = tmp + whichDirection + whichHandlerType + "LogicalHandler2"; - context.put(whichHandlerType + "To" + whichHandlerType + "Prop", tmp); - HandlerTracker.reportPut(this, - whichHandlerType + "To" + whichHandlerType + "Prop", tmp); - - context.setScope(whichHandlerType + "To" + whichHandlerType + "Prop", - MessageContext.Scope.APPLICATION); - HandlerTracker.reportSetScope(this, - whichHandlerType + "To" + whichHandlerType + "Prop", - MessageContext.Scope.APPLICATION.toString()); - - } else { - // server - String tmp = ""; - if (direction.equals(Constants.OUTBOUND)) { - HandlerTracker.reportGet(this, - "Handler" + whichHandlerType + "HandlerProp", (String) context - .get("Handler" + whichHandlerType + "HandlerProp")); - - tmp = (String) context - .get("Handler" + whichHandlerType + "HandlerProp"); - } - tmp = tmp + whichDirection + whichHandlerType + "LogicalHandler2"; - context.put("Handler" + whichHandlerType + "HandlerProp", tmp); - HandlerTracker.reportPut(this, - "Handler" + whichHandlerType + "HandlerProp", tmp); - - context.setScope("Handler" + whichHandlerType + "HandlerProp", - MessageContext.Scope.APPLICATION); - HandlerTracker.reportSetScope(this, - "Handler" + whichHandlerType + "HandlerProp", - MessageContext.Scope.APPLICATION.toString()); - } - HandlerTracker.reportComment(this, - "EndMessageContextCallbackInvocations"); - - } else if (handlerName.equals("ClientLogicalHandler1") - || handlerName.equals("ServerLogicalHandler1")) { - HandlerTracker.reportComment(this, - "BeginMessageContextCallbackInvocations"); - if (direction.equals(Constants.OUTBOUND)) { - HandlerTracker.reportComment(this, - "Set Properties and see that Handler3 can access them"); - // set a property and see that it can be referenced by a different - // handler - context.put(whichDirection + whichHandlerType - + "LogicalCrossHandlerPropSetByHandler1", "SetByHandler1"); - HandlerTracker.reportPut(this, whichDirection + whichHandlerType - + "LogicalCrossHandlerPropSetByHandler1", "SetByHandler1"); - - // set various scoped properties and see that they can be referenced by - // a different handler - context.put(whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler1", "SetByHandler1"); - HandlerTracker.reportPut(this, whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler1", "SetByHandler1"); - context.setScope( - whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler1", - MessageContext.Scope.APPLICATION); - HandlerTracker.reportSetScope(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler1", - MessageContext.Scope.APPLICATION.toString()); - - context.put( - whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler1", - "SetByHandler1"); - HandlerTracker.reportPut(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler1", - "SetByHandler1"); - context.setScope( - whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler1", - MessageContext.Scope.HANDLER); - HandlerTracker.reportSetScope(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler1", - MessageContext.Scope.HANDLER.toString()); - - } else if (direction.equals(Constants.INBOUND)) { - HandlerTracker.reportGet(this, - whichDirection + whichHandlerType - + "LogicalCrossHandlerPropSetByHandler3", - (String) context.get(whichDirection + whichHandlerType - + "LogicalCrossHandlerPropSetByHandler3")); - HandlerTracker.reportGet(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler3", - (String) context.get(whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler3")); - HandlerTracker.reportGet(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler3", - (String) context.get(whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler3")); - HandlerTracker.reportGetScope(this, - whichDirection + whichHandlerType - + "LogicalCrossHandlerPropSetByHandler3", - context.getScope(whichDirection + whichHandlerType - + "LogicalCrossHandlerPropSetByHandler3").toString()); - HandlerTracker - .reportGetScope(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler3", - context - .getScope(whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler3") - .toString()); - HandlerTracker.reportGetScope(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler3", - context - .getScope(whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler3") - .toString()); - } - HandlerTracker.reportComment(this, - "EndMessageContextCallbackInvocations"); - - } else if (handlerName.equals("ClientLogicalHandler3") - || handlerName.equals("ServerLogicalHandler3")) { - HandlerTracker.reportComment(this, - "BeginMessageContextCallbackInvocations"); - if (direction.equals(Constants.OUTBOUND)) { - TestUtil.logTrace("whichHandlerType=" + whichHandlerType); - // get a property that was set by the endpoint - HandlerTracker.reportGet(this, - whichDirection + whichHandlerType - + "LogicalCrossHandlerPropSetByHandler1", - (String) context.get(whichDirection + whichHandlerType - + "LogicalCrossHandlerPropSetByHandler1")); - HandlerTracker.reportGet(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler1", - (String) context.get(whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler1")); - HandlerTracker.reportGet(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler1", - (String) context.get(whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler1")); - - HandlerTracker.reportGetScope(this, - whichDirection + whichHandlerType - + "LogicalCrossHandlerPropSetByHandler1", - context.getScope(whichDirection + whichHandlerType - + "LogicalCrossHandlerPropSetByHandler1").toString()); - HandlerTracker - .reportGetScope(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler1", - context - .getScope(whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler1") - .toString()); - HandlerTracker.reportGetScope(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler1", - context - .getScope(whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler1") - .toString()); - - } else if (direction.equals(Constants.INBOUND)) { - - // set a property and see that it can be referenced by a different - // handler - context.put(whichDirection + whichHandlerType - + "LogicalCrossHandlerPropSetByHandler3", "SetByHandler3"); - HandlerTracker.reportPut(this, whichDirection + whichHandlerType - + "LogicalCrossHandlerPropSetByHandler3", "SetByHandler3"); - // set various scoped properties and see that they can be referenced by - // a different handler - context.put(whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler3", "SetByHandler3"); - HandlerTracker.reportPut(this, whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler3", "SetByHandler3"); - context.setScope( - whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler3", - MessageContext.Scope.APPLICATION); - HandlerTracker.reportSetScope(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeAppPropSetByHandler3", - MessageContext.Scope.APPLICATION.toString()); - - context.put( - whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler3", - "SetByHandler3"); - HandlerTracker.reportPut(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler3", - "SetByHandler3"); - context.setScope( - whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler3", - MessageContext.Scope.HANDLER); - HandlerTracker.reportSetScope(this, - whichDirection + whichHandlerType - + "LogicalMessageScopeHandlerPropSetByHandler3", - MessageContext.Scope.HANDLER.toString()); - - } - HandlerTracker.reportComment(this, - "EndMessageContextCallbackInvocations"); - } - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/LogicalHandlerBase2.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/LogicalHandlerBase2.java deleted file mode 100644 index 60f70b2809..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/LogicalHandlerBase2.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.handler.*; - -import jakarta.annotation.PreDestroy; -import jakarta.annotation.PostConstruct; - -public class LogicalHandlerBase2 - implements jakarta.xml.ws.handler.LogicalHandler { - private int destroyCalled = 0; - - private int doingHandlerWork = 0; - - private String whichHandlerType = null; - - private String handlerName = null; - - public void setWhichHandlerType(String w) { - this.whichHandlerType = w; - } - - public String getWhichHandlerType() { - return this.whichHandlerType; - } - - public void setHandlerName(String h) { - this.handlerName = h; - } - - public String getHandlerName() { - return this.handlerName; - } - - public void preinvoke() { - doingHandlerWork++; - if (destroyCalled > 0) - HandlerTracker.reportThrowable(this, new Exception( - "Violation of Handler Lifecycle - Handler used after destroy called")); - } - - public void postinvoke() { - doingHandlerWork = 0; - } - - @PostConstruct - public void myInit() { - System.out.println("in " + this + ":myInit"); - HandlerTracker.reportInit(this, "myInit"); - } - - @PreDestroy - public void myDestroy() { - System.out.println("in " + this + ":myDestroy"); - if (doingHandlerWork > 0) - HandlerTracker.reportThrowable(this, new Exception( - "Violation of Handler Lifecycle - destroy called during handler usage")); - - destroyCalled++; - HandlerTracker.reportDestroy(this, "myDestroy"); - } - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - try { - preinvoke(); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - String direction = Handler_Util.getDirection(context); - HandlerTracker.reportHandleMessage(this, direction); - } else { - TestUtil.logTrace("found GetTrackerData message, handler will ignore"); - } - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - - public void close(MessageContext context) { - TestUtil.logTrace("in " + this + ":close"); - try { - preinvoke(); - HandlerTracker.reportClose(this); - } finally { - postinvoke(); - } - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + this + ":handleFault"); - TestUtil.logTrace("in " + this + ":handleFault"); - try { - preinvoke(); - HandlerTracker.reportHandleFault(this); - } finally { - postinvoke(); - } - TestUtil.logTrace("exiting " + this + ":handleFault"); - System.out.println("exiting " + this + ":handleFault"); - return true; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/Modules.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/Modules.java deleted file mode 100644 index fd3188e736..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/Modules.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.jaxws.common; - -import java.lang.reflect.Method; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * Utility class used to enforce accessibility of a module when using Reflection - * API. - * - * @author Miroslav Kos (miroslav.kos at oracle.com) - */ -public class Modules { - - private static final Logger logger = Logger - .getLogger(Modules.class.getName()); - - private static Method GET_MODULE; - - private static Method ADD_READS; - - private static Method GET_NAME; - - private static Method CAN_READ; - - private static boolean initializationFailed; - - static { - try { - Class moduleClass = Class.forName("java.lang.reflect.Module"); - GET_MODULE = Class.class.getMethod("getModule"); - GET_NAME = moduleClass.getMethod("getName"); - ADD_READS = moduleClass.getMethod("addReads", moduleClass); - CAN_READ = moduleClass.getMethod("canRead", moduleClass); - } catch (Throwable t) { - logger.log(Level.INFO, - "Error during initialization of [{0}]. Probably not Jigsaw runtime.", - Modules.class.getName()); - // this code needs to run on older JDKs too - // so this can be correct - initializationFailed = true; - } - } - - /** - * This method uses jdk9 specific API. For all the JDKs <= 8 empty. - * - * @param sourceClass - * class (current module) usinf Core Reflection API - * @param targetClass - * class to be accessed via Core Reflection - */ - public static void ensureReadable(Class sourceClass, - Class targetClass) { - if (initializationFailed) - return; - Object targetModule = getModule(targetClass); - Object sourceModule = getModule(sourceClass); - if (!canRead(sourceModule, targetModule)) { - logger.log(Level.FINE, "Adding module [{0}] to module [{1}]'s reads", - new Object[] { getName(targetModule), getName(sourceModule) }); - addReads(sourceModule, targetModule); - } - } - - private static void addReads(Object sourceModule, Object targetModule) { - if (sourceModule == null) - return; - try { - ADD_READS.invoke(sourceModule, targetModule); - } catch (Exception e) { - throw new InternalError(e.getMessage()); - } - } - - private static Object getModule(Class targetClass) { - if (targetClass == null) - return null; - try { - return GET_MODULE.invoke(targetClass); - } catch (Exception e) { - throw new InternalError(e.getMessage()); - } - } - - private static Object getName(Object module) { - if (module == null) - return ""; - try { - return GET_NAME.invoke(module); - } catch (Exception e) { - throw new InternalError(e.getMessage()); - } - } - - private static boolean canRead(Object sourceModule, Object targetModule) { - if (sourceModule == null) - return true; - try { - return (Boolean) CAN_READ.invoke(sourceModule, targetModule); - } catch (Exception e) { - throw new InternalError(e.getMessage()); - } - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/RequestConformanceChecker.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/RequestConformanceChecker.java deleted file mode 100644 index c133941f03..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/RequestConformanceChecker.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.tests.jaxws.wsi.constants.WSIConstants; - -import jakarta.xml.ws.handler.soap.SOAPHandler; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; -import javax.xml.namespace.QName; -import jakarta.xml.soap.*; -import java.util.Iterator; -import java.util.HashSet; -import java.util.Set; - -public abstract class RequestConformanceChecker - implements SOAPHandler, WSIConstants { - - // this is not threadsafe - protected String response; - - public Set getHeaders() { - return new HashSet(); - } - - public void init(java.util.Map config) { - }; - - public boolean handleFault(SOAPMessageContext context) { - return true; - }; - - public void destroy() { - }; - - public void close(MessageContext context) { - }; - - public abstract void test(SOAPMessageContext context) throws SOAPException; - - public boolean handleMessage(SOAPMessageContext context) { - System.out - .println("HANDLER: RequestConformanceChecker.handleMessage() BEGIN"); - try { - if (Handler_Util.getDirection(context).equals(Constants.INBOUND)) { - if (isRequestTest((context))) { - System.out.println( - "HANDLER: RequestConformanceChecker.handleMessage() HANDLING REQUEST"); - test(context); - } - } else { - if (response != null) { - System.out.println( - "HANDLER: RequestConformanceChecker.handleMessage() HANDLING RESPONSE"); - setResponse(context); - response = null; - } - } - } catch (SOAPException se) { - com.sun.ts.lib.util.TestUtil.printStackTrace(se); - } - System.out - .println("HANDLER: RequestConformanceChecker.handleMessage() END"); - return true; - } - - private void setResponse(SOAPMessageContext context) throws SOAPException { - SOAPBody body = context.getMessage().getSOAPPart().getEnvelope().getBody(); - SOAPElement responseElement = getResponseElement(body); - Iterator children = responseElement.getChildElements(); - ((Text) children.next()).detachNode(); - responseElement.addTextNode(response); - context.getMessage().saveChanges(); - } - - private SOAPElement getResponseElement(SOAPBody body) { - return getResponseElement((SOAPElement) body.getChildElements().next()); - } - - private SOAPElement getResponseElement(SOAPElement elem) { - if (elem.getChildElements().next() instanceof Text) { - return elem; - } else { - return getResponseElement((SOAPElement) elem.getChildElements().next()); - } - } - - private boolean isRequestTest(SOAPMessageContext context) - throws SOAPException { - SOAPHeader header = context.getMessage().getSOAPPart().getEnvelope() - .getHeader(); - if (header != null) { - Iterator headers = header - .examineHeaderElements("http://conformance-checker.org"); - SOAPHeaderElement headerElement; - while (headers.hasNext()) { - headerElement = (SOAPHeaderElement) headers.next(); - if (headerElement.getElementName().getLocalName().equals("test")) { - if (headerElement.getValue().equals("request")) { - return true; - } else if (headerElement.getValue().equals("response")) { - return false; - } - } - } - } - return true; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/SOAPHandlerBase.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/SOAPHandlerBase.java deleted file mode 100644 index 48a5e29a02..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/SOAPHandlerBase.java +++ /dev/null @@ -1,732 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import jakarta.xml.bind.JAXBContext; -import javax.xml.namespace.QName; - -import jakarta.annotation.PreDestroy; -import jakarta.annotation.PostConstruct; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; -import jakarta.activation.DataHandler; - -public class SOAPHandlerBase - implements jakarta.xml.ws.handler.soap.SOAPHandler { - - private int doingHandlerWork = 0; - - private int destroyCalled = 0; - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private static final String PORT_NAME1 = "HelloPort"; - - private String whichHandlerType = null; - - private String handlerName = null; - - public void setWhichHandlerType(String w) { - this.whichHandlerType = w; - } - - public String getWhichHandlerType() { - return this.whichHandlerType; - } - - public void setHandlerName(String h) { - this.handlerName = h; - } - - public String getHandlerName() { - return this.handlerName; - } - - public void preinvoke() { - doingHandlerWork++; - if (destroyCalled > 0) - HandlerTracker.reportThrowable(this, new Exception( - "Violation of Handler Lifecycle - Handler used after destroy called")); - } - - public void postinvoke() { - doingHandlerWork = 0; - } - - @PostConstruct - public void myInit() { - TestUtil.logTrace("in " + this + ":myInit"); - HandlerTracker.reportInit(this, "myInit"); - } - - @PreDestroy - public void myDestroy() { - TestUtil.logTrace("in " + this + ":myDestroy"); - if (doingHandlerWork > 0) - HandlerTracker.reportThrowable(this, new Exception( - "Violation of Handler Lifecycle - destroy called during handler usage")); - HandlerTracker.reportDestroy(this, "myDestroy"); - destroyCalled++; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } - - private static final String JAXB_OBJECT_CLIENT_FACTORY = "com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ObjectFactory"; - - private static final String JAXB_OBJECT_SERVER_FACTORY = "com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ObjectFactory"; - - private JAXBContext createJAXBContext() { - Class c = null; - JAXBContext jbc = null; - try { - if (whichHandlerType.equals("Client")) { - TestUtil.logTrace( - "Getting the object factory:" + JAXB_OBJECT_CLIENT_FACTORY); - c = Class.forName(JAXB_OBJECT_CLIENT_FACTORY); - } else { - TestUtil.logTrace( - "Getting the object factory:" + JAXB_OBJECT_SERVER_FACTORY); - c = Class.forName(JAXB_OBJECT_SERVER_FACTORY); - } - jbc = JAXBContext.newInstance(c); - } catch (Exception e) { - throw new WebServiceException(e); - } - return jbc; - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - - try { - preinvoke(); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - String direction = Handler_Util.getDirection(context); - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - HandlerTracker.reportHandleMessage(this, direction); - if (Handler_Util.checkForMsg(this, context, "SOAPTest")) { - if (Handler_Util.checkForMsg(this, context, "MessageContextTest")) { - doSOAPMessageContext(context, direction); - doMessageContext(context, direction); - } else if (Handler_Util.checkForMsg(this, context, - "ContextPropertiesTest")) { - doContextProperties(context, direction); - } - } - } else { - TestUtil.logTrace("found GetTrackerData message, handler will ignore"); - } - } catch (Exception e) { - HandlerTracker.reportThrowable(this, e); - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - - public void close(MessageContext context) { - TestUtil.logTrace("in " + this + ":close"); - try { - preinvoke(); - HandlerTracker.reportClose(this); - } finally { - postinvoke(); - } - } - - public boolean handleFault(SOAPMessageContext context) { - System.out.println("in " + this + ":handleFault"); - TestUtil.logTrace("in " + this + ":handleFault"); - try { - preinvoke(); - HandlerTracker.reportHandleFault(this); - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleFault"); - TestUtil.logTrace("exiting " + this + ":handleFault"); - return true; - } - - private void doContextProperties(SOAPMessageContext context, - String direction) { - TestUtil.logTrace("in doSOAPMessageContext"); - TestUtil.logTrace("direction=" + direction); - TestUtil.logTrace("handlerName=" + handlerName); - if (handlerName.equals("ClientSOAPHandler2") - || handlerName.equals("ServerSOAPHandler2")) { - Map m1 = null; - String attachmentProp = ""; - if (direction.equals(Constants.OUTBOUND)) { - m1 = (Map) context - .get(SOAPMessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); - attachmentProp = "SOAPMessageContext.OUTBOUND_MESSAGE_ATTACHMENTS"; - } else { - m1 = (Map) context - .get(SOAPMessageContext.INBOUND_MESSAGE_ATTACHMENTS); - attachmentProp = "SOAPMessageContext.INBOUND_MESSAGE_ATTACHMENTS"; - } - String sTmp = ""; - int cnt = 0; - Iterator iterator = null; - try { - if (m1 != null) { - if (m1.size() > 0) { - iterator = m1.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logTrace("request attachments key[" + cnt + "]=" + key); - sTmp = "key[" + cnt + "]=" + key; - HandlerTracker.reportProperties(this, direction, attachmentProp, - sTmp); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - HandlerTracker.reportProperties(this, direction, attachmentProp, - "empty"); - } - } else { - TestUtil.logTrace("null"); - HandlerTracker.reportProperties(this, direction, attachmentProp, - "null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - - if (direction.equals(Constants.OUTBOUND)) { - m1 = (Map) context - .get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); - attachmentProp = "MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS"; - } else { - m1 = (Map) context - .get(MessageContext.INBOUND_MESSAGE_ATTACHMENTS); - attachmentProp = "MessageContext.INBOUND_MESSAGE_ATTACHMENTS"; - } - cnt = 0; - iterator = null; - try { - if (m1 != null) { - if (m1.size() > 0) { - iterator = m1.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logTrace("request attachments key[" + cnt + "]=" + key); - sTmp = "key[" + cnt + "]=" + key; - HandlerTracker.reportProperties(this, direction, attachmentProp, - sTmp); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - HandlerTracker.reportProperties(this, direction, attachmentProp, - "empty"); - } - } else { - TestUtil.logTrace("null"); - HandlerTracker.reportProperties(this, direction, attachmentProp, - "null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - - String ss = (String) context.get(SOAPMessageContext.HTTP_REQUEST_METHOD); - if (ss != null) { - HandlerTracker.reportProperties(this, direction, - "SOAPMessageContext.HTTP_REQUEST_METHOD", ss); - } else { - HandlerTracker.reportProperties(this, direction, - "SOAPMessageContext.HTTP_REQUEST_METHOD", "null"); - } - ss = (String) context.get(MessageContext.HTTP_REQUEST_METHOD); - if (ss != null) { - HandlerTracker.reportProperties(this, direction, - "MessageContext.HTTP_REQUEST_METHOD", ss); - } else { - HandlerTracker.reportProperties(this, direction, - "MessageContext.HTTP_REQUEST_METHOD", "null"); - } - Integer ii = (Integer) context.get(SOAPMessageContext.HTTP_RESPONSE_CODE); - if (ii != null) { - HandlerTracker.reportProperties(this, direction, - "SOAPMessageContext.HTTP_RESPONSE_CODE", ii.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "SOAPMessageContext.HTTP_RESPONSE_CODE", "null"); - } - ii = (Integer) context.get(MessageContext.HTTP_RESPONSE_CODE); - if (ii != null) { - HandlerTracker.reportProperties(this, direction, - "MessageContext.HTTP_RESPONSE_CODE", ii.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "MessageContext.HTTP_RESPONSE_CODE", "null"); - } - - Map> m2 = (Map>) context - .get(SOAPMessageContext.HTTP_REQUEST_HEADERS); - StringBuffer sb = new StringBuffer(); - cnt = 0; - iterator = null; - try { - if (m2 != null) { - if (m2.size() > 0) { - iterator = m2.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logTrace("request headers key[" + cnt + "]=" + key); - sb.append("key[" + cnt + "]=" + key + "|"); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - sb.append("empty"); - } - } else { - TestUtil.logTrace("null"); - sb.append("null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - HandlerTracker.reportProperties(this, direction, - "SOAPMessageContext.HTTP_REQUEST_HEADERS", sb.toString()); - - m2 = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - sb = new StringBuffer(); - cnt = 0; - iterator = null; - try { - if (m2 != null) { - if (m2.size() > 0) { - iterator = m2.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logTrace("request headers key[" + cnt + "]=" + key); - sb.append("key[" + cnt + "]=" + key + "|"); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - sb.append("empty"); - } - } else { - TestUtil.logTrace("null"); - sb.append("null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - HandlerTracker.reportProperties(this, direction, - "MessageContext.HTTP_REQUEST_HEADERS", sb.toString()); - - m2 = (Map>) context - .get(SOAPMessageContext.HTTP_RESPONSE_HEADERS); - sb = new StringBuffer(); - cnt = 0; - iterator = null; - try { - if (m2 != null) { - if (m2.size() > 0) { - iterator = m2.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logTrace("response headers key[" + cnt + "]=" + key); - sb.append("key[" + cnt + "]=" + key + "|"); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - sb.append("empty"); - } - } else { - TestUtil.logTrace("null"); - sb.append("null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - HandlerTracker.reportProperties(this, direction, - "SOAPMessageContext.HTTP_RESPONSE_HEADERS", sb.toString()); - - m2 = (Map>) context - .get(MessageContext.HTTP_RESPONSE_HEADERS); - sb = new StringBuffer(); - cnt = 0; - iterator = null; - try { - if (m2 != null) { - if (m2.size() > 0) { - iterator = m2.keySet().iterator(); - while (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logTrace("response headers key[" + cnt + "]=" + key); - sb.append("key[" + cnt + "]=" + key + "|"); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - sb.append("empty"); - } - } else { - TestUtil.logTrace("null"); - sb.append("null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - HandlerTracker.reportProperties(this, direction, - "MessageContext.HTTP_RESPONSE_HEADERS", sb.toString()); - - Object oo = context.get(SOAPMessageContext.SERVLET_REQUEST); - if (oo != null) { - HandlerTracker.reportProperties(this, direction, - "SOAPMessageContext.SERVLET_REQUEST", oo.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "SOAPMessageContext.SERVLET_REQUEST", "null"); - } - oo = context.get(MessageContext.SERVLET_REQUEST); - if (oo != null) { - HandlerTracker.reportProperties(this, direction, - "MessageContext.SERVLET_REQUEST", oo.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "MessageContext.SERVLET_REQUEST", "null"); - } - oo = context.get(SOAPMessageContext.SERVLET_RESPONSE); - if (oo != null) { - HandlerTracker.reportProperties(this, direction, - "SOAPMessageContext.SERVLET_RESPONSE", oo.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "SOAPMessageContext.SERVLET_RESPONSE", "null"); - } - oo = context.get(MessageContext.SERVLET_RESPONSE); - if (oo != null) { - HandlerTracker.reportProperties(this, direction, - "MessageContext.SERVLET_RESPONSE", oo.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "MessageContext.SERVLET_RESPONSE", "null"); - } - oo = context.get(SOAPMessageContext.SERVLET_CONTEXT); - if (oo != null) { - HandlerTracker.reportProperties(this, direction, - "SOAPMessageContext.SERVLET_CONTEXT", oo.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "SOAPMessageContext.SERVLET_CONTEXT", "null"); - } - oo = context.get(MessageContext.SERVLET_CONTEXT); - if (oo != null) { - HandlerTracker.reportProperties(this, direction, - "MessageContext.SERVLET_CONTEXT", oo.toString()); - } else { - HandlerTracker.reportProperties(this, direction, - "MessageContext.SERVLET_CONTEXT", "null"); - } - - } - } - - private void doSOAPMessageContext(SOAPMessageContext context, - String direction) { - TestUtil.logTrace("in doSOAPMessageContext"); - TestUtil.logTrace("direction=" + direction); - TestUtil.logTrace("handlerName" + handlerName); - if (handlerName.equals("ClientSOAPHandler2") - || handlerName.equals("ServerSOAPHandler2")) { - TestUtil.logTrace("calling context.getMessage()"); - SOAPMessage sm = context.getMessage(); - - if (sm != null) { - HandlerTracker.reportSMCGetMessage(this, direction, - JAXWS_Util.getSOAPMessageAsString(sm)); - } else { - HandlerTracker.reportSMCGetMessage(this, direction, "null"); - } - - context.setMessage(sm); - HandlerTracker.reportSMCSetMessage(this, direction); - HandlerTracker.reportSMCGetRoles(this, direction, context.getRoles()); - JAXBContext jbc = createJAXBContext(); - if (jbc != null) { - QName qname = new QName(NAMESPACEURI, PORT_NAME1); - TestUtil.logTrace("qname=" + qname); - HandlerTracker.reportSMCGetHeaders(this, direction, - context.getHeaders(qname, jbc, true)); - } else { - throw new WebServiceException( - direction + this + "The JAXBContext returned was null"); - } - } - } - - private void doMessageContext(SOAPMessageContext context, String direction) { - String whichDirection = direction.toUpperCase(); - TestUtil.logTrace("in doMessageContext"); - TestUtil.logTrace("whichDirection=" + whichDirection); - TestUtil.logTrace("handlerName=" + handlerName); - if (handlerName.equals("ClientSOAPHandler2") - || handlerName.equals("ServerSOAPHandler2")) { - HandlerTracker.reportComment(this, - "BeginSOAPMessageContextCallbackInvocations"); - TestUtil.logTrace("whichHandlerType=" + whichHandlerType); - - // set a property that the everyone will add to. - - if (whichHandlerType.equals("Client")) { - HandlerTracker.reportGet(this, - whichHandlerType + "To" + whichHandlerType + "Prop", - (String) context - .get(whichHandlerType + "To" + whichHandlerType + "Prop")); - - String tmp = (String) context - .get(whichHandlerType + "To" + whichHandlerType + "Prop"); - tmp = tmp + whichDirection + handlerName; - context.put(whichHandlerType + "To" + whichHandlerType + "Prop", tmp); - HandlerTracker.reportPut(this, - whichHandlerType + "To" + whichHandlerType + "Prop", tmp); - - context.setScope(whichHandlerType + "To" + whichHandlerType + "Prop", - MessageContext.Scope.APPLICATION); - HandlerTracker.reportSetScope(this, - whichHandlerType + "To" + whichHandlerType + "Prop", - MessageContext.Scope.APPLICATION.toString()); - - } else { - // server - String tmp = ""; - if (direction.equals(Constants.OUTBOUND)) { - HandlerTracker.reportGet(this, - "Handler" + whichHandlerType + "HandlerProp", (String) context - .get("Handler" + whichHandlerType + "HandlerProp")); - - tmp = (String) context - .get("Handler" + whichHandlerType + "HandlerProp"); - } - tmp = tmp + whichDirection + handlerName; - context.put("Handler" + whichHandlerType + "HandlerProp", tmp); - HandlerTracker.reportPut(this, - "Handler" + whichHandlerType + "HandlerProp", tmp); - - context.setScope("Handler" + whichHandlerType + "HandlerProp", - MessageContext.Scope.APPLICATION); - HandlerTracker.reportSetScope(this, - "Handler" + whichHandlerType + "HandlerProp", - MessageContext.Scope.APPLICATION.toString()); - } - HandlerTracker.reportComment(this, - "EndMessageContextCallbackInvocations"); - } else if (handlerName.equals("ClientSOAPHandler1") - || handlerName.equals("ServerSOAPHandler1")) { - HandlerTracker.reportComment(this, - "BeginSOAPMessageContextCallbackInvocations"); - - if (direction.equals(Constants.OUTBOUND)) { - HandlerTracker.reportComment(this, - "Set Properties and see that Handler3 can access them"); - // set a property and see that it can be referenced by a different - // handler - context.put(whichDirection + whichHandlerType - + "SOAPCrossHandlerPropSetByHandler1", "SetByHandler1"); - HandlerTracker.reportPut(this, whichDirection + whichHandlerType - + "SOAPCrossHandlerPropSetByHandler1", "SetByHandler1"); - - // set various scoped properties and see that they can be referenced by - // a different handler - context.put(whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler1", "SetByHandler1"); - HandlerTracker.reportPut(this, whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler1", "SetByHandler1"); - context.setScope( - whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler1", - MessageContext.Scope.APPLICATION); - HandlerTracker.reportSetScope(this, - whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler1", - MessageContext.Scope.APPLICATION.toString()); - - context.put(whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler1", "SetByHandler1"); - HandlerTracker.reportPut(this, whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler1", "SetByHandler1"); - context.setScope( - whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler1", - MessageContext.Scope.HANDLER); - HandlerTracker.reportSetScope(this, - whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler1", - MessageContext.Scope.HANDLER.toString()); - - } else if (direction.equals(Constants.INBOUND)) { - HandlerTracker.reportGet(this, - whichDirection + whichHandlerType - + "SOAPCrossHandlerPropSetByHandler3", - (String) context.get(whichDirection + whichHandlerType - + "SOAPCrossHandlerPropSetByHandler3")); - HandlerTracker.reportGet(this, - whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler3", - (String) context.get(whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler3")); - HandlerTracker.reportGet(this, - whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler3", - (String) context.get(whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler3")); - HandlerTracker.reportGetScope(this, - whichDirection + whichHandlerType - + "SOAPCrossHandlerPropSetByHandler3", - context.getScope(whichDirection + whichHandlerType - + "SOAPCrossHandlerPropSetByHandler3").toString()); - HandlerTracker.reportGetScope(this, - whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler3", - context.getScope(whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler3").toString()); - HandlerTracker - .reportGetScope(this, - whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler3", - context - .getScope(whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler3") - .toString()); - } - HandlerTracker.reportComment(this, - "EndMessageContextCallbackInvocations"); - - } else if (handlerName.equals("ClientSOAPHandler3") - || handlerName.equals("ServerSOAPHandler3")) { - HandlerTracker.reportComment(this, - "BeginSOAPMessageContextCallbackInvocations"); - if (direction.equals(Constants.OUTBOUND)) { - TestUtil.logTrace("whichHandlerType=" + whichHandlerType); - // get a property that was set by the endpoint - HandlerTracker.reportGet(this, - whichDirection + whichHandlerType - + "SOAPCrossHandlerPropSetByHandler1", - (String) context.get(whichDirection + whichHandlerType - + "SOAPCrossHandlerPropSetByHandler1")); - HandlerTracker.reportGet(this, - whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler1", - (String) context.get(whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler1")); - HandlerTracker.reportGet(this, - whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler1", - (String) context.get(whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler1")); - - HandlerTracker.reportGetScope(this, - whichDirection + whichHandlerType - + "SOAPCrossHandlerPropSetByHandler1", - context.getScope(whichDirection + whichHandlerType - + "SOAPCrossHandlerPropSetByHandler1").toString()); - HandlerTracker.reportGetScope(this, - whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler1", - context.getScope(whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler1").toString()); - HandlerTracker - .reportGetScope(this, - whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler1", - context - .getScope(whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler1") - .toString()); - - } else if (direction.equals(Constants.INBOUND)) { - - // set a property and see that it can be referenced by a different - // handler - context.put(whichDirection + whichHandlerType - + "SOAPCrossHandlerPropSetByHandler3", "SetByHandler3"); - HandlerTracker.reportPut(this, whichDirection + whichHandlerType - + "SOAPCrossHandlerPropSetByHandler3", "SetByHandler3"); - // set various scoped properties and see that they can be referenced by - // a different handler - context.put(whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler3", "SetByHandler3"); - HandlerTracker.reportPut(this, whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler3", "SetByHandler3"); - context.setScope( - whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler3", - MessageContext.Scope.APPLICATION); - HandlerTracker.reportSetScope(this, - whichDirection + whichHandlerType - + "SOAPMessageScopeAppPropSetByHandler3", - MessageContext.Scope.APPLICATION.toString()); - - context.put(whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler3", "SetByHandler3"); - HandlerTracker.reportPut(this, whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler3", "SetByHandler3"); - context.setScope( - whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler3", - MessageContext.Scope.HANDLER); - HandlerTracker.reportSetScope(this, - whichDirection + whichHandlerType - + "SOAPMessageScopeHandlerPropSetByHandler3", - MessageContext.Scope.HANDLER.toString()); - - } - HandlerTracker.reportComment(this, - "EndSOAPMessageContextCallbackInvocations"); - } - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/SOAPHandlerBase2.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/SOAPHandlerBase2.java deleted file mode 100644 index f08db883d1..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/SOAPHandlerBase2.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; - -import javax.xml.namespace.QName; - -import jakarta.annotation.PreDestroy; -import jakarta.annotation.PostConstruct; - -import java.util.HashSet; -import java.util.Set; - -public class SOAPHandlerBase2 - implements jakarta.xml.ws.handler.soap.SOAPHandler { - - private int doingHandlerWork = 0; - - private int destroyCalled = 0; - - private String whichHandlerType = null; - - private String handlerName = null; - - public void setWhichHandlerType(String w) { - this.whichHandlerType = w; - } - - public String getWhichHandlerType() { - return this.whichHandlerType; - } - - public void setHandlerName(String h) { - this.handlerName = h; - } - - public String getHandlerName() { - return this.handlerName; - } - - public void preinvoke() { - doingHandlerWork++; - if (destroyCalled > 0) - HandlerTracker.reportThrowable(this, new Exception( - "Violation of Handler Lifecycle - Handler used after destroy called")); - } - - public void postinvoke() { - doingHandlerWork = 0; - } - - @PostConstruct - public void myInit() { - TestUtil.logTrace("in " + this + ":myInit"); - HandlerTracker.reportInit(this, "myInit"); - } - - @PreDestroy - public void myDestroy() { - TestUtil.logTrace("in " + this + ":myDestroy"); - if (doingHandlerWork > 0) - HandlerTracker.reportThrowable(this, new Exception( - "Violation of Handler Lifecycle - destroy called during handler usage")); - HandlerTracker.reportDestroy(this, "myDestroy"); - destroyCalled++; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - - try { - preinvoke(); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - String direction = Handler_Util.getDirection(context); - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - HandlerTracker.reportHandleMessage(this, direction); - } else { - TestUtil.logTrace("found GetTrackerData message, handler will ignore"); - } - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - - public void close(MessageContext context) { - TestUtil.logTrace("in " + this + ":close"); - try { - preinvoke(); - HandlerTracker.reportClose(this); - } finally { - postinvoke(); - } - } - - public boolean handleFault(SOAPMessageContext context) { - System.out.println("in " + this + ":handleFault"); - TestUtil.logTrace("in " + this + ":handleFault"); - try { - preinvoke(); - HandlerTracker.reportHandleFault(this); - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleFault"); - TestUtil.logTrace("exiting " + this + ":handleFault"); - return true; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/XMLUtils.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/XMLUtils.java deleted file mode 100644 index 7bd0405776..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/XMLUtils.java +++ /dev/null @@ -1,814 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.common; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.*; -import java.io.*; - -import javax.xml.parsers.*; -import javax.xml.transform.*; -import javax.xml.transform.dom.*; -import javax.xml.transform.stream.*; -import jakarta.xml.soap.SOAPConstants; -import org.xml.sax.*; -import org.w3c.dom.*; - -public final class XMLUtils { - private static TransformerFactory tfactory = null; - - private static DocumentBuilderFactory dbfactory = null; - - private static DocumentBuilder builder = null; - - private static Transformer transformer = null; - - private static Document document = null; - - private static Element rootElement = null; - - private static Element faultElement = null; - - private static int spaces = 0; - - private static String spacesString = ""; - - private static boolean tckmode = true; - - private static boolean validating = false; - - private static boolean nsaware = false; - - private static boolean valid = true; - - private static String prefix = null; - - public static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; - - public static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource"; - - public static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema"; - - private static boolean captureResults = false; - - private static ArrayList capturedResults = null; - - public static void main(String[] args) { - String usage = "java XMLUtils [-v -n] "; - String filename = null; - String schema = null; - tckmode = false; - boolean errors = false; - for (int i = 0; i < args.length; i++) { - if (args[i].equals("-v")) - validating = true; - else if (args[i].equals("-n")) - nsaware = true; - else { - filename = args[i++]; - if (i < args.length) { - schema = args[i]; - break; - } - } - } - if (filename == null) { - System.err.println(usage); - System.exit(1); - } - String data = ""; - try { - System.out.println("validating=" + validating); - System.out.println("namespaceaware=" + nsaware); - System.out.println("file=" + filename); - System.out.println("schema=" + schema); - BufferedReader in = new BufferedReader(new FileReader(filename)); - String line = ""; - StringBuffer sb = new StringBuffer(); - while ((line = in.readLine()) != null) { - sb.append(line); - } - in.close(); - data = sb.toString(); - System.out.println("data=" + data); - dbfactory = DocumentBuilderFactory.newInstance(); - if (validating) { - dbfactory.setValidating(validating); - if (nsaware) - dbfactory.setNamespaceAware(nsaware); - dbfactory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA); - dbfactory.setAttribute(JAXP_SCHEMA_SOURCE, new File(schema)); - } - builder = dbfactory.newDocumentBuilder(); - if (validating) { - builder.setErrorHandler(new org.xml.sax.ErrorHandler() { - public void fatalError(SAXParseException e) throws SAXException { - } - - public void error(SAXParseException e) throws SAXParseException { - throw e; - } - - public void warning(SAXParseException e) throws SAXParseException { - if (tckmode) { - TestUtil.logMsg("** Warning, line " + e.getLineNumber() + ", uri " - + e.getSystemId()); - TestUtil.logMsg(" " + e.getMessage()); - } else { - System.out.println("** Warning, line " + e.getLineNumber() - + ", uri " + e.getSystemId()); - System.out.println(" " + e.getMessage()); - } - } - }); - } - document = builder.parse(new InputSource(new StringReader(data))); - rootElement = document.getDocumentElement(); - NodeList nodes = document.getElementsByTagName("Fault"); - if (nodes.getLength() == 0) - nodes = document.getElementsByTagName(prefix + ":Fault"); - Node node = nodes.item(0); - faultElement = (Element) node; - if (!errors) - xmlDumpDOMNodes(XMLUtils.getRootElement()); - } catch (SAXParseException e) { - if (tckmode) { - TestUtil.logErr("SAXParseException"); - TestUtil.logErr(" " + e.getMessage()); - } else { - System.err.println("SAXParseException"); - System.err.println(" " + e.getMessage()); - } - Throwable x = e; - if (e.getException() != null) { - x = e.getException(); - } - if (!tckmode) - x.printStackTrace(); - errors = true; - } catch (SAXException e) { - if (tckmode) { - TestUtil.logErr("SAXException"); - TestUtil.logErr(" " + e.getMessage()); - } else { - System.err.println("SAXException"); - System.err.println(" " + e.getMessage()); - } - Throwable x = e; - if (e.getException() != null) { - x = e.getException(); - } - if (!tckmode) - x.printStackTrace(); - errors = true; - } catch (IOException e) { - System.err.println("IOException: " + e.getMessage()); - e.printStackTrace(); - } catch (Exception e) { - System.err.println("Exception: " + e.getMessage()); - e.printStackTrace(); - } - } - - public static Element getRootElement() { - return rootElement; - } - - public static Element getFaultElement() { - return faultElement; - } - - public static void setValidating(boolean b) { - validating = b; - } - - public static void setPrefix(String s) { - prefix = s; - } - - public static void setNamespaceAware(boolean b) { - nsaware = b; - } - - public static void startCapturedResults() { - captureResults = true; - capturedResults = new ArrayList(); - } - - public static void stopCapturedResults() { - captureResults = false; - } - - public static ArrayList getCapturedResults() { - return capturedResults; - } - - public static boolean xmlDOMSetup() { - boolean errors = false; - try { - dbfactory = DocumentBuilderFactory.newInstance(); - dbfactory.setNamespaceAware(nsaware); - dbfactory.setValidating(validating); - if (validating && nsaware) { - dbfactory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA); - dbfactory.setAttribute(JAXP_SCHEMA_SOURCE, - SOAPConstants.URI_NS_SOAP_ENVELOPE); - /*** - * if(JAXWS_Util.getSOAPVersion().equals(JAXWS_Util.SOAP11)) - * dbfactory.setAttribute( JAXP_SCHEMA_SOURCE, - * SOAPConstants.URI_NS_SOAP_ENVELOPE); else dbfactory.setAttribute( - * JAXP_SCHEMA_SOURCE, SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE); - ***/ - } - builder = dbfactory.newDocumentBuilder(); - if (validating) { - builder.setErrorHandler(new org.xml.sax.ErrorHandler() { - public void fatalError(SAXParseException e) throws SAXException { - } - - public void error(SAXParseException e) throws SAXParseException { - throw e; - } - - public void warning(SAXParseException e) throws SAXParseException { - if (tckmode) { - TestUtil.logMsg("** Warning, line " + e.getLineNumber() + ", uri " - + e.getSystemId()); - TestUtil.logMsg(" " + e.getMessage()); - } else { - System.out.println("** Warning, line " + e.getLineNumber() - + ", uri " + e.getSystemId()); - System.out.println(" " + e.getMessage()); - } - } - }); - } - tfactory = TransformerFactory.newInstance(); - transformer = tfactory.newTransformer(); - } catch (TransformerConfigurationException e) { - if (tckmode) { - TestUtil.logErr("TransformerConfigurationException"); - TestUtil.logErr(" " + e.getMessage()); - } else { - System.err.println("TransformerConfigurationException"); - System.err.println(" " + e.getMessage()); - } - Throwable x = e; - if (e.getException() != null) - x = e.getException(); - if (!tckmode) - x.printStackTrace(); - errors = true; - } catch (Exception e) { - if (tckmode) { - TestUtil.logErr("Exception"); - TestUtil.logErr(" " + e.getMessage()); - TestUtil.printStackTrace(e); - } else { - System.err.println("Exception"); - System.err.println(" " + e.getMessage()); - e.printStackTrace(); - } - errors = true; - } - return errors; - } - - public static boolean xmlDOMParse(String data) { - boolean errors = false; - try { - document = builder.parse(new InputSource(new StringReader(data))); - rootElement = document.getDocumentElement(); - NodeList nodes = document.getElementsByTagName("Fault"); - if (nodes.getLength() == 0) - nodes = document.getElementsByTagName(prefix + ":Fault"); - Node node = nodes.item(0); - faultElement = (Element) node; - } catch (SAXParseException e) { - if (tckmode) { - TestUtil.logErr("SAXParseException"); - TestUtil.logErr(" " + e.getMessage()); - } else { - System.err.println("SAXParseException"); - System.err.println(" " + e.getMessage()); - } - Throwable x = e; - if (e.getException() != null) { - x = e.getException(); - } - if (!tckmode) - x.printStackTrace(); - errors = true; - } catch (SAXException e) { - if (tckmode) { - TestUtil.logErr("SAXException"); - TestUtil.logErr(" " + e.getMessage()); - } else { - System.err.println("SAXException"); - System.err.println(" " + e.getMessage()); - } - Throwable x = e; - if (e.getException() != null) { - x = e.getException(); - } - if (!tckmode) - x.printStackTrace(); - errors = true; - } catch (IOException e) { - if (tckmode) { - TestUtil.logErr("IOException"); - TestUtil.logErr(" " + e.getMessage()); - TestUtil.printStackTrace(e); - } else { - System.err.println("IOException"); - System.err.println(" " + e.getMessage()); - e.printStackTrace(); - } - errors = true; - } catch (Exception e) { - if (tckmode) { - TestUtil.logErr("Exception"); - TestUtil.logErr(" " + e.getMessage()); - TestUtil.printStackTrace(e); - } else { - System.err.println("Exception"); - System.err.println(" " + e.getMessage()); - e.printStackTrace(); - } - errors = true; - } - return errors; - } - - public static boolean xmlDOMParse(File f) { - boolean errors = false; - try { - document = builder.parse(f); - rootElement = document.getDocumentElement(); - } catch (SAXParseException e) { - if (tckmode) { - TestUtil.logErr("SAXParseException"); - TestUtil.logErr(" " + e.getMessage()); - } else { - System.err.println("SAXParseException"); - System.err.println(" " + e.getMessage()); - } - Throwable x = e; - if (e.getException() != null) { - x = e.getException(); - } - if (!tckmode) - x.printStackTrace(); - errors = true; - } catch (SAXException e) { - if (tckmode) { - TestUtil.logErr("SAXException"); - TestUtil.logErr(" " + e.getMessage()); - } else { - System.err.println("SAXException"); - System.err.println(" " + e.getMessage()); - } - Throwable x = e; - if (e.getException() != null) { - x = e.getException(); - } - if (!tckmode) - x.printStackTrace(); - errors = true; - } catch (IOException e) { - if (tckmode) { - TestUtil.logErr("IOException"); - TestUtil.logErr(" " + e.getMessage()); - TestUtil.printStackTrace(e); - } else { - System.err.println("IOException"); - System.err.println(" " + e.getMessage()); - e.printStackTrace(); - } - errors = true; - } catch (Exception e) { - if (tckmode) { - TestUtil.logErr("Exception"); - TestUtil.logErr(" " + e.getMessage()); - TestUtil.printStackTrace(e); - } else { - System.err.println("Exception"); - System.err.println(" " + e.getMessage()); - e.printStackTrace(); - } - errors = true; - } - return errors; - } - - public static boolean xmlDOMTransform() { - boolean errors = false; - try { - DOMSource source = new DOMSource(document); - StreamResult result = new StreamResult(System.out); - transformer.transform(source, result); - } catch (TransformerConfigurationException e) { - if (tckmode) { - TestUtil.logErr("TransformerConfigurationException"); - TestUtil.logErr(" " + e.getMessage()); - } else { - System.err.println("TransformerConfigurationException"); - System.err.println(" " + e.getMessage()); - } - Throwable x = e; - if (e.getException() != null) - x = e.getException(); - if (!tckmode) - x.printStackTrace(); - errors = true; - } catch (TransformerException e) { - if (tckmode) { - TestUtil.logErr("TransformerException"); - TestUtil.logErr(" " + e.getMessage()); - } else { - System.err.println("TransformerException"); - System.err.println(" " + e.getMessage()); - } - Throwable x = e; - if (e.getException() != null) { - x = e.getException(); - } - if (!tckmode) - x.printStackTrace(); - errors = true; - } catch (Exception e) { - if (tckmode) { - TestUtil.logErr("Exception"); - TestUtil.logErr(" " + e.getMessage()); - TestUtil.printStackTrace(e); - } else { - System.err.println("Exception"); - System.err.println(" " + e.getMessage()); - e.printStackTrace(); - } - errors = true; - } - return errors; - } - - public static void setSpaces() { - spacesString = ""; - for (int i = 0; i < spaces; i++) - spacesString = spacesString + " "; - } - - public static String getText(Node node) { - String result = ""; - result = node.getNodeValue(); - if (result == null) - result = ""; - result = result.trim(); - return result; - } - - public static String getAttrValue_(Node n, String name, String value) { - String retAttr = null; - NamedNodeMap attribs = n.getAttributes(); - if (attribs != null) { - for (int i = 0; i < attribs.getLength(); i++) { - Node attnode = attribs.item(i); - String attName = attnode.getNodeName(); - String attValue = attnode.getNodeValue(); - System.out - .println("" + attName + "=" + attValue + ""); - int index = attValue.indexOf("?wsdl"); - if (index != -1) { - attValue = attValue.substring(0, index) - + attValue.substring(index).toUpperCase(); - } - index = value.indexOf("?wsdl"); - if (index != -1) { - value = value.substring(0, index) - + value.substring(index).toUpperCase(); - } - if ((attName.equals(name) || attName.indexOf(name) != -1) - && attValue.indexOf(value) != -1) { - retAttr = attValue; - break; - } - } - } - return retAttr; - } - - public static void processAttributes(Node root) { - NamedNodeMap attribs = root.getAttributes(); - if (attribs != null) { - for (int i = 0; i < attribs.getLength(); i++) { - Node attnode = attribs.item(i); - String attName = attnode.getNodeName(); - String attValue = attnode.getNodeValue(); - String _string = "" + attName + "=" + attValue - + ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - } - } - } - - public static boolean hasAttributes(Node root) { - NamedNodeMap attribs = root.getAttributes(); - if (attribs == null || attribs.getLength() == 0) - return false; - else - return true; - } - - public static void xmlDumpDocument(Document document) { - xmlDumpDOMNodes(document.getDocumentElement()); - } - - public static void xmlDumpDocument(Document document, boolean mode) { - tckmode = mode; - xmlDumpDOMNodes(document.getDocumentElement()); - } - - public static void xmlDumpDOMNodes(Element element, boolean mode) { - tckmode = mode; - xmlDumpDOMNodes(element); - } - - public static void xmlDumpDOMNodes(Element element) { - if (tckmode) { - TestUtil.logMsg(""); - TestUtil.logMsg("-----------------------"); - TestUtil.logMsg("DOM DUMP OF XML MESSAGE"); - TestUtil.logMsg("-----------------------"); - } else { - System.out.println("\n-----------------------\nDOM DUMP OF XML MESSAGE" - + "\n-----------------------"); - } - Node node = (Node) element; - String nodeName = node.getNodeName(); - String nodeValue = node.getNodeValue(); - short nodeType = node.getNodeType(); - spaces = 0; - setSpaces(); - processNode(node, nodeName, nodeValue, nodeType); - spaces += 2; - setSpaces(); - xmlDumpDOMNodes_(element); - } - - public static void xmlDumpDOMNodes(Node node, boolean mode) { - tckmode = mode; - xmlDumpDOMNodes(node); - } - - public static void xmlDumpDOMNodes(Node node) { - if (node instanceof Document) - xmlDumpDocument((Document) node); - else if (node instanceof Element) - xmlDumpDOMNodes((Element) node); - } - - public static void xmlDumpDOMNodes_(Element element) { - NodeList nodes = element.getChildNodes(); - for (int i = 0; i < nodes.getLength(); i++) { - Node node = nodes.item(i); - String nodeName = node.getNodeName(); - String nodeValue = node.getNodeValue(); - short nodeType = node.getNodeType(); - processNode(node, nodeName, nodeValue, nodeType); - if (node instanceof Element) { - Element e = (Element) node; - NodeList nl = e.getChildNodes(); - if (nl.getLength() > 0) { - spaces += 2; - setSpaces(); - xmlDumpDOMNodes_((Element) node); - spaces -= 2; - setSpaces(); - } - } - } - } - - public static void processNode(Node node, String nodeName, String nodeValue, - short nodeType) { - String _string = ""; - switch (nodeType) { - case Node.ATTRIBUTE_NODE: - spaces += 2; - setSpaces(); - _string = "" + nodeName + "=" + nodeValue + ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - spaces -= 2; - setSpaces(); - break; - case Node.CDATA_SECTION_NODE: - _string = "" + nodeValue + ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - break; - case Node.COMMENT_NODE: - _string = "" + nodeValue + ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - break; - case Node.DOCUMENT_FRAGMENT_NODE: - _string = ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - break; - case Node.DOCUMENT_NODE: - _string = ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - break; - case Node.DOCUMENT_TYPE_NODE: - _string = "" + nodeName + ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - break; - case Node.ELEMENT_NODE: - _string = "" + nodeName + ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - spaces += 2; - setSpaces(); - processAttributes(node); - spaces -= 2; - setSpaces(); - break; - case Node.ENTITY_NODE: - _string = "" + nodeValue + ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - break; - case Node.ENTITY_REFERENCE_NODE: - _string = "" + nodeValue + ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - break; - case Node.NOTATION_NODE: - _string = "" + nodeValue + ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - break; - case Node.PROCESSING_INSTRUCTION_NODE: - _string = "" + nodeName - + ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - break; - case Node.TEXT_NODE: - String text = getText(node); - if (!text.equals("")) { - _string = "" + text + ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - } - break; - default: - _string = ""; - if (captureResults) - capturedResults.add(_string); - if (tckmode) - TestUtil.logMsg(spacesString + _string); - else - System.out.println(spacesString + _string); - break; - } - } - - public static void changeNodeValue_(Node n, String nName, String newValue) { - Node n1 = findNode_(n, nName); - Node node = null; - String nodeValue = null; - if (n1 != null) { - NodeList nl = n1.getChildNodes(); - for (int i = 0; i < nl.getLength(); i++) { - node = nl.item(i); - short nodeType = node.getNodeType(); - if (nodeType == Node.TEXT_NODE) { - node.setNodeValue(newValue); - break; - } - } - } - } - - public static String getNodeValue_(Node n, String nName) { - Node n1 = findNode_(n, nName); - Node node = null; - String nodeValue = null; - if (n1 != null) { - NodeList nl = n1.getChildNodes(); - for (int i = 0; i < nl.getLength(); i++) { - node = nl.item(i); - short nodeType = node.getNodeType(); - if (nodeType == Node.TEXT_NODE) { - nodeValue = node.getNodeValue(); - break; - } - } - } - return nodeValue; - } - - public static Node findNode_(Node n, String nName) { - Node result = null; - - if (n != null) { - String nodeName = n.getNodeName(); - if (nodeName != null) { - if (nodeName.endsWith(nName)) { - return n; - } - } - - NodeList nodes = n.getChildNodes(); - Node node = null; - for (int i = 0; i < nodes.getLength(); i++) { - node = nodes.item(i); - if (node instanceof Element) { - result = findNode_((Element) node, nName); - } - if (result != null) { - break; - } - } - } - return result; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/build.xml deleted file mode 100644 index 183bfaf2d9..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/build.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/catalog/META-INF/jax-ws-catalog.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/catalog/META-INF/jax-ws-catalog.xml deleted file mode 100644 index 3380148fee..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/catalog/META-INF/jax-ws-catalog.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/common.jdk9.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/common.jdk9.xml deleted file mode 100644 index 56f6e92834..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/common.jdk9.xml +++ /dev/null @@ -1,1767 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/common.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/common.xml deleted file mode 100644 index 7a41609e7b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/common.xml +++ /dev/null @@ -1,1752 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/build.xml deleted file mode 100644 index 651959d090..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/build.xml deleted file mode 100644 index 8cdd1dc726..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/client/APPNAME_wsappclient_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/client/APPNAME_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index edc65d3e54..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/client/APPNAME_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - @SERVICEREFNAMEWSAPPCLIENT@ - file:wsdlRepository1/@APPNAME@/@WSDLFILENAME@ - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/client/APPNAME_wsejb_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/client/APPNAME_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index b68bb4d497..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/client/APPNAME_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - @JNDINAME@_wsejb_vehicle - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/client/APPNAME_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/client/APPNAME_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index c3d1ede706..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/client/APPNAME_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - @JNDINAME@_wsejb_vehicle - - @SERVICEREFNAMEWSEJB@ - file:wsdlRepository1/@APPNAME@/@WSDLFILENAME@ - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/client/APPNAME_wsservlet_vehicle_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/client/APPNAME_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index fc58f73f15..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/client/APPNAME_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - @SERVICEREFNAMEWSSERVLET@ - file:wsdlRepository1/@APPNAME@/@WSDLFILENAME@ - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/clientnumservices2/APPNAME_wsappclient_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/clientnumservices2/APPNAME_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 86f9613f6c..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/clientnumservices2/APPNAME_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - @SERVICEREFNAMEWSAPPCLIENT@ - file:wsdlRepository1/@APPNAME@/@WSDLFILENAME@ - - - @SERVICEREFNAMEWSAPPCLIENT2@ - file:wsdlRepository1/@APPNAME@/@WSDLFILENAME2@ - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/clientnumservices2/APPNAME_wsejb_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/clientnumservices2/APPNAME_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index b68bb4d497..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/clientnumservices2/APPNAME_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - @JNDINAME@_wsejb_vehicle - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/clientnumservices2/APPNAME_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/clientnumservices2/APPNAME_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index bd12023026..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/clientnumservices2/APPNAME_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - @JNDINAME@_wsejb_vehicle - - @SERVICEREFNAMEWSEJB@ - file:wsdlRepository1/@APPNAME@/@WSDLFILENAME@ - - - @SERVICEREFNAMEWSEJB2@ - file:wsdlRepository1/@APPNAME@/@WSDLFILENAME2@ - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/clientnumservices2/APPNAME_wsservlet_vehicle_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/clientnumservices2/APPNAME_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index 1d59031d66..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/clientnumservices2/APPNAME_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - @SERVICEREFNAMEWSSERVLET@ - file:wsdlRepository1/@APPNAME@/@WSDLFILENAME@ - - - @SERVICEREFNAMEWSSERVLET2@ - file:wsdlRepository1/@APPNAME@/@WSDLFILENAME2@ - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/ejbendpoint/APPNAME_ejb.jar.sun-ejb-jar.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/ejbendpoint/APPNAME_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 84bb8a85db..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/ejbendpoint/APPNAME_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - @STATELESSNAME@ - @STATELESSNAME@ - false - false - -1 - - - @BEANWEBSERVICENAME@ - @APPNAME@/ejb - - - - @WEBSERVICEDESCRIPTION@ - file:wsdlRepository1/@APPNAME@ - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/ejbendpointnumservices2/APPNAME_ejb.jar.sun-ejb-jar.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/ejbendpointnumservices2/APPNAME_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index f36ff92911..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/ejbendpointnumservices2/APPNAME_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - 0 - - @STATELESSNAME@ - @STATELESSNAME@ - false - false - -1 - - - @BEANWEBSERVICENAME@ - @APPNAME@/ejb1 - - - - @STATELESSNAME2@ - @STATELESSNAME2@ - false - false - -1 - - - @BEANWEBSERVICENAME2@ - @APPNAME@/ejb2 - - - - @WEBSERVICEDESCRIPTION@ - file:wsdlRepository1/@APPNAME@ - - - @WEBSERVICEDESCRIPTION2@ - file:wsdlRepository1/@APPNAME@ - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/servletendpoint/APPNAME_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/servletendpoint/APPNAME_web.war.sun-web.xml deleted file mode 100644 index 76b06c52ab..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/servletendpoint/APPNAME_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - @WEBSERVICEDESCRIPTION@ - file:wsdlRepository1/@APPNAME@ - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/servletendpointnumservices2/APPNAME_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/servletendpointnumservices2/APPNAME_web.war.sun-web.xml deleted file mode 100644 index e7174bf04e..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/filetemplates/servletendpointnumservices2/APPNAME_web.war.sun-web.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - @WEBSERVICEDESCRIPTION@ - file:wsdlRepository1/@APPNAME@ - - - @WEBSERVICEDESCRIPTION2@ - file:wsdlRepository1/@APPNAME@ - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/build.xml deleted file mode 100644 index 1ae771f100..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/client/APPNAME_wsappclient_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/client/APPNAME_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 163122f642..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/client/APPNAME_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - @SERVICEREFNAMEWSAPPCLIENT@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS@?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/client/APPNAME_wsejb_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/client/APPNAME_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index b68bb4d497..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/client/APPNAME_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - @JNDINAME@_wsejb_vehicle - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/client/APPNAME_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/client/APPNAME_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 3b7c00369d..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/client/APPNAME_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - @JNDINAME@_wsejb_vehicle - - @SERVICEREFNAMEWSEJB@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS@?WSDL - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/client/APPNAME_wsservlet_vehicle_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/client/APPNAME_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index 39862405e2..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/client/APPNAME_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - @SERVICEREFNAMEWSSERVLET@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS@?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/clientnumservices2/APPNAME_wsappclient_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/clientnumservices2/APPNAME_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 283e8cb22d..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/clientnumservices2/APPNAME_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - @SERVICEREFNAMEWSAPPCLIENT@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS@?WSDL - - - @SERVICEREFNAMEWSAPPCLIENT2@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS2@?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/clientnumservices2/APPNAME_wsejb_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/clientnumservices2/APPNAME_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index b68bb4d497..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/clientnumservices2/APPNAME_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - @JNDINAME@_wsejb_vehicle - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/clientnumservices2/APPNAME_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/clientnumservices2/APPNAME_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 21c5754d02..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/clientnumservices2/APPNAME_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - @JNDINAME@_wsejb_vehicle - - @SERVICEREFNAMEWSEJB@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS@?WSDL - - - @SERVICEREFNAMEWSEJB2@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS2@?WSDL - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/clientnumservices2/APPNAME_wsservlet_vehicle_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/clientnumservices2/APPNAME_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index 4af9b72ec8..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/clientnumservices2/APPNAME_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - @SERVICEREFNAMEWSSERVLET@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS@?WSDL - - - @SERVICEREFNAMEWSSERVLET2@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS2@?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/ejbendpoint/APPNAME_ejb.jar.sun-ejb-jar.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/ejbendpoint/APPNAME_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 16da4deea9..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/ejbendpoint/APPNAME_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - @STATELESSNAME@ - @STATELESSNAME@ - false - false - -1 - - - @BEANWEBSERVICENAME@ - @APPNAME@@URLALIAS@ - - - - @WEBSERVICEDESCRIPTION@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS@?WSDL - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/ejbendpointnumservices2/APPNAME_ejb.jar.sun-ejb-jar.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/ejbendpointnumservices2/APPNAME_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 5a2200a3fc..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/ejbendpointnumservices2/APPNAME_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - 0 - - @STATELESSNAME@ - @STATELESSNAME@ - false - false - -1 - - - @BEANWEBSERVICENAME@ - @APPNAME@@URLALIAS@ - - - - @STATELESSNAME2@ - @STATELESSNAME2@ - false - false - -1 - - - @BEANWEBSERVICENAME2@ - @APPNAME@@URLALIAS2@ - - - - @WEBSERVICEDESCRIPTION@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS@?WSDL - - - - @WEBSERVICEDESCRIPTION2@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS2@?WSDL - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/servletendpoint/APPNAME_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/servletendpoint/APPNAME_web.war.sun-web.xml deleted file mode 100644 index 8e8ac6e1d1..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/servletendpoint/APPNAME_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - @WEBSERVICEDESCRIPTION@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS@?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/servletendpointnumservices2/APPNAME_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/servletendpointnumservices2/APPNAME_web.war.sun-web.xml deleted file mode 100644 index bff0a32973..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/deploymentDescriptors/httptemplates/servletendpointnumservices2/APPNAME_web.war.sun-web.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - @WEBSERVICEDESCRIPTION@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS@?WSDL - - - @WEBSERVICEDESCRIPTION2@ - http://webServerHost.1:webServerPort.1/@APPNAME@@URLALIAS2@?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/jakartaEE.tokens deleted file mode 100644 index 2daa5b9673..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/jakartaEE.tokens +++ /dev/null @@ -1,2 +0,0 @@ -WSRImport=import jakarta.jws.WebServiceRef; -WSRAnn= @WebServiceRef diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/standalone.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/standalone.tokens deleted file mode 100644 index e88b17726d..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/common/xml/standalone.tokens +++ /dev/null @@ -1 +0,0 @@ -WSRAnn= diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/JavaBean.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/JavaBean.java deleted file mode 100644 index 75621759d5..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/JavaBean.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.server; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.*; -import java.math.*; - -public class JavaBean implements java.io.Serializable { - - // Primitive Data Types - private boolean myBoolean; - - private byte myByte; - - private short myShort; - - private int myInt; - - private long myLong; - - private float myFloat; - - private double myDouble; - - // Primitive Data Type Wrappers - private Boolean myBoolean1; - - private Byte myByte1; - - private Short myShort1; - - private Integer myInt1; - - private Long myLong1; - - private Float myFloat1; - - private Double myDouble1; - - // Standard Java Classes - private String myString; - - private BigInteger myBigInteger; - - private BigDecimal myBigDecimal; - - private Calendar myCalendar; - - // Default constructor - public JavaBean() { - } - - public void setMyBoolean(boolean v) { - myBoolean = v; - } - - public boolean getMyBoolean() { - return myBoolean; - } - - public boolean isMyBoolean() { - return myBoolean; - } - - public void setMyByte(byte v) { - myByte = v; - } - - public byte getMyByte() { - return myByte; - } - - public void setMyShort(short v) { - myShort = v; - } - - public short getMyShort() { - return myShort; - } - - public void setMyInt(int v) { - myInt = v; - } - - public int getMyInt() { - return myInt; - } - - public void setMyLong(long v) { - myLong = v; - } - - public long getMyLong() { - return myLong; - } - - public void setMyFloat(float v) { - myFloat = v; - } - - public float getMyFloat() { - return myFloat; - } - - public void setMyDouble(double v) { - myDouble = v; - } - - public double getMyDouble() { - return myDouble; - } - - public void setMyBoolean1(Boolean v) { - myBoolean1 = v; - } - - public Boolean getMyBoolean1() { - return myBoolean1; - } - - public Boolean isMyBoolean1() { - return myBoolean1; - } - - public void setMyByte1(Byte v) { - myByte1 = v; - } - - public Byte getMyByte1() { - return myByte1; - } - - public void setMyShort1(Short v) { - myShort1 = v; - } - - public Short getMyShort1() { - return myShort1; - } - - public void setMyInt1(Integer v) { - myInt1 = v; - } - - public Integer getMyInt1() { - return myInt1; - } - - public void setMyLong1(Long v) { - myLong1 = v; - } - - public Long getMyLong1() { - return myLong1; - } - - public void setMyFloat1(Float v) { - myFloat1 = v; - } - - public Float getMyFloat1() { - return myFloat1; - } - - public void setMyDouble1(Double v) { - myDouble1 = v; - } - - public Double getMyDouble1() { - return myDouble1; - } - - public void setMyString(String v) { - myString = v; - } - - public String getMyString() { - return myString; - } - - public void setMyBigInteger(BigInteger v) { - myBigInteger = v; - } - - public BigInteger getMyBigInteger() { - return myBigInteger; - } - - public void setMyBigDecimal(BigDecimal v) { - myBigDecimal = v; - } - - public BigDecimal getMyBigDecimal() { - return myBigDecimal; - } - - public void setMyCalendar(Calendar v) { - myCalendar = v; - } - - public Calendar getMyCalendar() { - return myCalendar; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/MarshallTest.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/MarshallTest.java deleted file mode 100644 index 7413b2f787..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/MarshallTest.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.server; - -import java.util.*; - -import java.math.BigInteger; -import java.math.BigDecimal; - -// Service Defintion Interface - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(targetNamespace = "http://marshalltestservice.org/wsdl") -public interface MarshallTest { - - // ==================================================================== - // Java Primitive Types - // ==================================================================== - public boolean booleanTest(boolean v); - - public Boolean wrapperBooleanTest(Boolean v); - - public byte byteTest(byte v); - - public Byte wrapperByteTest(Byte v); - - public short shortTest(short v); - - public Short wrapperShortTest(Short v); - - public int intTest(int v); - - public Integer wrapperIntegerTest(Integer v); - - public long longTest(long v); - - public Long wrapperLongTest(Long v); - - public float floatTest(float v); - - public Float wrapperFloatTest(Float v); - - public double doubleTest(double v); - - public Double wrapperDoubleTest(Double v); - - // ==================================================================== - // Java Primitive Type Arrays (Single and Multi Dimensional) - // ==================================================================== - public boolean[] booleanArrayTest(boolean[] v); - - public byte[] byteArrayTest(byte[] v); - - public short[] shortArrayTest(short[] v); - - public int[] intArrayTest(int[] v); - - public long[] longArrayTest(long[] v); - - public float[] floatArrayTest(float[] v); - - public double[] doubleArrayTest(double[] v); - - public Boolean[] wrapperBooleanArrayTest(Boolean[] v); - - public Byte[] wrapperByteArrayTest(Byte[] v); - - public Short[] wrapperShortArrayTest(Short[] v); - - public Integer[] wrapperIntArrayTest(Integer[] v); - - public Long[] wrapperLongArrayTest(Long[] v); - - public Float[] wrapperFloatArrayTest(Float[] v); - - public Double[] wrapperDoubleArrayTest(Double[] v); - - // ==================================================================== - // Standard Java Classes (Scalar, Single and Multi Dimensional Arrays) - // ==================================================================== - public String stringTest(String v); - - public String[] stringArrayTest(String[] v); - - public Calendar calendarTest(Calendar v); - - public Calendar[] calendarArrayTest(Calendar[] v); - - public BigInteger bigIntegerTest(BigInteger v); - - public BigInteger[] bigIntegerArrayTest(BigInteger[] v); - - public BigDecimal bigDecimalTest(BigDecimal v); - - public BigDecimal[] bigDecimalArrayTest(BigDecimal[] v); - - // ==================================================================== - // JavaBeans Class (Scalar, Single and Multi Dimensional Arrays) - // ==================================================================== - public JavaBean javaBeanTest(JavaBean v); - - public JavaBean[] javaBeanArrayTest(JavaBean[] v); - - // ==================================================================== - // Service Specific Exception - // ==================================================================== - public void myServiceExceptionTest() throws MyServiceException; - - // ==================================================================== - // The void type - // ==================================================================== - public void voidTest(); -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/MarshallTestImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/MarshallTestImpl.java deleted file mode 100644 index 4b63ceb9a1..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/MarshallTestImpl.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.server; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import java.util.*; - -import java.math.BigInteger; -import java.math.BigDecimal; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "MarshallTestPort", serviceName = "MarshallTestService", targetNamespace = "http://marshalltestservice.org/wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.server.MarshallTest") -public class MarshallTestImpl implements MarshallTest { - - // ==================================================================== - // Java Primitive Types - // ==================================================================== - public boolean booleanTest(boolean v) { - TestUtil.logTrace("booleanTest"); - TestUtil.logMsg("boolean=" + v); - return v; - } - - public Boolean wrapperBooleanTest(Boolean v) { - TestUtil.logTrace("wrapperBooleanTest"); - TestUtil.logMsg("Boolean=" + v); - return v; - } - - public byte byteTest(byte v) { - TestUtil.logTrace("byteTest"); - TestUtil.logMsg("byte=" + v); - return v; - } - - public Byte wrapperByteTest(Byte v) { - TestUtil.logTrace("wrapperByteTest"); - TestUtil.logMsg("Byte=" + v); - return v; - } - - public short shortTest(short v) { - TestUtil.logTrace("shortTest"); - TestUtil.logMsg("short=" + v); - return v; - } - - public Short wrapperShortTest(Short v) { - TestUtil.logTrace("wrapperShortTest"); - TestUtil.logMsg("Short=" + v); - return v; - } - - public int intTest(int v) { - TestUtil.logTrace("intTest"); - TestUtil.logMsg("int=" + v); - return v; - } - - public Integer wrapperIntegerTest(Integer v) { - TestUtil.logTrace("wrapperIntegerTest"); - TestUtil.logMsg("Integer=" + v); - return v; - } - - public long longTest(long v) { - TestUtil.logTrace("longTest"); - TestUtil.logMsg("long=" + v); - return v; - } - - public Long wrapperLongTest(Long v) { - TestUtil.logTrace("wrapperLongTest"); - TestUtil.logMsg("Long=" + v); - return v; - } - - public float floatTest(float v) { - TestUtil.logTrace("floatTest"); - TestUtil.logMsg("float=" + v); - return v; - } - - public Float wrapperFloatTest(Float v) { - TestUtil.logTrace("wrapperFloatTest"); - TestUtil.logMsg("Float=" + v); - return v; - } - - public double doubleTest(double v) { - TestUtil.logTrace("doubleTest"); - TestUtil.logMsg("double=" + v); - return v; - } - - public Double wrapperDoubleTest(Double v) { - TestUtil.logTrace("wrapperDoubleTest"); - TestUtil.logMsg("Double=" + v); - return v; - } - - // ==================================================================== - // Java Primitive Type Arrays (Single and Multi Dimensional) - // ==================================================================== - public boolean[] booleanArrayTest(boolean[] v) { - TestUtil.logTrace("booleanArrayTest"); - JAXWS_Data.dumpArrayValues(v, "boolean"); - return v; - } - - public byte[] byteArrayTest(byte[] v) { - TestUtil.logTrace("byteArrayTest"); - JAXWS_Data.dumpArrayValues(v, "byte"); - return v; - } - - public short[] shortArrayTest(short[] v) { - TestUtil.logTrace("shortArrayTest"); - JAXWS_Data.dumpArrayValues(v, "short"); - return v; - } - - public int[] intArrayTest(int[] v) { - TestUtil.logTrace("intArrayTest"); - JAXWS_Data.dumpArrayValues(v, "int"); - return v; - } - - public long[] longArrayTest(long[] v) { - TestUtil.logTrace("longArrayTest"); - JAXWS_Data.dumpArrayValues(v, "long"); - return v; - } - - public float[] floatArrayTest(float[] v) { - TestUtil.logTrace("floatArrayTest"); - JAXWS_Data.dumpArrayValues(v, "float"); - return v; - } - - public double[] doubleArrayTest(double[] v) { - TestUtil.logTrace("doubleArrayTest"); - JAXWS_Data.dumpArrayValues(v, "double"); - return v; - } - - public Boolean[] wrapperBooleanArrayTest(Boolean[] v) { - TestUtil.logTrace("wrapperBooleanArrayTest"); - JAXWS_Data.dumpArrayValues(v, "Boolean"); - return v; - } - - public Byte[] wrapperByteArrayTest(Byte[] v) { - TestUtil.logTrace("wrapperByteArrayTest"); - JAXWS_Data.dumpArrayValues(v, "Byte"); - return v; - } - - public Short[] wrapperShortArrayTest(Short[] v) { - TestUtil.logTrace("wrapperShortArrayTest"); - JAXWS_Data.dumpArrayValues(v, "Short"); - return v; - } - - public Integer[] wrapperIntArrayTest(Integer[] v) { - TestUtil.logTrace("wrapperIntArrayTest"); - JAXWS_Data.dumpArrayValues(v, "Integer"); - return v; - } - - public Long[] wrapperLongArrayTest(Long[] v) { - TestUtil.logTrace("wrapperLongArrayTest"); - JAXWS_Data.dumpArrayValues(v, "Long"); - return v; - } - - public Float[] wrapperFloatArrayTest(Float[] v) { - TestUtil.logTrace("wrapperFloatArrayTest"); - JAXWS_Data.dumpArrayValues(v, "Float"); - return v; - } - - public Double[] wrapperDoubleArrayTest(Double[] v) { - TestUtil.logTrace("wrapperDoubleArrayTest"); - JAXWS_Data.dumpArrayValues(v, "Double"); - return v; - } - - // ==================================================================== - // Standard Java Classes (Scalar, Single and Multi Dimensional Arrays) - // ==================================================================== - public String stringTest(String v) { - TestUtil.logTrace("stringTest"); - TestUtil.logMsg("String=" + v); - return v; - } - - public String[] stringArrayTest(String[] v) { - TestUtil.logTrace("stringArrayTest"); - JAXWS_Data.dumpArrayValues(v, "String"); - return v; - } - - public Calendar calendarTest(Calendar v) { - TestUtil.logTrace("calendarTest"); - TestUtil.logMsg("Calendar=" + v); - return v; - } - - public Calendar[] calendarArrayTest(Calendar[] v) { - TestUtil.logTrace("calendarArrayTest"); - JAXWS_Data.dumpArrayValues(v, "Calendar"); - return v; - } - - public BigInteger bigIntegerTest(BigInteger v) { - TestUtil.logTrace("bigIntegerTest"); - TestUtil.logMsg("BigInteger=" + v); - return v; - } - - public BigInteger[] bigIntegerArrayTest(BigInteger[] v) { - TestUtil.logTrace("bigIntegerArrayTest"); - JAXWS_Data.dumpArrayValues(v, "BigInteger"); - return v; - } - - public BigDecimal bigDecimalTest(BigDecimal v) { - TestUtil.logTrace("bigDecimalTest"); - TestUtil.logMsg("BigDecimal=" + v); - return v; - } - - public BigDecimal[] bigDecimalArrayTest(BigDecimal[] v) { - TestUtil.logTrace("bigDecimalArrayTest"); - JAXWS_Data.dumpArrayValues(v, "BigDecimal"); - return v; - } - - // ==================================================================== - // JavaBeans Class (Scalar, Single and Multi Dimensional Arrays) - // ==================================================================== - public JavaBean javaBeanTest(JavaBean v) { - TestUtil.logTrace("javaBeanTest"); - TestUtil.logMsg("JavaBean=" + v); - return v; - } - - public JavaBean[] javaBeanArrayTest(JavaBean[] v) { - TestUtil.logTrace("javaBeanArrayTest"); - return v; - } - - // ==================================================================== - // Service Specific Exception - // ==================================================================== - public void myServiceExceptionTest() throws MyServiceException { - TestUtil.logTrace("myServiceExceptionTest"); - throw new MyServiceException("My ServiceException"); - } - - // ==================================================================== - // The void type - // ==================================================================== - public void voidTest() { - TestUtil.logTrace("voidTest"); - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/MyServiceException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/MyServiceException.java deleted file mode 100644 index 990fd78cd8..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/MyServiceException.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.server; - -public class MyServiceException extends Exception { - private String theMessage; - - public MyServiceException(String theMessage) { - this.theMessage = theMessage; - } - - public String getTheMessage() { - return theMessage; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/build.xml deleted file mode 100644 index f388514a14..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/build.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/jakartaEE.tokens deleted file mode 100644 index 8bc7ccd24c..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdlmarshalltestservice") -SERVICE=com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.server.MarshallTestService -IMPL=com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.server.MarshallTestImpl -SEI=com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.server.MarshallTest -NAMESPACEURI=http://marshalltestservice.org/wsdl -PORT=MarshallTestPort -URLALIAS=/jaxws/MarshallTest -SERVLETNAME=com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.server.MarshallTestImpl -WEBSERVICEDESCRIPTION=MarshallTestService -SERVICEREFNAMEWSSERVLET=service/wsj2wdlmarshalltestservice -SERVICEREFNAMEWSEJB=service/wsj2wdlmarshalltestservice -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdlmarshalltestservice diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/standalone-sun-jaxws.xml deleted file mode 100644 index 733cad3cd7..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/standalone.web.xml deleted file mode 100644 index a37620330c..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WDLMTApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -MarshallTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -MarshallTest -/jaxws/MarshallTest - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/EchoImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/EchoImpl.java deleted file mode 100644 index 92984e3580..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/EchoImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.server; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; - -@WebService(name = "Echo", serviceName = "EchoService", targetNamespace = "http://echo.org/wsdl") -public class EchoImpl { - @WebMethod - public String echoString(String str) { - return str; - } - - @WebMethod - public String[] echoStringArray(String[] str) { - return str; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/build.xml deleted file mode 100644 index 4a301cbb47..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/jakartaEE.tokens deleted file mode 100644 index 265c79cf29..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdlechoservice") -SERVICE=com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.server.EchoService -IMPL=com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.server.EchoImpl -SEI=com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.server.Echo -NAMESPACEURI=http://echo.org/wsdl -PORT=EchoPort -URLALIAS=/jaxws/Echo -SERVLETNAME=com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.server.EchoImpl -WEBSERVICEDESCRIPTION=EchoService -SERVICEREFNAMEWSSERVLET=service/wsj2wdlechoservice -SERVICEREFNAMEWSEJB=service/wsj2wdlechoservice -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdlechoservice diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/standalone-sun-jaxws.xml deleted file mode 100644 index 0e84d74e6e..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/standalone.web.xml deleted file mode 100644 index fdda896e5b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WDLNOSEIApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Echo -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Echo -/jaxws/Echo - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/TestImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/TestImpl.java deleted file mode 100644 index b4b0f4445f..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/TestImpl.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.sessionmaintaintest.server; - -import java.util.HashSet; -import java.util.Set; - -import jakarta.annotation.Resource; - -import jakarta.jws.WebMethod; -import jakarta.jws.WebService; - -import jakarta.xml.ws.handler.MessageContext; - -import java.lang.reflect.*; - -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.WebServiceContext; - -@WebService(name = "Test", serviceName = "TestService", targetNamespace = "http://test.org/wsdl") -public class TestImpl { - - @Resource - private WebServiceContext wsc; - - public TestImpl() { - } - - @WebMethod - public String getSessionId() { - System.out.println("Entering getSessionId()"); - String id = getClientId(); - System.out.println("** session id: " + id); - System.out.println("Leaving getSessionId()"); - return id; - } - - @WebMethod - public boolean compareSessionId(String sessionId) { - System.out.println("Enter doesSessionExist()"); - System.out.println("session id passed in by client: " + sessionId); - String id = getClientId(); - System.out.println("** current session id: " + id); - boolean exists = false; - if (id.equals(sessionId)) { - exists = true; - } else { - exists = false; - } - System.out.println("returning result of:" + exists); - System.out.println("Leave doesSessionExist()"); - return exists; - } - - private String getClientId() { - String id = null; - - Object o1 = wsc.getMessageContext().get(MessageContext.SERVLET_REQUEST); - - try { - if (o1 != null) { - Class c1 = o1.getClass(); - Method getSession = c1.getMethod("getSession"); - Object o2 = getSession.invoke(o1); - Class c2 = o2.getClass(); - Method getId = c2.getMethod("getId"); - id = (String) getId.invoke(o2); - } - } catch (Exception e) { - e.printStackTrace(); - } - return id; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/TestImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/TestImpl.java deleted file mode 100644 index 096cbbb2b7..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/TestImpl.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestImpl.java 52492 2007-01-24 00:59:57Z adf $ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.webmethod.server; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; - -@WebService(name = "Test", serviceName = "TestService", targetNamespace = "http://test.org/wsdl") -public class TestImpl extends TestImplBase { - - @WebMethod - public String method3(String str) { - return str; - } - - // This is also a WebMethod since declaring class - // has WebService - public String method4(String str) { - return str; - } - - // This is a WebMethod since exclude=false - @WebMethod(exclude = false) - public String method5(String str) { - return str; - } - - // Not a web method since exclude=true - @WebMethod(exclude = true) - public String method6(String str) { - return str; - } - - // Not a web method a static method plus exclude=true - @WebMethod(exclude = true) - public static String method7(String str) { - return str; - } - - // Not a web method a final method plus exclude=true - @WebMethod(exclude = true) - public final String method8(String str) { - return str; - } - - // Not a web method a static method - public static String method9(String str) { - return str; - } - - // Not a web method a final method - public final String method10(String str) { - return str; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/TestImplBase.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/TestImplBase.java deleted file mode 100644 index f0cf276b81..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/TestImplBase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestImplBase.java 52492 2007-01-24 00:59:57Z adf $ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.webmethod.server; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; - -public class TestImplBase extends TestImplBaseBase { - - // Not a web method (not a WebService) - public String method2(String str) { - return str; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/TestImplBaseBase.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/TestImplBaseBase.java deleted file mode 100644 index 906a030c46..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/TestImplBaseBase.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestImplBaseBase.java 52492 2007-01-24 00:59:57Z adf $ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.webmethod.server; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; - -@WebService -public class TestImplBaseBase { - - // This is also a WebMethod since declaring class - // has WebService - public String method1(String str) { - return str; - } - - // This is also a WebMethod since declaring class - // has WebService - @Override - public String toString() { - return "TestImplBaseBase"; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/HandlerChainTest.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/HandlerChainTest.java deleted file mode 100644 index 5cfaf29919..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/HandlerChainTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1; - -@jakarta.jws.WebService(targetNamespace = "http://handlerchaintestservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -public interface HandlerChainTest { - public String helloWorld(String str); - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/HandlerChainTestImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/HandlerChainTestImpl.java deleted file mode 100644 index 39f758978b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/HandlerChainTestImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1; - -import jakarta.jws.HandlerChain; - -@HandlerChain(name = "", file = "server-handler.xml") -@jakarta.jws.WebService(targetNamespace = "http://handlerchaintestservice.org/wsdl", serviceName = "HandlerChainTestService", portName = "HandlerChainTestPort", endpointInterface = "com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1.HandlerChainTest") -public class HandlerChainTestImpl implements HandlerChainTest { - public String helloWorld(String str) { - return str; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/LogicalHandler.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/LogicalHandler.java deleted file mode 100644 index 3ba1754d7f..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/LogicalHandler.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1; - -import jakarta.xml.ws.handler.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import java.io.StringReader; -import javax.xml.transform.stream.StreamSource; - -public class LogicalHandler - implements jakarta.xml.ws.handler.LogicalHandler { - private final String HANDLER_NAME = "ServerLogicalHandler"; - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "HandlerChainOnImplTest")) { - HandlerChainOnImplTest(context, direction); - } else { - System.out.println( - "didn't find HandlerChainOnImplTest message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void HandlerChainOnImplTest(LogicalMessageContext context, - String direction) { - System.out.println("in " + HANDLER_NAME + ":HandlerChainOnImplTest"); - - Handler_Util.dumpMsg(context); - - String tmp = Handler_Util.getMessageAsString(context); - String newTmp = tmp.replaceAll("HandlerChainOnImplTest", - "HandlerChainOnImplTest" + direction + HANDLER_NAME); - context.getMessage().setPayload(new StreamSource(new StringReader(newTmp))); - Handler_Util.dumpMsg(context); - - System.out.println("exiting " + HANDLER_NAME + ":HandlerChainOnImplTest"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/SOAPHandler.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/SOAPHandler.java deleted file mode 100644 index a8355d4203..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/SOAPHandler.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1; - -import com.sun.ts.lib.util.*; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Iterator; - -import com.sun.ts.tests.jaxws.common.Handler_Util; - -public class SOAPHandler - implements jakarta.xml.ws.handler.soap.SOAPHandler { - - private final String HANDLER_NAME = "ServerSOAPHandler"; - - public Set getHeaders() { - return new HashSet(); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "HandlerChainOnImplTest")) { - HandlerChainOnImplTest(context, direction); - } else { - System.out.println( - "didn't find HandlerChainOnImplTest message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void HandlerChainOnImplTest(MessageContext context, String direction) { - System.out.println("in " + HANDLER_NAME + ":HandlerChainOnImplTest"); - try { - System.out.println("direction=" + direction); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); - SOAPBody body = env.getBody(); - Iterator it = body.getChildElements(); - while (it.hasNext()) { - SOAPElement elem = (SOAPElement) it.next(); - Name elemName = elem.getElementName(); - Iterator it2 = ((SOAPElement) elem).getChildElements(); - while (it2.hasNext()) { - SOAPElement elem2 = (SOAPElement) it2.next(); - String value = elem2.getValue(); - if (value.indexOf("HandlerChainOnImplTest") >= 0) { - value = value + direction + HANDLER_NAME; - elem2.setValue(value); - } - } - } - msg.saveChanges(); - Handler_Util.dumpMsg(context); - } catch (Exception e) { - TestUtil.printStackTrace(e); - e.printStackTrace(); - } - System.out.println("exiting " + HANDLER_NAME + ":HandlerChainOnImplTest"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/jakartaEE.tokens deleted file mode 100644 index f86ce193f4..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2whandlerchaintest1") -SERVICE=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1.HandlerChainTestService -IMPL=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1.HandlerChainTestImpl -SEI=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1.HandlerChainTest -NAMESPACEURI=http://handlerchaintestservice.org/wsdl -PORT=HandlerChainTestPort -URLALIAS=/jaxws/HandlerChainTest -SERVLETNAME=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1.HandlerChainTestImpl -WEBSERVICEDESCRIPTION=HandlerChainTest -SERVICEREFNAMEWSSERVLET=service/wsj2whandlerchaintest1 -SERVICEREFNAMEWSEJB=service/wsj2whandlerchaintest1 -SERVICEREFNAMEWSAPPCLIENT=service/wsj2whandlerchaintest1 diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/server-handler.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/server-handler.xml deleted file mode 100644 index 398798251f..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/server-handler.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - SOAPHandler - com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1.SOAPHandler - - - LogicalHandler - com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1.LogicalHandler - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/standalone-sun-jaxws.xml deleted file mode 100644 index 4366a64a13..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/standalone.web.xml deleted file mode 100644 index dd31b7b96f..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WHandlerServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -HandlerChainTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -HandlerChainTest -/jaxws/HandlerChainTest - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/HandlerChainTest.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/HandlerChainTest.java deleted file mode 100644 index 815e45f050..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/HandlerChainTest.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2; - -@jakarta.jws.HandlerChain(name = "", file = "handler.xml") -@jakarta.jws.WebService(targetNamespace = "http://handlerchaintestservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -public interface HandlerChainTest { - public String helloWorld(String str); - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/HandlerChainTestImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/HandlerChainTestImpl.java deleted file mode 100644 index ce43361e37..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/HandlerChainTestImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2; - -@jakarta.jws.WebService(targetNamespace = "http://handlerchaintestservice.org/wsdl", serviceName = "HandlerChainTestService", portName = "HandlerChainTestPort", endpointInterface = "com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2.HandlerChainTest") -public class HandlerChainTestImpl implements HandlerChainTest { - public String helloWorld(String str) { - return str; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/LogicalHandler.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/LogicalHandler.java deleted file mode 100644 index 699ef88c7e..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/LogicalHandler.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2; - -import jakarta.xml.ws.handler.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import java.io.StringReader; -import javax.xml.transform.stream.StreamSource; - -public class LogicalHandler - implements jakarta.xml.ws.handler.LogicalHandler { - private final String HANDLER_NAME = "ServerLogicalHandler"; - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "HandlerChainOnSEITest")) { - HandlerChainOnSEITest(context, direction); - } else { - System.out.println( - "didn't find HandlerChainOnSEITest message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void HandlerChainOnSEITest(LogicalMessageContext context, - String direction) { - System.out.println("in " + HANDLER_NAME + ":HandlerChainOnSEITest"); - - Handler_Util.dumpMsg(context); - - String tmp = Handler_Util.getMessageAsString(context); - String newTmp = tmp.replaceAll("HandlerChainOnSEITest", - "HandlerChainOnSEITest" + direction + HANDLER_NAME); - context.getMessage().setPayload(new StreamSource(new StringReader(newTmp))); - Handler_Util.dumpMsg(context); - - System.out.println("exiting " + HANDLER_NAME + ":HandlerChainOnSEITest"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/SOAPHandler.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/SOAPHandler.java deleted file mode 100644 index 6c2dc51a4b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/SOAPHandler.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2; - -import com.sun.ts.lib.util.*; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Iterator; - -import com.sun.ts.tests.jaxws.common.Handler_Util; - -public class SOAPHandler - implements jakarta.xml.ws.handler.soap.SOAPHandler { - - private final String HANDLER_NAME = "ServerSOAPHandler"; - - public Set getHeaders() { - return new HashSet(); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "HandlerChainOnSEITest")) { - HandlerChainOnSEITest(context, direction); - } else { - System.out.println( - "didn't find HandlerChainOnSEITest message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void HandlerChainOnSEITest(MessageContext context, String direction) { - System.out.println("in " + HANDLER_NAME + ":HandlerChainOnSEITest"); - try { - System.out.println("direction=" + direction); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); - SOAPBody body = env.getBody(); - Iterator it = body.getChildElements(); - while (it.hasNext()) { - SOAPElement elem = (SOAPElement) it.next(); - Name elemName = elem.getElementName(); - Iterator it2 = ((SOAPElement) elem).getChildElements(); - while (it2.hasNext()) { - SOAPElement elem2 = (SOAPElement) it2.next(); - String value = elem2.getValue(); - if (value.indexOf("HandlerChainOnSEITest") >= 0) { - value = value + direction + HANDLER_NAME; - elem2.setValue(value); - } - } - } - msg.saveChanges(); - Handler_Util.dumpMsg(context); - } catch (Exception e) { - TestUtil.printStackTrace(e); - e.printStackTrace(); - } - System.out.println("exiting " + HANDLER_NAME + ":HandlerChainOnSEITest"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/handler.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/handler.xml deleted file mode 100644 index d0f94b5d30..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/handler.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - SOAPHandler - com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2.SOAPHandler - - - LogicalHandler - com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2.LogicalHandler - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/jakartaEE.tokens deleted file mode 100644 index 63284d48c9..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2whandlerchaintest2") -SERVICE=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2.HandlerChainTestService -IMPL=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2.HandlerChainTestImpl -SEI=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2.HandlerChainTest -NAMESPACEURI=http://handlerchaintestservice.org/wsdl -PORT=HandlerChainTestPort -URLALIAS=/jaxws/HandlerChainTest -SERVLETNAME=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2.HandlerChainTestImpl -WEBSERVICEDESCRIPTION=HandlerChainTest -SERVICEREFNAMEWSSERVLET=service/wsj2whandlerchaintest2 -SERVICEREFNAMEWSEJB=service/wsj2whandlerchaintest2 -SERVICEREFNAMEWSAPPCLIENT=service/wsj2whandlerchaintest2 diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/server-handler.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/server-handler.xml deleted file mode 100644 index d0f94b5d30..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/server-handler.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - SOAPHandler - com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2.SOAPHandler - - - LogicalHandler - com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2.LogicalHandler - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/standalone-sun-jaxws.xml deleted file mode 100644 index bec3524df2..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/standalone.web.xml deleted file mode 100644 index dd31b7b96f..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WHandlerServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -HandlerChainTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -HandlerChainTest -/jaxws/HandlerChainTest - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/EchoImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/EchoImpl.java deleted file mode 100644 index b9b34febc7..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/EchoImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.nosei.server; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; - -@WebService(name = "Echo", serviceName = "EchoService", targetNamespace = "http://echo.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC) -public class EchoImpl { - @WebMethod - public String echoString(String str) { - return str; - } - - @WebMethod - public String[] echoStringArray(String[] str) { - return str; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersException.java deleted file mode 100644 index 23df4e6046..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersException.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous; - -public class AddNumbersException extends Exception { - private static final long serialVersionUID = 23L; - - String detail; - - public AddNumbersException(String message, String detail) { - super(message); - this.detail = detail; - } - - public String getDetail() { - return detail; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersImpl23001.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersImpl23001.java deleted file mode 100644 index ac10d4eb18..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersImpl23001.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; -import jakarta.jws.WebParam; -import jakarta.jws.HandlerChain; -import jakarta.xml.ws.Action; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.AddressingFeature; - -@WebService(name = "AddNumbersPortType23001", portName = "AddNumbersPort23001", serviceName = "AddNumbersService23001", targetNamespace = "http://example.com/") - -@Addressing(enabled = true, required = true, responses = AddressingFeature.Responses.ANONYMOUS) -@HandlerChain(file = "server-handler.xml") -public class AddNumbersImpl23001 { - - @Action(input = "http://example.com/AddNumbersPortType23001/add", output = "http://example.com/AddNumbersPortType23001/addResponse") - @WebMethod - public int addNumbers( - @WebParam(name = "number1", targetNamespace = "http://example.com/") int number1, - @WebParam(name = "number2", targetNamespace = "http://example.com/") int number2, - @WebParam(name = "testName", targetNamespace = "http://example.com/") String testName) - throws AddNumbersException { - - if (number1 < 0 || number2 < 0) { - throw new AddNumbersException("Negative numbers can't be added!", - "Numbers: " + number1 + ", " + number2); - } - return number1 + number2; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersImpl23002.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersImpl23002.java deleted file mode 100644 index e7cccd7845..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersImpl23002.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; -import jakarta.jws.WebParam; -import jakarta.jws.HandlerChain; -import jakarta.xml.ws.Action; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.AddressingFeature; - -@WebService(name = "AddNumbersPortType23002", portName = "AddNumbersPort23002", serviceName = "AddNumbersService23002", targetNamespace = "http://example.com/") - -@Addressing(enabled = true, required = true, responses = AddressingFeature.Responses.NON_ANONYMOUS) -@HandlerChain(file = "server-handler.xml") -public class AddNumbersImpl23002 { - - @Action(input = "http://example.com/AddNumbersPortType23002/add", output = "http://example.com/AddNumbersPortType23002/addResponse") - @WebMethod - public int addNumbers( - @WebParam(name = "number1", targetNamespace = "http://example.com/") int number1, - @WebParam(name = "number2", targetNamespace = "http://example.com/") int number2, - @WebParam(name = "testName", targetNamespace = "http://example.com/") String testName) - throws AddNumbersException { - if (number1 < 0 || number2 < 0) { - throw new AddNumbersException("Negative numbers can't be added!", - "Numbers: " + number1 + ", " + number2); - } - return number1 + number2; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/NonAnonymousRespProcessor.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/NonAnonymousRespProcessor.java deleted file mode 100644 index 4b0f103fad..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/NonAnonymousRespProcessor.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous; - -import jakarta.xml.ws.*; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import java.util.Calendar; -import java.util.concurrent.Exchanger; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.io.IOException; - -/** - * This class handles the non-anonymous ReplyTo responses - * - * @author Alan Frechette - */ -@WebServiceProvider -@ServiceMode(value = Service.Mode.MESSAGE) -public class NonAnonymousRespProcessor implements Provider { - Exchanger msgExchanger; - - public NonAnonymousRespProcessor() { - } - - public NonAnonymousRespProcessor(Exchanger msgExchanger) { - this.msgExchanger = msgExchanger; - } - - public SOAPMessage invoke(SOAPMessage request) { - System.out.printf("====%s[start:%tc]====\n", getClass().getName(), - Calendar.getInstance()); - try { - request.writeTo(System.out); - } catch (SOAPException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - System.out.printf("====%s[end:%tc]====\n", getClass().getName(), - Calendar.getInstance()); - try { - msgExchanger.exchange(request, 30L, TimeUnit.SECONDS); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (TimeoutException e) { - e.printStackTrace(); - } - return null; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/NonAnonymousRespProcessor2.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/NonAnonymousRespProcessor2.java deleted file mode 100644 index 245460086c..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/NonAnonymousRespProcessor2.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous; - -import jakarta.xml.ws.*; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import java.util.Calendar; -import java.util.concurrent.Exchanger; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.io.IOException; - -/** - * This class handles the non-anonymous FaultTo responses - * - * @author Alan Frechette - */ -@WebServiceProvider -@ServiceMode(value = Service.Mode.MESSAGE) -public class NonAnonymousRespProcessor2 implements Provider { - Exchanger msgExchanger; - - public NonAnonymousRespProcessor2() { - } - - public NonAnonymousRespProcessor2(Exchanger msgExchanger) { - this.msgExchanger = msgExchanger; - } - - public SOAPMessage invoke(SOAPMessage request) { - System.out.printf("====%s[start:%tc]====\n", getClass().getName(), - Calendar.getInstance()); - try { - request.writeTo(System.out); - } catch (SOAPException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - System.out.printf("====%s[end:%tc]====\n", getClass().getName(), - Calendar.getInstance()); - try { - msgExchanger.exchange(request, 30L, TimeUnit.SECONDS); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (TimeoutException e) { - e.printStackTrace(); - } - return null; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/ServerSOAPHandler.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/ServerSOAPHandler.java deleted file mode 100644 index 0ee8399bac..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/ServerSOAPHandler.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, "testAnonymousResponsesAssertion")) { - verifyAddressingHeadersForAnonymousResponsesAssertion(context, action); - } else if (Handler_Util.checkForMsg(context, - "testNonAnonymousResponsesAssertion")) { - verifyAddressingHeadersForNonAnonymousResponsesAssertion(context, action); - } - } - - private void verifyAddressingHeadersForAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ServerSOAPHandler.VerifyAddressingHeadersForAnonymousResponsesAssertion"); - System.out.println( - "ServerSOAPHandler.VerifyAddressingHeadersForAnonymousResponsesAssertion"); - if (!TestConstants.TEST_ANONYMOUS_RESPONSES_ASSERTION_IN_ACTION - .equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.TEST_ANONYMOUS_RESPONSES_ASSERTION_IN_ACTION - + ", Actual:" + action); - } - try { - String to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - System.out.println("[To=" + to + "]"); - } catch (Exception e) { - } - String replyTo = null; - try { - replyTo = getReplyTo(context); - TestUtil.logMsg("[ReplyTo=" + replyTo + "]"); - System.out.println("[ReplyTo=" + replyTo + "]"); - } catch (Exception e) { - } - if (replyTo != null) { - if (!replyTo.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI) - && !replyTo.equals(W3CAddressingConstants.WSA_NONE_ADDRESS)) { - throw new AddressingPropertyException("Expected: wsa:ReplyTo=" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI + " or " - + W3CAddressingConstants.WSA_NONE_ADDRESS + ", Actual: wsa:ReplyTo=" - + replyTo); - } - } - try { - String messageID = getMessageId(context); - TestUtil.logMsg("[MessageID=" + messageID + "]"); - System.out.println("[MessageID=" + messageID + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:MessageID was not set (unexpected)"); - } - } - - private void verifyAddressingHeadersForNonAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ServerSOAPHandler.VerifyAddressingHeadersForNonAnonymousResponsesAssertion"); - System.out.println( - "ServerSOAPHandler.VerifyAddressingHeadersForNonAnonymousResponsesAssertion"); - if (!TestConstants.TEST_NONANONYMOUS_RESPONSES_ASSERTION_IN_ACTION - .equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.TEST_NONANONYMOUS_RESPONSES_ASSERTION_IN_ACTION - + ", Actual:" + action); - } - try { - String to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - System.out.println("[To=" + to + "]"); - } catch (Exception e) { - } - String replyTo; - try { - replyTo = getReplyTo(context); - TestUtil.logMsg("[ReplyTo=" + replyTo + "]"); - System.out.println("[ReplyTo=" + replyTo + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:ReplyTo was not set (unexpected)"); - } - if (replyTo.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI)) - throw new AddressingPropertyException("Expected: wsa:ReplyTo=!" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI - + ", Actual: wsa:ReplyTo=" + replyTo); - try { - String messageID = getMessageId(context); - TestUtil.logMsg("[MessageID=" + messageID + "]"); - System.out.println("[MessageID=" + messageID + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:MessageID was not set (unexpected)"); - } - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/TestConstants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/TestConstants.java deleted file mode 100644 index 79e832bb84..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/TestConstants.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous; - -public class TestConstants { - public static final String TEST_ANONYMOUS_RESPONSES_ASSERTION_IN_ACTION = "http://example.com/AddNumbersPortType23001/add"; - - public static final String TEST_ANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION = "http://example.com/AddNumbersPortType23001/addResponse"; - - public static final String TEST_NONANONYMOUS_RESPONSES_ASSERTION_IN_ACTION = "http://example.com/AddNumbersPortType23002/add"; - - public static final String TEST_NONANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION = "http://example.com/AddNumbersPortType23002/addResponse"; -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_web.war.sun-web.xml deleted file mode 100644 index 8f9fcaf6fc..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_web.war.sun-web.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - AddNumbersService23001 - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest23_web/jaxws/AddNumbers23001?WSDL - - - AddNumbersService23002 - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest23_web/jaxws/AddNumbers23002?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_wsappclient_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index dfad4d5808..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - service/WSAJ2WDLAnonymousTest23001 - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23001 - - http://example.com/ - AddNumbersPort23001 - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest23_web/jaxws/AddNumbers23001?WSDL - - - service/WSAJ2WDLAnonymousTest23002 - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23002 - - http://example.com/ - AddNumbersPor23002 - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest23_web/jaxws/AddNumbers23002?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_wsejb_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 6df371d8ef..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - WSAJ2WDLAnonymousTest23_wsejb_vehicle - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index b7707d16e3..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - WSAJ2WDLAnonymousTest23_wsejb_vehicle - - service/WSAJ2WDLAnonymousTest23001 - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23001 - - http://example.com/ - AddNumbersPort23001 - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest23_web/jaxws/AddNumbers23001?WSDL - - - service/WSAJ2WDLAnonymousTest23002 - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23002 - - http://example.com/ - AddNumbersPort23002 - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest23_web/jaxws/AddNumbers23002?WSDL - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_wsservlet_vehicle_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index 70d81a2601..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest23_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - service/WSAJ2WDLAnonymousTest23001 - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23001 - - http://example.com/ - AddNumbersPort23001 - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest23_web/jaxws/AddNumbers23001?WSDL - - - service/WSAJ2WDLAnonymousTest23002 - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23002 - - http://example.com/ - AddNumbersPort23002 - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest23_web/jaxws/AddNumbers23002?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/jakartaEE.tokens deleted file mode 100644 index 89d1293432..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/jakartaEE.tokens +++ /dev/null @@ -1,19 +0,0 @@ -WSREFSEJBCLIENT=@WebServiceRef(name="service/WSAJ2WDLAnonymousTest23001", type=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23001.class, wsdlLocation="META-INF/wsdl/AddNumbersService23001.wsdl") @WebServiceRef(name="service/WSAJ2WDLAnonymousTest23002", type=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23002.class, wsdlLocation="META-INF/wsdl/AddNumbersService23002.wsdl") - -WSREFSAPPCLIENT=@WebServiceRef(name="service/WSAJ2WDLAnonymousTest23001", type=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23001.class, wsdlLocation="META-INF/wsdl/AddNumbersService23001.wsdl") @WebServiceRef(name="service/WSAJ2WDLAnonymousTest23002", type=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23002.class, wsdlLocation="META-INF/wsdl/AddNumbersService23002.wsdl") - -WSREFSWEBCLIENT=@WebServiceRef(name="service/WSAJ2WDLAnonymousTest23001", type=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23001.class, wsdlLocation="WEB-INF/wsdl/AddNumbersService23001.wsdl") @WebServiceRef(name="service/WSAJ2WDLAnonymousTest23002", type=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23002.class, wsdlLocation="WEB-INF/wsdl/AddNumbersService23002.wsdl") - -SERVICE=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23001 -SERVICE2=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23002 -SEI=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23001 -SEI2=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23002 -IMPL=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersImpl23001 -IMPL2=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersImpl23002 -URLALIAS=/jaxws/AddNumbers23001 -URLALIAS2=/jaxws/AddNumbers23002 -SERVLETNAME=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersImpl23001 -SERVLETNAME2=com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersImpl23002 -NAMESPACEURI=http://example.com/ -PORT=AddNumbersPort23001 -PORT2=AddNumbersPort23001 diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/server-handler.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/server-handler.xml deleted file mode 100644 index 57b5b15de2..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/server-handler.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.ServerSOAPHandler - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/standalone-sun-jaxws.xml deleted file mode 100644 index 55a63a4446..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/standalone-sun-jaxws.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/standalone.web.xml deleted file mode 100644 index 5901d0522a..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSJ2WAnonymousTestApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddNumbersPortType23001 - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbersPortType23002 - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbersPortType23001 - /jaxws/AddNumbers23001 - - - AddNumbersPortType23002 - /jaxws/AddNumbers23002 - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/wsservlet_vehicle_web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/wsservlet_vehicle_web.xml deleted file mode 100644 index 999e2d41b1..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/wsservlet_vehicle_web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - wsservlet_vehicle - - WSServlet_VehicleLogicalName - com.sun.ts.tests.common.vehicle.wsservlet.WSServletVehicle - - - WSServlet_VehicleLogicalName - /wsservlet_vehicle - - - 54 - - - service/WSAJ2WDLAnonymousTest23001 - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23001 - WEB-INF/wsdl/AddNumbersService23001.wsdl - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23001 - - - - service/WSAJ2WDLAnonymousTest23002 - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23002 - WEB-INF/wsdl/AddNumbersService23002.wsdl - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23002 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/J2WDLSharedBean.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/J2WDLSharedBean.java deleted file mode 100644 index fd33cd612d..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/J2WDLSharedBean.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.doclitservice; - -public class J2WDLSharedBean { - - private int myInt; - - private String myString; - - public J2WDLSharedBean() { - } - - public J2WDLSharedBean(int i, String s) { - setMyInt(i); - setMyString(s); - } - - public int getMyInt() { - return myInt; - } - - public void setMyInt(int myInt) { - this.myInt = myInt; - } - - public String getMyString() { - return myString; - } - - public void setMyString(String myString) { - this.myString = myString; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/J2WDLSharedEndpoint.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/J2WDLSharedEndpoint.java deleted file mode 100644 index 46fc01dd4d..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/J2WDLSharedEndpoint.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.doclitservice; - -import jakarta.jws.WebService; - -@WebService(targetNamespace = "http://doclitservice.org/wsdl") -public interface J2WDLSharedEndpoint { - public String helloWorld(); - - public String stringOperation(String param); - - public String[] arrayOperation(); - - public J2WDLSharedBean getBean(); - - public String arrayOperationFromClient(String[] array); -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/J2WDLSharedEndpointImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/J2WDLSharedEndpointImpl.java deleted file mode 100644 index c25c4c4a00..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/J2WDLSharedEndpointImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.doclitservice; - -import jakarta.jws.WebService; - -@WebService(portName = "J2WDLSharedEndpointPort", targetNamespace = "http://doclitservice.org/wsdl", serviceName = "J2WDLShared", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.doclitservice.J2WDLSharedEndpoint") -public class J2WDLSharedEndpointImpl implements J2WDLSharedEndpoint { - public String helloWorld() { - return "hello world"; - } - - public String stringOperation(String param) { - return param; - } - - public String[] arrayOperation() { - return new String[] { "one", "two", "three" }; - } - - public J2WDLSharedBean getBean() { - return new J2WDLSharedBean(5, "A String"); - } - - public String arrayOperationFromClient(String[] array) { - return "success"; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/build.xml deleted file mode 100644 index d84aa9517b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/jakartaEE.tokens deleted file mode 100644 index 4d96cfa565..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedwebservices.doclitservice.J2WDLShared -IMPL=com.sun.ts.tests.jaxws.sharedwebservices.doclitservice.J2WDLSharedEndpointImpl -SEI=com.sun.ts.tests.jaxws.sharedwebservices.doclitservice.J2WDLSharedEndpoint -NAMESPACEURI=http://doclitservice.org/wsdl -PORT=J2WDLSharedEndpointPort -URLALIAS=/jaxws/J2WDLShared -SERVLETNAME=com.sun.ts.tests.jaxws.sharedwebservices.doclitservice.J2WDLSharedEndpointImpl -WEBSERVICEDESCRIPTION=J2WDLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wdlshared -SERVICEREFNAMEWSEJB=service/wsj2wdlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdlshared diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/standalone-sun-jaxws.xml deleted file mode 100644 index bdf08f76e8..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/standalone.web.xml deleted file mode 100644 index a20b1c3ea0..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WDLSharedApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -J2WDLShared -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -J2WDLShared -/jaxws/J2WDLShared - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/DummyException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/DummyException.java deleted file mode 100644 index 83bf1d6b85..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/DummyException.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.faultservice; - -public class DummyException extends Exception { - - /** - * These dummy fields exist to testMessage Java -> WSDL mapping for - * Exceptions. JAXWS spec says that fields map to extra elements in the - * soap:Fault. Basic Profile R1000 says extra fields aren't allowed in - * soap:Faults - */ - private String dummyField1; - - private String dummyField2; - - public DummyException(String dummyField1, String dummyField2) { - super(); - this.dummyField1 = dummyField1; - this.dummyField2 = dummyField2; - } - - public String getDummyField1() { - return dummyField1; - } - - public void setDummyField1(String dummyField1) { - this.dummyField1 = dummyField1; - } - - public String getDummyField2() { - return dummyField2; - } - - public void setDummyField2(String dummyField2) { - this.dummyField2 = dummyField2; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/SoapFaultTest.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/SoapFaultTest.java deleted file mode 100644 index 1a8230044e..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/SoapFaultTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.faultservice; - -import java.rmi.ServerException; - -@jakarta.jws.WebService(targetNamespace = "http://faulttestservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -public interface SoapFaultTest { - public String alwaysThrowsException() throws DummyException; - - public String alwaysThrowsServerException() throws ServerException; - - public String alwaysThrowsSOAPFaultExceptionDetailNoChildren(); - - public String alwaysThrowsSOAPFaultExceptionDetailUnqualifiedChildren(); - - public String alwaysThrowsSOAPFaultExceptionDetailQualifiedChildren(); - - public String alwaysThrowsSOAPFaultExceptionDetailNoAttributes(); - - public String alwaysThrowsSOAPFaultExceptionDetailQualifiedAttributes(); -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/SoapFaultTestImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/SoapFaultTestImpl.java deleted file mode 100644 index 54adc0687d..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/SoapFaultTestImpl.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.faultservice; - -import jakarta.xml.ws.soap.SOAPFaultException; -import javax.xml.namespace.QName; -import jakarta.xml.soap.*; -import jakarta.xml.ws.WebServiceException; -import java.rmi.ServerException; - -@jakarta.jws.WebService(targetNamespace = "http://faulttestservice.org/wsdl", portName = "SoapFaultTestPort", serviceName = "FaultTest", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.faultservice.SoapFaultTest") -public class SoapFaultTestImpl implements SoapFaultTest { - public String alwaysThrowsException() throws DummyException { - throw new DummyException("dummyString1", "dummyString2"); - } - - public String alwaysThrowsServerException() throws ServerException { - throw new ServerException("alwaysThrowsServerException"); - } - - public String alwaysThrowsSOAPFaultExceptionDetailNoChildren() { - try { - SOAPFault sf = SOAPFactory.newInstance().createFault( - "This always throws a SOAPFaultException", new QName("Server")); - sf.setFaultActor("http://a.dummy.uri"); - sf.addDetail(); - throw new SOAPFaultException(sf); - } catch (SOAPException se) { - throw new WebServiceException(se.toString(), se); - } - } - - public String alwaysThrowsSOAPFaultExceptionDetailUnqualifiedChildren() { - try { - SOAPFault sf = SOAPFactory.newInstance().createFault( - "This always throws a SOAPFaultException", new QName("Server")); - sf.setFaultActor("http://a.dummy.uri"); - sf.addDetail(); - sf.getDetail().addDetailEntry(getName("dummyLocalName")); - throw new SOAPFaultException(sf); - } catch (SOAPException se) { - throw new WebServiceException(se.toString(), se); - } - } - - public String alwaysThrowsSOAPFaultExceptionDetailQualifiedChildren() { - try { - SOAPFault sf = SOAPFactory.newInstance().createFault( - "This always throws a SOAPFaultException", new QName("Server")); - sf.setFaultActor("http://a.dummy.uri"); - sf.addDetail(); - sf.getDetail().addDetailEntry( - getName("dummyLocalName", "dummyPrefix", "http://dummyURI.org")); - throw new SOAPFaultException(sf); - } catch (SOAPException se) { - throw new WebServiceException(se.toString(), se); - } - } - - public String alwaysThrowsSOAPFaultExceptionDetailNoAttributes() { - try { - SOAPFault sf = SOAPFactory.newInstance().createFault( - "This always throws a SOAPFaultException", new QName("Server")); - sf.setFaultActor("http://a.dummy.uri"); - sf.addDetail(); - throw new SOAPFaultException(sf); - } catch (SOAPException se) { - throw new WebServiceException(se.toString(), se); - } - } - - public String alwaysThrowsSOAPFaultExceptionDetailQualifiedAttributes() { - try { - SOAPFault sf = SOAPFactory.newInstance().createFault( - "This always throws a SOAPFaultException", new QName("Server")); - sf.setFaultActor("http://a.dummy.uri"); - sf.addDetail(); - sf.getDetail().addAttribute( - getName("dummyLocalName", "dummyPrefix", "http://dummyURI.org"), - "dummyValue"); - throw new SOAPFaultException(sf); - } catch (SOAPException se) { - throw new WebServiceException(se.toString(), se); - } - } - - private Name getName(String localName) throws SOAPException { - return getName(localName, null, null); - } - - private Name getName(String localName, String prefix, String uri) - throws SOAPException { - if (prefix == null && uri == null) { - return MessageFactory.newInstance().createMessage().getSOAPPart() - .getEnvelope().createName(localName); - } else { - return MessageFactory.newInstance().createMessage().getSOAPPart() - .getEnvelope().createName(localName, prefix, uri); - } - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/build.xml deleted file mode 100644 index a2c71390f7..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/build.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/jakartaEE.tokens deleted file mode 100644 index 5d1d89cc4d..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wfaulttest") -SERVICE=com.sun.ts.tests.jaxws.sharedwebservices.faultservice.FaultTest -IMPL=com.sun.ts.tests.jaxws.sharedwebservices.faultservice.SoapFaultTestImpl -SEI=com.sun.ts.tests.jaxws.sharedwebservices.faultservice.SoapFaultTest -NAMESPACEURI=http://faulttestservice.org/wsdl -PORT=SoapFaultTestPort -URLALIAS=/jaxws/FaultTest -SERVLETNAME=com.sun.ts.tests.jaxws.sharedwebservices.faultservice.SoapFaultTestImpl -WEBSERVICEDESCRIPTION=FaultTest -SERVICEREFNAMEWSSERVLET=service/wsj2wfaulttest -SERVICEREFNAMEWSEJB=service/wsj2wfaulttest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wfaulttest diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/jakartaEE.web.xml deleted file mode 100644 index cca584b368..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @WEBSERVICEDESCRIPTION@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/standalone-sun-jaxws.xml deleted file mode 100644 index cf2dd0567f..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/standalone.web.xml deleted file mode 100644 index 275599af1f..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WFaultServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -FaultTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -FaultTest -/jaxws/FaultTest - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/J2WRLSharedBean.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/J2WRLSharedBean.java deleted file mode 100644 index 02fcc9f637..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/J2WRLSharedBean.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rpclitservice; - -public class J2WRLSharedBean { - - private int myInt; - - private String myString; - - public J2WRLSharedBean() { - } - - public J2WRLSharedBean(int i, String s) { - setMyInt(i); - setMyString(s); - } - - public int getMyInt() { - return myInt; - } - - public void setMyInt(int myInt) { - this.myInt = myInt; - } - - public String getMyString() { - return myString; - } - - public void setMyString(String myString) { - this.myString = myString; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/J2WRLSharedEndpoint.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/J2WRLSharedEndpoint.java deleted file mode 100644 index 1d849a8ce2..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/J2WRLSharedEndpoint.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rpclitservice; - -@jakarta.jws.WebService(targetNamespace = "http://rpclitservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -public interface J2WRLSharedEndpoint { - - @jakarta.jws.WebMethod(operationName = "arrayOperationFromClient") - @jakarta.jws.WebResult(name = "return", targetNamespace = "http://rpclitservice.org/wsdl") - public java.lang.String arrayOperationFromClient( - @jakarta.jws.WebParam(name = "arg0") java.lang.String[] arg0); - - public com.sun.ts.tests.jaxws.sharedwebservices.rpclitservice.J2WRLSharedBean getBean(); - - public java.lang.String[] arrayOperation(); - - @jakarta.jws.WebMethod(operationName = "stringOperation") - @jakarta.jws.WebResult(name = "return", targetNamespace = "http://rpclitservice.org/wsdl") - public java.lang.String stringOperation( - @jakarta.jws.WebParam(name = "arg0") java.lang.String arg0); - - public java.lang.String helloWorld(); - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/J2WRLSharedEndpointImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/J2WRLSharedEndpointImpl.java deleted file mode 100644 index 68dca49355..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/J2WRLSharedEndpointImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rpclitservice; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "J2WRLSharedEndpointPort", serviceName = "J2WRLShared", targetNamespace = "http://rpclitservice.org/wsdl", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.rpclitservice.J2WRLSharedEndpoint") -public class J2WRLSharedEndpointImpl implements J2WRLSharedEndpoint { - public String helloWorld() { - return "hello world"; - } - - public String stringOperation(String param) { - return param; - } - - public String[] arrayOperation() { - return new String[] { "one", "two", "three" }; - } - - public J2WRLSharedBean getBean() { - return new J2WRLSharedBean(5, "A String"); - } - - public String arrayOperationFromClient(String[] array) { - return "success"; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/build.xml deleted file mode 100644 index 6b410ad535..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/jakartaEE.tokens deleted file mode 100644 index 9b0399181b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedwebservices.rpclitservice.J2WRLShared -IMPL=com.sun.ts.tests.jaxws.sharedwebservices.rpclitservice.J2WRLSharedEndpointImpl -SEI=com.sun.ts.tests.jaxws.sharedwebservices.rpclitservice.J2WRLSharedEndpoint -NAMESPACEURI=http://rpclitservice.org/wsdl -PORT=J2WRLSharedEndpointPort -URLALIAS=/jaxws/J2WRLShared -SERVLETNAME=com.sun.ts.tests.jaxws.sharedwebservices.rpclitservice.J2WRLSharedEndpointImpl -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/standalone-sun-jaxws.xml deleted file mode 100644 index 22d186c328..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/standalone.web.xml deleted file mode 100644 index 93b6c11337..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WRLSharedApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -J2WRLShared -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -J2WRLShared -/jaxws/J2WRLShared - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/ConformanceClaimHandler.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/ConformanceClaimHandler.java deleted file mode 100644 index 2a106637fc..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/ConformanceClaimHandler.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)ConformanceClaimHandler.java 1.1 03/04/15 - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.simpleservice; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; -import jakarta.xml.soap.*; -import java.util.*; -import com.sun.ts.tests.jaxws.wsi.constants.WSIConstants; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.Constants; - -public class ConformanceClaimHandler - implements SOAPHandler, WSIConstants { - public Set getHeaders() { - Set headers = new HashSet(); - headers.add(new QName(WSIConstants.WSI_CLAIM_NAMESPACE_URI, WSIConstants.WSI_CLAIM_LOCAL_NAME)); - return headers; - } - - public void init(Map config) { - } - - public void destroy() { - } - - public void close(MessageContext message) { - } - - public boolean handleMessage(SOAPMessageContext context) { - try { - if (Handler_Util.getDirection(context).equals(Constants.OUTBOUND)) - addConformanceClaims(context.getMessage()); - } catch (SOAPException se) { - com.sun.ts.lib.util.TestUtil.printStackTrace(se); - } - - return true; - } - - public boolean handleFault(SOAPMessageContext message) { - return true; - } - - private void addConformanceClaims(SOAPMessage message) throws SOAPException { - addBP10ConformanceClaim(message); - addDummyConformanceClaim(message); - } - - private void addBP10ConformanceClaim(SOAPMessage message) - throws SOAPException { - SOAPEnvelope env = message.getSOAPPart().getEnvelope(); - SOAPHeader conformanceClaim = getHeader(env); - Name claimName = env.createName(WSIConstants.WSI_CLAIM_LOCAL_NAME, WSIConstants.WSI_CLAIM_PREFIX, - WSIConstants.WSI_CLAIM_NAMESPACE_URI); - SOAPHeaderElement claim = conformanceClaim.addHeaderElement(claimName); - claim.addAttribute(env.createName(WSIConstants.WSI_CLAIM_CONFORMS_TO_ATTR), - WSIConstants.WSI_CLAIM_CONFORMS_TO_VALUE); - message.saveChanges(); - } - - private void addDummyConformanceClaim(SOAPMessage message) - throws SOAPException { - SOAPEnvelope env = message.getSOAPPart().getEnvelope(); - SOAPHeader conformanceClaim = getHeader(env); - Name claimName = env.createName(WSIConstants.WSI_CLAIM_LOCAL_NAME, WSIConstants.WSI_CLAIM_PREFIX, - WSIConstants.WSI_CLAIM_NAMESPACE_URI); - SOAPHeaderElement claim = conformanceClaim.addHeaderElement(claimName); - claim.addAttribute(env.createName(WSIConstants.WSI_CLAIM_CONFORMS_TO_ATTR), - "http://dummy/conformanceClaim"); - message.saveChanges(); - } - - private SOAPHeader getHeader(SOAPEnvelope env) throws SOAPException { - SOAPHeader header = env.getHeader(); - if (header != null) { - return header; - } else { - return env.addHeader(); - } - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/SimpleBean.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/SimpleBean.java deleted file mode 100644 index cf524a4a59..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/SimpleBean.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.simpleservice; - -public class SimpleBean { - - private int myInt; - - private String myString; - - public SimpleBean() { - } - - public SimpleBean(int i, String s) { - setMyInt(i); - setMyString(s); - } - - public int getMyInt() { - return myInt; - } - - public void setMyInt(int myInt) { - this.myInt = myInt; - } - - public String getMyString() { - return myString; - } - - public void setMyString(String myString) { - this.myString = myString; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/SimpleEndpoint.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/SimpleEndpoint.java deleted file mode 100644 index 626086eab9..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/SimpleEndpoint.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.simpleservice; - -@jakarta.jws.WebService(targetNamespace = "http://simpletestservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -public interface SimpleEndpoint { - public String helloWorld(); - - public void oneWayOperation(); - - @jakarta.jws.WebMethod(operationName = "overloadedOperation") - @jakarta.jws.WebResult(name = "return", targetNamespace = "http://simpletestservice.org/wsdl") - public java.lang.String overloadedOperation( - @jakarta.jws.WebParam(name = "arg0") java.lang.String arg0); - - @jakarta.jws.WebMethod(operationName = "overloadedOperation2") - @jakarta.jws.WebResult(name = "return", targetNamespace = "http://simpletestservice.org/wsdl") - public java.lang.String overloadedOperation( - @jakarta.jws.WebParam(name = "arg0") java.lang.String arg0, - @jakarta.jws.WebParam(name = "arg1") java.lang.String arg1); - - public String[] arrayOperation(); - - public SimpleBean getBean(); - - @jakarta.jws.WebMethod(operationName = "arrayOperationFromClient") - @jakarta.jws.WebResult(name = "return", targetNamespace = "http://simpletestservice.org/wsdl") - public java.lang.String arrayOperationFromClient( - @jakarta.jws.WebParam(name = "arg0") java.lang.String[] arg0); - - @jakarta.jws.WebMethod(operationName = "holderOperation") - @jakarta.jws.WebResult(name = "return", targetNamespace = "http://simpletestservice.org/wsdl") - public java.lang.String holderOperation( - @jakarta.jws.WebParam(name = "arg0", mode = jakarta.jws.WebParam.Mode.INOUT) jakarta.xml.ws.Holder arg0, - @jakarta.jws.WebParam(name = "arg1", mode = jakarta.jws.WebParam.Mode.INOUT) jakarta.xml.ws.Holder arg1); -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/SimpleEndpointImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/SimpleEndpointImpl.java deleted file mode 100644 index fbbe2b7c02..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/SimpleEndpointImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.simpleservice; - -@jakarta.jws.WebService(targetNamespace = "http://simpletestservice.org/wsdl", serviceName = "SimpleTest", portName = "SimpleEndpointPort", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.simpleservice.SimpleEndpoint") -public class SimpleEndpointImpl implements SimpleEndpoint { - public String helloWorld() { - return "hello world"; - } - - public void oneWayOperation() { - } - - public String overloadedOperation(String param) { - return param; - } - - public String overloadedOperation(String param, String param2) { - return param + param2; - } - - public String[] arrayOperation() { - return new String[] { "one", "two", "three" }; - } - - public SimpleBean getBean() { - SimpleBean sb = new SimpleBean(); - sb.setMyInt(5); - sb.setMyString("A String"); - return sb; - } - - public String arrayOperationFromClient(String[] array) { - return "success"; - } - - public String holderOperation(jakarta.xml.ws.Holder holder1, - jakarta.xml.ws.Holder holder2) { - return "success"; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/build.xml deleted file mode 100644 index 2bdcbb7042..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/customfile.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/customfile.xml deleted file mode 100644 index cfe5722edc..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/customfile.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - ConformanceClaimHandler - com.sun.ts.tests.jaxws.sharedwebservices.simpleservice.ConformanceClaimHandler - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/jakartaEE.tokens deleted file mode 100644 index 940b5ae419..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wsimpletest") -SERVICE=com.sun.ts.tests.jaxws.sharedwebservices.simpleservice.SimpleTest -IMPL=com.sun.ts.tests.jaxws.sharedwebservices.simpleservice.SimpleEndpointImpl -SEI=com.sun.ts.tests.jaxws.sharedwebservices.simpleservice.SimpleEndpoint -NAMESPACEURI=http://simpletestservice.org/wsdl -PORT=SimpleEndpointPort -URLALIAS=/jaxws/SimpleTest -SERVLETNAME=com.sun.ts.tests.jaxws.sharedwebservices.simpleservice.SimpleEndpointImpl -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/wsj2wsimpletest -SERVICEREFNAMEWSEJB=service/wsj2wsimpletest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wsimpletest diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/standalone-sun-jaxws.xml deleted file mode 100644 index 1b1c704476..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/standalone.web.xml deleted file mode 100644 index d1f85ef153..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WSimpleServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -SimpleTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -SimpleTest -/jaxws/SimpleTest - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/ActionNotSupportedException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/ActionNotSupportedException.java deleted file mode 100644 index b5d4898b08..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/ActionNotSupportedException.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import jakarta.xml.ws.WebServiceException; - -public class ActionNotSupportedException extends WebServiceException { - String detail; - - public ActionNotSupportedException(String message) { - super(message); - } - - public ActionNotSupportedException(String message, String detail) { - super(message); - this.detail = detail; - } - - public String getDetail() { - return detail; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingConstants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingConstants.java deleted file mode 100644 index dac8ebf04e..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingConstants.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -public interface AddressingConstants { - public static final String CLIENT_INBOUND = "client.inbound"; - - public static final String CLIENT_OUTBOUND = "client.outbound"; - - public static final String SERVER_INBOUND = "server.inbound"; - - public static final String SERVER_OUTBOUND = "server.outbound"; -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingHeaderException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingHeaderException.java deleted file mode 100644 index ac656cb142..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingHeaderException.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import jakarta.xml.ws.WebServiceException; - -public class AddressingHeaderException extends WebServiceException { - String detail; - - public AddressingHeaderException(String message) { - super(message); - } - - public AddressingHeaderException(String message, String detail) { - super(message); - this.detail = detail; - } - - public String getDetail() { - return detail; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingPropertyException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingPropertyException.java deleted file mode 100644 index 59a97c290b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingPropertyException.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import jakarta.xml.ws.WebServiceException; - -public class AddressingPropertyException extends WebServiceException { - String detail; - - public AddressingPropertyException(String message) { - super(message); - } - - public AddressingPropertyException(String message, String detail) { - super(message); - this.detail = detail; - } - - public String getDetail() { - return detail; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/ByteArrayBuffer.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/ByteArrayBuffer.java deleted file mode 100644 index 56c80efe3e..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/ByteArrayBuffer.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ByteArrayBuffer.java 51075 2003-03-27 10:44:21Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -public class ByteArrayBuffer extends OutputStream { - /** - * The buffer where data is stored. - */ - protected byte[] buf; - - /** - * The number of valid bytes in the buffer. - */ - private int count; - - /** - * Creates a new byte array output stream. The buffer capacity is initially 32 - * bytes, though its size increases if necessary. - */ - public ByteArrayBuffer() { - this(32); - } - - /** - * Creates a new byte array output stream, with a buffer capacity of the - * specified size, in bytes. - * - * @param size - * the initial size. - * @throws IllegalArgumentException - * if size is negative. - */ - public ByteArrayBuffer(int size) { - if (size <= 0) - throw new IllegalArgumentException(); - buf = new byte[size]; - } - - public ByteArrayBuffer(byte[] data) { - this.buf = data; - } - - /** - * Reads all the data of the given {@link InputStream} and appends them into - * this buffer. - * - * @throws IOException - * if the read operation fails with an {@link IOException}. - */ - public final void write(InputStream in) throws IOException { - while (true) { - int cap = buf.length - count; // the remaining buffer space - int sz = in.read(buf, count, cap); - if (sz < 0) - return; // hit EOS - count += sz; - - if (cap == sz) - ensureCapacity(buf.length * 2); // buffer filled up. - } - } - - public final void write(int b) { - int newcount = count + 1; - ensureCapacity(newcount); - buf[count] = (byte) b; - count = newcount; - } - - public final void write(byte b[], int off, int len) { - int newcount = count + len; - ensureCapacity(newcount); - System.arraycopy(b, off, buf, count, len); - count = newcount; - } - - private void ensureCapacity(int newcount) { - if (newcount > buf.length) { - byte newbuf[] = new byte[Math.max(buf.length << 1, newcount)]; - System.arraycopy(buf, 0, newbuf, 0, count); - buf = newbuf; - } - } - - public final void writeTo(OutputStream out) throws IOException { - out.write(buf, 0, count); - } - - public final void reset() { - count = 0; - } - - /** - * Gets the copy of exact-size byte[] that represents the written data. - * - *

- * Since this method needs to allocate a new byte[], this method will be - * costly. - * - * @deprecated this method causes a buffer reallocation. Use it only when you - * have to. - */ - public final byte[] toByteArray() { - byte newbuf[] = new byte[count]; - System.arraycopy(buf, 0, newbuf, 0, count); - return newbuf; - } - - public final int size() { - return count; - } - - /** - * Gets the underlying buffer that this {@link ByteArrayBuffer} uses. It's - * never small than its {@link #size()}. - * - * Use with caution. - */ - public final byte[] getRawData() { - return buf; - } - - public void close() throws IOException { - } - - /** - * Creates a new {@link InputStream} that reads from this buffer. - */ - public final InputStream newInputStream() { - return new ByteArrayInputStream(buf, 0, count); - } - - /** - * Creates a new {@link InputStream} that reads a part of this bfufer. - */ - public final InputStream newInputStream(int start, int length) { - return new ByteArrayInputStream(buf, start, length); - } - - /** - * Decodes the contents of this buffer by the default encoding and returns it - * as a string. - * - *

- * Meant to aid debugging, but no more. - */ - public String toString() { - return new String(buf, 0, count); - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/DOMUtil.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/DOMUtil.java deleted file mode 100644 index 52a4fb20cb..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/DOMUtil.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: DOMUtil.java 51109 2006-09-28 15:28:12Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import org.w3c.dom.Document; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; -import org.xml.sax.SAXException; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.FactoryConfigurationError; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamWriter; -import javax.xml.XMLConstants; -import javax.xml.namespace.NamespaceContext; -import java.io.IOException; -import java.io.InputStream; -import java.util.Iterator; - -public class DOMUtil { - - private static DocumentBuilder db; - - /** - * Creates a new DOM document. - */ - public static Document createDom() { - synchronized (DOMUtil.class) { - if (db == null) { - try { - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - db = dbf.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - throw new FactoryConfigurationError(e); - } - } - return db.newDocument(); - } - } - - public static Node createDOMNode(InputStream inputStream) { - - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - dbf.setValidating(false); - try { - DocumentBuilder builder = dbf.newDocumentBuilder(); - try { - return builder.parse(inputStream); - } catch (SAXException e) { - e.printStackTrace(); // To change body of catch statement use File | - // Settings | File Templates. - } catch (IOException e) { - e.printStackTrace(); // To change body of catch statement use File | - // Settings | File Templates. - } - } catch (ParserConfigurationException pce) { - IllegalArgumentException iae = new IllegalArgumentException( - pce.getMessage()); - iae.initCause(pce); - throw iae; - } - return null; - } - - /** - * Traverses a DOM node and writes out on a streaming writer. - * - * @param node - * @param writer - */ - public static void serializeNode(Element node, XMLStreamWriter writer) - throws XMLStreamException { - String nodePrefix = fixNull(node.getPrefix()); - String nodeNS = fixNull(node.getNamespaceURI()); - - // See if nodePrefix:nodeNS is declared in writer's NamespaceContext before - // writing start element - // Writing start element puts nodeNS in NamespaceContext even though - // namespace declaration not written - boolean prefixDecl = isPrefixDeclared(writer, nodeNS, nodePrefix); - - writer.writeStartElement(nodePrefix, node.getLocalName(), nodeNS); - - if (node.hasAttributes()) { - NamedNodeMap attrs = node.getAttributes(); - int numOfAttributes = attrs.getLength(); - // write namespace declarations first. - // if we interleave this with attribue writing, - // Zephyr will try to fix it and we end up getting inconsistent namespace - // bindings. - for (int i = 0; i < numOfAttributes; i++) { - Node attr = attrs.item(i); - String nsUri = fixNull(attr.getNamespaceURI()); - if (nsUri.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) { - // handle default ns declarations - String local = attr.getLocalName() - .equals(XMLConstants.XMLNS_ATTRIBUTE) ? "" : attr.getLocalName(); - if (local.equals(nodePrefix) && attr.getNodeValue().equals(nodeNS)) { - prefixDecl = true; - } - // this is a namespace declaration, not an attribute - writer.setPrefix(attr.getLocalName(), attr.getNodeValue()); - writer.writeNamespace(attr.getLocalName(), attr.getNodeValue()); - } - } - } - // node's namespace is not declared as attribute, but declared on ancestor - if (!prefixDecl) { - writer.writeNamespace(nodePrefix, nodeNS); - } - - // Write all other attributes which are not namespace decl. - if (node.hasAttributes()) { - NamedNodeMap attrs = node.getAttributes(); - int numOfAttributes = attrs.getLength(); - - for (int i = 0; i < numOfAttributes; i++) { - Node attr = attrs.item(i); - String attrPrefix = fixNull(attr.getPrefix()); - String attrNS = fixNull(attr.getNamespaceURI()); - if (!attrNS.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) { - String localName = attr.getLocalName(); - if (localName == null) { - // TODO: this is really a bug in the caller for not creating proper - // DOM tree. - // will remove this workaround after plugfest - localName = attr.getNodeName(); - } - boolean attrPrefixDecl = isPrefixDeclared(writer, attrNS, attrPrefix); - if (!attrPrefix.equals("") && !attrPrefixDecl) { - // attr has namespace but namespace decl is there in ancestor node - // So write the namespace decl before writing the attr - writer.setPrefix(attr.getLocalName(), attr.getNodeValue()); - writer.writeNamespace(attrPrefix, attrNS); - } - writer.writeAttribute(attrPrefix, attrNS, localName, - attr.getNodeValue()); - } - } - } - - if (node.hasChildNodes()) { - NodeList children = node.getChildNodes(); - for (int i = 0; i < children.getLength(); i++) { - Node child = children.item(i); - switch (child.getNodeType()) { - case Node.PROCESSING_INSTRUCTION_NODE: - writer.writeProcessingInstruction(child.getNodeValue()); - break; - case Node.DOCUMENT_TYPE_NODE: - break; - case Node.CDATA_SECTION_NODE: - writer.writeCData(child.getNodeValue()); - break; - case Node.COMMENT_NODE: - writer.writeComment(child.getNodeValue()); - break; - case Node.TEXT_NODE: - writer.writeCharacters(child.getNodeValue()); - break; - case Node.ELEMENT_NODE: - serializeNode((Element) child, writer); - break; - } - } - } - writer.writeEndElement(); - } - - private static boolean isPrefixDeclared(XMLStreamWriter writer, String nsUri, - String prefix) { - boolean prefixDecl = false; - NamespaceContext nscontext = writer.getNamespaceContext(); - Iterator prefixItr = nscontext.getPrefixes(nsUri); - while (prefixItr.hasNext()) { - if (prefix.equals(prefixItr.next())) { - prefixDecl = true; - break; - } - } - return prefixDecl; - } - - /** - * Gets the first child of the given name, or null. - */ - public static Element getFirstChild(Element e, String nsUri, String local) { - for (Node n = e.getFirstChild(); n != null; n = n.getNextSibling()) { - if (n.getNodeType() == Node.ELEMENT_NODE) { - Element c = (Element) n; - if (c.getLocalName().equals(local) && c.getNamespaceURI().equals(nsUri)) - return c; - } - } - return null; - } - - private static String fixNull(String s) { - if (s == null) - return ""; - else - return s; - } - - /** - * Gets the first element child. - */ - public static Element getFirstElementChild(Node parent) { - for (Node n = parent.getFirstChild(); n != null; n = n.getNextSibling()) { - if (n.getNodeType() == Node.ELEMENT_NODE) { - return (Element) n; - } - } - return null; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/EprUtil.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/EprUtil.java deleted file mode 100644 index d8122f8094..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/EprUtil.java +++ /dev/null @@ -1,392 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: EprUtil.java 51075 2003-03-27 10:44:21Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import com.sun.ts.lib.util.*; - -import org.w3c.dom.Node; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import jakarta.xml.ws.EndpointReference; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import javax.xml.transform.dom.DOMResult; -import javax.xml.namespace.QName; - -import com.sun.ts.tests.jaxws.common.XMLUtils; - -public class EprUtil { - private static final String FAILED = "FAILED"; - - private static final String W3C_WSA_NS = "http://www.w3.org/2005/08/addressing"; - - private static final String W3C_WSAM_NS = "http://www.w3.org/2007/05/addressing/metadata"; - - private static final String MS_EPR_NS = "http://schemas.xmlsoap.org/ws/2004/08/addressing"; - - private static final QName WSDL_DEFINITIONS_NAME = new QName( - "http://schemas.xmlsoap.org/wsdl/", "definitions"); - - private static boolean debug = false; - - public static boolean validateEPR(Node node, Class epr, - String endpointAddress, QName serviceName, QName portName, - QName portTypeName, boolean hasWSDL, String wsdlLocation) { - boolean pass1 = validateEPR(node, epr, endpointAddress, serviceName, - portName, portTypeName, hasWSDL); - boolean pass2 = validateWsdlLocation(node, wsdlLocation); - if (pass1 && pass2) - return true; - else - return false; - } - - public static boolean validateEPR(Node node, Class epr, - String endpointAddress, QName serviceName, QName portName, - QName portTypeName, boolean hasWSDL) { - - boolean pass = true; - - if (node.getNodeType() == Node.DOCUMENT_NODE) - node = node.getFirstChild(); - - if (endpointAddress != null) - TestUtil.logMsg("EndpointAddress=" + endpointAddress); - if (serviceName != null) - TestUtil.logMsg("ServiceName=" + serviceName.getLocalPart()); - if (portName != null) - TestUtil.logMsg("PortName=" + portName.getLocalPart()); - if (portTypeName != null) - TestUtil.logMsg("PortTypeName=" + portTypeName.getLocalPart()); - if (hasWSDL) - TestUtil.logMsg("WSDL=" + hasWSDL); - TestUtil.logMsg("EPR class=" + epr); - - if (epr.isAssignableFrom(W3CEndpointReference.class)) { - TestUtil.logMsg("Verify element"); - if (!node.getNamespaceURI().equals(W3C_WSA_NS)) { - TestUtil.logErr("Incorrect namespace uri, got: " - + node.getNamespaceURI() + " expected: " + W3C_WSA_NS); - pass = false; - } - if (!node.getLocalName().equals("EndpointReference")) { - TestUtil.logErr("Incorrect element name, got: " + node.getLocalName() - + " expected: EndpointReference"); - pass = false; - } - - if (endpointAddress == null) - return pass; - - Element elm = (Element) node; - Element add = DOMUtil.getFirstElementChild(node); - String value = XmlUtil.getTextForNode(add); - TestUtil.logMsg("Verify

element"); - if (!value.equals(endpointAddress)) { - TestUtil.logErr("Incorrect endpoint address, got: " + value - + " expected: " + endpointAddress); - pass = false; - } - if (serviceName == null && portName == null && !hasWSDL) { - // Need not check metadata - return pass; - } - TestUtil.logMsg("Verify the EPR MetaData"); - NodeList nl = elm.getElementsByTagNameNS(W3C_WSA_NS, "Metadata"); - if (nl.getLength() != 1) { - TestUtil.logErr("Could not find "); - return false; - } - Element metdata = (Element) nl.item(0); - String qname; - String prefix; - String name; - String ns; - // service - if (serviceName != null) { - TestUtil.logMsg("Verify element"); - nl = metdata.getElementsByTagNameNS(W3C_WSAM_NS, "ServiceName"); - if (nl.getLength() != 1) { - TestUtil.logErr("Could not find in "); - return false; - } - Node service = nl.item(0); - qname = XmlUtil.getTextForNode(service); - prefix = XmlUtil.getPrefix(qname); - name = XmlUtil.getLocalPart(qname); - ns = service.lookupNamespaceURI(prefix); - if (debug) - XMLUtils.xmlDumpDOMNodes(service); - if (debug) - TestUtil.logMsg( - "prefix=" + prefix + " localPart=" + name + " namespace=" + ns); - if (!serviceName.getNamespaceURI().equals(ns)) { - TestUtil.logErr("Incorrect namespace uri, got: " + ns + " expected: " - + serviceName.getNamespaceURI()); - pass = false; - if (ns == null || ns.equals("")) - TestUtil - .logErr("Namespace uri is null for QName element: " + qname); - } - if (!serviceName.getLocalPart().equals(name)) { - TestUtil.logErr("Incorrect service name, got: " - + serviceName.getLocalPart() + " expected: " + name); - pass = false; - } - // port - if (portName != null) { - TestUtil.logMsg("Verify element"); - String port = ((Element) service).getAttribute("EndpointName"); - prefix = XmlUtil.getPrefix(port); - name = XmlUtil.getLocalPart(port); - ns = service.lookupNamespaceURI(prefix); - if (debug) - TestUtil.logMsg( - "prefix=" + prefix + " localPart=" + name + " namespace=" + ns); - if (!portName.getLocalPart().equals(name)) { - TestUtil.logErr("Incorrect port name, got: " + name + " expected: " - + portName.getLocalPart()); - pass = false; - } - } - } - - if (hasWSDL) { - // validate portType only if it is present - TestUtil.logMsg("Verify element"); - nl = metdata.getElementsByTagNameNS(W3C_WSAM_NS, "InterfaceName"); - if (nl.getLength() != 1) { - TestUtil.logMsg( - "The element is not present in "); - return true; - } - Node portType = nl.item(0); - qname = XmlUtil.getTextForNode(portType); - prefix = XmlUtil.getPrefix(qname); - name = XmlUtil.getLocalPart(qname); - ns = portType.lookupNamespaceURI(prefix); - if (debug) - XMLUtils.xmlDumpDOMNodes(portType); - if (debug) - TestUtil.logMsg( - "prefix=" + prefix + " localPart=" + name + " namespace=" + ns); - if (!portTypeName.getNamespaceURI().equals(ns)) { - TestUtil.logErr("Incorrect namespace uri, got: " + ns + " expected:" - + portTypeName.getNamespaceURI()); - pass = false; - if (ns == null || ns.equals("")) - TestUtil - .logErr("Namespace uri is null for QName element: " + qname); - } - if (!portTypeName.getLocalPart().equals(name)) { - TestUtil.logErr("Incorrect port type name, got: " + name - + " expected:" + portTypeName.getLocalPart()); - pass = false; - } - - // validate WSDL - nl = metdata.getElementsByTagNameNS( - WSDL_DEFINITIONS_NAME.getNamespaceURI(), - WSDL_DEFINITIONS_NAME.getLocalPart()); - Node wsdl = nl.item(0); - // TODO:What else to do to validate this WSDL? - } - return pass; - } else if (epr.isAssignableFrom(MemberSubmissionEndpointReference.class)) { - TestUtil.logMsg("Verify element"); - if (!node.getNamespaceURI().equals(MS_EPR_NS)) { - TestUtil.logErr("Incorrect namespace uri, got: " - + node.getNamespaceURI() + " expected: " + MS_EPR_NS); - pass = false; - } - if (!node.getLocalName().equals("EndpointReference")) { - TestUtil.logErr("Incorrect element name, got: " + node.getLocalName() - + " expected: EndpointReference"); - pass = false; - } - - Element elm = (Element) node; - Element add = DOMUtil.getFirstElementChild(node); - String value = XmlUtil.getTextForNode(add); - TestUtil.logMsg("Verify
element"); - if (!value.equals(endpointAddress)) { - TestUtil.logErr("Incorrect endpoint address, got: " + value - + " expected: " + endpointAddress); - pass = false; - } - NodeList nl; - String qname; - String prefix; - String name; - String ns; - // service - if (serviceName != null) { - TestUtil.logMsg("Verify element"); - nl = elm.getElementsByTagNameNS(MS_EPR_NS, "ServiceName"); - if (nl.getLength() != 1) { - TestUtil.logErr("Could not find in "); - return false; - } - Node service = nl.item(0); - qname = XmlUtil.getTextForNode(service); - prefix = XmlUtil.getPrefix(qname); - name = XmlUtil.getLocalPart(qname); - ns = service.lookupNamespaceURI(prefix); - if (!serviceName.getNamespaceURI().equals(ns)) { - TestUtil.logErr("Incorrect namespace uri, got: " + ns + " expected: " - + serviceName.getNamespaceURI()); - pass = false; - if (ns == null || ns.equals("")) - TestUtil - .logErr("Namespace uri is null for QName element: " + qname); - } - if (!serviceName.getLocalPart().equals(name)) { - TestUtil.logErr("Incorrect service name, got: " - + serviceName.getLocalPart() + " expected: " + name); - pass = false; - } - // port - if (portName != null) { - TestUtil.logMsg("Verify element"); - String port = ((Element) service).getAttribute("PortName"); - if (!portName.getLocalPart().equals(port)) { - TestUtil.logErr("Incorrect port name, got: " + port + " expected:" - + portName.getLocalPart()); - pass = false; - } - } - } - - if (hasWSDL) { - // validate portType - TestUtil.logMsg("Verify element"); - nl = elm.getElementsByTagNameNS(MS_EPR_NS, "PortType"); - if (nl.getLength() != 1) { - TestUtil.logMsg( - "The element is not present in "); - return true; - } - Node portType = nl.item(0); - qname = XmlUtil.getTextForNode(portType); - prefix = XmlUtil.getPrefix(qname); - name = XmlUtil.getLocalPart(qname); - ns = portType.lookupNamespaceURI(prefix); - if (!portTypeName.getNamespaceURI().equals(ns)) { - TestUtil.logErr("Incorrect namespace uri, got: " + ns + " expected:" - + portTypeName.getNamespaceURI()); - pass = false; - if (ns == null || ns.equals("")) - TestUtil - .logErr("Namespace uri is null for QName element: " + qname); - } - if (!portTypeName.getLocalPart().equals(name)) { - TestUtil.logErr("Incorrect port type name, got: " + name - + " expected:" + portTypeName.getLocalPart()); - pass = false; - } - } - if (hasWSDL) { - // validate WSDL - nl = elm.getElementsByTagNameNS(WSDL_DEFINITIONS_NAME.getNamespaceURI(), - WSDL_DEFINITIONS_NAME.getLocalPart()); - Node wsdl = nl.item(0); - // TODO:What else to do to validate this WSDL? - } - - return pass; - } - return false; - } - - public static boolean validateEPR(EndpointReference epr, - String endpointAddress, QName serviceName, QName portName, - QName portTypeName, boolean hasWSDL) { - if (epr != null) { - DOMResult dr = new DOMResult(); - epr.writeTo(dr); - Node node = dr.getNode(); - return validateEPR(node, epr.getClass(), endpointAddress, serviceName, - portName, portTypeName, hasWSDL); - } else - return false; - } - - public static boolean validateEPR(EndpointReference epr, - String endpointAddress, QName serviceName, QName portName, - QName portTypeName, boolean hasWSDL, String wsdlLocation) { - if (epr != null) { - DOMResult dr = new DOMResult(); - epr.writeTo(dr); - Node node = dr.getNode(); - return validateEPR(node, epr.getClass(), endpointAddress, serviceName, - portName, portTypeName, hasWSDL, wsdlLocation); - } else - return false; - } - - public static boolean validateReferenceParameter(Node n, String refParamName, - String refParamValue) { - TestUtil.logMsg("Verify Reference Parameter " + refParamName - + " with value " + refParamValue); - String actual = XMLUtils.getNodeValue_(n, refParamName); - if ((actual != null) && (actual.equals(refParamValue))) { - return true; - } else { - return false; - } - } - - public static boolean validateWsdlLocation(Node n, String wsdlLocation) { - TestUtil.logMsg( - "Verify attribute with value of " + wsdlLocation); - Node node1 = XMLUtils.findNode_(n, "Metadata"); - String actual = XMLUtils.getAttrValue_(node1, "wsdlLocation", wsdlLocation); - if (debug) { - TestUtil.logMsg("wsdlLocation=" + wsdlLocation); - TestUtil.logMsg("actual=" + actual); - } - if (actual != null) { - int index = wsdlLocation.indexOf('?'); - if (index != -1) { - wsdlLocation = wsdlLocation.substring(0, index) - + wsdlLocation.substring(index).toUpperCase(); - } - index = actual.indexOf('?'); - if (index != -1) { - actual = actual.substring(0, index) - + actual.substring(index).toUpperCase(); - } - } - if ((actual != null) && (actual.indexOf(wsdlLocation) != -1)) { - return true; - } - /***** - * WE DON'T NEED TO SEARCH for wsdl:import TestUtil.logMsg("Search - * wsdl:import element for location attribute"); Node node2 = - * XMLUtils.findNode_(n, "import"); actual = XMLUtils.getAttrValue_(node2, - * "location", wsdlLocation); if((actual != null) && - * (actual.indexOf(wsdlLocation) != -1)){ return true; - *****/ - TestUtil.logErr(" attribute with value of '" + wsdlLocation - + "' was not found"); - return false; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MapException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MapException.java deleted file mode 100644 index 203e69ccd5..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MapException.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: MapException.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import jakarta.xml.ws.WebServiceException; -import javax.xml.namespace.QName; - -public class MapException extends WebServiceException { - QName name; - - public MapException(QName name) { - this.name = name; - } - - public QName getMapQName() { - return name; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MapRequiredException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MapRequiredException.java deleted file mode 100644 index 65897467e2..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MapRequiredException.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: MapRequiredException.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import jakarta.xml.ws.WebServiceException; -import javax.xml.namespace.QName; - -public class MapRequiredException extends WebServiceException { - QName name; - - public MapRequiredException(QName name) { - this.name = name; - } - - public QName getMapQName() { - return name; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MemberSubmissionAddressingConstants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MemberSubmissionAddressingConstants.java deleted file mode 100644 index d8621865ef..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MemberSubmissionAddressingConstants.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import javax.xml.namespace.QName; - -public interface MemberSubmissionAddressingConstants { - public static final String WSA_NAMESPACE_NAME = "http://schemas.xmlsoap.org/ws/2004/08/addressing"; - - public static final String WSA_NAMESPACE_WSDL_NAME = WSA_NAMESPACE_NAME; - - public static final String WSA_NAMESPACE_POLICY_NAME = "http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"; - - public static final String WSA_NAMESPACE_PREFIX = "wsa"; - - public static final String WSA_NAMESPACE_WSDL_PREFIX = "wsa"; - - public static final String WSA_SERVICENAME_NAME = "ServiceName"; - - public static final String WSA_PORTTYPE_NAME = "PortType"; - - public static final String WSA_PORTNAME_NAME = "PortName"; - - public static final String WSA_REFERENCEPROPERTIES_NAME = "ReferenceProperties"; - - public static final QName WSA_REFERENCEPROPERTIES_QNAME = new QName( - WSA_NAMESPACE_NAME, WSA_REFERENCEPROPERTIES_NAME); - - public static final String WSA_REFERENCEPARAMETERS_NAME = "ReferenceParameters"; - - public static final QName WSA_REFERENCEPARAMETERS_QNAME = new QName( - WSA_NAMESPACE_NAME, WSA_REFERENCEPARAMETERS_NAME); - - public static final String WSA_ISREFPARAM_NAME = "isReferenceParameter"; - - public static final QName WSA_ISREFPARAM_QNAME = new QName(WSA_NAMESPACE_NAME, - WSA_ISREFPARAM_NAME); - - public static final String WSA_ADDRESS_NAME = "Address"; - - public static final QName WSA_ADDRESS_QNAME = new QName(WSA_NAMESPACE_NAME, - WSA_ADDRESS_NAME); - - public static final String WSA_METADATA_NAME = WSA_REFERENCEPARAMETERS_NAME; - - public static final QName WSA_METADATA_QNAME = new QName(WSA_NAMESPACE_NAME, - WSA_METADATA_NAME); - - public static final QName WSA_FROM_QNAME = new QName(WSA_NAMESPACE_NAME, - "From"); - - public static final QName WSA_TO_QNAME = new QName(WSA_NAMESPACE_NAME, "To"); - - public static final QName WSA_REPLYTO_QNAME = new QName(WSA_NAMESPACE_NAME, - "ReplyTo"); - - public static final QName WSA_FAULTTO_QNAME = new QName(WSA_NAMESPACE_NAME, - "FaultTo"); - - public static final QName WSA_ACTION_QNAME = new QName(WSA_NAMESPACE_NAME, - "Action"); - - public static final QName WSA_MESSAGEID_QNAME = new QName(WSA_NAMESPACE_NAME, - "MessageID"); - - public static final QName IS_REFERENCE_PARAMETER_QNAME = new QName( - WSA_NAMESPACE_NAME, "IsReferenceParameter"); - - public static final String WSA_RELATIONSHIP_REPLY = WSA_NAMESPACE_NAME - + "/reply"; - - public static final QName WSA_RELATESTO_QNAME = new QName(WSA_NAMESPACE_NAME, - "RelatesTo"); - - public static final QName WSA_RELATIONSHIPTYPE_QNAME = new QName( - WSA_NAMESPACE_NAME, "RelationshipType"); - - public static final String WSA_ANONYMOUS_ADDRESS = WSA_NAMESPACE_NAME - + "/role/anonymous"; - - public static final String WSA_NONE_ADDRESS = ""; - - public static final String WSA_DEFAULT_FAULT_ACTION = WSA_NAMESPACE_NAME - + "/fault"; - - public static final String WSAW_ACTION_NAME = "Action"; - - public static final QName WSAW_ACTION_QNAME = new QName( - WSA_NAMESPACE_WSDL_NAME, WSAW_ACTION_NAME); - - public static final String WSAW_USING_ADDRESSING_NAME = "UsingAddressing"; - - public static final QName WSAW_USING_ADDRESSING_QNAME = new QName( - WSA_NAMESPACE_WSDL_NAME, WSAW_USING_ADDRESSING_NAME); - - public static final String WSDL_INSTANCE_NAMESPACE_NAME = "http://www.w3.org/2004/08/wsdl-instance"; - - public static final QName INVALID_MAP_QNAME = new QName(WSA_NAMESPACE_NAME, - "InvalidMessageInformationHeader"); - - public static final QName MAP_REQUIRED_QNAME = new QName(WSA_NAMESPACE_NAME, - "MessageInformationHeaderRequired"); - - public static final QName DESTINATION_UNREACHABLE_QNAME = new QName( - WSA_NAMESPACE_NAME, "DestinationUnreachable"); - - public static final QName ACTION_NOT_SUPPORTED_QNAME = new QName( - WSA_NAMESPACE_NAME, "ActionNotSupported"); - - public static final QName ENDPOINT_UNAVAILABLE_QNAME = new QName( - WSA_NAMESPACE_NAME, "EndpointUnavailable"); - - public static final String ACTION_NOT_SUPPORTED_TEXT = "The \"%s\" cannot be processed at the receiver."; - - public static final String DESTINATION_UNREACHABLE_TEXT = "No route can be determined to reach the destination role defined by the WS-Addressing To."; - - public static final String ENDPOINT_UNAVAILABLE_TEXT = "The endpoint is unable to process the message at this time."; - - public static final String INVALID_MAP_TEXT = "A message information header is not valid and the message cannot be processed."; - - public static final String MAP_REQUIRED_TEXT = "A required message information header, To, MessageID, or Action, is not present."; - - public static final QName PROBLEM_ACTION_QNAME = new QName(WSA_NAMESPACE_NAME, - "ProblemAction"); - - public static final QName PROBLEM_HEADER_QNAME_QNAME = new QName( - WSA_NAMESPACE_NAME, "ProblemHeaderQName"); - - public static final QName FAULT_DETAIL_QNAME = new QName(WSA_NAMESPACE_NAME, - "FaultDetail"); -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MemberSubmissionAddressingFeature.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MemberSubmissionAddressingFeature.java deleted file mode 100644 index 0bda79153b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MemberSubmissionAddressingFeature.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: MemberSubmissionAddressingFeature.java 51109 2006-09-28 15:28:12Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import jakarta.xml.ws.soap.AddressingFeature; -import jakarta.xml.ws.WebServiceFeature; - -public class MemberSubmissionAddressingFeature extends WebServiceFeature { - /** - * Constant value identifying the MemberSubmissionAddressingFeature - */ - public static final String ID = "https://jakarta.ee/xml/ns/jaxws/2004/08/addressing"; - - /** - * Constant ID for the required feature parameter - */ - public static final String IS_REQUIRED = "ADDRESSING_IS_REQUIRED"; - - private boolean required; - - private boolean enabled; - - /** - * Create an MemberSubmissionAddressingFeature The instance created will be - * enabled. - */ - public MemberSubmissionAddressingFeature() { - } - - /** - * Create an MemberSubmissionAddressingFeature - * - * @param enabled - * specifies whether this feature should be enabled or not. - */ - public MemberSubmissionAddressingFeature(boolean enabled) { - this.enabled = enabled; - } - - /** - * Create an MemberSubmissionAddressingFeature - * - * @param enabled - * specifies whether this feature should be enabled or not. - * @param required - * specifies the value that will be used for the - * required attribute on the - * wsaw:UsingAddressing element. - */ - public MemberSubmissionAddressingFeature(boolean enabled, boolean required) { - this.enabled = enabled; - this.required = required; - } - - public String getID() { - return ID; - } - - public boolean isRequired() { - return required; - } - - public void setRequired(boolean required) { - this.required = required; - } - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MemberSubmissionEndpointReference.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MemberSubmissionEndpointReference.java deleted file mode 100644 index e525dbc1d5..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MemberSubmissionEndpointReference.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: MemberSubmissionEndpointReference.java 51109 2006-09-28 15:28:12Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import org.w3c.dom.Element; - -import jakarta.xml.bind.JAXBContext; -import jakarta.xml.bind.JAXBException; -import jakarta.xml.bind.Marshaller; -import jakarta.xml.bind.Unmarshaller; -import jakarta.xml.bind.annotation.*; -import javax.xml.namespace.QName; -import javax.xml.transform.Result; -import javax.xml.transform.Source; -import jakarta.xml.ws.EndpointReference; -import jakarta.xml.ws.WebServiceException; -import java.util.List; -import java.util.Map; - -@XmlRootElement(name = "EndpointReference", namespace = MemberSubmissionEndpointReference.MSNS) -@XmlType(name = "EndpointReferenceType", namespace = MemberSubmissionEndpointReference.MSNS) -public class MemberSubmissionEndpointReference extends EndpointReference - implements MemberSubmissionAddressingConstants { - - private final static JAXBContext msjc = MemberSubmissionEndpointReference - .getMSJaxbContext(); - - private Marshaller marshaller; - - private Unmarshaller unmarshaller = null; - - public MemberSubmissionEndpointReference() { - } - - /** - * construct an EPR from infoset representation - * - * @param source - * A source object containing valid XmlInfoset instance consistent - * with the Member Submission WS-Addressing - * @throws jakarta.xml.ws.WebServiceException - * if the source does not contain a valid W3C WS-Addressing - * EndpointReference. - * @throws WebServiceException - * if the null source value is given - */ - public MemberSubmissionEndpointReference(Source source) { - - if (source == null) - throw new WebServiceException( - "Source parameter can not be null on constructor"); - - try { - if (unmarshaller == null) - unmarshaller = MemberSubmissionEndpointReference.msjc - .createUnmarshaller(); - MemberSubmissionEndpointReference epr = (MemberSubmissionEndpointReference) unmarshaller - .unmarshal(source); - - this.addr = epr.addr; - this.referenceProperties = epr.referenceProperties; - this.referenceParameters = epr.referenceParameters; - this.portTypeName = epr.portTypeName; - this.serviceName = epr.serviceName; - this.attributes = epr.attributes; - this.elements = epr.elements; - } catch (JAXBException e) { - throw new WebServiceException( - "Error unmarshalling MemberSubmissionEndpointReference ", e); - } catch (ClassCastException e) { - throw new WebServiceException( - "Source did not contain MemberSubmissionEndpointReference", e); - } - } - - public void writeTo(Result result) { - try { - if (marshaller == null) - marshaller = MemberSubmissionEndpointReference.msjc.createMarshaller(); - marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE); - marshaller.marshal(this, result); - } catch (JAXBException e) { - throw new WebServiceException("Error marshalling W3CEndpointReference. ", - e); - } - } - - private static JAXBContext getMSJaxbContext() { - try { - return JAXBContext.newInstance(MemberSubmissionEndpointReference.class); - } catch (JAXBException e) { - throw new WebServiceException( - "Error creating JAXBContext for MemberSubmissionEndpointReference. ", - e); - } - } - - @XmlElement(name = "Address", namespace = MemberSubmissionEndpointReference.MSNS) - public Address addr; - - @XmlElement(name = "ReferenceProperties", namespace = MemberSubmissionEndpointReference.MSNS) - public Elements referenceProperties; - - @XmlElement(name = "ReferenceParameters", namespace = MemberSubmissionEndpointReference.MSNS) - public Elements referenceParameters; - - @XmlElement(name = "PortType", namespace = MemberSubmissionEndpointReference.MSNS) - public AttributedQName portTypeName; - - @XmlElement(name = "ServiceName", namespace = MemberSubmissionEndpointReference.MSNS) - public ServiceNameType serviceName; - - @XmlAnyAttribute - public Map attributes; - - @XmlAnyElement - public Elements elements; - - public static class Address { - public Address() { - } - - @XmlValue - public String uri; - - @XmlAnyAttribute - public Map attributes; - } - - public static class Elements { - public Elements() { - } - - @XmlAnyElement - public List elements; - } - - public static class AttributedQName { - public AttributedQName() { - } - - @XmlValue - public QName name; - - @XmlAnyAttribute - public Map attributes; - } - - public static class ServiceNameType extends AttributedQName { - public ServiceNameType() { - } - - @XmlAttribute(name = "PortName") - public String portName; - } - - protected static final String MSNS = "http://schemas.xmlsoap.org/ws/2004/08/addressing"; -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MissingAddressingHeaderException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MissingAddressingHeaderException.java deleted file mode 100644 index 26a3fa7715..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/MissingAddressingHeaderException.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: MissingAddressingHeaderException.java 51050 2006-06-27 15:11:34Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import jakarta.xml.ws.WebServiceException; -import javax.xml.namespace.QName; - -public class MissingAddressingHeaderException extends WebServiceException { - QName name; - - public MissingAddressingHeaderException(QName name) { - this.name = name; - } - - public QName getMapQName() { - return name; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/NamedNodeMapIterator.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/NamedNodeMapIterator.java deleted file mode 100644 index 2a57add4d7..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/NamedNodeMapIterator.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: NamedNodeMapIterator.java 51109 2006-09-28 15:28:12Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import java.util.Iterator; - -import org.w3c.dom.NamedNodeMap; - -public class NamedNodeMapIterator implements Iterator { - - protected NamedNodeMap _map; - - protected int _index; - - public NamedNodeMapIterator(NamedNodeMap map) { - _map = map; - _index = 0; - } - - public boolean hasNext() { - if (_map == null) - return false; - return _index < _map.getLength(); - } - - public Object next() { - Object obj = _map.item(_index); - if (obj != null) - ++_index; - return obj; - } - - public void remove() { - throw new UnsupportedOperationException(); - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/NodeListIterator.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/NodeListIterator.java deleted file mode 100644 index 45d327e355..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/NodeListIterator.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: NodeListIterator.java 51109 2006-09-28 15:28:12Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import java.util.Iterator; - -import org.w3c.dom.NodeList; - -public class NodeListIterator implements Iterator { - - protected NodeList _list; - - protected int _index; - - public NodeListIterator(NodeList list) { - _list = list; - _index = 0; - } - - public boolean hasNext() { - if (_list == null) - return false; - return _index < _list.getLength(); - } - - public Object next() { - Object obj = _list.item(_index); - if (obj != null) - ++_index; - return obj; - } - - public void remove() { - throw new UnsupportedOperationException(); - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/W3CAddressingConstants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/W3CAddressingConstants.java deleted file mode 100644 index 4c5e76b71b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/W3CAddressingConstants.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPConstants; - -public interface W3CAddressingConstants { - public static final String WSA_NAMESPACE_NAME = "http://www.w3.org/2005/08/addressing"; - - public static final String WSA_NAMESPACE_WSDL_NAME = "http://www.w3.org/2006/05/addressing/wsdl"; - - public static final String WSA_NAMESPACE_PREFIX = "wsa"; - - public static final String WSA_NAMESPACE_WSDL_PREFIX = "wsaw"; - - public static final String WSAW_SERVICENAME_NAME = "ServiceName"; - - public static final String WSAW_INTERFACENAME_NAME = "InterfaceName"; - - public static final String WSAW_ENDPOINTNAME_NAME = "EndpointName"; - - public static final String WSA_REFERENCEPROPERTIES_NAME = "ReferenceParameters"; - - public static final QName WSA_REFERENCEPROPERTIES_QNAME = new QName( - WSA_NAMESPACE_NAME, WSA_REFERENCEPROPERTIES_NAME); - - public static final String WSA_REFERENCEPARAMETERS_NAME = "ReferenceParameters"; - - public static final QName WSA_REFERENCEPARAMETERS_QNAME = new QName( - WSA_NAMESPACE_NAME, WSA_REFERENCEPARAMETERS_NAME); - - public static final String WSA_METADATA_NAME = "Metadata"; - - public static final QName WSA_METADATA_QNAME = new QName(WSA_NAMESPACE_NAME, - WSA_METADATA_NAME); - - public static final String WSA_ADDRESS_NAME = "Address"; - - public static final QName WSA_ADDRESS_QNAME = new QName(WSA_NAMESPACE_NAME, - WSA_ADDRESS_NAME); - - public static final QName WSA_FROM_QNAME = new QName(WSA_NAMESPACE_NAME, - "From", WSA_NAMESPACE_PREFIX); - - public static final QName WSA_TO_QNAME = new QName(WSA_NAMESPACE_NAME, "To", - WSA_NAMESPACE_PREFIX); - - public static final QName WSA_REPLYTO_QNAME = new QName(WSA_NAMESPACE_NAME, - "ReplyTo", WSA_NAMESPACE_PREFIX); - - public static final QName WSA_FAULTTO_QNAME = new QName(WSA_NAMESPACE_NAME, - "FaultTo", WSA_NAMESPACE_PREFIX); - - public static final QName WSA_ACTION_QNAME = new QName(WSA_NAMESPACE_NAME, - "Action", WSA_NAMESPACE_PREFIX); - - public static final QName WSA_MESSAGEID_QNAME = new QName(WSA_NAMESPACE_NAME, - "MessageID", WSA_NAMESPACE_PREFIX); - - public static final QName WSA_IS_REFERENCE_PARAMETER_QNAME = new QName( - WSA_NAMESPACE_NAME, "IsReferenceParameter", WSA_NAMESPACE_PREFIX); - - public static final String WSA_RELATIONSHIP_REPLY = WSA_NAMESPACE_NAME - + "/reply"; - - public static final QName WSA_RELATESTO_QNAME = new QName(WSA_NAMESPACE_NAME, - "RelatesTo", WSA_NAMESPACE_PREFIX); - - public static final QName WSA_RELATIONSHIPTYPE_QNAME = new QName( - WSA_NAMESPACE_NAME, "RelationshipType", WSA_NAMESPACE_PREFIX); - - public static final String WSA_ANONYMOUS_ADDRESS_URI = WSA_NAMESPACE_NAME - + "/anonymous"; - - public static final String WSA_ANONYMOUS_ADDRESS = WSA_NAMESPACE_NAME - + "/anonymous"; - - public static final String WSA_NONE_ADDRESS = WSA_NAMESPACE_NAME + "/none"; - - public static final String WSA_DEFAULT_FAULT_ACTION = WSA_NAMESPACE_NAME - + "/fault"; - - public static final String WSAW_ACTION_NAME = "Action"; - - public static final QName WSAW_ACTION_QNAME = new QName( - WSA_NAMESPACE_WSDL_NAME, WSAW_ACTION_NAME); - - public static final String WSAW_USING_ADDRESSING_NAME = "UsingAddressing"; - - public static final QName WSAW_USING_ADDRESSING_QNAME = new QName( - WSA_NAMESPACE_WSDL_NAME, WSAW_USING_ADDRESSING_NAME); - - public static final String WSAW_ANONYMOUS_NAME = "Anonymous"; - - public static final QName WSAW_ANONYMOUS_QNAME = new QName( - WSA_NAMESPACE_WSDL_NAME, WSAW_ANONYMOUS_NAME); - - public static final QName INVALID_MAP_QNAME = new QName(WSA_NAMESPACE_NAME, - "InvalidAddressingHeader"); - - public static final QName MAP_REQUIRED_QNAME = new QName(WSA_NAMESPACE_NAME, - "MessageAddressingHeaderRequired"); - - public static final QName DESTINATION_UNREACHABLE_QNAME = new QName( - WSA_NAMESPACE_NAME, "DestinationUnreachable"); - - public static final QName ACTION_NOT_SUPPORTED_QNAME = new QName( - WSA_NAMESPACE_NAME, "ActionNotSupported"); - - public static final QName ENDPOINT_UNAVAILABLE_QNAME = new QName( - WSA_NAMESPACE_NAME, "EndpointUnavailable"); - - public static final String ACTION_NOT_SUPPORTED_TEXT = "The \"%s\" cannot be processed at the receiver"; - - public static final String DESTINATION_UNREACHABLE_TEXT = "No route can be determined to reach %s"; - - public static final String ENDPOINT_UNAVAILABLE_TEXT = "The endpoint is unable to process the message at this time"; - - public static final String INVALID_MAP_TEXT = "A header representing a Message Addressing Property is not valid and the message cannot be processed"; - - public static final String MAP_REQUIRED_TEXT = "A required header representing a Message Addressing Property is not present"; - - public static final QName PROBLEM_ACTION_QNAME = new QName(WSA_NAMESPACE_NAME, - "ProblemAction"); - - public static final QName PROBLEM_HEADER_QNAME_QNAME = new QName( - WSA_NAMESPACE_NAME, "ProblemHeaderQName"); - - public static final QName PROBLEM_HEADER_QNAME = new QName(WSA_NAMESPACE_NAME, - "ProblemHeader"); - - public static final QName FAULT_DETAIL_QNAME = new QName(WSA_NAMESPACE_NAME, - "FaultDetail"); - - // Fault subsubcode when an invalid address is specified. - public static final QName INVALID_ADDRESS_SUBCODE = new QName( - WSA_NAMESPACE_NAME, "InvalidAddress", WSA_NAMESPACE_PREFIX); - - // Fault subsubcode when an invalid header was expected to be - // EndpointReference but was not valid. - public static final QName INVALID_EPR = new QName(WSA_NAMESPACE_NAME, - "InvalidEPR", WSA_NAMESPACE_PREFIX); - - // Fault subsubcode when greater than expected number of the specified header - // is received. - public static final QName INVALID_CARDINALITY = new QName(WSA_NAMESPACE_NAME, - "InvalidCardinality", WSA_NAMESPACE_PREFIX); - - // Fault subsubcode when an invalid header was expected to be - // EndpointReference but did not contain address. - public static final QName MISSING_ADDRESS_IN_EPR = new QName( - WSA_NAMESPACE_NAME, "MissingAddressInEPR", WSA_NAMESPACE_PREFIX); - - // Fault subsubcode when a header contains a message id that was a duplicate - // of one already received. - public static final QName DUPLICATE_MESSAGEID = new QName(WSA_NAMESPACE_NAME, - "DuplicateMessageID", WSA_NAMESPACE_PREFIX); - - // Fault subsubcode when Action and SOAPAction for - // the mesage did not match. - public static final QName ACTION_MISMATCH = new QName(WSA_NAMESPACE_NAME, - "ActionMismatch", WSA_NAMESPACE_PREFIX); - - // Fault subsubcode when the only address supported is the anonymous address. - public static final QName ONLY_ANONYMOUS_ADDRESS_SUPPORTED = new QName( - WSA_NAMESPACE_NAME, "OnlyAnonymousAddressSupported", - WSA_NAMESPACE_PREFIX); - - // Fault subsubcode when anonymous address is not supported. - public static final QName ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED = new QName( - WSA_NAMESPACE_NAME, "OnlyNonAnonymousAddressSupported", - WSA_NAMESPACE_PREFIX); - - // SOAP 1.1 Fault Codes - public static final QName SOAP11_MUSTUNDERSTAND_FAULT = new QName( - SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, "MustUnderstand"); - - public static final QName SOAP11_VERSIONMISMATCH_FAULT = new QName( - SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, "VersionMismatch"); - - public static final QName SOAP11_CLIENT_FAULT = new QName( - SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, "Client"); - - public static final QName SOAP11_SERVER_FAULT = new QName( - SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, "Server"); -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/WsaBaseSOAPHandler.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/WsaBaseSOAPHandler.java deleted file mode 100644 index 2540b20a34..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/WsaBaseSOAPHandler.java +++ /dev/null @@ -1,496 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import com.sun.ts.lib.util.*; - -import java.util.Iterator; -import java.util.Set; - -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.soap.SOAPHandler; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPHeader; -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.Text; -import javax.xml.namespace.QName; - -import com.sun.ts.tests.jaxws.common.*; - -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; - -public class WsaBaseSOAPHandler implements SOAPHandler { - - public WsaBaseSOAPHandler() { - } - - public boolean handleMessage(SOAPMessageContext context) { - boolean outbound = (Boolean) context - .get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); - if (outbound) { - TestUtil.logMsg("Direction=outbound"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out.println("Direction=outbound"); - } else { - TestUtil.logMsg("Direction=inbound"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out.println("Direction=inbound"); - } - try { - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - JAXWS_Util.dumpSOAPMessage(msg, true); - if (whichHandler().equals("ServerSOAPHandler")) - JAXWS_Util.dumpSOAPMessage(msg, false); - - SOAPBody soapBody = getSOAPBody(context); - if (soapBody != null && soapBody.getFirstChild() != null) { - String oper = getOperationName(soapBody); - String testName = getTestName(soapBody); - context.put("op.name", oper); - context.put("test.name", testName); - if (!outbound) { - checkInboundAction(context, oper, getAction(context)); - checkInboundTo(context); - checkInboundReplyTo(context); - checkInboundMessageId(context); - checkInboundRelationship(context); - checkInboundRelatesTo(context); - processInboundMessage(context, oper, testName); - } else { - processOutboundMessage(context, oper, testName); - } - } - } catch (SOAPException e) { - e.printStackTrace(); - } - return true; - } - - public boolean handleFault(SOAPMessageContext context) { - boolean outbound = (Boolean) context - .get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); - if (outbound) { - TestUtil.logMsg("Direction=outbound"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out.println("Direction=outbound"); - } else { - TestUtil.logMsg("Direction=inbound"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out.println("Direction=inbound"); - } - if (!outbound) { - try { - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - JAXWS_Util.dumpSOAPMessage(msg, true); - if (whichHandler().equals("ServerSOAPHandler")) - JAXWS_Util.dumpSOAPMessage(msg, false); - if (context.getMessage().getSOAPBody().getFault() != null) { - String detailName = null; - try { - detailName = context.getMessage().getSOAPBody().getFault() - .getDetail().getFirstChild().getLocalName(); - } catch (Exception e) { - } - checkFaultActions((String) context.get("op.name"), detailName, - getAction(context)); - } - } catch (SOAPException e) { - e.printStackTrace(); - } - } - return true; - } - - public Set getHeaders() { - return null; - } - - public void close(MessageContext messageContext) { - } - - protected SOAPBody getSOAPBody(SOAPMessageContext context) - throws SOAPException { - SOAPBody soapBody = context.getMessage().getSOAPBody(); - return soapBody; - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String action = null; - try { - SOAPMessage message = context.getMessage(); - SOAPHeader header = message.getSOAPHeader(); - Iterator iter = header - .getChildElements(W3CAddressingConstants.WSA_ACTION_QNAME); - if (!iter.hasNext()) { - throw new AddressingHeaderException( - "WsaBaseSOAPHandler:getAction: Element not found:" - + W3CAddressingConstants.WSA_ACTION_QNAME); - } - Node node = (Node) iter.next(); - action = node.getFirstChild().getNodeValue(); - } catch (SOAPException e) { - throw new AddressingHeaderException( - "WsaBaseSOAPHandler:getAction: Element not found:" - + W3CAddressingConstants.WSA_ACTION_QNAME); - } - return action; - } - - protected String getTo(SOAPMessageContext context) throws SOAPException { - String to = null; - SOAPMessage message = context.getMessage(); - SOAPHeader header = message.getSOAPHeader(); - Iterator iter = header - .getChildElements(W3CAddressingConstants.WSA_TO_QNAME); - if (iter.hasNext()) { - to = "invalid"; - NodeList nodes = ((Element) iter.next()).getChildNodes(); - for (int i = 0; i < nodes.getLength(); i++) { - Node node = (Node) nodes.item(i); - return node.getNodeValue(); - } - } else { - throw new AddressingHeaderException( - "WsaBaseSOAPHandler:getTo: Element not found:" - + W3CAddressingConstants.WSA_TO_QNAME); - } - return to; - } - - protected String getReplyTo(SOAPMessageContext context) throws SOAPException { - String replyTo = null; - SOAPMessage message = context.getMessage(); - SOAPHeader header = message.getSOAPHeader(); - Iterator iter = header - .getChildElements(W3CAddressingConstants.WSA_REPLYTO_QNAME); - if (iter.hasNext()) { - replyTo = "invalid"; - NodeList nodes = ((Element) iter.next()).getChildNodes(); - for (int i = 0; i < nodes.getLength(); i++) { - Node node = (Node) nodes.item(i); - if (node instanceof Text) { - continue; - } - if (node.getLocalName().equals("Address") && node.getNamespaceURI() - .equals(W3CAddressingConstants.WSA_NAMESPACE_NAME)) { - return node.getFirstChild().getNodeValue(); - } - } - } else { - throw new AddressingHeaderException( - "WsaBaseSOAPHandler:getReplyTo: Element not found:" - + W3CAddressingConstants.WSA_REPLYTO_QNAME); - } - return replyTo; - } - - protected String getMessageId(SOAPMessageContext context) - throws SOAPException { - SOAPMessage message = context.getMessage(); - SOAPHeader header = message.getSOAPHeader(); - Iterator iter = header - .getChildElements(W3CAddressingConstants.WSA_MESSAGEID_QNAME); - if (!iter.hasNext()) { - throw new AddressingHeaderException( - "WsaBaseSOAPHandler:getMessageId: Element not found:" - + W3CAddressingConstants.WSA_MESSAGEID_QNAME); - } - Node node = (Node) iter.next(); - String mid = node.getFirstChild().getNodeValue(); - return mid; - } - - protected String getRelatesTo(SOAPMessageContext context) - throws SOAPException { - SOAPMessage message = context.getMessage(); - SOAPHeader header = message.getSOAPHeader(); - Iterator iter = header - .getChildElements(W3CAddressingConstants.WSA_RELATESTO_QNAME); - if (!iter.hasNext()) { - throw new AddressingHeaderException( - "WsaBaseSOAPHandler:getRelatesTo: Element not found:" - + W3CAddressingConstants.WSA_RELATESTO_QNAME); - } - Node node = (Node) iter.next(); - String relatesTo = node.getFirstChild().getNodeValue(); - return relatesTo; - } - - protected String getActionDoesNotExist(SOAPMessageContext context) - throws SOAPException { - String action = null; - try { - SOAPMessage message = context.getMessage(); - SOAPHeader header = message.getSOAPHeader(); - Iterator iter = header - .getChildElements(W3CAddressingConstants.WSA_ACTION_QNAME); - if (iter.hasNext()) { - Node node = (Node) iter.next(); - action = node.getFirstChild().getNodeValue(); - } - } catch (SOAPException e) { - action = null; - } - return action; - } - - protected String getRelationship(SOAPMessageContext context) - throws SOAPException { - SOAPMessage message = context.getMessage(); - SOAPHeader header = message.getSOAPHeader(); - Iterator iter = header - .getChildElements(W3CAddressingConstants.WSA_RELATIONSHIPTYPE_QNAME); - if (!iter.hasNext()) { - throw new AddressingHeaderException( - "WsaBaseSOAPHandler:getRelationship: Element not found:" - + W3CAddressingConstants.WSA_RELATIONSHIPTYPE_QNAME); - } - Node node = (Node) iter.next(); - String relationship = node.getFirstChild().getNodeValue(); - return relationship; - } - - protected String getOperationName(SOAPBody soapBody) throws SOAPException { - return soapBody.getFirstChild().getLocalName(); - } - - protected String getTestName(SOAPBody soapbody) throws SOAPException { - String testName = null; - SOAPElement se = null; - Iterator i = soapbody.getChildElements(); - if (i.hasNext()) { - se = (SOAPElement) i.next(); - i = se.getChildElements(); - while (i.hasNext()) { - se = (SOAPElement) i.next(); - String elementName = se.getElementName().getLocalName(); - Node node = (Node) se; - String elementValue = node.getFirstChild().getNodeValue(); - if (elementName.equals("testName")) { - testName = elementValue; - break; - } - } - } - return testName; - } - - protected void checkFaultActions(String requestName, String detailName, - String action) { - } - - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - }; - - protected void checkInboundTo(SOAPMessageContext context) { - } - - protected void checkInboundReplyTo(SOAPMessageContext context) { - } - - protected void checkInboundMessageId(SOAPMessageContext context) { - } - - protected void checkInboundRelationship(SOAPMessageContext context) { - } - - protected void checkInboundRelatesTo(SOAPMessageContext context) { - } - - protected void processOutboundMessage(SOAPMessageContext context, String oper, - String testName) { - } - - protected void processInboundMessage(SOAPMessageContext context, String oper, - String testName) { - } - - protected String whichHandler() { - return "WsaBaseSOAPHandler"; - } - - protected void checkInboundToExist(SOAPMessageContext context) { - String to = null; - try { - to = getTo(context); - TestUtil.logMsg(whichHandler() + ".checkInboundToExist: [To=" + to + "]"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out - .println(whichHandler() + ".checkInboundToExist: [To=" + to + "]"); - } catch (Exception e) { - return; - } - if (to == null) { - throw new AddressingPropertyException("wsa:To contains null"); - } - if (to.equals("invalid")) { - throw new AddressingPropertyException("wsa:To contains an invalid value"); - } - if (to.equals("")) { - throw new AddressingPropertyException("wsa:To contains an empty value"); - } - } - - protected void checkInboundRelatesToExist(SOAPMessageContext context) { - String relatesto = null; - String mid = null; - try { - relatesto = getRelatesTo(context); - TestUtil.logMsg(whichHandler() - + ".checkInboundRelatesToExist: [RelatesTo=" + relatesto + "]"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out.println(whichHandler() - + ".checkInboundRelatesToExist: [RelatesTo=" + relatesto + "]"); - } catch (Exception e) { - throw new WebServiceException(e); - } - if (relatesto == null) { - throw new AddressingPropertyException("wsa:RelatesTo contains null"); - } - if (relatesto.equals("")) { - throw new AddressingPropertyException( - "wsa:RelatesTo contains an empty value"); - } - } - - protected void checkInboundMessageIdExist(SOAPMessageContext context) { - String mid = null; - try { - mid = getMessageId(context); - TestUtil.logMsg(whichHandler() - + ".checkInboundMessageIdExist: [MessageId=" + mid + "]"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out.println(whichHandler() - + ".checkInboundMessageIdExist: [MessageId=" + mid + "]"); - } catch (Exception e) { - throw new WebServiceException(e); - } - if (mid == null) { - throw new AddressingPropertyException("wsa:MessageId contains null"); - } - if (mid.equals("")) { - throw new AddressingPropertyException( - "wsa:MessageId contains an empty value"); - } - } - - protected void checkInboundReplyToExist(SOAPMessageContext context) { - String replyto = null; - try { - replyto = getReplyTo(context); - TestUtil.logMsg(whichHandler() + ".checkInboundReplyToExist: [ReplyTo=" - + replyto + "]"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out.println(whichHandler() - + ".checkInboundReplyToExist: [ReplyTo=" + replyto + "]"); - } catch (Exception e) { - return; - } - if (replyto == null) { - throw new AddressingPropertyException("wsa:ReplyTo contains null"); - } - if (replyto.equals("invalid")) { - throw new AddressingPropertyException( - "wsa:ReplyTo contains an invalid value"); - } - if (replyto.equals("")) { - throw new AddressingPropertyException( - "wsa:ReplyTo contains an empty value"); - } - } - - protected void checkActionDoesNotExist(String action) { - TestUtil.logMsg(whichHandler() + ".checkActionDoesNotExist"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out.println(whichHandler() + ".checkActionDoesNotExist"); - if (action != null) { - throw new AddressingPropertyException( - "wsa:Action header exists (unexpected)"); - } - } - - protected void checkInboundToDoesNotExist(SOAPMessageContext context) { - TestUtil.logMsg(whichHandler() + ".checkInboundToDoesNotExist"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out.println(whichHandler() + ".checkInboundToDoesNotExist"); - boolean pass = false; - try { - getTo(context); - } catch (Exception e) { - pass = true; - } - if (!pass) - throw new AddressingPropertyException( - "wsa:To header exists (unexpected)"); - } - - protected void checkInboundRelatesToDoesNotExist(SOAPMessageContext context) { - TestUtil.logMsg(whichHandler() + ".checkInboundRelatesToDoesNotExist"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out.println(whichHandler() + ".checkInboundRelatesToDoesNotExist"); - boolean pass = false; - try { - getRelatesTo(context); - } catch (Exception e) { - pass = true; - } - if (!pass) - throw new AddressingPropertyException( - "wsa:RelatesTo header exists (unexpected)"); - } - - protected void checkInboundMessageIdDoesNotExist(SOAPMessageContext context) { - TestUtil.logMsg(whichHandler() + ".checkInboundMessageIdDoesNotExist"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out.println(whichHandler() + ".checkInboundMessageIdDoesNotExist"); - boolean pass = false; - try { - getMessageId(context); - } catch (Exception e) { - pass = true; - } - if (!pass) - throw new AddressingPropertyException( - "wsa:MessageId header exists (unexpected)"); - } - - protected void checkInboundReplyToDoesNotExist(SOAPMessageContext context) { - TestUtil.logMsg(whichHandler() + ".checkInboundReplyToDoesNotExist"); - if (whichHandler().equals("ServerSOAPHandler")) - System.out.println(whichHandler() + ".checkInboundReplyToDoesNotExist"); - boolean pass = false; - try { - getReplyTo(context); - } catch (Exception e) { - pass = true; - } - if (!pass) - throw new AddressingPropertyException( - "wsa:ReplyTo header exists (unexpected)"); - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/WsaSOAPUtils.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/WsaSOAPUtils.java deleted file mode 100644 index 9f8e7dd64a..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/WsaSOAPUtils.java +++ /dev/null @@ -1,586 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: WsaSOAPUtils.java 51075 2003-03-27 10:44:21Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import jakarta.xml.soap.MessageFactory; -import jakarta.xml.soap.SOAPConstants; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.soap.SOAPHeader; -import jakarta.xml.soap.SOAPFault; -import jakarta.xml.soap.Detail; -import jakarta.xml.soap.DetailEntry; -import jakarta.xml.soap.Text; -import jakarta.xml.ws.soap.*; -import jakarta.xml.ws.handler.soap.*; - -import java.util.Iterator; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.OutputStream; - -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; -import jakarta.xml.ws.Dispatch; - -public class WsaSOAPUtils implements jakarta.xml.soap.SOAPConstants, - com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants { - - public static final String UUID = "uuid:" + java.util.UUID.randomUUID(); - - public static final String W3C_WSA_NS = W3CAddressingConstants.WSA_NAMESPACE_NAME; - - public static final String MS_WSA_NS = MemberSubmissionAddressingConstants.WSA_NAMESPACE_NAME; - - public static final String S11_NS = SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE; - - public static final String S12_NS = SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE; - - public static final String FAULT_DETAIL = "detail"; - - public static final String FAULT_ACTOR = "faultactor"; - - public static final String FAULT_STRING = "faultstring"; - - public static final String FAULT_CODE = "faultcode"; - - public static final String[] FAULT_CHILDREN = { FAULT_ACTOR, FAULT_CODE, - FAULT_DETAIL, FAULT_STRING }; - - private static String AddressingVersionNSURI = W3CAddressingConstants.WSA_NAMESPACE_NAME; - - private static String AddressingVersionAnonymousURI = W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS; - - public static void setAddrVerNSUri(String nsuri, String anonuri) { - AddressingVersionNSURI = nsuri; - AddressingVersionAnonymousURI = anonuri; - } - - public static String getAddrVerNSUri() { - return AddressingVersionNSURI; - } - - public static String getAddrVerAnonUri() { - return AddressingVersionAnonymousURI; - } - - public static boolean isValidSoapFaultChildName(SOAPElement element) { - for (int i = 0; i < FAULT_CHILDREN.length; i++) { - if (FAULT_CHILDREN[i].equals(element.getElementName().getLocalName())) { - return true; - } - } - return false; - } - - public static boolean isMustUnderstandFaultCode(SOAPFaultException se) - throws SOAPException { - return isFaultCode(se, - W3CAddressingConstants.SOAP11_MUSTUNDERSTAND_FAULT.getLocalPart()); - } - - public static boolean isVersionMismatchFaultCode(SOAPFaultException se) - throws SOAPException { - return isFaultCode(se, - W3CAddressingConstants.SOAP11_VERSIONMISMATCH_FAULT.getLocalPart()); - } - - public static boolean isClientFaultCode(SOAPFaultException se) - throws SOAPException { - return isFaultCode(se, - W3CAddressingConstants.SOAP11_CLIENT_FAULT.getLocalPart()); - } - - public static boolean isServerFaultCode(SOAPFaultException se) - throws SOAPException { - return isFaultCode(se, - W3CAddressingConstants.SOAP11_SERVER_FAULT.getLocalPart()); - } - - public static boolean isMessageAddressingHeaderRequiredFaultCode( - SOAPMessage message) throws SOAPException { - return isFaultCode(message, - W3CAddressingConstants.MAP_REQUIRED_QNAME.getLocalPart()); - } - - public static boolean isMessageAddressingHeaderRequiredFaultCode( - SOAPFaultException se) { - return isFaultCode(se, - W3CAddressingConstants.MAP_REQUIRED_QNAME.getLocalPart()); - } - - public static boolean isInvalidAddressingHeaderFaultCode(SOAPMessage message) - throws SOAPException { - return isFaultCode(message, - W3CAddressingConstants.INVALID_MAP_QNAME.getLocalPart()); - } - - public static boolean isInvalidAddressingHeaderFaultCode( - SOAPFaultException se) { - return isFaultCode(se, - W3CAddressingConstants.INVALID_MAP_QNAME.getLocalPart()); - } - - public static boolean isInvalidEPRFaultCode(SOAPMessage message) - throws SOAPException { - return isFaultCode(message, - W3CAddressingConstants.INVALID_EPR.getLocalPart()); - } - - public static boolean isInvalidEPRFaultCode(SOAPFaultException se) { - return isFaultCode(se, W3CAddressingConstants.INVALID_EPR.getLocalPart()); - } - - public static boolean isInvalidCARDINALITYFaultCode(SOAPMessage message) - throws SOAPException { - return isFaultCode(message, - W3CAddressingConstants.INVALID_CARDINALITY.getLocalPart()); - } - - public static boolean isInvalidCARDINALITYFaultCode(SOAPFaultException se) { - return isFaultCode(se, - W3CAddressingConstants.INVALID_CARDINALITY.getLocalPart()); - } - - public static boolean isMissingAddressInEPRFaultCode(SOAPMessage message) - throws SOAPException { - return isFaultCode(message, - W3CAddressingConstants.MISSING_ADDRESS_IN_EPR.getLocalPart()); - } - - public static boolean isMissingAddressInEPRFaultCode(SOAPFaultException se) { - return isFaultCode(se, - W3CAddressingConstants.MISSING_ADDRESS_IN_EPR.getLocalPart()); - } - - public static boolean isDuplicateMessageIDFaultCode(SOAPMessage message) - throws SOAPException { - return isFaultCode(message, - W3CAddressingConstants.DUPLICATE_MESSAGEID.getLocalPart()); - } - - public static boolean isDuplicateMessageIDFaultCode(SOAPFaultException se) { - return isFaultCode(se, - W3CAddressingConstants.DUPLICATE_MESSAGEID.getLocalPart()); - } - - public static boolean isActionMismatchFaultCode(SOAPMessage message) - throws SOAPException { - return isFaultCode(message, - W3CAddressingConstants.ACTION_MISMATCH.getLocalPart()); - } - - public static boolean isActionMismatchFaultCode(SOAPFaultException se) { - return isFaultCode(se, - W3CAddressingConstants.ACTION_MISMATCH.getLocalPart()); - } - - public static boolean isOnlyAnonymousAddressSupportedFaultCode( - SOAPMessage message) throws SOAPException { - return isFaultCode(message, - W3CAddressingConstants.ONLY_ANONYMOUS_ADDRESS_SUPPORTED.getLocalPart()); - } - - public static boolean isOnlyAnonymousAddressSupportedFaultCode( - SOAPFaultException se) { - return isFaultCode(se, - W3CAddressingConstants.ONLY_ANONYMOUS_ADDRESS_SUPPORTED.getLocalPart()); - } - - public static boolean isOnlyNonAnonymousAddressSupportedFaultCode( - SOAPMessage message) throws SOAPException { - return isFaultCode(message, - W3CAddressingConstants.ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED - .getLocalPart()); - } - - public static boolean isOnlyNonAnonymousAddressSupportedFaultCode( - SOAPFaultException se) { - return isFaultCode(se, - W3CAddressingConstants.ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED - .getLocalPart()); - } - - public static boolean isDestinationUnreachableFaultCode(SOAPMessage message) - throws SOAPException { - return isFaultCode(message, - W3CAddressingConstants.DESTINATION_UNREACHABLE_QNAME.getLocalPart()); - } - - public static boolean isDestinationUnreachableFaultCode( - SOAPFaultException se) { - return isFaultCode(se, - W3CAddressingConstants.DESTINATION_UNREACHABLE_QNAME.getLocalPart()); - } - - public static boolean isActionNotSupportedFaultCode(SOAPMessage message) - throws SOAPException { - return isFaultCode(message, - W3CAddressingConstants.ACTION_NOT_SUPPORTED_QNAME.getLocalPart()); - } - - public static boolean isActionNotSupportedFaultCode(SOAPFaultException se) { - return isFaultCode(se, - W3CAddressingConstants.ACTION_NOT_SUPPORTED_QNAME.getLocalPart()); - } - - public static boolean isEndpointUnavailableFaultCode(SOAPMessage message) - throws SOAPException { - return isFaultCode(message, - W3CAddressingConstants.ENDPOINT_UNAVAILABLE_QNAME.getLocalPart()); - } - - public static boolean isEndpointUnavailableFaultCode(SOAPFaultException se) { - return isFaultCode(se, - W3CAddressingConstants.ENDPOINT_UNAVAILABLE_QNAME.getLocalPart()); - } - - public static boolean isFaultCode(SOAPFaultException se, String faultcode) { - return se.getFault().getFaultCode().endsWith(faultcode); - } - - public static boolean isFaultCode(SOAPMessage message, String faultcode) - throws SOAPException { - SOAPBody body = message.getSOAPPart().getEnvelope().getBody(); - if (body.hasFault()) { - return body.getFault().getFaultCode().endsWith(faultcode); - } else { - return false; - } - } - - public static String getFaultCode(SOAPFaultException se) - throws SOAPException { - return se.getFault().getFaultCodeAsQName().getLocalPart(); - } - - public static String getFaultCode(SOAPMessage message) throws SOAPException { - SOAPBody body = message.getSOAPPart().getEnvelope().getBody(); - return body.getFault().getFaultCodeAsQName().getLocalPart(); - } - - public static String getFaultString(SOAPFaultException se) - throws SOAPException { - return se.getFault().getFaultString(); - } - - public static String getFaultString(SOAPMessage message) - throws SOAPException { - SOAPBody body = message.getSOAPPart().getEnvelope().getBody(); - return body.getFault().getFaultString(); - } - - public static String[] getFaultDetail(SOAPFaultException se) - throws SOAPException { - String faultDetail[] = new String[10]; - int i = 0; - - SOAPFault sf = se.getFault(); - Detail d = sf.getDetail(); - if (d != null) { - Iterator iter = d.getDetailEntries(); - Object obj; - while (iter.hasNext()) { - DetailEntry de = (DetailEntry) iter.next(); - StringBuffer s = new StringBuffer(de.getElementName().getLocalName()); - if (de instanceof Text) - s.append(":" + de.getValue()); - faultDetail[i++] = s.toString(); - } - } - if (i == 0) - return null; - else - return faultDetail; - } - - public static String[] getFaultDetail(SOAPMessage message) - throws SOAPException { - SOAPElement se = null; - SOAPElement se2 = null; - Object obj = null; - String faultDetail[] = new String[10]; - Text text = null; - int i = 0; - - SOAPHeader header = message.getSOAPHeader(); - Iterator iter = header - .getChildElements(W3CAddressingConstants.FAULT_DETAIL_QNAME); - if (!iter.hasNext()) - return null; - obj = iter.next(); - if (obj instanceof SOAPElement) { - se = (SOAPElement) obj; - iter = se.getChildElements(); - } - while (iter.hasNext()) { - obj = iter.next(); - if (obj instanceof SOAPElement) { - se = (SOAPElement) obj; - faultDetail[i++] = se.getElementQName().getLocalPart(); - iter = se.getChildElements(); - } else if (obj instanceof Text) { - text = (Text) obj; - faultDetail[i++] = text.getValue(); - } - } - if (i == 0) - return null; - else - return faultDetail; - } - - public static String[] getFaultDetail(SOAPMessageContext context) - throws SOAPException { - return getFaultDetail(context.getMessage()); - } - - public static boolean isProblemHeaderQNameFaultDetail(String faultdetail) { - if (faultdetail == null) - return false; - if (faultdetail.equals(PROBLEM_HEADER_QNAME_QNAME.getLocalPart())) - return true; - else - return false; - } - - public static boolean isProblemHeaderFaultDetail(String faultdetail) { - if (faultdetail == null) - return false; - if (faultdetail.equals(PROBLEM_HEADER_QNAME.getLocalPart())) - return true; - else - return false; - } - - public static boolean isProblemActionFaultDetail(String faultdetail) { - if (faultdetail == null) - return false; - if (faultdetail.equals(PROBLEM_ACTION_QNAME.getLocalPart())) - return true; - else - return false; - } - - private static final Source makeStreamSource(String msg) { - byte[] bytes = msg.getBytes(); - ByteArrayInputStream sinputStream = new ByteArrayInputStream(bytes); - return new StreamSource(sinputStream); - } - - private static final SOAPMessage getSOAPMessage(Source msg) throws Exception { - MessageFactory factory = MessageFactory.newInstance(); - SOAPMessage message = factory.createMessage(); - message.getSOAPPart().setContent(msg); - message.saveChanges(); - return message; - } - - private static final SOAPMessage getSOAP12Message(Source msg) - throws Exception { - MessageFactory factory = MessageFactory - .newInstance(SOAPConstants.SOAP_1_2_PROTOCOL); - SOAPMessage message = factory.createMessage(); - message.getSOAPPart().setContent(msg); - message.saveChanges(); - return message; - } - - public static String fileToXMLString(String filename) { - return sourceToXMLString(new StreamSource(new File(filename))); - } - - public static String sourceToXMLString(Source result) { - String xmlResult = null; - try { - TransformerFactory factory = TransformerFactory.newInstance(); - Transformer transformer = factory.newTransformer(); - transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - transformer.setOutputProperty(OutputKeys.METHOD, "xml"); - OutputStream out = new ByteArrayOutputStream(); - StreamResult streamResult = new StreamResult(); - streamResult.setOutputStream(out); - transformer.transform(result, streamResult); - xmlResult = streamResult.getOutputStream().toString(); - } catch (TransformerException e) { - e.printStackTrace(); - } - return xmlResult; - } - - public static final SOAPMessage invoke(Dispatch dispatch, - String request, String... args) throws Exception { - String fRequest = String.format(request, (Object[]) args); - - return dispatch.invoke(getSOAPMessage(makeStreamSource(fRequest))); - } - - public static final void invokeOneWay(Dispatch dispatch, - String request, String... args) throws Exception { - String fRequest = String.format(request, (Object[]) args); - - dispatch.invokeOneWay(getSOAPMessage(makeStreamSource(fRequest))); - } - - public static final SOAPMessage invoke12(Dispatch dispatch, - String request, String... args) throws Exception { - String fRequest = String.format(request, (Object[]) args); - - return dispatch.invoke(getSOAP12Message(makeStreamSource(fRequest))); - } - - public static final void invokeOneWay12(Dispatch dispatch, - String request, String... args) throws Exception { - String fRequest = String.format(request, (Object[]) args); - - dispatch.invokeOneWay(getSOAP12Message(makeStreamSource(fRequest))); - } - - public static final String BAD_ACTION_MESSAGE = "\n" + "\n" + "%s\n" - + "" + UUID + "\n" + "\n" - + " %s\n" + "\n" - + "badSOAPAction\n" + "\n" - + "\n" + "\n" - + " 10\n" + " 10\n" - + "\n" + ""; - - public static final String MISSING_ACTION_MESSAGE = "\n" + "\n" + "%s\n" - + "" + UUID + "\n" + "\n" - + " %s\n" + "\n" - + "\n" + "\n" - + "\n" - + " 10\n" + " 10\n" - + "\n" + ""; - - public static final String REPLY_TO_REFPS_MESSAGE = "\n" + "\n" + "%s\n" - + "" + UUID + "\n" + "\n" - + " %s\n" + " \n" - + " Key#123456789\n" - + " " + "\n" - + "%s\n" + "\n" + "\n" - + "\n" - + " 10\n" + " 10\n" - + "\n" + ""; - - public static final String FAULT_TO_REFPS_MESSAGE = "\n" + "\n" + "%s\n" - + "" + UUID + "\n" + "\n" - + " %s\n" + " \n" - + " Key#123456789\n" - + " " + "\n" + "\n" - + " %s\n" + " \n" - + " Fault#123456789\n" - + " " + "\n" - + "%s\n" + "\n" + "\n" - + "\n" - + " -10\n" + " 10\n" - + "\n" + ""; - - public static final String DUPLICATE_TO_MESSAGE = "\n" + "\n" + "%s\n" - + "\n" + "\n" - + "\n" - + " 10\n" + " 10\n" - + "\n" + ""; - - public static final String DUPLICATE_REPLY_TO_MESSAGE = "\n" + "\n" - + "%s" - + "\n" + "\n" - + "\n" - + " 10\n" + " 10\n" - + "\n" + ""; - - public static final String DUPLICATE_FAULT_TO_MESSAGE = "\n" + "\n" - + "%s" - + "%s" - + "\n" + "\n" - + "\n" - + " 10\n" + " 10\n" - + "\n" + ""; - - public static final String DUPLICATE_ACTION_MESSAGE = "\n" + "\n" + "%s" - + "\n" + "\n" - + "\n" - + " 10\n" + " 10\n" - + "\n" + ""; - - public static final String DUPLICATE_MESSAGE_ID_MESSAGE = "\n" + "\n" + "" + UUID - + "" + "\n" + "\n" - + "\n" - + " 10\n" + " 10\n" - + "\n" + ""; - - public static final String DUPLICATE_MESSAGE_ID_MESSAGE_ONEWAY = "\n" + "\n" + "" + UUID - + "" + "\n" + "\n" - + "\n" - + " 10\n" + " 10\n" - + "\n" + ""; - - /***** - * COMMENT OUT public static final void assertInvalidHeaderFaultCode(QName - * got, AddressingVersion av) { try { - * TestCase.assertEquals(av.invalidCardinalityTag, got); } catch - * (AssertionFailedError e) { TestCase.assertEquals(av.invalidMapTag, got); } - * } - * - * public static final void assertHeaderRequiredFaultCode(QName got) { - * TestCase.assertEquals(W3CAddressingConstants.MAP_REQUIRED_QNAME, got); } - * - * public static final void assertHeaderRequiredFaultCode12(SOAPFault f) { - * TestCase.assertNotNull("Fault element is null", f); QName faultcode = - * f.getFaultCodeAsQName(); - * TestCase.assertEquals(SOAPConstants.SOAP_SENDER_FAULT, faultcode); Iterator - * iter = f.getFaultSubcodes(); TestCase.assertNotNull("Subcode iterator is - * null", iter); TestCase.assertTrue("Subcode iterator has no elements", - * iter.hasNext()); TestCase.assertEquals(iter.next(), - * W3CAddressingConstants.MAP_REQUIRED_QNAME); TestCase.assertTrue("No - * subsubcode on the fault", iter.hasNext()); - * TestCase.assertEquals(iter.next(), - * W3CAddressingConstants.INVALID_CARDINALITY); } - * - * public static final void assertInvalidCardinalityCode12(SOAPFault f, - * AddressingVersion av) { TestCase.assertNotNull("Fault element is null", f); - * QName faultcode = f.getFaultCodeAsQName(); - * TestCase.assertEquals(SOAPConstants.SOAP_SENDER_FAULT, faultcode); Iterator - * iter = f.getFaultSubcodes(); TestCase.assertNotNull("Subcode iterator is - * null", iter); TestCase.assertTrue("Subcode iterator has no elements", - * iter.hasNext()); TestCase.assertEquals(iter.next(), av.invalidMapTag); - * TestCase.assertTrue("No subsubcode on the fault", iter.hasNext()); - * TestCase.assertEquals(iter.next(), av.invalidCardinalityTag); } COMMENT OUT - */ -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/XmlUtil.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/XmlUtil.java deleted file mode 100644 index 5c6f25657a..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/XmlUtil.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: XmlUtil.java 51075 2003-03-27 10:44:21Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.common; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStreamWriter; -import java.io.Writer; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.StringTokenizer; - -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerFactory; - -import org.w3c.dom.Attr; -import org.w3c.dom.Element; -import org.w3c.dom.EntityReference; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Text; - -import javax.xml.namespace.QName; - -public class XmlUtil { - - public static String getPrefix(String s) { - int i = s.indexOf(':'); - if (i == -1) - return null; - return s.substring(0, i); - } - - public static String getLocalPart(String s) { - int i = s.indexOf(':'); - if (i == -1) - return s; - return s.substring(i + 1); - } - - public static String getAttributeOrNull(Element e, String name) { - Attr a = e.getAttributeNode(name); - if (a == null) - return null; - return a.getValue(); - } - - public static String getAttributeNSOrNull(Element e, String name, - String nsURI) { - Attr a = e.getAttributeNodeNS(nsURI, name); - if (a == null) - return null; - return a.getValue(); - } - - public static String getAttributeNSOrNull(Element e, QName name) { - Attr a = e.getAttributeNodeNS(name.getNamespaceURI(), name.getLocalPart()); - if (a == null) - return null; - return a.getValue(); - } - - public static Iterator getAllChildren(Element element) { - return new NodeListIterator(element.getChildNodes()); - } - - public static Iterator getAllAttributes(Element element) { - return new NamedNodeMapIterator(element.getAttributes()); - } - - public static List parseTokenList(String tokenList) { - List result = new ArrayList(); - StringTokenizer tokenizer = new StringTokenizer(tokenList, " "); - while (tokenizer.hasMoreTokens()) { - result.add(tokenizer.nextToken()); - } - return result; - } - - public static String getTextForNode(Node node) { - StringBuffer sb = new StringBuffer(); - - NodeList children = node.getChildNodes(); - if (children.getLength() == 0) - return null; - - for (int i = 0; i < children.getLength(); ++i) { - Node n = children.item(i); - - if (n instanceof Text) - sb.append(n.getNodeValue()); - else if (n instanceof EntityReference) { - String s = getTextForNode(n); - if (s == null) - return null; - else - sb.append(s); - } else - return null; - } - - return sb.toString(); - } - - public static InputStream getUTF8Stream(String s) { - try { - ByteArrayBuffer bab = new ByteArrayBuffer(); - Writer w = new OutputStreamWriter(bab, "utf-8"); - w.write(s); - w.close(); - return bab.newInputStream(); - } catch (IOException e) { - throw new RuntimeException("should not happen"); - } - } - - static final TransformerFactory transformerFactory = TransformerFactory - .newInstance(); - - public static Transformer newTransformer() { - try { - return transformerFactory.newTransformer(); - } catch (TransformerConfigurationException tex) { - throw new IllegalStateException("Unable to create a JAXP transformer"); - } - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/build.xml deleted file mode 100644 index 978d6feab3..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/build.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/AddNumbersException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/AddNumbersException.java deleted file mode 100644 index 9897471102..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/AddNumbersException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action; - -public class AddNumbersException extends Exception { - String detail; - - public AddNumbersException(String message, String detail) { - super(message); - this.detail = detail; - } - - public String getDetail() { - return detail; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/AddNumbersImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/AddNumbersImpl.java deleted file mode 100644 index d240e2a688..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/AddNumbersImpl.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action; - -import jakarta.annotation.Resource; -import jakarta.jws.HandlerChain; -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; -import jakarta.xml.ws.WebServiceContext; -import jakarta.xml.ws.Action; -import jakarta.xml.ws.FaultAction; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.SOAPBinding; - -@HandlerChain(name = "", file = "server-handler.xml") -@WebService(name = "AddNumbers", portName = "AddNumbersPort", targetNamespace = "http://foobar.org/", serviceName = "AddNumbersService") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = true, required = true) -public class AddNumbersImpl { - - @Resource - WebServiceContext wsc; - - public int addNumbersNoAction(int number1, int number2) - throws AddNumbersException { - return doStuff(number1, number2); - } - - @Action(input = "", output = "") - public int addNumbersEmptyAction(int number1, int number2) - throws AddNumbersException { - return doStuff(number1, number2); - } - - // Specify input action via the WebMethod annotation and the Action annotation - // (MUST WORK) - @Action(input = "http://example.com/input", output = "http://example.com/output") - @WebMethod(action = "http://example.com/input") - public int addNumbers(int number1, int number2) throws AddNumbersException { - return doStuff(number1, number2); - } - - @Action(input = "http://example.com/input2", output = "http://example.com/output2") - public int addNumbers2(int number1, int number2) throws AddNumbersException { - return doStuff(number1, number2); - } - - // Specify input action via the WebMethod annotation only - @WebMethod(action = "http://example.com/input3") - public int addNumbers3(int number1, int number2) throws AddNumbersException { - return doStuff(number1, number2); - } - - @Action(input = "http://example.com/input4") - public int addNumbers4(int number1, int number2) throws AddNumbersException { - return doStuff(number1, number2); - } - - @Action(input = "finput1", output = "foutput1", fault = { - @FaultAction(className = AddNumbersException.class, value = "http://fault1") }) - public int addNumbersFault1(int number1, int number2) - throws AddNumbersException { - return doStuff(number1, number2); - } - - @Action(input = "finput2", output = "foutput2", fault = { - @FaultAction(className = AddNumbersException.class, value = "http://fault2/addnumbers"), - @FaultAction(className = TooBigNumbersException.class, value = "http://fault2/toobignumbers") }) - public int addNumbersFault2(int number1, int number2) - throws AddNumbersException, TooBigNumbersException { - throwTooBigException(number1, number2); - - return doStuff(number1, number2); - } - - @Action(input = "finput3", output = "foutput3", fault = { - @FaultAction(className = AddNumbersException.class, value = "http://fault3/addnumbers") }) - public int addNumbersFault3(int number1, int number2) - throws AddNumbersException, TooBigNumbersException { - throwTooBigException(number1, number2); - - return doStuff(number1, number2); - } - - @Action(fault = { - @FaultAction(className = AddNumbersException.class, value = "http://fault4/addnumbers") }) - public int addNumbersFault4(int number1, int number2) - throws AddNumbersException, TooBigNumbersException { - throwTooBigException(number1, number2); - - return doStuff(number1, number2); - } - - @Action(fault = { - @FaultAction(className = TooBigNumbersException.class, value = "http://fault5/toobignumbers") }) - public int addNumbersFault5(int number1, int number2) - throws AddNumbersException, TooBigNumbersException { - throwTooBigException(number1, number2); - - return doStuff(number1, number2); - } - - @Action(fault = { - @FaultAction(className = AddNumbersException.class, value = "http://fault6/addnumbers"), - @FaultAction(className = TooBigNumbersException.class, value = "http://fault6/toobignumbers") }) - public int addNumbersFault6(int number1, int number2) - throws AddNumbersException, TooBigNumbersException { - throwTooBigException(number1, number2); - - return doStuff(number1, number2); - } - - @Action(fault = { - @FaultAction(className = AddNumbersException.class, value = ""), - @FaultAction(className = TooBigNumbersException.class, value = "") }) - public int addNumbersFault7(int number1, int number2) - throws AddNumbersException, TooBigNumbersException { - throwTooBigException(number1, number2); - - return doStuff(number1, number2); - } - - int doStuff(int number1, int number2) throws AddNumbersException { - if (number1 < 0 || number2 < 0) { - throw new AddNumbersException("Negative numbers can't be added!", - "Numbers: " + number1 + ", " + number2); - } - return number1 + number2; - } - - void throwTooBigException(int number1, int number2) - throws TooBigNumbersException { - if (number1 > 10 || number2 > 10) - throw new TooBigNumbersException("Too big numbers can't be added!", - "Numbers: " + number1 + ", " + number2); - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/ServerSOAPHandler.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/ServerSOAPHandler.java deleted file mode 100644 index 5764e3a5ab..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/ServerSOAPHandler.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", action=" + action + "]"); - TestUtil.logMsg("Verify input action: [" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", action=" + action + "]"); - System.out.println("Verify input action: [" + action + "]"); - if (action.equals("http://wrong.com/wrongaction")) - return; - if (oper.equals("addNumbersNoAction")) { - if (!action.equals(TestConstants.ADD_NUMBERS_IN_NOACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS_IN_NOACTION, - action); - } - } else if (oper.equals("addNumbersEmptyAction")) { - if (!action.equals(TestConstants.ADD_NUMBERS_IN_EMPTYACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_IN_EMPTYACTION, action); - } - } else if (oper.equals("addNumbers")) { - if (!action.equals(TestConstants.ADD_NUMBERS_IN_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS_IN_ACTION, - action); - } - } else if (oper.equals("addNumbers2")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_IN_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS2_IN_ACTION, - action); - } - } else if (oper.equals("addNumbers3")) { - if (!action.equals(TestConstants.ADD_NUMBERS3_IN_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS3_IN_ACTION, - action); - } - } else if (oper.equals("addNumbersFault1")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT1_IN_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT1_IN_ACTION, action); - } - } else if (oper.equals("addNumbersFault2")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT2_IN_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT2_IN_ACTION, action); - } - } else if (oper.equals("addNumbersFault3")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT3_IN_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT3_IN_ACTION, action); - } - } else if (oper.equals("addNumbersFault4")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT4_IN_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT4_IN_ACTION, action); - } - } else if (oper.equals("addNumbersFault5")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT5_IN_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT5_IN_ACTION, action); - } - } else if (oper.equals("addNumbersFault6")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT6_IN_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT6_IN_ACTION, action); - } - } else if (oper.equals("addNumbersFault7")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT7_IN_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT7_IN_ACTION, action); - } - } - } - - private void ThrowActionNotSupportedException(String expected, - String actual) { - throw new ActionNotSupportedException( - "Expected:" + expected + ", Actual:" + actual); - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/TestConstants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/TestConstants.java deleted file mode 100644 index dfabb0f3c3..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/TestConstants.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action; - -public class TestConstants { - public static final String ADD_NUMBERS_IN_NOACTION = "http://foobar.org/AddNumbers/addNumbersNoActionRequest"; - - public static final String ADD_NUMBERS_IN_EMPTYACTION = "http://foobar.org/AddNumbers/addNumbersEmptyActionRequest"; - - public static final String ADD_NUMBERS_IN_ACTION = "http://example.com/input"; - - public static final String ADD_NUMBERS2_IN_ACTION = "http://example.com/input2"; - - public static final String ADD_NUMBERS3_IN_ACTION = "http://example.com/input3"; - - public static final String ADD_NUMBERS_FAULT1_IN_ACTION = "finput1"; - - public static final String ADD_NUMBERS_FAULT2_IN_ACTION = "finput2"; - - public static final String ADD_NUMBERS_FAULT3_IN_ACTION = "finput3"; - - public static final String ADD_NUMBERS_FAULT4_IN_ACTION = "http://foobar.org/AddNumbers/addNumbersFault4Request"; - - public static final String ADD_NUMBERS_FAULT5_IN_ACTION = "http://foobar.org/AddNumbers/addNumbersFault5Request"; - - public static final String ADD_NUMBERS_FAULT6_IN_ACTION = "http://foobar.org/AddNumbers/addNumbersFault6Request"; - - public static final String ADD_NUMBERS_FAULT7_IN_ACTION = "http://foobar.org/AddNumbers/addNumbersFault7Request"; - - public static final String ADD_NUMBERS_OUT_NOACTION = "http://foobar.org/AddNumbers/addNumbersNoActionResponse"; - - public static final String ADD_NUMBERS_OUT_EMPTYACTION = "http://foobar.org/AddNumbers/addNumbersEmptyActionResponse"; - - public static final String ADD_NUMBERS_OUT_ACTION = "http://example.com/output"; - - public static final String ADD_NUMBERS2_OUT_ACTION = "http://example.com/output2"; - - public static final String ADD_NUMBERS3_OUT_ACTION = "http://foobar.org/AddNumbers/addNumbers3Response"; - - public static final String ADD_NUMBERS_FAULT1_ADDNUMBERS_ACTION = "http://fault1"; - - public static final String ADD_NUMBERS_FAULT2_ADDNUMBERS_ACTION = "http://fault2/addnumbers"; - - public static final String ADD_NUMBERS_FAULT2_TOOBIGNUMBERS_ACTION = "http://fault2/toobignumbers"; - - public static final String ADD_NUMBERS_FAULT3_ADDNUMBERS_ACTION = "http://fault3/addnumbers"; - - public static final String ADD_NUMBERS_FAULT3_TOOBIGNUMBERS_ACTION = "http://foobar.org/AddNumbers/addNumbersFault3/Fault/TooBigNumbersException"; - - public static final String ADD_NUMBERS_FAULT4_ADDNUMBERS_ACTION = "http://fault4/addnumbers"; - - public static final String ADD_NUMBERS_FAULT4_TOOBIGNUMBERS_ACTION = "http://foobar.org/AddNumbers/addNumbersFault4/Fault/TooBigNumbersException"; - - public static final String ADD_NUMBERS_FAULT5_ADDNUMBERS_ACTION = "http://foobar.org/AddNumbers/addNumbersFault5/Fault/AddNumbersException"; - - public static final String ADD_NUMBERS_FAULT5_TOOBIGNUMBERS_ACTION = "http://fault5/toobignumbers"; - - public static final String ADD_NUMBERS_FAULT6_ADDNUMBERS_ACTION = "http://fault6/addnumbers"; - - public static final String ADD_NUMBERS_FAULT6_TOOBIGNUMBERS_ACTION = "http://fault6/toobignumbers"; - - public static final String ADD_NUMBERS_FAULT7_ADDNUMBERS_ACTION = "http://foobar.org/AddNumbers/addNumbersFault7/Fault/AddNumbersException"; - - public static final String ADD_NUMBERS_FAULT7_TOOBIGNUMBERS_ACTION = "http://foobar.org/AddNumbers/addNumbersFault7/Fault/TooBigNumbersException"; -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/TooBigNumbersException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/TooBigNumbersException.java deleted file mode 100644 index 290411a83c..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/TooBigNumbersException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action; - -public class TooBigNumbersException extends Exception { - String detail; - - public TooBigNumbersException(String message, String detail) { - super(message); - this.detail = detail; - } - - public String getDetail() { - return detail; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/jakartaEE.tokens deleted file mode 100644 index c324a2521b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsaj2wdlactiontest") -SERVICE=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action.AddNumbersService -IMPL=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action.AddNumbersImpl -SEI=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action.AddNumbers -NAMESPACEURI=http://foobar.org/ -PORT=AddNumbersPort -URLALIAS=/jaxws/AddNumbers -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action.AddNumbersImpl -WEBSERVICEDESCRIPTION=AddNumbersService -SERVICEREFNAMEWSSERVLET=service/wsaj2wdlactiontest -SERVICEREFNAMEWSEJB=service/wsaj2wdlactiontest -SERVICEREFNAMEWSAPPCLIENT=service/wsaj2wdlactiontest diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/server-handler.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/server-handler.xml deleted file mode 100644 index b557c322a1..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/server-handler.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action.ServerSOAPHandler - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/standalone-sun-jaxws.xml deleted file mode 100644 index 390f6eec32..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/standalone.web.xml deleted file mode 100644 index 4943112bba..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSAJ2WDLActionTest - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddNumbers - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbers - /jaxws/AddNumbers - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureException.java deleted file mode 100644 index 50f33d1064..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureException.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature; - -import jakarta.xml.ws.WebServiceException; - -public class AddressingFeatureException extends WebServiceException { - String detail; - - public AddressingFeatureException(String message) { - super(message); - } - - public AddressingFeatureException(String message, String detail) { - super(message); - this.detail = detail; - } - - public String getDetail() { - return detail; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTestImpl1.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTestImpl1.java deleted file mode 100644 index 422c833e28..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTestImpl1.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature; - -import jakarta.jws.WebService; -import jakarta.jws.WebParam; -import jakarta.jws.HandlerChain; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.Action; -import jakarta.xml.ws.soap.Addressing; - -@WebService(name = "AddressingFeatureTest1", portName = "AddressingFeatureTest1Port", targetNamespace = "http://addressingfeatureservice.org/wsdl", serviceName = "AddressingFeatureTest1Service") - -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = true, required = false) -@HandlerChain(name = "", file = "server-handler.xml") - -public class AddressingFeatureTestImpl1 { - @Action(input = "inputAction", output = "outputAction") - public int addNumbers1( - @WebParam(name = "testName", mode = WebParam.Mode.INOUT) Holder testName, - @WebParam(name = "number1") int number1, - @WebParam(name = "number2") int number2) { - if (number1 < 0 || number2 < 0) { - throw new AddressingFeatureException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTestImpl2.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTestImpl2.java deleted file mode 100644 index 7ae8f983d5..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTestImpl2.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature; - -import jakarta.jws.WebService; -import jakarta.jws.WebParam; -import jakarta.jws.HandlerChain; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.Action; -import jakarta.xml.ws.soap.Addressing; - -@WebService(name = "AddressingFeatureTest2", portName = "AddressingFeatureTest2Port", targetNamespace = "http://addressingfeatureservice.org/wsdl", serviceName = "AddressingFeatureTest2Service") - -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = true, required = true) -@HandlerChain(name = "", file = "server-handler.xml") - -public class AddressingFeatureTestImpl2 { - @Action(input = "inputAction", output = "outputAction") - public int addNumbers2( - @WebParam(name = "testName", mode = WebParam.Mode.INOUT) Holder testName, - @WebParam(name = "number1") int number1, - @WebParam(name = "number2") int number2) { - if (number1 < 0 || number2 < 0) { - throw new AddressingFeatureException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTestImpl3.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTestImpl3.java deleted file mode 100644 index 63547b7374..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTestImpl3.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature; - -import jakarta.jws.WebService; -import jakarta.jws.WebParam; -import jakarta.jws.HandlerChain; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.Action; -import jakarta.xml.ws.soap.Addressing; - -@WebService(name = "AddressingFeatureTest3", portName = "AddressingFeatureTest3Port", targetNamespace = "http://addressingfeatureservice.org/wsdl", serviceName = "AddressingFeatureTest3Service") - -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing -@HandlerChain(name = "", file = "server-handler.xml") - -public class AddressingFeatureTestImpl3 { - @Action(input = "inputAction", output = "outputAction") - public int addNumbers3( - @WebParam(name = "testName", mode = WebParam.Mode.INOUT) Holder testName, - @WebParam(name = "number1") int number1, - @WebParam(name = "number2") int number2) { - if (number1 < 0 || number2 < 0) { - throw new AddressingFeatureException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTestImpl4.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTestImpl4.java deleted file mode 100644 index ef7f0e26b0..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTestImpl4.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingFeatureTestImpl4.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature; - -import jakarta.jws.WebService; -import jakarta.jws.WebParam; -import jakarta.jws.HandlerChain; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.soap.Addressing; - -@WebService(name = "AddressingFeatureTest4", portName = "AddressingFeatureTest4Port", targetNamespace = "http://addressingfeatureservice.org/wsdl", serviceName = "AddressingFeatureTest4Service") - -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = false) -@HandlerChain(name = "", file = "server-handler.xml") - -public class AddressingFeatureTestImpl4 { - public int addNumbers4( - @WebParam(name = "testName", mode = WebParam.Mode.INOUT) Holder testName, - @WebParam(name = "number1") int number1, - @WebParam(name = "number2") int number2) { - if (number1 < 0 || number2 < 0) { - throw new AddressingFeatureException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/ServerSOAPHandler.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/ServerSOAPHandler.java deleted file mode 100644 index 37f1b544cf..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/ServerSOAPHandler.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature; - -import com.sun.ts.lib.util.TestUtil; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.SOAPException; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - String testName = null; - - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - // figure out which testname i'm checking for and call appropropriate - // verifyBlah(...) - if (Handler_Util.checkForMsg(context, - "ClientNotEnabledServerEnabledNotREQ")) { - verifyClientNotEnabledServerEnabledNotREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientNotEnabledServerEnabledREQ")) { - verifyClientNotEnabledServerEnabledREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledREQServerNotEnabled")) { - verifyClientEnabledREQServerNotEnabled(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerEnabledREQ")) { - verifyClientEnabledNotREQServerEnabledREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerEnabledNotREQ")) { - verifyClientEnabledNotREQServerEnabledNotREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerUsingDefaults")) { - verifyClientEnabledNotREQServerUsingDefaults(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerNotEnabled")) { - verifyClientEnabledNotREQServerNotEnabled(context, action); - } - } - - private void verifyClientNotEnabledServerEnabledNotREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientNotEnabledServerEnabledNotRequire - // here... - checkAddressingHeadersDoNotExist(context, action); - } - - private void verifyClientNotEnabledServerEnabledREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientNotEnabledServerEnabledREQ here... - checkAddressingHeadersDoNotExist(context, action); - } - - private void verifyClientEnabledREQServerNotEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledREQServerNotEnabled here... - checkAddressingHeadersExist(context, action); - } - - private void verifyClientEnabledNotREQServerEnabledREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerEnabledREQ here... - checkAddressingHeadersMayExist(context, action); - } - - private void verifyClientEnabledNotREQServerNotEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerNotEnabled here... - checkAddressingHeadersMayExist(context, action); - } - - private void verifyClientEnabledNotREQServerEnabledNotREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerEnabledNotREQ - // here... - checkAddressingHeadersMayExist(context, action); - } - - private void verifyClientEnabledNotREQServerUsingDefaults( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerUsingDefaults - // here... - checkAddressingHeadersMayExist(context, action); - } - - private void verifyAction(String action) { - TestUtil.logMsg("ServerSOAPHandler.verifyAction: [action=" + action + "]"); - System.out - .println("ServerSOAPHandler.verifyAction: [action=" + action + "]"); - if (testName.equals("ClientEnabledREQServerNotEnabled") - || testName.equals("ClientEnabledNotREQServerNotEnabled")) { - if (!action.equals(TestConstants.ADD_NUMBERS_IN_ACTION4)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS_IN_ACTION4 + ", Actual:" + action); - } - } else if (!action.equals(TestConstants.ADD_NUMBERS_IN_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS_IN_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersMayExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersMayExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersMayExist"); - // If Addressing headers exist then check them otherwise don't - if (action != null) { - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersExist"); - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersDoNotExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersDoNotExist"); - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundMessageIdDoesNotExist(context); - checkInboundReplyToDoesNotExist(context); - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - testName = (String) context.get("test.name"); - TestUtil.logMsg("ServerSOAPHandler.getAction(): testName=" + testName); - System.out.println("ServerSOAPHandler.getAction(): testName=" + testName); - if (testName == null) { - return super.getAction(context); - } - /* Headers MAY be present on SOAPRequest */ - else if (testName.equals("ClientEnabledNotREQServerEnabledREQ") - || testName.equals("ClientEnabledNotREQServerNotEnabled") - || testName.equals("ClientEnabledNotREQServerEnabledNotREQ") - || testName.equals("ClientEnabledNotREQServerUsingDefaults")) { - try { - return super.getAction(context); - } catch (Exception e) { - return null; - } - } - /* Headers MUST be present on SOAPRequest */ - else if (testName.equals("ClientEnabledREQServerNotEnabled")) { - return super.getAction(context); - } - /* Headers MUST NOT be present on SOAPRequest */ - else if (testName.equals("ClientNotEnabledServerEnabledREQ") - || testName.equals("ClientNotEnabledServerEnabledNotREQ")) { - return super.getActionDoesNotExist(context); - } - /* Fault case just return null */ - else - return null; - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/TestConstants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/TestConstants.java deleted file mode 100644 index c4cf80cb32..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/TestConstants.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature; - -public class TestConstants { - public static final String ADD_NUMBERS_IN_ACTION = "inputAction"; - - public static final String ADD_NUMBERS_OUT_ACTION = "outputAction"; - - public static final String ADD_NUMBERS_IN_ACTION4 = "http://addressingfeatureservice.org/wsdl/AddressingFeatureTest4/addNumbers4Request"; -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest.ear.sun-application.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest.ear.sun-application.xml deleted file mode 100644 index 26558c0092..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest.ear.sun-application.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - WSAJ2WDLAddressingFeatureTest_web.war - WSAJ2WDLAddressingFeatureTest_web - - 0 - - Administrator - j2ee - - - Manager - javajoe - - - Guest - javajoe - j2ee - guest - - - Employee - javajoe - j2ee - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_web.war.sun-web.xml deleted file mode 100644 index 8d1031381d..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_web.war.sun-web.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - AddressingFeatureTest1Service - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest1?WSDL - - - AddressingFeatureTest2Service - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest2?WSDL - - - AddressingFeatureTest3Service - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest3?WSDL - - - AddressingFeatureTest4Service - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest4?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_wsappclient_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 2e439d1264..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - service/WSAJ2WDLAddressingFeatureTest1 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1 - - http://addressingfeatureservice.org/wsdl - AddressingFeatureTest1Port - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest1?WSDL - - - service/WSAJ2WDLAddressingFeatureTest2 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2 - - http://addressingfeatureservice.org/wsdl - AddressingFeatureTest2Port - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest2?WSDL - - - service/WSAJ2WDLAddressingFeatureTest3 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3 - - http://addressingfeatureservice.org/wsdl - AddressingFeatureTest3Port - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest3?WSDL - - - service/WSAJ2WDLAddressingFeatureTest4 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4 - - http://addressingfeatureservice.org/wsdl - AddressingFeatureTest4Port - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest4?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_wsejb_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index a85c55e0ad..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - WSAJ2WDLAddressingFeatureTest_wsejb_vehicle - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 43f5d3d412..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - WSAJ2WDLAddressingFeatureTest_wsejb_vehicle - - service/WSAJ2WDLAddressingFeatureTest1 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1 - - http://addressingfeatureservice.org/wsdl - AddressingFeatureTest1Port - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest1?WSDL - - - service/WSAJ2WDLAddressingFeatureTest2 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2 - - http://addressingfeatureservice.org/wsdl - AddressingFeatureTest2Port - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest2?WSDL - - - service/WSAJ2WDLAddressingFeatureTest3 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3 - - http://addressingfeatureservice.org/wsdl - AddressingFeatureTest3Port - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest3?WSDL - - - service/WSAJ2WDLAddressingFeatureTest4 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4 - - http://addressingfeatureservice.org/wsdl - AddressingFeatureTest4Port - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest4?WSDL - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_wsservlet_vehicle_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index e266fe3f22..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/WSAJ2WDLAddressingFeatureTest_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - service/WSAJ2WDLAddressingFeatureTest1 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1 - - http://addressingfeatureservice.org/wsdl - AddressingFeatureTest1Port - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest1?WSDL - - - service/WSAJ2WDLAddressingFeatureTest2 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2 - - http://addressingfeatureservice.org/wsdl - AddressingFeatureTest2Port - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest2?WSDL - - - service/WSAJ2WDLAddressingFeatureTest3 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3 - - http://addressingfeatureservice.org/wsdl - AddressingFeatureTest3Port - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest3?WSDL - - - service/WSAJ2WDLAddressingFeatureTest4 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4 - - http://addressingfeatureservice.org/wsdl - AddressingFeatureTest4Port - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAddressingFeatureTest_web/jaxws/AddressingFeatureTest4?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/jakartaEE.tokens deleted file mode 100644 index 8cabb7abe1..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/jakartaEE.tokens +++ /dev/null @@ -1,27 +0,0 @@ -WSREFSEJBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSAJ2WDLAddressingFeatureTest1", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1Service.class, wsdlLocation="META-INF/wsdl/AddressingFeatureTest1Service.wsdl"), @WebServiceRef(name="service/WSAJ2WDLAddressingFeatureTest2", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2Service.class, wsdlLocation="META-INF/wsdl/AddressingFeatureTest2Service.wsdl"), @WebServiceRef(name="service/WSAJ2WDLAddressingFeatureTest3", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3Service.class, wsdlLocation="META-INF/wsdl/AddressingFeatureTest3Service.wsdl"), @WebServiceRef(name="service/WSAJ2WDLAddressingFeatureTest4", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4Service.class, wsdlLocation="META-INF/wsdl/AddressingFeatureTest4Service.wsdl")}) - -WSREFSAPPCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSAJ2WDLAddressingFeatureTest1", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1Service.class, wsdlLocation="META-INF/wsdl/AddressingFeatureTest1Service.wsdl"), @WebServiceRef(name="service/WSAJ2WDLAddressingFeatureTest2", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2Service.class, wsdlLocation="META-INF/wsdl/AddressingFeatureTest2Service.wsdl"), @WebServiceRef(name="service/WSAJ2WDLAddressingFeatureTest3", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3Service.class, wsdlLocation="META-INF/wsdl/AddressingFeatureTest3Service.wsdl"),@WebServiceRef(name="service/WSAJ2WDLAddressingFeatureTest4", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4Service.class, wsdlLocation="META-INF/wsdl/AddressingFeatureTest4Service.wsdl")}) - -WSREFSWEBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSAJ2WDLAddressingFeatureTest1", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1Service.class, wsdlLocation="WEB-INF/wsdl/AddressingFeatureTest1Service.wsdl"), @WebServiceRef(name="service/WSAJ2WDLAddressingFeatureTest2", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2Service.class, wsdlLocation="WEB-INF/wsdl/AddressingFeatureTest2Service.wsdl"), @WebServiceRef(name="service/WSAJ2WDLAddressingFeatureTest3", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3Service.class, wsdlLocation="WEB-INF/wsdl/AddressingFeatureTest3Service.wsdl"), @WebServiceRef(name="service/WSAJ2WDLAddressingFeatureTest4", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4Service.class, wsdlLocation="WEB-INF/wsdl/AddressingFeatureTest4Service.wsdl")}) - -SEI=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1 -SEI2=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2 -SEI3=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3 -SEI4=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4 -IMPL=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTestImpl1 -IMPL2=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTestImpl2 -IMPL3=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTestImpl3 -IMPL4=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTestImpl4 -NAMESPACEURI=http://addressingfeatureservice.org/wsdl -PORT=AddressingFeatureTest1Port -PORT2=AddressingFeatureTest2Port -PORT3=AddressingFeatureTest3Port -PORT4=AddressingFeatureTest4Port -URLALIAS=/jaxws/AddressingFeatureTest1 -URLALIAS2=/jaxws/AddressingFeatureTest2 -URLALIAS3=/jaxws/AddressingFeatureTest3 -URLALIAS4=/jaxws/AddressingFeatureTest4 -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTestImpl1 -SERVLETNAME2=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTestImpl2 -SERVLETNAME3=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTestImpl3 -SERVLETNAME4=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTestImpl4 diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/jakartaEE.web.xml deleted file mode 100644 index 090948745e..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/jakartaEE.web.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME3@ - @IMPL3@ - 0 - - - @SERVLETNAME4@ - @IMPL4@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - @SERVLETNAME3@ - @URLALIAS3@ - - - @SERVLETNAME4@ - @URLALIAS4@ - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/server-handler.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/server-handler.xml deleted file mode 100644 index 149a6fe6f9..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/server-handler.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.ServerSOAPHandler - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/standalone-sun-jaxws.xml deleted file mode 100644 index 08c234962b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/standalone-sun-jaxws.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/standalone.web.xml deleted file mode 100644 index 1887c2e154..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/standalone.web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - WSJ2WDLAddressingFeatureTestApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddressingFeatureTest1 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - AddressingFeatureTest2 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - AddressingFeatureTest3 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - AddressingFeatureTest4 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - AddressingFeatureTest1 - /jaxws/AddressingFeatureTest1 - - - AddressingFeatureTest2 - /jaxws/AddressingFeatureTest2 - - - AddressingFeatureTest3 - /jaxws/AddressingFeatureTest3 - - - AddressingFeatureTest4 - /jaxws/AddressingFeatureTest4 - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/wsservlet_vehicle_web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/wsservlet_vehicle_web.xml deleted file mode 100644 index f03f13560c..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/wsservlet_vehicle_web.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - wsservlet_vehicle - - WSServlet_VehicleLogicalName - com.sun.ts.tests.common.vehicle.wsservlet.WSServletVehicle - - - WSServlet_VehicleLogicalName - /wsservlet_vehicle - - - 54 - - - service/WSAJ2WDLAddressingFeatureTest1 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1Service - WEB-INF/wsdl/AddressingFeatureTest1Service.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1 - - - - service/WSAJ2WDLAddressingFeatureTest2 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2Service - WEB-INF/wsdl/AddressingFeatureTest2Service.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2 - - - - service/WSAJ2WDLAddressingFeatureTest3 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3Service - WEB-INF/wsdl/AddressingFeatureTest3Service.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3 - - - - service/WSAJ2WDLAddressingFeatureTest4 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4Service - WEB-INF/wsdl/AddressingFeatureTest4Service.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/AddNumbersException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/AddNumbersException.java deleted file mode 100644 index 1bf59db63f..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/AddNumbersException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersException.java 52501 2007-01-24 02:29:49Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous; - -public class AddNumbersException extends Exception { - String detail; - - public AddNumbersException(String message, String detail) { - super(message); - this.detail = detail; - } - - public String getDetail() { - return detail; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/AddNumbersImpl3.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/AddNumbersImpl3.java deleted file mode 100644 index b5533a4d69..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/AddNumbersImpl3.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersImpl3.java 52501 2007-01-24 02:29:49Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; -import jakarta.jws.WebParam; -import jakarta.jws.HandlerChain; -import jakarta.xml.ws.Action; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.AddressingFeature; - -@WebService(name = "AddNumbersPortType3", portName = "AddNumbersPort3", serviceName = "AddNumbersService3", targetNamespace = "http://example.com/") - -@Addressing(enabled = true, required = true, responses = AddressingFeature.Responses.ANONYMOUS) -@HandlerChain(name = "", file = "server-handler.xml") -public class AddNumbersImpl3 { - - @Action(input = "http://example.com/AddNumbersPortType3/add", output = "http://example.com/AddNumbersPortType3/addResponse") - @WebMethod - public int addNumbers( - @WebParam(name = "number1", targetNamespace = "http://example.com/") int number1, - @WebParam(name = "number2", targetNamespace = "http://example.com/") int number2, - @WebParam(name = "testName", targetNamespace = "http://example.com/") String testName) - throws AddNumbersException { - - if (number1 < 0 || number2 < 0) { - throw new AddNumbersException("Negative numbers can't be added!", - "Numbers: " + number1 + ", " + number2); - } - return number1 + number2; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/AddNumbersImpl4.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/AddNumbersImpl4.java deleted file mode 100644 index 47dd812e03..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/AddNumbersImpl4.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersImpl4.java 52501 2007-01-24 02:29:49Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; -import jakarta.jws.WebParam; -import jakarta.jws.HandlerChain; -import jakarta.xml.ws.Action; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.AddressingFeature; - -@WebService(name = "AddNumbersPortType4", portName = "AddNumbersPort4", serviceName = "AddNumbersService4", targetNamespace = "http://example.com/") - -@Addressing(enabled = true, required = true, responses = AddressingFeature.Responses.NON_ANONYMOUS) -@HandlerChain(name = "", file = "server-handler.xml") -public class AddNumbersImpl4 { - - @Action(input = "http://example.com/AddNumbersPortType4/add", output = "http://example.com/AddNumbersPortType4/addResponse") - @WebMethod - public int addNumbers( - @WebParam(name = "number1", targetNamespace = "http://example.com/") int number1, - @WebParam(name = "number2", targetNamespace = "http://example.com/") int number2, - @WebParam(name = "testName", targetNamespace = "http://example.com/") String testName) - throws AddNumbersException { - if (number1 < 0 || number2 < 0) { - throw new AddNumbersException("Negative numbers can't be added!", - "Numbers: " + number1 + ", " + number2); - } - return number1 + number2; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_web.war.sun-web.xml deleted file mode 100644 index e2b56945d8..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_web.war.sun-web.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - AddNumbersService3 - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest_web/jaxws/AddNumbers3?WSDL - - - AddNumbersService4 - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest_web/jaxws/AddNumbers4?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_wsappclient_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 2c03b0977e..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - service/WSAJ2WDLAnonymousTest3 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType3 - - http://example.com/ - AddNumbersPort3 - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest_web/jaxws/AddNumbers3?WSDL - - - service/WSAJ2WDLAnonymousTest4 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType4 - - http://example.com/ - AddNumbersPort4 - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest_web/jaxws/AddNumbers4?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_wsejb_vehicle_client.jar.sun-application-client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index c281151098..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - WSAJ2WDLAnonymousTest_wsejb_vehicle - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 5441f68e7b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - WSAJ2WDLAnonymousTest_wsejb_vehicle - - service/WSAJ2WDLAnonymousTest3 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType3 - - http://example.com/ - AddNumbersPort3 - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest_web/jaxws/AddNumbers3?WSDL - - - service/WSAJ2WDLAnonymousTest4 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType4 - - http://example.com/ - AddNumbersPort4 - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest_web/jaxws/AddNumbers4?WSDL - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_wsservlet_vehicle_web.war.sun-web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index f04bbfa219..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/WSAJ2WDLAnonymousTest_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - service/WSAJ2WDLAnonymousTest3 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType3 - - http://example.com/ - AddNumbersPort3 - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest_web/jaxws/AddNumbers3?WSDL - - - service/WSAJ2WDLAnonymousTest4 - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType4 - - http://example.com/ - AddNumbersPort4 - - - http://webServerHost.1:webServerPort.1/WSAJ2WDLAnonymousTest_web/jaxws/AddNumbers4?WSDL - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/standalone-sun-jaxws.xml deleted file mode 100644 index cf3bc7da86..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/standalone-sun-jaxws.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/standalone.web.xml deleted file mode 100644 index 0aaeff0b83..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSJ2WAnonymousTestApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddNumbersPortType3 - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbersPortType4 - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbersPortType3 - /jaxws/AddNumbers3 - - - AddNumbersPortType4 - /jaxws/AddNumbers4 - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/wsappclient_vehicle_client.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/wsappclient_vehicle_client.xml deleted file mode 100644 index 149453a4a1..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/wsappclient_vehicle_client.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - TS app client vehicle - wsappclient_vehicle_client - - service/WSAJ2WDLAnonymousTest3 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService3 - META-INF/wsdl/AddNumbersService3.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType3 - - - - service/WSAJ2WDLAnonymousTest4 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService4 - META-INF/wsdl/AddNumbersService4.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType4 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/wsejb_vehicle_ejb.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/wsejb_vehicle_ejb.xml deleted file mode 100644 index f47cf11046..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/wsejb_vehicle_ejb.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - Ejb1 - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicleRemote - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicle - Stateful - Container - - - service/WSAJ2WDLAnonymousTest3 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService3 - META-INF/wsdl/AddNumbersService3.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType3 - - - - service/WSAJ2WDLAnonymousTest4 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService4 - META-INF/wsdl/AddNumbersService4.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType4 - - - - - - - - - - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - Remote - runTest - - Required - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/wsservlet_vehicle_web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/wsservlet_vehicle_web.xml deleted file mode 100644 index 510f17a537..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/wsservlet_vehicle_web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - wsservlet_vehicle - - WSServlet_VehicleLogicalName - com.sun.ts.tests.common.vehicle.wsservlet.WSServletVehicle - - - WSServlet_VehicleLogicalName - /wsservlet_vehicle - - - 54 - - - service/WSAJ2WDLAnonymousTest3 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService3 - WEB-INF/wsdl/AddNumbersService3.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType3 - - - - service/WSAJ2WDLAnonymousTest4 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService4 - WEB-INF/wsdl/AddNumbersService4.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType4 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/AddNumbersImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/AddNumbersImpl.java deleted file mode 100644 index 87435dcdbe..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/AddNumbersImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersImpl.java 51075 2003-03-27 10:44:21Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.epr; - -import jakarta.annotation.Resource; -import jakarta.jws.HandlerChain; -import jakarta.jws.WebService; -import jakarta.xml.ws.WebServiceContext; -import jakarta.xml.ws.Action; -import jakarta.xml.ws.FaultAction; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; - -@WebService(name = "AddNumbers", portName = "AddNumbersPort", targetNamespace = "http://foobar.org/", serviceName = "AddNumbersService") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = true, required = true) -public class AddNumbersImpl { - - @Resource - WebServiceContext wsc; - - public W3CEndpointReference getW3CEPR1() { - System.out.println("wsc=" + wsc); - return (W3CEndpointReference) wsc.getEndpointReference(); - } - - public W3CEndpointReference getW3CEPR2() { - System.out.println("wsc=" + wsc); - return (W3CEndpointReference) wsc.getEndpointReference( - jakarta.xml.ws.wsaddressing.W3CEndpointReference.class); - } - - public int doAddNumbers(int number1, int number2) { - return number1 + number2; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/AddNumbersException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/AddNumbersException.java deleted file mode 100644 index 68cbc16188..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/AddNumbersException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersException.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.refps; - -public class AddNumbersException extends Exception { - String detail; - - public AddNumbersException(String message, String detail) { - super(message); - this.detail = detail; - } - - public String getDetail() { - return detail; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/AddNumbersImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/AddNumbersImpl.java deleted file mode 100644 index d6be1851bc..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/AddNumbersImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersImpl.java 51679 2006-10-30 20:53:11Z af70133 $ - */ -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.refps; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.Action; -import jakarta.jws.WebParam; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.jws.HandlerChain; - -@WebService(name = "AddNumbersPortType", portName = "AddNumbersPort", serviceName = "AddNumbersService", targetNamespace = "http://example.com") -@HandlerChain(name = "", file = "server-handler.xml") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = true, required = true) - -public class AddNumbersImpl { - @Action(input = "addInAction", output = "addOutAction") - public int addNumbers( - @WebParam(name = "number1", targetNamespace = "http://example.com") int number1, - @WebParam(name = "number2", targetNamespace = "http://example.com") int number2) - throws AddNumbersException { - System.out - .println("In addNumbers: number1=" + number1 + ", number2=" + number2); - return doStuff(number1, number2); - } - - public int addNumbersAndPassString( - @WebParam(name = "number1", targetNamespace = "http://example.com") int number1, - @WebParam(name = "number2", targetNamespace = "http://example.com") int number2, - @WebParam(name = "testString", targetNamespace = "http://example.com") String testString) - throws AddNumbersException { - System.out.println("In addNumbersAndPassString: number1=" + number1 - + ", number2=" + number2 + ", testString=" + testString); - return doStuff(number1, number2); - } - - int doStuff(int number1, int number2) throws AddNumbersException { - if (number1 < 0 || number2 < 0) { - System.out.println("a negative number, throw AddNumbersException ..."); - throw new AddNumbersException("Negative numbers can't be added!", - "Numbers: " + number1 + ", " + number2); - } - return number1 + number2; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/standalone-sun-jaxws.xml deleted file mode 100644 index 692619b8b5..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/standalone.web.xml deleted file mode 100644 index 1a4027d310..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSAJ2WDLReferenceParamsTest - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddNumbers - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbers - /jaxws/AddNumbers - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/AddNumbersImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/AddNumbersImpl.java deleted file mode 100644 index 73d88316f9..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/AddNumbersImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersImpl.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse; - -import jakarta.jws.WebService; -import jakarta.jws.WebParam; -import jakarta.jws.HandlerChain; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Action; -import jakarta.xml.ws.Holder; - -import com.sun.ts.tests.jaxws.wsa.common.AddressingHeaderException; - -@WebService(name = "AddNumbersPortType", portName = "AddNumbersPort", serviceName = "AddNumbersService", targetNamespace = "http://example.com") -@HandlerChain(file = "server-handler.xml") -@Addressing(enabled = true, required = true) -public class AddNumbersImpl { - - public int addNumbers(@WebParam(name = "number1") int number1, - @WebParam(name = "number2") int number2, - @WebParam(name = "testName", mode = WebParam.Mode.INOUT) Holder testName) { - if (number1 < 0 || number2 < 0) { - throw new AddressingHeaderException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } - - @Action(input = "inputAction", output = "outputAction") - public int addNumbers2(@WebParam(name = "number1") int number1, - @WebParam(name = "number2") int number2, - @WebParam(name = "testName", mode = WebParam.Mode.INOUT) Holder testName) { - if (number1 < 0 || number2 < 0) { - throw new AddressingHeaderException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/ServerSOAPHandler.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/ServerSOAPHandler.java deleted file mode 100644 index 6348f37d37..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/ServerSOAPHandler.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52769 2007-02-21 19:46:02Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.*; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - String testName = null; - - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, "testDefaultRequestResponseAction")) { - checkAddressingHeadersExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "testExplicitRequestResponseAction")) { - checkAddressingHeadersExist(context, action); - } - } - - private void verifyAction(String action) { - TestUtil.logMsg("ServerSOAPHandler.verifyAction: [action=" + action + "]"); - System.out - .println("ServerSOAPHandler.verifyAction: [action=" + action + "]"); - if (testName.equals("testDefaultRequestResponseAction")) { - if (!action.equals(TestConstants.ADD_NUMBERS_IN_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS_IN_ACTION + ", Actual:" + action); - } - } else if (testName.equals("testExplicitRequestResponseAction")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_IN_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS2_IN_ACTION + ", Actual:" + action); - } - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersExist"); - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - testName = (String) context.get("test.name"); - TestUtil.logMsg("ServerSOAPHandler.getAction(): testName=" + testName); - System.out.println("ServerSOAPHandler.getAction(): testName=" + testName); - if (testName == null) - return super.getAction(context); - else if (!testName.equals("missingActionHeader")) - return super.getAction(context); - else - return null; - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/TestConstants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/TestConstants.java deleted file mode 100644 index 25ef0f284b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/TestConstants.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse; - -public class TestConstants { - public static final String ADD_NUMBERS2_IN_ACTION = "inputAction"; - - public static final String ADD_NUMBERS2_OUT_ACTION = "outputAction"; - - public static final String ADD_NUMBERS_IN_ACTION = "http://example.com/AddNumbersPortType/addNumbersRequest"; - - public static final String ADD_NUMBERS_OUT_ACTION = "http://example.com/AddNumbersPortType/addNumbersResponse"; -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/jakartaEE.tokens deleted file mode 100644 index 2ca8ea242d..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdlrequestresponsetest") -SERVICE=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse.AddNumbersService -SEI=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse.AddNumbersPortType -IMPL=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse.AddNumbersImpl -URLALIAS=/jaxws/AddNumbers -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse.AddNumbersImpl -NAMESPACEURI=http://example.com -PORT=AddNumbersPort -WEBSERVICEDESCRIPTION=AddNumbersService -SERVICEREFNAMEWSSERVLET=service/wsj2wdlrequestresponsetest -SERVICEREFNAMEWSEJB=service/wsj2wdlrequestresponsetest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdlrequestresponsetest diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/server-handler.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/server-handler.xml deleted file mode 100644 index 488b4999a5..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/server-handler.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - -ServerSOAPHandler -com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse.ServerSOAPHandler - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/standalone-sun-jaxws.xml deleted file mode 100644 index c783b3003f..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/standalone.web.xml deleted file mode 100644 index 44f3066b24..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSAJ2WDLRequestResponseTest - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddNumbers - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbers - /jaxws/AddNumbers - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/Car.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/Car.java deleted file mode 100644 index 704f1f05a6..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/Car.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Car.java 51063 2006-08-11 19:56:36Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.typesubstitution; - -import jakarta.xml.bind.annotation.XmlSeeAlso; - -@XmlSeeAlso({ Toyota.class, Ford.class }) - -public abstract class Car { - private String model; - - private String year; - - private String make; - - public String getModel() { - return model; - } - - public void setModel(String model) { - this.model = model; - } - - public String getYear() { - return year; - } - - public void setYear(String year) { - this.year = year; - } - - public String getMake() { - return make; - } - - public void setMake(String make) { - this.make = make; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/CarDealerImpl.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/CarDealerImpl.java deleted file mode 100644 index f9dd6c9559..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/CarDealerImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: CarDealerImpl.java 51063 2006-08-11 19:56:36Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.typesubstitution; - -import jakarta.jws.WebService; -import jakarta.xml.bind.annotation.XmlSeeAlso; - -import java.util.ArrayList; -import java.util.List; - -/** - * Tests the type substitution. - */ -@WebService(name = "CarDealer", portName = "CarDealerPort", serviceName = "CarDealerService", targetNamespace = "http://typesubstitution/wsdl") -@XmlSeeAlso({ Toyota.class, Ford.class }) -public class CarDealerImpl { - public List getSedans() { - List cars = new ArrayList(); - Toyota camry = new Toyota(); - - camry.setMake("Toyota"); - camry.setModel("Camry"); - camry.setYear("1998"); - camry.setColor("white"); - - cars.add(camry); - - Ford mustang = new Ford(); - - mustang.setMake("Ford"); - mustang.setModel("Mustang"); - mustang.setYear("1999"); - mustang.setColor("red"); - cars.add(mustang); - return cars; - } -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/Ford.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/Ford.java deleted file mode 100644 index 9ff8dfac0b..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/Ford.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Ford.java 51063 2006-08-11 19:56:36Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.typesubstitution; - -public class Ford extends Car { - - private String color; - - private final String make = "Ford"; - - public Ford() { - setMake("Ford"); - } - - public String getMake() { - return make; - } - - public Ford(String model, String year, String color) { - setModel(model); - setYear(year); - this.color = color; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public String toString() { - return getMake() + ":" + getModel() + ":" + getYear() + ":" + color; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/Toyota.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/Toyota.java deleted file mode 100644 index 149ba62cc3..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/Toyota.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Toyota.java 51063 2006-08-11 19:56:36Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.typesubstitution; - -public class Toyota extends Car { - - private String color; - - private final String make = "Toyota"; - - public Toyota() { - setMake("Toyota"); - } - - public String getMake() { - return make; - } - - public Toyota(String model, String year, String color) { - setModel(model); - setYear(year); - this.color = color; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public String toString() { - return getMake() + ":" + getModel() + ":" + getYear() + ":" + color; - } - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/build.xml deleted file mode 100644 index 7a0ccec4e9..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/build.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/jakartaEE.tokens deleted file mode 100644 index c19def69a4..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdltypesubstitutiontest") -SERVICE=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.typesubstitution.CarDealerService -SEI=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.typesubstitution.CarDealer -IMPL=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.typesubstitution.CarDealerImpl -URLALIAS=/jaxws/CarDealer -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.typesubstitution.CarDealerImpl -NAMESPACEURI=http://typesubstitution/wsdl -PORT=CarDealerPort -WEBSERVICEDESCRIPTION=CarDealerService -SERVICEREFNAMEWSSERVLET=service/wsj2wdltypesubstitutiontest -SERVICEREFNAMEWSEJB=service/wsj2wdltypesubstitutiontest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdltypesubstitutiontest diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/standalone-sun-jaxws.xml deleted file mode 100644 index 000409b18e..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/standalone-sun-jaxws.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/standalone.web.xml deleted file mode 100644 index 5744cdf628..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSAJ2WDLTypeSubstitutionTest - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - CarDealer - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - CarDealer - /jaxws/CarDealer - - - 54 - - diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/DescriptionConstants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/DescriptionConstants.java deleted file mode 100644 index a027257910..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/DescriptionConstants.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.constants; - -public interface DescriptionConstants { - - public static final String WSDL_NAMESPACE_URI = "http://schemas.xmlsoap.org/wsdl/"; - - public static final String WSDL_DEFINITIONS_LOCAL_NAME = "definitions"; - - public static final String WSDL_DOCUMENTATION_LOCAL_NAME = "documentation"; - - public static final String WSDL_BINDING_LOCAL_NAME = "binding"; - - public static final String WSDL_FAULT_LOCAL_NAME = "fault"; - - public static final String WSDL_IMPORT_LOCAL_NAME = "import"; - - public static final String WSDL_INPUT_LOCAL_NAME = "input"; - - public static final String WSDL_MESSAGE_LOCAL_NAME = "message"; - - public static final String WSDL_OPERATION_LOCAL_NAME = "operation"; - - public static final String WSDL_OUTPUT_LOCAL_NAME = "output"; - - public static final String WSDL_PART_LOCAL_NAME = "part"; - - public static final String WSDL_PORT_LOCAL_NAME = "port"; - - public static final String WSDL_PORTTYPE_LOCAL_NAME = "portType"; - - public static final String WSDL_SCHEMA_LOCAL_NAME = "schema"; - - public static final String WSDL_SERVICE_LOCAL_NAME = "service"; - - public static final String WSDL_TYPES_LOCAL_NAME = "types"; - - public static final String WSDL_ARRAY_TYPE_ATTR = "arrayType"; - - public static final String WSDL_ELEMENT_ATTR = "element"; - - public static final String WSDL_LOCATION_ATTR = "location"; - - public static final String WSDL_MESSAGE_ATTR = "message"; - - public static final String WSDL_NAME_ATTR = "name"; - - public static final String WSDL_NAMESPACE_ATTR = "namespace"; - - public static final String WSDL_PARAMETERORDER_ATTR = "parameterOrder"; - - public static final String WSDL_TARGETNAMESPACE_ATTR = "targetNamespace"; - - public static final String WSDL_TYPE_ATTR = "type"; - - public static final String WSA_NAMESPACE_URI = "http://www.w3.org/2005/08/addressing"; - - public static final String WSAM_NAMESPACE_URI = "http://www.w3.org/2007/05/addressing/metadata"; - - public static final String WSAM_ACTION_LOCAL_NAME = "Action"; - - public static final String WSAM_ADDRESSING_LOCAL_NAME = "Addressing"; - - public static final String WSAM_ANONYMOUS_RESPONSES_LOCAL_NAME = "AnonymousResponses"; - - public static final String WSAM_NONANONYMOUS_RESPONSES_LOCAL_NAME = "NonAnonymousResponses"; - - public static final String WSP_OPTIONAL_ATTR = "Optional"; - - public static final String WSP_NAMESPACE_URI = "http://www.w3.org/ns/ws-policy"; - - public static final String WSP_POLICYREFERENCE_LOCAL_NAME = "PolicyReference"; - - public static final String WSP_POLICY_LOCAL_NAME = "Policy"; -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/SOAPConstants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/SOAPConstants.java deleted file mode 100644 index 2c8d0b968f..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/SOAPConstants.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.constants; - -public interface SOAPConstants { - public static final String SOAP_NAMESPACE_URI = "http://schemas.xmlsoap.org/wsdl/soap/"; - - public static final String SOAP_ADDRESS_LOCAL_NAME = "address"; - - public static final String SOAP_BINDING_LOCAL_NAME = "binding"; - - public static final String SOAP_BODY_LOCAL_NAME = "body"; - - public static final String SOAP_FAULT_LOCAL_NAME = "fault"; - - public static final String SOAP_HEADER_LOCAL_NAME = "header"; - - public static final String SOAP_HEADERFAULT_LOCAL_NAME = "headerfault"; - - public static final String SOAP_OPERATION_LOCAL_NAME = "operation"; - - public static final String SOAP_SOAPACTION_ATTR = "soapAction"; - - public static final String SOAP_ENCODINGSTYLE_ATTR = "encodingStyle"; - - public static final String SOAP_LOCATION_ATTR = "location"; - - public static final String SOAP_MUST_UNDERSTAND_ATTR = "mustUnderstand"; - - public static final String SOAP_NAME_ATTR = "name"; - - public static final String SOAP_NAMESPACE_ATTR = "namespace"; - - public static final String SOAP_PART_ATTR = "part"; - - public static final String SOAP_PARTS_ATTR = "parts"; - - public static final String SOAP_STYLE_ATTR = "style"; - - public static final String SOAP_TRANSPORT_ATTR = "transport"; - - public static final String SOAP_USE_ATTR = "use"; - - public static final String SOAP_DOCUMENT = "document"; - - public static final String SOAP_ENCODED = "encoded"; - - public static final String SOAP_LITERAL = "literal"; - - public static final String SOAP_RPC = "rpc"; - - public static final String SOAP_TRANSPORT = "http://schemas.xmlsoap.org/soap/http"; - - public static final String SOAP_ACTION_HEADER_NAME = "SOAPAction"; -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/SchemaConstants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/SchemaConstants.java deleted file mode 100644 index daa1fbd58c..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/SchemaConstants.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.constants; - -public interface SchemaConstants { - public static final String XSD_NAMESPACE_URI = "http://www.w3.org/2001/XMLSchema"; - - public static final String XSD_ATTRIBUTE_LOCAL_NAME = "attribute"; - - public static final String XSD_ANNOTATION_LOCAL_NAME = "annotation"; - - public static final String XSD_COMPLEXCONTENT_LOCAL_NAME = "complexContent"; - - public static final String XSD_COMPLEXTYPE_LOCAL_NAME = "complexType"; - - public static final String XSD_IMPORT_LOCAL_NAME = "import"; - - public static final String XSD_ELEMENT_LOCAL_NAME = "element"; - - public static final String XSD_RESTRICTION_LOCAL_NAME = "restriction"; - - public static final String XSD_SCHEMA_LOCAL_NAME = "schema"; - - public static final String XSD_BASE_ATTR = "base"; - - public static final String XSD_NAME_ATTR = "name"; - - public static final String XSD_TYPE_ATTR = "type"; - - public static final String XSD_ELEMENT_ATTR = "element"; - - public static final String XSD_SCHEMALOCATION_ATTR = "schemaLocation"; - - public static final String XSD_NAMESPACE_ATTR = "namespace"; - - public static final String XSD_TARGETNAMESPACE_ATTR = "targetNamespace"; -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/WSIConstants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/WSIConstants.java deleted file mode 100644 index c8001943eb..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/WSIConstants.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.constants; - -public interface WSIConstants { - public static final String WSI_CLAIM_NAMESPACE_URI = "http://ws-i.org/schemas/conformanceClaim/"; - - public static final String WSI_CLAIM_LOCAL_NAME = "Claim"; - - public static final String WSI_CLAIM_PREFIX = "wsi"; - - public static final String WSI_CLAIM_CONFORMS_TO_ATTR = "conformsTo"; - - public static final String WSI_CLAIM_CONFORMS_TO_VALUE = "http://ws-i.org/profiles/basic1.0/"; - - public static final String SOAP_ENV_NS = "http://schemas.xmlsoap.org/soap/envelope/"; - - public static final String SOAP_ENC_STYLE = "encodingStyle"; - - public static final String SOAP_ENC_ARRAY_TYPE = "arrayType"; - -} diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/build.xml deleted file mode 100644 index 4cf3c1c141..0000000000 --- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsi/constants/build.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/customfile.xml b/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/customfile.xml deleted file mode 100644 index 03e7588eb6..0000000000 --- a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/customfile.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/customfile23001.xml b/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/customfile23001.xml deleted file mode 100644 index 4964f0f44f..0000000000 --- a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/customfile23001.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.ClientSOAPHandler - - - - - - diff --git a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/customfile23002.xml b/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/customfile23002.xml deleted file mode 100644 index 3c7c1642ef..0000000000 --- a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/customfile23002.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.ClientSOAPHandler - - - - - - diff --git a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/customfile.xml b/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/customfile.xml deleted file mode 100644 index 41e43d5859..0000000000 --- a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/customfile.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - ns2:AddNumbersPort - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action.ClientSOAPHandler - - - - - - diff --git a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile1.xml b/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile1.xml deleted file mode 100644 index 8d0739b58b..0000000000 --- a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile1.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.ClientSOAPHandler - - - - - - diff --git a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile2.xml b/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile2.xml deleted file mode 100644 index f6f6676ad1..0000000000 --- a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile2.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.ClientSOAPHandler - - - - - - diff --git a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile3.xml b/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile3.xml deleted file mode 100644 index 5d0f417190..0000000000 --- a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile3.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.ClientSOAPHandler - - - - - - diff --git a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile4.xml b/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile4.xml deleted file mode 100644 index 0b92d00949..0000000000 --- a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile4.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.ClientSOAPHandler - - - - - - diff --git a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/customfile3.xml b/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/customfile3.xml deleted file mode 100644 index b629d45149..0000000000 --- a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/customfile3.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.ClientSOAPHandler - - - - - - diff --git a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/customfile4.xml b/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/customfile4.xml deleted file mode 100644 index 9fbcd25d30..0000000000 --- a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/customfile4.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.ClientSOAPHandler - - - - - - diff --git a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/customfile.xml b/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/customfile.xml deleted file mode 100644 index 8447cb168c..0000000000 --- a/jaxws-common/src/main/resources/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/customfile.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - ns2:AddNumbersPort - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse.ClientSOAPHandler - - - - - - diff --git a/jaxws/pom.xml b/jaxws/pom.xml deleted file mode 100644 index 2f9c7d4e30..0000000000 --- a/jaxws/pom.xml +++ /dev/null @@ -1,2865 +0,0 @@ - - - - 4.0.0 - - - jakarta.tck - project - 11.0.0-SNAPSHOT - - - jaxws - jar - - JAXWS - JAXWS - - - ${project.build.directory}/jaxws/stale - - - - - ${project.groupId} - common - - - ${project.groupId} - jaxws-common - - - javatest - javatest - - - jakarta.annotation - jakarta.annotation-api - - - jakarta.xml.ws - jakarta.xml.ws-api - - - - - - - src/main/java - - **/*.xml - - - **/build.xml - - - - - - - - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - - unpack - - validate - - - - ${project.groupId} - jaxws-common - ${project.version} - jar - false - **/sun/ts/tests/jaxws/**/*.wsdl,**/sun/ts/tests/jaxws/**/*.xsd,,**/sun/ts/tests/jaxws/**/*.xml - - - ${project.build.directory}/jaxws/wsdls - false - true - - - - - - com.sun.xml.ws - jaxws-maven-plugin - - - - ws-mapping-w2jmapping-document-literal-customization - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-mapping-w2jmapping-document-literal-customization - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/customfile.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/W2JDLCustomization.wsdl - - - - - - ws-mapping-w2jmapping-document-literal-noncustomization - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-mapping-w2jmapping-document-literal-noncustomization - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/noncustomization/W2JDLNoncustomization.wsdl - - - - - - ws-services-AddNumbersService - - wsimport - - generate-sources - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.epr - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-AddNumbersService - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/AddNumbersService.wsdl - - - - - - ws-services-J2WRLShared - - wsimport - - generate-sources - - com.sun.ts.tests.jaxws.sharedclients.rpclitclient - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-J2WRLShared - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/sharedwebservices/rpclitservice/J2WRLShared.wsdl - - - - - ws-services-R1006-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R1006-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/customfile-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/W2JRLR1006TestService.wsdl - - - - - - ws-services-R1006-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R1006-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/customfile-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/W2JRLR1006TestService.wsdl - - - - - ws-services-R1011-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R1011-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011TestService.wsdl - - - - - - ws-services-R1011-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R1011-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011TestService.wsdl - - - - - ws-services-R1012-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R1012-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012TestService.wsdl - - - - - - ws-services-R1012-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R1012-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012TestService.wsdl - - - - - - ws-services-R1141 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R1141 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/W2JRLR1141TestService.wsdl - - - - - ws-services-R11XX-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R11XX-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXTestService.wsdl - - - - - - ws-services-R11XX-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R11XX-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXTestService.wsdl - - - - - - ws-services-R2030 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R2030 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030TestService.wsdl - - - - - ws-services-R2113-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R2113-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/customfile-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/W2JRLR2113TestService.wsdl - - - - - - ws-services-R2113-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R2113-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/customfile-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/W2JRLR2113TestService.wsdl - - - - - ws-services-R2712-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R2712-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712TestService.wsdl - - - - - - ws-services-R2712-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R2712-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712TestService.wsdl - - - - - ws-services-R273X-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R273X-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XTestService.wsdl - - - - - - ws-services-R273X-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R273X-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XTestService.wsdl - - - - - - ws-services-R2747 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R2747 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747TestService.wsdl - - - - - - ws-services-R2748 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R2748 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748TestService.wsdl - - - - - - ws-services-R4003 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R4003 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/customfile.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003TestService.wsdl - - - - - ws-services-R97XX-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R97XX-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXTestService.wsdl - - - - - - ws-services-R97XX-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-R97XX-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXTestService.wsdl - - - - - ws-services-anonymous-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-anonymous-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/WSAW2JDLAnonymousTest.wsdl - - - - - - ws-services-anonymous-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-anonymous-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/WSAW2JDLAnonymousTest.wsdl - - - - - - ws-services-com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.client - com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.client - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/server/EchoService.wsdl - - - - - - ws-services-com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1 - com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1 - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/HandlerChainTestService.wsdl - - - - - - ws-services-com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2 - com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2 - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/HandlerChainTestService.wsdl - - - - - ws-services-doc-literal-swatest-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-doc-literal-swatest-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/WSW2JDLSwaTestService.wsdl - - - - - - ws-services-doc-literal-swatest-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-doc-literal-swatest-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/WSW2JDLSwaTestService.wsdl - - - - - - ws-services-document-R2709 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-R2709 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/W2JDLR2709TestService.wsdl - - - - - - ws-services-document-action-AddNumbersService - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-action-AddNumbersService - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/customfile.xml - - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/AddNumbersService.wsdl - - - - - - ws-services-document-action-AddressingFeatureTest1Service - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-action-AddressingFeatureTest1Service - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile1.xml - - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTest1Service.wsdl - - - - - - ws-services-document-action-AddressingFeatureTest2Service - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-action-AddressingFeatureTest2Service - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile2.xml - - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTest2Service.wsdl - - - - - - ws-services-document-action-AddressingFeatureTest3Service - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-action-AddressingFeatureTest3Service - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile3.xml - - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTest3Service.wsdl - - - - - - ws-services-document-action-AddressingFeatureTest4Service - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-action-AddressingFeatureTest4Service - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/customfile4.xml - - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/AddressingFeatureTest4Service.wsdl - - - - - - ws-services-document-anonymous-AddNumbersService3 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-anonymous-AddNumbersService3 - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/customfile3.xml - - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/AddNumbersService3.wsdl - - - - - - ws-services-document-anonymous-AddNumbersService4 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-anonymous-AddNumbersService4 - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/customfile4.xml - - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/AddNumbersService4.wsdl - - - - - - ws-services-document-catalogtest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-catalogtest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/WSW2JDLCatalogTestService.wsdl - - - - - - ws-services-document-handlerchaintest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-handlerchaintest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/WSW2JHandlerChainTestService.wsdl - - - - - - ws-services-document-holdertest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-holdertest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/WSW2JDLHolderTestService.wsdl - - - - - - ws-services-document-httptest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-httptest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/WSW2JDLHttpTestService.wsdl - - - - - - ws-services-document-lteral-refps-AddNumbersService4 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-lteral-refps-AddNumbersService4 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.refps - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/AddNumbersService.wsdl - - - - - - ws-services-document-marshalltest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-document-marshalltest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/WSW2JDLWMarshallTestService.wsdl - - - - - - ws-services-ee-w2j-rpc-literal-onewayhandlertest-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-ee-w2j-rpc-literal-onewayhandlertest-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/WSRLOWHandlerTestService.wsdl - - - - - - ws-services-ee/w2j/rpc/literal/onewayhandlertest/server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-ee-w2j-rpc-literal-onewayhandlertest-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/WSRLOWHandlerTestService.wsdl - - - - - - ws-services-faultservice - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-faultservice - com.sun.ts.tests.jaxws.sharedclients.faultclient - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/sharedwebservices/faultservice/FaultTest.wsdl - - - - - - ws-services-headertest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-headertest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/customfile.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/WSW2JRLHeaderTestService.wsdl - - - - - - ws-services-jaxws23-wsa-j2w-document-literal-anonymous-23001 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-jaxws23-wsa-j2w-document-literal-anonymous-23001 - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/customfile23001.xml - - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23001.wsdl - - - - - - ws-services-jaxws23-wsa-j2w-document-literal-anonymous-23002 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-jaxws23-wsa-j2w-document-literal-anonymous-23002 - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/customfile23002.xml - - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23002.wsdl - - - - - - ws-services-mapping-w2jmapping-rpc-literal-customization - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-mapping-w2jmapping-rpc-literal-customization - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/W2JRLCustomization.wsdl - - - - - - ws-services-mapping-w2jmapping-rpc-noncustomization - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-mapping-w2jmapping-rpc-noncustomization - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/noncustomization/W2JRLNoncustomization.wsdl - - - - - - ws-services-marshalltest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-marshalltest - com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.client - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/MarshallTestService.wsdl - - - - - - ws-services-parametermodetest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-parametermodetest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/WSW2JRLParameterModeTestService.wsdl - - - - - ws-services-refps-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-refps-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/WSAW2JDLReferenceParamsTest.wsdl - - - - - - ws-services-refps-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-refps-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/WSAW2JDLReferenceParamsTest.wsdl - - - - - ws-services-requiredfalse-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-requiredfalse-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/WSAW2JDLRequiredFalseTest.wsdl - - - - - - ws-services-requiredfalse-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-requiredfalse-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/WSAW2JDLRequiredFalseTest.wsdl - - - - - ws-services-respectbindingfeature-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-respectbindingfeature-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestService.wsdl - - - - - - ws-services-respectbindingfeature-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-respectbindingfeature-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestService.wsdl - - - - - - ws-services-rpc-R2707 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-rpc-R2707 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/W2JRLR2707TestService.wsdl - - - - - - ws-services-rpc-R2709 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-rpc-R2709 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/W2JRLR2709TestService.wsdl - - - - - - ws-services-rpc-R2729 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-rpc-R2729 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/W2JRLR2729TestService.wsdl - - - - - - ws-services-rpc-R2747 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-rpc-R2747 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747TestService.wsdl - - - - - - ws-services-rpc-xmlnamemappingtest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-rpc-xmlnamemappingtest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/WSW2JXMLNameMappingTestService.wsdl - - - - - - ws-services-sessionmaintaintest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - com.sun.ts.tests.jaxws.ee.j2w.document.literal.sessionmaintaintest.client - ${jaxwsStaleDirectory}/ws-services-sessionmaintaintest - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/TestService.wsdl - - - - - - ws-services-sharedclients-dlhandlerclient - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-sharedclients-dlhandlerclient - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/DLHandlerService.wsdl - - - - - - ws-services-sharedclients-doclithelloservice - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-sharedclients-doclithelloservice - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/standalone-customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/WSDLHelloService.wsdl - - - - - - ws-services-sharedclients-hellosecure-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-sharedclients-hellosecure-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedclients/hellosecureclient/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/WSHelloSecureService.wsdl - - - - - - ws-services-sharedclients-hellosecureclient - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-sharedclients-hellosecureclient - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedclients/hellosecureclient/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/WSHelloSecureService.wsdl - - - - - - ws-services-sharedwebservices-dlhandlerservice - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-sharedwebservices-dlhandlerservice - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/DLHandlerService.wsdl - - - - - - ws-services-sharedwebservices-dlhelloproviderservice - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/com.sun.ts.tests.jaxws.sharedclients.dlhelloproviderclient - com.sun.ts.tests.jaxws.sharedclients.dlhelloproviderclient - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/WSDLHelloProviderService.wsdl - - - - - - ws-services-sharedwebservices-doclithelloservice - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-sharedwebservices-doclithelloservice - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/WSDLHelloService.wsdl - - - - - - ws-services-sharedwebservices-doclitservice - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-sharedwebservices-doclitservice - com.sun.ts.tests.jaxws.sharedclients.doclitclient - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/sharedwebservices/doclitservice/J2WDLShared.wsdl - - - - - - ws-services-sharedwebservices-hellosecure-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-sharedwebservices-hellosecure-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/WSHelloSecureService.wsdl - - - - - - ws-services-sharedwebservices-rlhandlerservice-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-sharedwebservices-rlhandlerservice-client - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/RLHandlerService.wsdl - - - - - ws-services-sharedwebservices-rlhandlerservice-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-sharedwebservices-rlhandlerservice-server - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/RLHandlerService.wsdl - - - - - - ws-services-sharedwebservices-xmlbinddlhelloproviderservice - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/com.sun.ts.tests.jaxws.sharedclients.xmlbinddlhelloproviderclient - com.sun.ts.tests.jaxws.sharedclients.xmlbinddlhelloproviderclient - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/WSXMLBindDLHelloProviderService.wsdl - - - - - - ws-services-sharedwebservices-xmlbinddlhelloproviderservice-custom - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-sharedwebservices-xmlbinddlhelloproviderservice-custom - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/WSXMLBindDLHelloProviderService.wsdl - - - - - - ws-services-sharedwebservices/dlhelloproviderservice - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/WSDLHelloProviderService.wsdl - - - - - ws-services-swatest-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-swatest-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/WSW2JRLSwaTestService.wsdl - - - - - - ws-services-swatest-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-swatest-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/WSW2JRLSwaTestService.wsdl - - - - - - ws-services-typesubstitution - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-typesubstitution - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.typesubstitution - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/CarDealerService.wsdl - - - - - - ws-services-w2j-document-R2707 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-R2707 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/W2JDLR2707TestService.wsdl - - - - - - ws-services-w2j-document-addressingfeature-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-addressingfeature-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestService.wsdl - - - - - - ws-services-w2j-document-addressingfeature-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-addressingfeature-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestService.wsdl - - - - - - ws-services-w2j-document-asynctest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-asynctest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/customfile-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/WSW2JDLAsyncTestService.wsdl - - - - - - ws-services-w2j-document-asynctest-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-asynctest-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/customfile-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/WSW2JDLAsyncTestService.wsdl - - - - - - ws-services-w2j-document-customization - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-customization - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/WSW2JDLCustomizationEmbeddedTestService.wsdl - - - - - - ws-services-w2j-document-delimiter-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-delimiter-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/WSAW2JDLDelimiterTest.wsdl - - - - - - ws-services-w2j-document-delimiter-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-delimiter-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/WSAW2JDLDelimiterTest.wsdl - - - - - - ws-services-w2j-document-eprinwsdl-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-eprinwsdl-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/EPRInWsdlTestService.wsdl - - - - - - ws-services-w2j-document-eprinwsdl-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-eprinwsdl-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/EPRInWsdlTestService.wsdl - - - - - - ws-services-w2j-document-external - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-external - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/customfile.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/WSW2JDLCustomizationExternalTestService.wsdl - - - - - - ws-services-w2j-document-headertest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-headertest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/customfile.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/WSW2JDLHeaderTestService.wsdl - - - - - - ws-services-w2j-document-marshalltest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-marshalltest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/customfile.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestService.wsdl - - - - - - ws-services-w2j-document-mtomfeature-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-mtomfeature-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestService.wsdl - - - - - - ws-services-w2j-document-mtomfeature-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-mtomfeature-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestService.wsdl - - - - - - ws-services-w2j-document-mtomtest-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-mtomtest-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/WSW2JDLMTOMTestService.wsdl - - - - - - ws-services-w2j-document-mtomtest-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-mtomtest-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/WSW2JDLMTOMTestService.wsdl - - - - - - ws-services-w2j-document-onewayhandlertest-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-onewayhandlertest-client - com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/WSDLOWHandlerTestService.wsdl - - - - - - ws-services-w2j-document-onewayhandlertest-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-onewayhandlertest-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/WSDLOWHandlerTestService.wsdl - - - - - - ws-services-w2j-document-providertest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-providertest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/ProviderTestService.wsdl - - - - - - ws-services-w2j-document-swareftest-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-swareftest-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/WSW2JDLSwaRefTestService.wsdl - - - - - - ws-services-w2j-document-swareftest-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-swareftest-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/WSW2JDLSwaRefTestService.wsdl - - - - - - ws-services-w2j-document-typesubstitution-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-typesubstitution-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-client.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-client2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/WSAW2JDLTypeSubstitutionTest.wsdl - - - - - - ws-services-w2j-document-typesubstitution-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-typesubstitution-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-server.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-server2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/WSAW2JDLTypeSubstitutionTest.wsdl - - - - - - ws-services-w2j-document-webmethod - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-document-webmethod - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/customfile.xml - - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/TestService.wsdl - - - - - ws-services-w2j-literal-action - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-literal-action - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/WSAW2JDLActionTest.wsdl - - - - - - ws-services-w2j-rpc-R1007-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R1007-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/customfile-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/W2JRLR1007TestService.wsdl - - - - - - ws-services-w2j-rpc-R1007-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R1007-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/customfile-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/W2JRLR1007TestService.wsdl - - - - - - ws-services-w2j-rpc-R1014-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R1014-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/customfile-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/W2JRLR1014TestService.wsdl - - - - - - ws-services-w2j-rpc-R1014-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R1014-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/customfile-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/W2JRLR1014TestService.wsdl - - - - - - ws-services-w2j-rpc-R1027 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R1027 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/W2JRLR1027TestService.wsdl - - - - - - ws-services-w2j-rpc-R2009 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R2009 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/customfile.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009TestService.wsdl - - - - - - ws-services-w2j-rpc-R2010 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R2010 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/customfile.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010TestService.wsdl - - - - - - ws-services-w2j-rpc-R2011 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R2011 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/customfile.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011TestService.wsdl - - - - - ws-services-w2j-rpc-R2114 - - wsimport - - generate-sources - - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2114 - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2114 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/W2JRLR2114TestService.wsdl - - - - - - ws-services-w2j-rpc-R2706 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R2706 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/W2JRLR2706TestService.wsdl - - - - - - ws-services-w2j-rpc-R2714 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R2714 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/W2JRLR2714TestService.wsdl - - - - - - ws-services-w2j-rpc-R2728 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R2728 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/W2JRLR2728TestService.wsdl - - - - - - ws-services-w2j-rpc-R2738 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R2738 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/customfile.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestService.wsdl - - - - - ws-services-w2j-rpc-R2744 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R2744 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/W2JRLR2744TestService.wsdl - - - - - - ws-services-w2j-rpc-R2745-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R2745-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745TestService.wsdl - - - - - - ws-services-w2j-rpc-R2745-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R2745-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745TestService.wsdl - - - - - - ws-services-w2j-rpc-R2751 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R2751 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/customfile.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestService.wsdl - - - - - - ws-services-w2j-rpc-R4001 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-R4001 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/W2JRLR4001TestService.wsdl - - - - - - ws-services-w2j-rpc-document-R1141 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-document-R1141 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/W2JDLR1141TestService.wsdl - - - - - - ws-services-w2j-rpc-holdertest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-holdertest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/WSW2JRLHolderTestService.wsdl - - - - - - ws-services-w2j-rpc-httpservletmsgctxpropstest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-httpservletmsgctxpropstest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/WSW2JRLHttpServletMsgCtxPropsTestService.wsdl - - - - - - ws-services-w2j-rpc-httptest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-httptest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTestService.wsdl - - - - - - ws-services-w2j-rpc-literal-R2753-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-literal-R2753-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753//customfile-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/W2JRLR2753TestService.wsdl - - - - - - ws-services-w2j-rpc-literal-R2753-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-literal-R2753-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753//customfile-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/W2JRLR2753TestService.wsdl - - - - - - ws-services-w2j-rpc-marshalltest - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-marshalltest - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/customfile.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestService.wsdl - - - - - - ws-services-w2j-rpc-nosei-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-nosei-client - com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.nosei.client - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/EchoService.wsdl - - - - - - ws-services-w2j-rpc-sec-basic - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-w2j-rpc-sec-basic - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/BasicAuthServiceTestService.wsdl - - - - - - ws-services-wsa-j2w-document-literal-requestresponse - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsa-j2w-document-literal-requestresponse - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/customfile.xml - - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/AddNumbersService.wsdl - - - - - - ws-services-wsa-w2j-document-literal-oneway-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsa-w2j-document-literal-oneway-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/custom-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/WSAW2JDLOneWayTest.wsdl - - - - - - ws-services-wsa-w2j-document-literal-oneway-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsa-w2j-document-literal-oneway-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/custom-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/WSAW2JDLOneWayTest.wsdl - - - - - - ws-services-wsa-w2j-document-literal-typesubstitution-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsa-w2j-document-literal-typesubstitution-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-server.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-server2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/WSAW2JDLTypeSubstitutionTest.wsdl - - - - - - ws-services-wsa/w2j/document/literal/typesubstitution-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsa-w2j-document-literal-typesubstitution-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-client.xml - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-client2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/WSAW2JDLTypeSubstitutionTest.wsdl - - - - - - ws-services-wsi-w2j-document-literal-R2030 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsi-w2j-document-literal-R2030 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030TestService.wsdl - - - - - - ws-services-wsi-w2j-document-literal-R2748 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsi-w2j-document-literal-R2748 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748TestService.wsdl - - - - - - ws-services-wsi-w2j-document-literal-R4002 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsi-w2j-document-literal-R4002 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002TestService.wsdl - - - - - - ws-services-wsi-w2j-document-literal-R4003 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsi-w2j-document-literal-R4003 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003TestService.wsdl - - - - - - ws-services-wsi-w2j-rpc-literal-R1005-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsi-w2j-rpc-literal-R1005-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/customfile-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/W2JRLR1005TestService.wsdl - - - - - - ws-services-wsi-w2j-rpc-literal-R1016-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsi-w2j-rpc-literal-R1016-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/customfile-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/W2JRLR1016TestService.wsdl - - - - - - ws-services-wsi-w2j-rpc-literal-R1016-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsi-w2j-rpc-literal-R1016-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/customfile-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/W2JRLR1016TestService.wsdl - - - - - - ws-services-wsi-w2j-rpc-literal-R2739-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsi-w2j-rpc-literal-R2739-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/customfile-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/W2JRLR2739TestService.wsdl - - - - - - ws-services-wsi-w2j-rpc-literal-R2739-server - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsi-w2j-rpc-literal-R2739-server - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/customfile-server.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/W2JRLR2739TestService.wsdl - - - - - - ws-services-wsi-w2j-rpc-literal-R4002 - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsi-w2j-rpc-literal-R4002 - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002TestService.wsdl - - - - - - ws-services-wsi/w2j/rpc/literal/R1005-client - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - ${jaxwsStaleDirectory}/ws-services-wsi-w2j-rpc-literal-R1005-client - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/customfile-client.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/W2JRLR1005TestService.wsdl - - - - - - ws-sharedwebservices-simpleservice - - wsimport - - generate-sources - - ${project.build.directory}/generated-sources/ - com.sun.ts.tests.jaxws.sharedclients.simpleclient - ${jaxwsStaleDirectory}/ws-sharedwebservices-simpleservice - - ${project.build.directory}/jaxws/wsdls/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/SimpleTest.wsdl - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/build.xml deleted file mode 100644 index 02c4df469e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/Client.java deleted file mode 100644 index 5e7c9d26fe..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/Client.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.AsyncHandler; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; - -import javax.xml.namespace.QName; - -import jakarta.xml.bind.JAXBContext; - -import javax.xml.transform.Source; - -public class Client extends ServiceEETest { - // need to create jaxbContext - private static final ObjectFactory of = new ObjectFactory(); - - private String helloReq = "foo"; - - private String helloResp = "foo"; - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.api.jakarta_xml_ws.AsyncHandler."; - - private static final String SHARED_CLIENT_PKG = "com.sun.ts.tests.jaxws.sharedclients.doclithelloclient"; - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService.class; - - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME; - - private QName PORT_QNAME; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "dlhelloservice.endpoint.1"; - - private static final String WSDLLOC_URL = "dlhelloservice.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private Dispatch dispatchJaxb = null; - - private Dispatch dispatchSrc = null; - - static HelloService service = null; - - private static final Class JAXB_OBJECT_FACTORY = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.ObjectFactory.class; - - private JAXBContext createJAXBContext() { - try { - return JAXBContext.newInstance(JAXB_OBJECT_FACTORY); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - // Initialize QNAMES used in the test - SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (HelloService) JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, - SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HelloService) getSharedObject(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - private Dispatch createDispatchJAXB() throws Exception { - return service.createDispatch(PORT_QNAME, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - private Dispatch createDispatchSource() throws Exception { - return service.createDispatch(PORT_QNAME, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - /* - * @testName: HandleResponseXMLTest - * - * @assertion_ids: JAXWS:JAVADOC:1; JAXWS:JAVADOC:10; WS4EE:SPEC:4005; - * WS4EE:SPEC:4006; WS4EE:SPEC:4007; - * - * @test_Strategy: Get a Response using the invokeAsync method passing - * an stream that contains xml and verify the response returned via "get()" is - * correct - */ - public void HandleResponseXMLTest() throws Fault { - TestUtil.logTrace("HandleResponseXMLTest"); - boolean pass = true; - Collection requestList = new ArrayList(); - requestList.add(JAXWS_Util.makeSource(helloReq, "DOMSource")); - requestList.add(JAXWS_Util.makeSource(helloReq, "StreamSource")); - requestList.add(JAXWS_Util.makeSource(helloReq, "SAXSource")); - Collection responseList = new ArrayList(); - responseList.add(JAXWS_Util.makeSource(helloResp, "DOMSource")); - responseList.add(JAXWS_Util.makeSource(helloResp, "StreamSource")); - responseList.add(JAXWS_Util.makeSource(helloResp, "SAXSource")); - Collection typeList = new ArrayList(); - typeList.add("DOMSource"); - typeList.add("StreamSource"); - typeList.add("SAXSource"); - int i = 0; - for (Iterator iter = requestList.iterator(); iter.hasNext();) { - try { - Source requestObject = (Source) iter.next(); - - Source sourceResponse = (Source) ((List) responseList).get(i); - String sSrcResponse = JAXWS_Util.getDOMResultAsString( - JAXWS_Util.getSourceAsDOMResult(sourceResponse)); - - XMLAsyncHandler xah = new XMLAsyncHandler(); - dispatchSrc = createDispatchSource(); - TestUtil.logMsg("Send: " + sSrcResponse); - dispatchSrc.invokeAsync(requestObject, xah); - - String dataType = (String) ((List) typeList).get(i); - TestUtil.logMsg("Testing " + dataType + " data"); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!xah.isDataReady()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - Source srcResponse = xah.getData(); - String sResponse = JAXWS_Util - .getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(srcResponse)); - TestUtil.logMsg("Recv: " + sResponse); - if (sResponse.indexOf("HelloResponse") == -1 - || sResponse.indexOf("foo") == -1) { - TestUtil.logErr("unexpected Response results"); - pass = false; - } - java.util.Map jrc = xah.getContext(); - if (jrc != null) { - TestUtil.logMsg("Properties/Keys from java.util.Map"); - int j = 1; - for (Iterator iter2 = jrc.keySet().iterator(); iter2.hasNext();) { - TestUtil.logMsg("Property [" + j + "]=" + (String) iter2.next()); - j++; - } - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - i++; - } - if (!pass) - throw new Fault("HandleResponseXMLTest failed"); - } - - /* - * @testName: HandleResponseJAXBTest - * - * @assertion_ids: JAXWS:JAVADOC:1; JAXWS:JAVADOC:10; WS4EE:SPEC:4005; - * WS4EE:SPEC:4006; WS4EE:SPEC:4007; - * - * @test_Strategy: Get a Response using the invokeAsync method passing - * a JAXB Object and verify the response returned via "get()" is correct - */ - public void HandleResponseJAXBTest() throws Fault { - TestUtil.logTrace("HandleResponseJAXBTest"); - boolean pass = true; - HelloRequest helloReq = null; - String param = "foo"; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument(param); - } catch (Exception e) { - pass = false; - TestUtil.logErr( - "The follow exception was generated while creating the request object."); - e.printStackTrace(); - } - if (pass) { - HelloResponse hResponse = null; - try { - dispatchJaxb = createDispatchJAXB(); - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - JAXBAsyncHandler jah = new JAXBAsyncHandler(); - dispatchJaxb.invokeAsync(helloReq, jah); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!jah.isDataReady()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - hResponse = (HelloResponse) jah.getData(); - String response = hResponse.getArgument(); - if (!helloReq.getArgument().equals(param)) { - pass = false; - TestUtil.logErr("The result return was in error:"); - TestUtil.logErr(" Expected result:" + param); - TestUtil.logErr(" Actual result:" + response); - } else { - TestUtil.logMsg("Actual result:" + response); - } - java.util.Map jrc = jah.getContext(); - if (jrc != null) { - TestUtil.logMsg("Properties/Keys from java.util.Map"); - int j = 1; - for (Iterator iter = jrc.keySet().iterator(); iter.hasNext();) { - TestUtil.logMsg("Property [" + j + "]=" + (String) iter.next()); - j++; - } - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - } - if (!pass) - throw new Fault("HandleResponseJAXBTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/JAXBAsyncHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/JAXBAsyncHandler.java deleted file mode 100644 index 242c9ebdcf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/JAXBAsyncHandler.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.AsyncHandler; - -import com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.*; - -import com.sun.ts.lib.util.*; -import jakarta.xml.ws.AsyncHandler; -import jakarta.xml.ws.Response; - -public class JAXBAsyncHandler implements AsyncHandler { - private boolean dataReady = false; - - private HelloResponse theData; - - private java.util.Map theContext; - - public JAXBAsyncHandler() { - TestUtil.logMsg("in JAXBAsyncHandler"); - } - - public synchronized boolean isDataReady() { - return dataReady; - } - - public HelloResponse getData() { - return theData; - } - - public java.util.Map getContext() { - return theContext; - } - - public void handleResponse(Response res) { - TestUtil.logMsg("in JAXBAsyncHandler.handleResponse()"); - try { - theData = (HelloResponse) res.get(); - theContext = res.getContext(); - } catch (Exception e) { - e.printStackTrace(); - } - synchronized (this) { - dataReady = true; - } - - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/XMLAsyncHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/XMLAsyncHandler.java deleted file mode 100644 index d4954786dc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/XMLAsyncHandler.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.AsyncHandler; - -import com.sun.ts.lib.util.*; - -import jakarta.xml.ws.AsyncHandler; -import jakarta.xml.ws.Response; -import javax.xml.transform.Source; - -public class XMLAsyncHandler implements AsyncHandler { - private boolean dataReady = false; - - private Source theData; - - private java.util.Map theContext; - - public XMLAsyncHandler() { - TestUtil.logMsg("in XMLAsyncHandler"); - } - - public synchronized boolean isDataReady() { - return dataReady; - } - - public Source getData() { - return theData; - } - - public java.util.Map getContext() { - return theContext; - } - - public void handleResponse(Response res) { - TestUtil.logMsg("in XMLAsyncHandler.handleResponse()"); - try { - theData = res.get(); - theContext = res.getContext(); - } catch (Exception e) { - e.printStackTrace(); - } - synchronized (this) { - dataReady = true; - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/build.xml deleted file mode 100644 index 9784a9ab67..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/jakartaEE.tokens deleted file mode 100644 index 28dc128adc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/AsyncHandler/jakartaEE.tokens +++ /dev/null @@ -1,9 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhelloservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloservice -~ - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Binding/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Binding/Client.java deleted file mode 100644 index 85dae958de..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Binding/Client.java +++ /dev/null @@ -1,392 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.Binding; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; -import jakarta.xml.ws.handler.*; -import javax.xml.transform.Source; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.api.jakarta_xml_ws.Binding."; - - private static final String SHARED_CLIENT_PKG = "com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient."; - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private static final String SERVICE_NAME = "DLHandlerService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.DLHandlerService.class; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "dlhandlerservice.endpoint.1"; - - private static final String WSDLLOC_URL = "dlhandlerservice.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private Binding binding = null; - - private BindingProvider bp = null; - - private Dispatch dispatch = null; - - private Hello port = null; - - static DLHandlerService service = null; - - private void getPorts() throws Exception { - TestUtil.logMsg("Get port = " + PORT_NAME); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port=" + port); - } - - private void getPortsStandalone() throws Exception { - getPorts(); - bp = (BindingProvider) port; - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - bp = (BindingProvider) port; - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - Binding binding = null; - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (DLHandlerService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, SERVICE_CLASS); - getPortsStandalone(); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (DLHandlerService) getSharedObject(); - getPortsJavaEE(); - } - TestUtil - .logMsg("Create a Dispatch object for SOAP 1.1 over HTTP binding"); - dispatch = service.createDispatch(PORT_QNAME, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: getBindingIDTest - * - * @assertion_ids: JAXWS:JAVADOC:133; - * - * @test_Strategy: - * - */ - public void getBindingIDTest() throws Fault { - TestUtil.logTrace("getBindingIDTest"); - boolean pass = true; - try { - binding = dispatch.getBinding(); - TestUtil.logMsg("Dispatch object = " + dispatch); - TestUtil.logMsg("Binding object = " + binding); - String bindingID = binding.getBindingID(); - TestUtil.logMsg("bindingID=" + bindingID); - if (!bindingID.equals(SOAPBinding.SOAP11HTTP_BINDING)) { - TestUtil.logErr("bindingID is not expected SOAP11HTTP_BINDING"); - pass = false; - } else - TestUtil.logMsg("bindingID is expected SOAP11HTTP_BINDING"); - } catch (WebServiceException e) { - TestUtil.logErr("Caught unexpected WebServiceException", e); - pass = false; - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("getBindingIDTest failed", e); - } - - if (!pass) - throw new Fault("getBindingIDTest failed"); - } - - /* - * @testName: SetAndGetHandlerChainForDispatchObjTest - * - * @assertion_ids: JAXWS:JAVADOC:2; JAXWS:JAVADOC:3; - * - * @test_Strategy: Sets the handler chain for a protocol binding instance. - * Gets the handler chain for a protocol binding instance. - */ - public void SetAndGetHandlerChainForDispatchObjTest() throws Fault { - TestUtil.logTrace("SetAndGetHandlerChainForDispatchObjTest"); - boolean pass = true; - try { - binding = dispatch.getBinding(); - TestUtil.logMsg("Dispatch object = " + dispatch); - TestUtil.logMsg("Binding object = " + binding); - TestUtil.logMsg( - "Test setHandlerChain()/getHandlerChain() for Dispatch object"); - TestUtil.logMsg( - "Create a handler chain for SOAP 1.1 over HTTP protocol binding"); - TestUtil.logMsg("List hc = new ArrayList()"); - List hc = new ArrayList(); - TestUtil - .logMsg("Construct ClientLogicalHandler1 and add to HandlerChain"); - hc.add( - new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler1()); - TestUtil - .logMsg("Construct ClientLogicalHandler2 and add to HandlerChain"); - hc.add( - new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler2()); - TestUtil - .logMsg("Construct ClientLogicalHandler3 and add to HandlerChain"); - hc.add( - new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler3()); - TestUtil.logMsg("Set handler chain for protocol binding instance"); - TestUtil - .logMsg("Calling Binding.setHandlerChain(java.util.List)"); - binding.setHandlerChain(hc); - TestUtil - .logMsg("Now get the handler chain for protocol binding instance"); - TestUtil - .logMsg("Calling java.util.List Binding.getHandlerChain()"); - List hl = binding.getHandlerChain(); - TestUtil.logMsg("HandlerChainList=" + hl); - TestUtil.logMsg("HandlerChainSize = " + hl.size()); - if (hl.size() != 3) { - TestUtil.logErr("Wrong size returned for HandlerChain"); - TestUtil.logErr( - "handlerchain1 size=" + hl.size() + ", handlerchain1 size=3"); - pass = false; - } - Class c1 = Class.forName( - "com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler1"); - Class c2 = Class.forName( - "com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler2"); - Class c3 = Class.forName( - "com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler3"); - TestUtil.logMsg("Walk through HandlerChain and verify contents"); - for (Handler hi : hl) { - Class c = (Class) hi.getClass(); - TestUtil.logMsg("Handler object = " + hi); - TestUtil.logMsg("Class object = " + c); - if (!c.equals(c1) && !c.equals(c2) && !c.equals(c3)) { - TestUtil.logErr("Expected object1: " + c1); - TestUtil.logErr("Expected object2: " + c2); - TestUtil.logErr("Expected object3: " + c3); - TestUtil.logErr("Unexpected object in chain: " + c); - pass = false; - } - } - } catch (UnsupportedOperationException e) { - TestUtil.logMsg("Caught UnsupportedOperationException"); - } catch (WebServiceException e) { - TestUtil.logErr("Caught unexpected WebServiceException", e); - pass = false; - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("SetAndGetHandlerChainForDispatchObjTest failed", e); - } - - if (!pass) - throw new Fault("SetAndGetHandlerChainForDispatchObjTest failed"); - } - - /* - * @testName: SetAndGetHandlerChainForStubObjTest - * - * @assertion_ids: JAXWS:JAVADOC:2; JAXWS:JAVADOC:3; - * - * @test_Strategy: Sets the handler chain for a protocol binding instance. - * Gets the handler chain for a protocol binding instance. - */ - public void SetAndGetHandlerChainForStubObjTest() throws Fault { - TestUtil.logTrace("SetAndGetHandlerChainForStubObjTest"); - boolean pass = true; - try { - binding = bp.getBinding(); - TestUtil.logMsg("Stub object = " + port); - TestUtil.logMsg("Binding object = " + binding); - TestUtil - .logMsg("Test setHandlerChain()/getHandlerChain() for Stub object"); - TestUtil.logMsg( - "Create a handler chain for SOAP 1.1 over HTTP protocol binding"); - TestUtil.logMsg("List hc = new ArrayList()"); - List hc = new ArrayList(); - TestUtil - .logMsg("Construct ClientLogicalHandler1 and add to HandlerChain"); - hc.add( - new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler1()); - TestUtil - .logMsg("Construct ClientLogicalHandler2 and add to HandlerChain"); - hc.add( - new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler2()); - TestUtil - .logMsg("Construct ClientLogicalHandler3 and add to HandlerChain"); - hc.add( - new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler3()); - TestUtil.logMsg("Set handler chain for protocol binding instance"); - TestUtil - .logMsg("Calling Binding.setHandlerChain(java.util.List)"); - binding.setHandlerChain(hc); - TestUtil - .logMsg("Now get the handler chain for protocol binding instance"); - TestUtil - .logMsg("Calling java.util.List Binding.getHandlerChain()"); - List hl = binding.getHandlerChain(); - TestUtil.logMsg("HandlerChainList=" + hl); - TestUtil.logMsg("HandlerChainSize = " + hl.size()); - if (hl.size() != 3) { - TestUtil.logErr("Wrong size returned for HandlerChain"); - TestUtil.logErr( - "handlerchain1 size=" + hl.size() + ", handlerchain1 size=3"); - pass = false; - } - Class c1 = Class.forName( - "com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler1"); - Class c2 = Class.forName( - "com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler2"); - Class c3 = Class.forName( - "com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler3"); - TestUtil.logMsg("Walk through HandlerChain and verify contents"); - for (Handler hi : hl) { - Class c = (Class) hi.getClass(); - TestUtil.logMsg("Handler object = " + hi); - TestUtil.logMsg("Class object = " + c); - if (!c.equals(c1) && !c.equals(c2) && !c.equals(c3)) { - TestUtil.logErr("Expected object1: " + c1); - TestUtil.logErr("Expected object2: " + c2); - TestUtil.logErr("Expected object3: " + c3); - TestUtil.logErr("Unexpected object in chain: " + c); - pass = false; - } - } - } catch (UnsupportedOperationException e) { - TestUtil.logMsg("Caught UnsupportedOperationException"); - } catch (WebServiceException e) { - TestUtil.logErr("Caught unexpected WebServiceException", e); - pass = false; - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("SetAndGetHandlerChainForStubObjTest failed", e); - } - - if (!pass) - throw new Fault("SetAndGetHandlerChainForStubObjTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Binding/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Binding/build.xml deleted file mode 100644 index 25e2dea756..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Binding/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Binding/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Binding/jakartaEE.tokens deleted file mode 100644 index 0b1a4b6067..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Binding/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsdlhandlerservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.DLHandlerService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=DLHandlerService -SERVICEREFNAMEWSSERVLET=service/wsdlhandlerservice -SERVICEREFNAMEWSEJB=service/wsdlhandlerservice -SERVICEREFNAMEWSAPPCLIENT=service/wsdlhandlerservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/BindingProvider/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/BindingProvider/Client.java deleted file mode 100644 index b64a0b9fd6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/BindingProvider/Client.java +++ /dev/null @@ -1,644 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.BindingProvider; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.EndpointReference; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; - -import javax.xml.namespace.QName; -import javax.xml.transform.Source; -import com.sun.ts.tests.jaxws.wsa.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.api.jakarta_xml_ws.BindingProvider."; - - private static final String SHARED_CLIENT_PKG = "com.sun.ts.tests.jaxws.sharedclients.doclithelloclient."; - - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private static final String PORT_TYPE = "Hello"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private QName PORT_TYPE_QNAME = new QName(NAMESPACEURI, PORT_TYPE); - - private String helloReq = "foo"; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private static final String ENDPOINT_URL = "dlhelloservice.endpoint.1"; - - private static final String WSDLLOC_URL = "dlhelloservice.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private EndpointReference epr = null; - - private Binding binding = null; - - private BindingProvider bpStub = null; - - private Dispatch dispatchSrc = null; - - private Hello port = null; - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService.class; - - static HelloService service = null; - - private Dispatch createDispatchSrc(QName port, Class type, - jakarta.xml.ws.Service.Mode mode) { - TestUtil.logMsg("Create a Dispatch object for SOAP 1.1 over HTTP binding"); - return service.createDispatch(port, type, mode); - } - - private void getPorts() throws Exception { - TestUtil.logMsg("Get port = " + PORT_NAME); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port=" + port); - } - - private void getPortsStandalone() throws Exception { - getPorts(); - bpStub = (BindingProvider) port; - dispatchSrc = createDispatchSrc(PORT_QNAME, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - bpStub = (BindingProvider) port; - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - dispatchSrc = service.createDispatch(PORT_QNAME, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - Binding binding = null; - modeProperty = p.getProperty(MODEPROP); - - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (HelloService) JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, - SERVICE_CLASS); - getPortsStandalone(); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HelloService) getSharedObject(); - getPortsJavaEE(); - } - HelloRequest req = new HelloRequest(); - req.setArgument("foo"); - TestUtil.logMsg("invoking hello through stub"); - port.hello(req); - Source reqMsg = JAXWS_Util.makeSource(helloReq, "StreamSource"); - TestUtil.logMsg("invoking hello through dispatch"); - dispatchSrc.invoke(reqMsg); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: getBindingForDispatchObjTest - * - * @assertion_ids: JAXWS:JAVADOC:4; - * - * @test_Strategy: Get the Binding for this binding provider. - */ - public void getBindingForDispatchObjTest() throws Fault { - TestUtil.logTrace("getBindingForDispatchObjTest"); - boolean pass = true; - TestUtil.logMsg("Calling BindingProvider.getBinding() for Dispatch object"); - binding = dispatchSrc.getBinding(); - TestUtil.logMsg("Binding object=" + binding); - if (binding == null) { - TestUtil.logErr("getBinding() returned null"); - pass = false; - } else - TestUtil.logMsg("getBinding() returned Binding object: " + binding); - if (!pass) - throw new Fault("getBindingForDispatchObjTest failed"); - } - - /* - * @testName: getRequestContextForDispatchObjTest - * - * @assertion_ids: JAXWS:JAVADOC:5; - * - * @test_Strategy: Get the context that is used to initialize the message - * context for request messages. - */ - public void getRequestContextForDispatchObjTest() throws Fault { - TestUtil.logTrace("getRequestContextForDispatchObjTest"); - boolean pass = true; - TestUtil.logMsg( - "Calling BindingProvider.getRequestContext() for Dispatch object"); - java.util.Map requestContext = dispatchSrc - .getRequestContext(); - if (requestContext == null) { - TestUtil.logErr("getRequestContext() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getRequestContext() returned java.util.Map object"); - TestUtil.logMsg("map size=" + requestContext.size()); - java.util.Iterator iterator = requestContext.keySet().iterator(); - StringBuffer names = new StringBuffer(); - while (iterator.hasNext()) { - if (names.length() > 0) - names.append("\n" + iterator.next()); - else - names.append("" + iterator.next()); - } - if (names.length() > 0) - TestUtil.logMsg("Request property names are\n" + names.toString()); - else - TestUtil.logMsg("There are no request properties set"); - } - if (!pass) - throw new Fault("getRequestContextForDispatchObjTest failed"); - } - - /* - * @testName: getResponseContextForDispatchObjTest - * - * @assertion_ids: JAXWS:JAVADOC:6; - * - * @test_Strategy: Get the context that resulted from processing a response - * message. - */ - public void getResponseContextForDispatchObjTest() throws Fault { - TestUtil.logTrace("getResponseContextForDispatchObjTest"); - boolean pass = true; - TestUtil.logMsg( - "Calling BindingProvider.getResponseContext() for Dispatch object"); - java.util.Map responseContext = dispatchSrc - .getResponseContext(); - if (responseContext == null) { - TestUtil.logErr("getResponseContext() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getResponseContext() returned java.util.Map object"); - TestUtil.logMsg("map size=" + responseContext.size()); - java.util.Iterator iterator = responseContext.keySet().iterator(); - StringBuffer names = new StringBuffer(); - while (iterator.hasNext()) { - if (names.length() > 0) - names.append("\n" + iterator.next()); - else - names.append("" + iterator.next()); - } - if (names.length() > 0) - TestUtil.logMsg("Response property names are\n" + names.toString()); - else - TestUtil.logMsg("There are no response properties set"); - } - if (!pass) - throw new Fault("getResponseContextForDispatchObjTest failed"); - } - - /* - * @testName: getBindingForStubObjTest - * - * @assertion_ids: JAXWS:SPEC:4009; JAXWS:SPEC:4010; JAXWS:JAVADOC:4; - * - * @test_Strategy: Get the Binding for this binding provider. - */ - public void getBindingForStubObjTest() throws Fault { - TestUtil.logTrace("getBindingForStubObjTest"); - boolean pass = true; - TestUtil.logMsg("Calling BindingProvider.getBinding() for Stub object"); - binding = bpStub.getBinding(); - TestUtil.logMsg("Binding object=" + binding); - if (binding == null) { - TestUtil.logErr("getBinding() returned null"); - pass = false; - } else - TestUtil.logMsg("getBinding() returned Binding object: " + binding); - if (!pass) - throw new Fault("getBindingForStubObjTest failed"); - } - - /* - * @testName: getRequestContextForStubObjTest - * - * @assertion_ids: JAXWS:SPEC:4009; JAXWS:SPEC:4010; JAXWS:JAVADOC:5; - * - * @test_Strategy: Get the context that is used to initialize the message - * context for request messages. - */ - public void getRequestContextForStubObjTest() throws Fault { - TestUtil.logTrace("getRequestContextForStubObjTest"); - boolean pass = true; - TestUtil - .logMsg("Calling BindingProvider.getRequestContext() for Stub object"); - java.util.Map requestContext = bpStub.getRequestContext(); - if (requestContext == null) { - TestUtil.logErr("getRequestContext() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getRequestContext() returned java.util.Map object"); - TestUtil.logMsg("map size=" + requestContext.size()); - java.util.Iterator iterator = requestContext.keySet().iterator(); - StringBuffer names = new StringBuffer(); - while (iterator.hasNext()) { - if (names.length() > 0) - names.append("\n" + iterator.next()); - else - names.append("" + iterator.next()); - } - if (names.length() > 0) - TestUtil.logMsg("Request property names are\n" + names.toString()); - else - TestUtil.logMsg("There are no request properties set"); - } - if (!pass) - throw new Fault("getRequestContextForStubObjTest failed"); - } - - /* - * @testName: getResponseContextForStubObjTest - * - * @assertion_ids: JAXWS:SPEC:4009; JAXWS:SPEC:4010; JAXWS:JAVADOC:6; - * - * @test_Strategy: Get the context that resulted from processing a response - * message. - */ - public void getResponseContextForStubObjTest() throws Fault { - TestUtil.logTrace("getResponseContextForStubObjTest"); - boolean pass = true; - TestUtil - .logMsg("Calling BindingProvider.getResponseContext() for Stub object"); - java.util.Map responseContext = bpStub.getResponseContext(); - if (responseContext == null) { - TestUtil.logErr("getResponseContext() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getResponseContext() returned java.util.Map object"); - TestUtil.logMsg("map size=" + responseContext.size()); - java.util.Iterator iterator = responseContext.keySet().iterator(); - StringBuffer names = new StringBuffer(); - while (iterator.hasNext()) { - if (names.length() > 0) - names.append("\n" + iterator.next()); - else - names.append("" + iterator.next()); - } - if (names.length() > 0) - TestUtil.logMsg("Response property names are\n" + names.toString()); - else - TestUtil.logMsg("There are no response properties set"); - } - if (!pass) - throw new Fault("getResponseContextForStubObjTest failed"); - } - - /* - * @testName: setStandardPropertiesTest - * - * @assertion_ids: JAXWS:SPEC:4005; - * - * @test_Strategy: Get the context that is used to initialize the message - * context for request messages and set all the standard properties. - */ - public void setStandardPropertiesTest() throws Fault { - TestUtil.logTrace("setStandardPropertiesTest"); - boolean pass = true; - TestUtil - .logMsg("Calling BindingProvider.getRequestContext() for Stub object"); - java.util.Map requestContext = bpStub.getRequestContext(); - if (requestContext == null) { - TestUtil.logErr("getRequestContext() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getRequestContext() returned java.util.Map object"); - TestUtil.logMsg("Verify setting of all standard properties"); - requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "endpoint-address"); - requestContext.put(BindingProvider.PASSWORD_PROPERTY, "password"); - requestContext.put(BindingProvider.USERNAME_PROPERTY, "username"); - requestContext.put(BindingProvider.SOAPACTION_URI_PROPERTY, "myuri"); - requestContext.put(BindingProvider.SOAPACTION_USE_PROPERTY, - new Boolean("false")); - requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, - new Boolean("false")); - TestUtil.logMsg("map size=" + requestContext.size()); - java.util.Iterator iterator = requestContext.keySet().iterator(); - StringBuffer names = new StringBuffer(); - while (iterator.hasNext()) { - if (names.length() > 0) - names.append("\n" + iterator.next()); - else - names.append("" + iterator.next()); - } - if (names.length() > 0) - TestUtil.logMsg("Request property names are\n" + names.toString()); - else - TestUtil.logMsg("There are no request properties set"); - } - if (!pass) - throw new Fault("setStandardPropertiesTest failed"); - } - - /* - * @testName: setNonStandardPropertiesTest - * - * @assertion_ids: JAXWS:SPEC:4007; - * - * @test_Strategy: Get the context that is used to initialize the message - * context for request messages and set all the standard properties. - */ - public void setNonStandardPropertiesTest() throws Fault { - TestUtil.logTrace("setNonStandardPropertiesTest"); - boolean pass = true; - TestUtil - .logMsg("Calling BindingProvider.getRequestContext() for Stub object"); - java.util.Map requestContext = bpStub.getRequestContext(); - if (requestContext == null) { - TestUtil.logErr("getRequestContext() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getRequestContext() returned java.util.Map object"); - TestUtil.logMsg("Verify setting of a non standard properties"); - requestContext.put("foobar.property", "foobar"); - TestUtil.logMsg("map size=" + requestContext.size()); - java.util.Iterator iterator = requestContext.keySet().iterator(); - StringBuffer names = new StringBuffer(); - while (iterator.hasNext()) { - if (names.length() > 0) - names.append("\n" + iterator.next()); - else - names.append("" + iterator.next()); - } - if (names.length() > 0) - TestUtil.logMsg("Request property names are\n" + names.toString()); - else - TestUtil.logMsg("There are no request properties set"); - } - if (!pass) - throw new Fault("setNonStandardPropertiesTest failed"); - } - - /* - * @testName: getEndpointReferenceForDispatchObjTest - * - * @assertion_ids: JAXWS:JAVADOC:186; JAXWS:SPEC:5023; JAXWS:SPEC:4022; - * WSAMD:SPEC:2000.2; WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; - * WSAMD:SPEC:2001.3; WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; - * WSAMD:SPEC:2002.3; WSAMD:SPEC:2002.4; JAXWS:SPEC:4033; - * - * @test_Strategy: Get the EndpointReference for this binding provider. - * Validate the EndpointReference (EPR) WSDL MetaData. - */ - public void getEndpointReferenceForDispatchObjTest() throws Fault { - TestUtil.logTrace("getEndpointReferenceForDispatchObjTest"); - boolean pass = true; - TestUtil.logMsg( - "Calling BindingProvider.getEndpointReference() for Dispatch object"); - epr = dispatchSrc.getEndpointReference(); - TestUtil.logMsg("EndpointReference object=" + epr); - if (epr == null) { - TestUtil.logErr("getEndpointReference() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getEndpointReference() returned EndpointReference object: " + epr); - pass = EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.FALSE); - } - if (!pass) - throw new Fault("getEndpointReferenceForDispatchObjTest failed"); - } - - /* - * @testName: getEndpointReferenceForStubObjTest - * - * @assertion_ids: JAXWS:JAVADOC:186; JAXWS:SPEC:5023; JAXWS:SPEC:4022; - * JAXWS:SPEC:4023; WSAMD:SPEC:2000.2; WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; - * WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; - * WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; WSAMD:SPEC:2002.4; JAXWS:SPEC:4033; - * - * @test_Strategy: Get the EndpointReference for this binding provider. - * Validate the EndpointReference (EPR) WSDL MetaData. - */ - public void getEndpointReferenceForStubObjTest() throws Fault { - TestUtil.logTrace("getEndpointReferenceForStubObjTest"); - boolean pass = true; - TestUtil.logMsg( - "Calling BindingProvider.getEndpointReference() for Stub object"); - epr = bpStub.getEndpointReference(); - TestUtil.logMsg("EndpointReference object=" + epr); - if (epr == null) { - TestUtil.logErr("getEndpointReference() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getEndpointReference() returned EndpointReference object: " + epr); - pass = EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.FALSE); - } - if (epr instanceof W3CEndpointReference) - TestUtil.logMsg("epr instanceof W3CEndpointReference"); - else { - TestUtil.logErr("epr not instanceof W3CEndpointReference"); - pass = false; - } - if (!pass) - throw new Fault("getEndpointReferenceForStubObjTest failed"); - } - - /* - * @testName: getEndpointReference2ForDispatchObjTest - * - * @assertion_ids: JAXWS:JAVADOC:187; JAXWS:SPEC:4022; JAXWS:SPEC:4023; - * WSAMD:SPEC:2000.2; WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; - * WSAMD:SPEC:2001.3; WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; - * WSAMD:SPEC:2002.3; WSAMD:SPEC:2002.4; JAXWS:SPEC:4033; - * - * @test_Strategy: Get the EndpointReference for this binding provider. - * Validate the EndpointReference (EPR) WSDL MetaData. - */ - public void getEndpointReference2ForDispatchObjTest() throws Fault { - TestUtil.logTrace("getEndpointReference2ForDispatchObjTest"); - boolean pass = true; - TestUtil.logMsg( - "Calling BindingProvider.getEndpointReference(Class) for Dispatch object"); - epr = dispatchSrc.getEndpointReference(W3CEndpointReference.class); - TestUtil.logMsg("EndpointReference object=" + epr); - if (epr == null) { - TestUtil.logErr("getEndpointReference() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getEndpointReference() returned EndpointReference object: " + epr); - pass = EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.FALSE); - } - if (epr instanceof W3CEndpointReference) - TestUtil.logMsg("epr instanceof W3CEndpointReference"); - else { - TestUtil.logErr("epr not instanceof W3CEndpointReference"); - pass = false; - } - if (!pass) - throw new Fault("getEndpointReference2ForDispatchObjTest failed"); - } - - /* - * @testName: getEndpointReference2ForStubObjTest - * - * @assertion_ids: JAXWS:JAVADOC:187; JAXWS:SPEC:4022; JAXWS:SPEC:4023; - * WSAMD:SPEC:2000.2; WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; - * WSAMD:SPEC:2001.3; WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; - * WSAMD:SPEC:2002.3; WSAMD:SPEC:2002.4; JAXWS:SPEC:4033; - * - * @test_Strategy: Get the EndpointReference for this binding provider. - * Validate the EndpointReference (EPR) WSDL MetaData. - */ - public void getEndpointReference2ForStubObjTest() throws Fault { - TestUtil.logTrace("getEndpointReference2ForStubObjTest"); - boolean pass = true; - TestUtil.logMsg( - "Calling BindingProvider.getEndpointReference(Class) for Stub object"); - epr = bpStub.getEndpointReference(W3CEndpointReference.class); - TestUtil.logMsg("EndpointReference object=" + epr); - if (epr == null) { - TestUtil.logErr("getEndpointReference() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getEndpointReference() returned EndpointReference object: " + epr); - pass = EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.FALSE); - } - if (epr instanceof W3CEndpointReference) - TestUtil.logMsg("epr instanceof W3CEndpointReference"); - else { - TestUtil.logErr("epr not instanceof W3CEndpointReference"); - pass = false; - } - if (!pass) - throw new Fault("getEndpointReference2ForStubObjTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/BindingProvider/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/BindingProvider/build.xml deleted file mode 100644 index 5e57199b11..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/BindingProvider/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/BindingProvider/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/BindingProvider/jakartaEE.tokens deleted file mode 100644 index e9beafdda0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/BindingProvider/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhelloservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Dispatch/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Dispatch/Client.java deleted file mode 100644 index 212459ca46..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Dispatch/Client.java +++ /dev/null @@ -1,795 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.Dispatch; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.*; - -import java.net.*; -import java.util.*; -import java.util.concurrent.*; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import jakarta.xml.ws.soap.*; -import jakarta.xml.soap.*; - -import jakarta.xml.bind.JAXBContext; - -import javax.xml.transform.Source; - -public class Client extends ServiceEETest { - // need to create jaxbContext - private static final ObjectFactory of = new ObjectFactory(); - - // Messages sent as straight XML as Source objects - private String helloReq = "foo"; - - private String helloOneWayReq = "foo"; - - // Messages sent as SOAPMessage objects - private String helloReqSM = "foo"; - - private String helloOneWayReqSM = "foo"; - - // Negative test case invalid messages - private String helloBadReq1 = "foo"; - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.api.jakarta_xml_ws.Dispatch."; - - private static final String SHARED_CLIENT_PKG = "com.sun.ts.tests.jaxws.sharedclients.doclithelloclient"; - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService.class; - - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "dlhelloservice.endpoint.1"; - - private static final String WSDLLOC_URL = "dlhelloservice.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private Dispatch dispatchJaxb = null; - - private Dispatch dispatchSrc = null; - - private Dispatch dispatchSM = null; - - static HelloService service = null; - - private static final Class JAXB_OBJECT_FACTORY = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.ObjectFactory.class; - - private JAXBContext createJAXBContext() { - try { - return JAXBContext.newInstance(JAXB_OBJECT_FACTORY); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - private Dispatch createDispatchJAXB() throws Exception { - return service.createDispatch(PORT_QNAME, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - private Dispatch createDispatchSource() throws Exception { - return service.createDispatch(PORT_QNAME, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - private Dispatch createDispatchSOAPMessage() throws Exception { - return service.createDispatch(PORT_QNAME, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE); - } - - class MyHandlerXML implements AsyncHandler { - private String theData; - - public String getData() { - return theData; - } - - public void handleResponse(Response res) { - TestUtil.logMsg("AsyncHandler: MyHandlerXML()"); - String resStr = null; - try { - Source resMsg = res.get(); - resStr = JAXWS_Util - .getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(resMsg)); - TestUtil.logMsg("resStr=" + resStr); - } catch (Exception e) { - e.printStackTrace(); - } - theData = resStr; - } - } - - class MyHandlerSOAPMessage implements AsyncHandler { - private String theData; - - public String getData() { - return theData; - } - - public void handleResponse(Response res) { - TestUtil.logMsg("AsyncHandler: MyHandlerSOAPMessage()"); - String resStr = null; - try { - SOAPMessage resMsg = res.get(); - } catch (Exception e) { - e.printStackTrace(); - } - theData = resStr; - } - } - - class MyHandlerJAXB implements AsyncHandler { - private HelloResponse theData; - - public HelloResponse getData() { - return theData; - } - - public void handleResponse(Response res) { - TestUtil.logMsg("AsyncHandler: MyHandlerJAXB()"); - try { - HelloResponse resMsg = (HelloResponse) res.get(); - theData = resMsg; - } catch (Exception e) { - e.printStackTrace(); - } - } - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (HelloService) JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, - SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HelloService) getSharedObject(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: invokeTestXML - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:8; WS4EE:SPEC:4005; - * - * @test_Strategy: - */ - public void invokeTestXML() throws Fault { - TestUtil.logTrace("invokeTestXML"); - boolean pass = true; - Source reqMsg = JAXWS_Util.makeSource(helloReq, "StreamSource"); - String resStr; - try { - dispatchSrc = createDispatchSource(); - Source resMsg = dispatchSrc.invoke(reqMsg); - try { - resStr = JAXWS_Util - .getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(resMsg)); - TestUtil.logMsg("resStr=" + resStr); - } catch (Exception e) { - e.printStackTrace(); - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTestXML failed"); - } - - /* - * @testName: invokeAsyncTestXML - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:9; WS4EE:SPEC:4005; - * WS4EE:SPEC:4006; WS4EE:SPEC:4007; - * - * @test_Strategy: - */ - public void invokeAsyncTestXML() throws Fault { - TestUtil.logTrace("invokeAsyncTestXML"); - boolean pass = true; - Source reqMsg = JAXWS_Util.makeSource(helloReq, "StreamSource"); - String resStr; - try { - dispatchSrc = createDispatchSource(); - Response res = dispatchSrc.invokeAsync(reqMsg); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!res.isDone()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - - try { - Source resMsg = res.get(); - resStr = JAXWS_Util - .getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(resMsg)); - TestUtil.logMsg("resStr=" + resStr); - } catch (Exception e) { - e.printStackTrace(); - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeAsyncTestXML failed"); - } - - /* - * @testName: invokeAsyncHandlerTestXML - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:9; WS4EE:SPEC:4005; - * WS4EE:SPEC:4006; WS4EE:SPEC:4008; - * - * @test_Strategy: - */ - public void invokeAsyncHandlerTestXML() throws Fault { - TestUtil.logTrace("invokeAsyncHandlerTestXML"); - boolean pass = true; - Source reqMsg = JAXWS_Util.makeSource(helloReq, "StreamSource"); - MyHandlerXML handler = new MyHandlerXML(); - Future future; - try { - dispatchSrc = createDispatchSource(); - future = dispatchSrc.invokeAsync(reqMsg, handler); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!future.isDone()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - TestUtil - .logMsg("Data from AsyncHandler MyHandler(): " + handler.getData()); - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - - if (!pass) - throw new Fault("invokeAsyncHandlerTestXML failed"); - } - - /* - * @testName: invokeOneWayTestXML - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:11; JAXWS:SPEC:10016; - * JAXWS:SPEC:6006; WS4EE:SPEC:4005; - * - * @test_Strategy: - */ - public void invokeOneWayTestXML() throws Fault { - TestUtil.logTrace("invokeOneWayTestXML"); - boolean pass = true; - Source reqMsg = JAXWS_Util.makeSource(helloOneWayReq, "StreamSource"); - try { - dispatchSrc = createDispatchSource(); - dispatchSrc.invokeOneWay(reqMsg); - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeOneWayTestXML failed"); - } - - /* - * @testName: invokeTestJAXB - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:8; WS4EE:SPEC:4005; - * - * @test_Strategy: - */ - public void invokeTestJAXB() throws Fault { - TestUtil.logTrace("invokeTestJAXB"); - boolean pass = true; - HelloRequest helloReq = null; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument("foo"); - } catch (Exception e) { - e.printStackTrace(); - } - HelloResponse helloRes = null; - try { - dispatchJaxb = createDispatchJAXB(); - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - helloRes = (HelloResponse) dispatchJaxb.invoke(helloReq); - TestUtil.logMsg("HelloRequest: " + helloReq.getArgument()); - TestUtil.logMsg("HelloResponse: " + helloRes.getArgument()); - if (!helloReq.getArgument().equals(helloRes.getArgument())) - pass = false; - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTestJAXB failed"); - } - - /* - * @testName: invokeAsyncTestJAXB - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:9; WS4EE:SPEC:4005; - * WS4EE:SPEC:4006; WS4EE:SPEC:4007; - * - * @test_Strategy: - */ - public void invokeAsyncTestJAXB() throws Fault { - TestUtil.logTrace("invokeAsyncTestJAXB"); - boolean pass = true; - HelloRequest helloReq = null; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument("foo"); - } catch (Exception e) { - e.printStackTrace(); - } - HelloResponse helloRes = null; - try { - dispatchJaxb = createDispatchJAXB(); - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - Response res = dispatchJaxb.invokeAsync(helloReq); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!res.isDone()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - helloRes = (HelloResponse) res.get(); - TestUtil.logMsg("HelloRequest: " + helloReq.getArgument()); - TestUtil.logMsg("HelloResponse: " + helloRes.getArgument()); - if (!helloReq.getArgument().equals(helloRes.getArgument())) - pass = false; - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeAsyncTestJAXB failed"); - } - - /* - * @testName: invokeAsyncHandlerTestJAXB - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:10; WS4EE:SPEC:4005; - * WS4EE:SPEC:4006; WS4EE:SPEC:4008; - * - * @test_Strategy: - */ - public void invokeAsyncHandlerTestJAXB() throws Fault { - TestUtil.logTrace("invokeAsyncHandlerTestJAXB"); - boolean pass = true; - HelloRequest helloReq = null; - Future future; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument("foo"); - } catch (Exception e) { - e.printStackTrace(); - } - MyHandlerJAXB handler = new MyHandlerJAXB(); - HelloResponse helloRes = null; - try { - dispatchJaxb = createDispatchJAXB(); - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - future = dispatchJaxb.invokeAsync(helloReq, handler); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!future.isDone()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - helloRes = handler.getData(); - if (helloRes != null) { - TestUtil.logMsg("HelloRequest: " + helloReq.getArgument()); - TestUtil.logMsg("HelloResponse: " + helloRes.getArgument()); - if (!helloReq.getArgument().equals(helloRes.getArgument())) - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeAsyncHandlerTestJAXB failed"); - } - - /* - * @testName: invokeOneWayTestJAXB - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:11; JAXWS:SPEC:6006; - * WS4EE:SPEC:4005; - * - * @test_Strategy: - */ - public void invokeOneWayTestJAXB() throws Fault { - TestUtil.logTrace("invokeOneWayTestJAXB"); - boolean pass = true; - HelloRequest helloReq = null; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument("foo"); - } catch (Exception e) { - e.printStackTrace(); - } - try { - dispatchJaxb = createDispatchJAXB(); - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - dispatchJaxb.invokeOneWay(helloReq); - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeOneWayTestJAXB failed"); - } - - /* - * @testName: invokeNegativeTestXML - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:SPEC:4015; - * - * @test_Strategy: - */ - public void invokeNegativeTestXML() throws Fault { - TestUtil.logTrace("invokeNegativeTestXML"); - boolean pass = true; - Source reqMsg = JAXWS_Util.makeSource(helloBadReq1, "StreamSource"); - String resStr; - try { - dispatchSrc = createDispatchSource(); - Source resMsg = dispatchSrc.invoke(reqMsg); - pass = false; - TestUtil.logErr("Did not get WebServiceException ..."); - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected WebServiceException"); - e.printStackTrace(); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Received unexpected exception", e); - } - if (!pass) - throw new Fault("invokeNegativeTestXML failed"); - } - - /* - * @testName: invokeOneWayNegTestXML - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:SPEC:4017; - * - * @test_Strategy: - */ - public void invokeOneWayNegTestXML() throws Fault { - TestUtil.logTrace("invokeOneWayNegTestXML"); - boolean pass = true; - Source reqMsg = JAXWS_Util.makeSource(helloBadReq1, "StreamSource"); - try { - dispatchSrc = createDispatchSource(); - dispatchSrc.invokeOneWay(reqMsg); - pass = false; - TestUtil.logErr("Did not get WebServiceException ..."); - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected WebServiceException"); - e.printStackTrace(); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Received unexpected exception", e); - } - if (!pass) - throw new Fault("invokeOneWayNegTestXML failed"); - } - - /* - * @testName: invokeTestSOAPMessage - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:8; - * - * @test_Strategy: - */ - public void invokeTestSOAPMessage() throws Fault { - TestUtil.logTrace("invokeTestSOAPMessage"); - boolean pass = true; - SOAPMessage reqMsg = JAXWS_Util.makeSOAPMessage(helloReqSM); - String resStr; - try { - dispatchSM = createDispatchSOAPMessage(); - SOAPMessage resMsg = dispatchSM.invoke(reqMsg); - try { - resStr = JAXWS_Util.getSOAPMessageAsString(resMsg); - TestUtil.logMsg("resStr=" + resStr); - } catch (Exception e) { - e.printStackTrace(); - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTestSOAPMessage failed"); - } - - /* - * @testName: invokeAsyncTestSOAPMessage - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:10; - * - * @test_Strategy: - */ - public void invokeAsyncTestSOAPMessage() throws Fault { - TestUtil.logTrace("invokeAsyncTestSOAPMessage"); - boolean pass = true; - SOAPMessage reqMsg = JAXWS_Util.makeSOAPMessage(helloReqSM); - String resStr; - try { - dispatchSM = createDispatchSOAPMessage(); - Response res = dispatchSM.invokeAsync(reqMsg); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!res.isDone()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - SOAPMessage resMsg = res.get(); - try { - resStr = JAXWS_Util.getSOAPMessageAsString(resMsg); - TestUtil.logMsg("resStr=" + resStr); - } catch (Exception e) { - e.printStackTrace(); - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeAsyncTestSOAPMessage failed"); - } - - /* - * @testName: invokeAsyncHandlerTestSOAPMessage - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:10; - * - * @test_Strategy: - */ - public void invokeAsyncHandlerTestSOAPMessage() throws Fault { - TestUtil.logTrace("invokeAsyncHandlerTestSOAPMessage"); - boolean pass = true; - SOAPMessage reqMsg = JAXWS_Util.makeSOAPMessage(helloReqSM); - MyHandlerSOAPMessage handler = new MyHandlerSOAPMessage(); - Future future; - try { - dispatchSM = createDispatchSOAPMessage(); - future = dispatchSM.invokeAsync(reqMsg, handler); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!future.isDone()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - TestUtil - .logMsg("Data from AsyncHandler MyHandler(): " + handler.getData()); - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - - if (!pass) - throw new Fault("invokeAsyncHandlerTestSOAPMessage failed"); - } - - /* - * @testName: invokeOneWayTestSOAPMessage - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:11; - * - * @test_Strategy: - */ - public void invokeOneWayTestSOAPMessage() throws Fault { - TestUtil.logTrace("invokeOneWayTestSOAPMessage"); - boolean pass = true; - SOAPMessage reqMsg = JAXWS_Util.makeSOAPMessage(helloOneWayReqSM); - try { - dispatchSM = createDispatchSOAPMessage(); - dispatchSM.invokeOneWay(reqMsg); - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeOneWayTestSOAPMessage failed"); - } - - /* - * @testName: invokeTestJAXBNull - * - * @assertion_ids: JAXWS:SPEC:2036; JAXWS:SPEC:4013; JAXWS:SPEC:4015; - * - * @test_Strategy: - */ - public void invokeTestJAXBNull() throws Fault { - TestUtil.logTrace("invokeTestJAXBNull"); - boolean pass = true; - HelloRequest helloReq = null; - HelloResponse helloRes = null; - try { - dispatchJaxb = createDispatchJAXB(); - Binding binding = ((BindingProvider) dispatchJaxb).getBinding(); - if (binding instanceof SOAPBinding) { - TestUtil.logMsg("binding is a SOAPBinding instance"); - } else { - TestUtil.logErr("binding is not a SOAPBinding instance"); - pass = false; - } - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - TestUtil.logMsg("Calling invoke ...."); - helloRes = (HelloResponse) dispatchJaxb.invoke(helloReq); - TestUtil.logErr( - "No SOAPFaultException or WebServiceException from bad invoke"); - pass = false; - } catch (SOAPFaultException e) { - TestUtil.logMsg("Got expected SOAPFaultException: " + e); - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected WebServiceException: " + e); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Received unexpected exception", e); - } - if (!pass) - throw new Fault("invokeTestJAXBNull failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Dispatch/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Dispatch/build.xml deleted file mode 100644 index bb37fa3b26..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Dispatch/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Dispatch/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Dispatch/jakartaEE.tokens deleted file mode 100644 index 28dc128adc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Dispatch/jakartaEE.tokens +++ /dev/null @@ -1,9 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhelloservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloservice -~ - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/EndpointReference/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/EndpointReference/Client.java deleted file mode 100644 index afc1d74998..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/EndpointReference/Client.java +++ /dev/null @@ -1,579 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 51361 2006-10-10 21:21:31Z jbenoit $ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.EndpointReference; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.*; - -import java.net.*; -import java.util.*; -import java.text.MessageFormat; - -import jakarta.xml.ws.EndpointReference; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import javax.xml.transform.Source; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.EprUtil; - -import jakarta.xml.ws.*; - -import javax.xml.namespace.QName; - -import javax.xml.transform.dom.*; -import org.w3c.dom.Node; - -public class Client extends ServiceEETest { - - private static String xmlSource = "
{0}
wsns:Hellowsns:HelloService
"; - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.api.jakarta_xml_ws.BindingProvider."; - - private static final String SHARED_CLIENT_PKG = "com.sun.ts.tests.jaxws.sharedclients.doclithelloclient."; - - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private static final String PORT_TYPE_NAME = "Hello"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private QName PORT_TYPE_QNAME = new QName(NAMESPACEURI, PORT_TYPE_NAME); - - private String helloReq = "foo"; - - private String foo_arg = "foo"; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private static final String ENDPOINT_URL = "dlhelloservice.endpoint.1"; - - private static final String WSDLLOC_URL = "dlhelloservice.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private EndpointReference epr = null; - - private BindingProvider bpStub = null; - - private Dispatch dispatchSrc = null; - - private Hello port = null; - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService.class; - - static HelloService service = null; - - private Dispatch createDispatchSrc(QName port, Class type, - jakarta.xml.ws.Service.Mode mode) { - TestUtil.logMsg("Create a Dispatch object for SOAP 1.1 over HTTP binding"); - return service.createDispatch(port, type, mode); - } - - private void getPorts() throws Exception { - TestUtil.logMsg("Get port = " + PORT_NAME); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port=" + port); - } - - private void getPortsStandalone() throws Exception { - getPorts(); - bpStub = (BindingProvider) port; - dispatchSrc = createDispatchSrc(PORT_QNAME, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - bpStub = (BindingProvider) port; - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - dispatchSrc = service.createDispatch(PORT_QNAME, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - xmlSource = MessageFormat.format(xmlSource, url, wsdlurl.toString()); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - Binding binding = null; - modeProperty = p.getProperty(MODEPROP); - - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (HelloService) JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, - SERVICE_CLASS); - getPortsStandalone(); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HelloService) getSharedObject(); - getPortsJavaEE(); - } - HelloRequest req = new HelloRequest(); - req.setArgument(foo_arg); - TestUtil.logMsg("invoking hello through stub"); - port.hello(req); - Source reqMsg = JAXWS_Util.makeSource(helloReq, "StreamSource"); - TestUtil.logMsg("invoking hello through dispatch"); - dispatchSrc.invoke(reqMsg); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: readFromTest - * - * @assertion_ids: JAXWS:JAVADOC:141; JAXWS:JAVADOC:178; - * - * @test_Strategy: Test factory method to read an EndpointReference from the - * infoset contained in eprInfoset. - */ - public void readFromTest() throws Fault { - TestUtil.logTrace("readFromTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Create instance via EndpointReference.readFrom(source) ..."); - EndpointReference result = EndpointReference - .readFrom(JAXWS_Util.makeSource(xmlSource, "StreamSource")); - if (result != null) { - if (!(result instanceof W3CEndpointReference)) { - TestUtil.logErr( - "W3CEndpointReference created, but not instanceof W3CEndpointReference"); - pass = false; - } else { - TestUtil.logMsg("W3CEndpointReference object created successfully"); - } - } else { - TestUtil.logErr("W3CEndpointReference object not created"); - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("readFromTest failed", e); - } - - if (!pass) { - throw new Fault("readFromTest failed"); - } - } - - /* - * @testName: toStringTest - * - * @assertion_ids: JAXWS:JAVADOC:188; - * - * @test_Strategy: - */ - public void toStringTest() throws Fault { - TestUtil.logTrace("toStringTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Create instance via EndpointReference.readFrom(source) ..."); - EndpointReference epr = EndpointReference - .readFrom(JAXWS_Util.makeSource(xmlSource, "StreamSource")); - if (epr != null) { - if (!(epr instanceof W3CEndpointReference)) { - TestUtil.logErr( - "W3CEndpointReference created, but not instanceof W3CEndpointReference"); - pass = false; - } else { - TestUtil.logMsg("epr.toString(): " + epr.toString()); - TestUtil.logMsg( - "Now perform an epr.readFrom() of the results from epr.toString()"); - epr = EndpointReference - .readFrom(JAXWS_Util.makeSource(epr.toString(), "StreamSource")); - TestUtil.logMsg("Validate the EPR for correctness (Verify MetaData)"); - if (!EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.TRUE)) { - pass = false; - TestUtil - .logErr("toString failed to write out xml source as expected"); - } else - TestUtil - .logMsg("toString passed to write out xml source as expected"); - } - } else { - TestUtil.logErr("W3CEndpointReference object not created"); - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("toStringTest failed", e); - } - - if (!pass) { - throw new Fault("toStringTest failed"); - } - } - - /* - * @testName: getPortFromEndpointReferenceForDispatchObjTest - * - * @assertion_ids: JAXWS:JAVADOC:140; - * - * @test_Strategy: Get the port from the EndpointReference for this binding - * provider. Verify method invocation works from the port obtained from the - * EPR. - */ - public void getPortFromEndpointReferenceForDispatchObjTest() throws Fault { - TestUtil.logTrace("getPortFromEndpointReferenceForDispatchObjTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Calling BindingProvider.getEndpointReference() for Dispatch object"); - epr = dispatchSrc.getEndpointReference(); - pass = processEprFromDispatch(epr); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getPortFromEndpointReferenceForDispatchObjTest failed", - e); - } - if (!pass) { - throw new Fault("getPortFromEndpointReferenceForDispatchObjTest failed"); - } - } - - /* - * @testName: getPortFromEndpointReferenceForStubObjTest - * - * @assertion_ids: JAXWS:JAVADOC:140; - * - * @test_Strategy: Get the port from the EndpointReference for this binding - * provider. Verify method invocation works from the port obtained from the - * EPR. - */ - public void getPortFromEndpointReferenceForStubObjTest() throws Fault { - TestUtil.logTrace("getPortFromEndpointReferenceForStubObjTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Calling BindingProvider.getEndpointReference() for Stub object"); - epr = bpStub.getEndpointReference(); - pass = processEprFromStub(epr); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getPortFromEndpointReferenceForDispatchObjTest failed", - e); - } - if (!pass) { - throw new Fault("getPortFromEndpointReferenceForStubObjTest failed"); - } - } - - /* - * @testName: getPortFromEndpointReference2ForDispatchObjTest - * - * @assertion_ids: JAXWS:JAVADOC:140; JAXWS:SPEC:4028; JAXWS:SPEC:4028.1; - * - * @test_Strategy: Get the port from the EndpointReference for this binding - * provider. Verify method invocation works from the port obtained from the - * EPR. - */ - public void getPortFromEndpointReference2ForDispatchObjTest() throws Fault { - TestUtil.logTrace("getPortFromEndpointReference2ForDispatchObjTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Calling BindingProvider.getEndpointReference(Class) for Dispatch object"); - epr = dispatchSrc.getEndpointReference(W3CEndpointReference.class); - pass = processEprFromDispatch(epr); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getPortFromEndpointReference2ForDispatchObjTest failed", - e); - } - if (!pass) { - throw new Fault("getPortFromEndpointReference2ForDispatchObjTest failed"); - } - } - - /* - * @testName: getPortFromEndpointReference2ForStubObjTest - * - * @assertion_ids: JAXWS:JAVADOC:140; JAXWS:SPEC:4028; JAXWS:SPEC:4028.1; - * - * @test_Strategy: Get the port from the EndpointReference for this binding - * provider. Verify method invocation works from the port obtained from the - * EPR. - */ - public void getPortFromEndpointReference2ForStubObjTest() throws Fault { - TestUtil.logTrace("getPortFromEndpointReference2ForStubObjTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Calling BindingProvider.getEndpointReference(Class) for Stub object"); - epr = bpStub.getEndpointReference(W3CEndpointReference.class); - TestUtil.logMsg("EndpointReference object=" + epr); - pass = processEprFromStub(epr); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getPortFromEndpointReference2ForStubObjTest failed", e); - } - if (!pass) { - throw new Fault("getPortFromEndpointReference2ForStubObjTest failed"); - } - } - - private boolean processEprFromStub(EndpointReference epr) { - TestUtil.logTrace("processEprFromStub"); - boolean pass = true; - try { - TestUtil.logMsg("EndpointReference object=" + epr); - if (epr == null) { - TestUtil.logErr("getEndpointReference() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getEndpointReference() returned EndpointReference object: " + epr); - if (!(epr instanceof W3CEndpointReference)) { - TestUtil.logErr( - "W3CEndpointReference created, but not instanceof W3CEndpointReference"); - pass = false; - } else { - port = (Hello) epr.getPort(Hello.class); - if (port == null) { - TestUtil.logErr("EndpointReference.getPort(Class) returned null"); - pass = false; - } else { - // INVOKE A METHOD AND VERIFY RESULT - TestUtil.logMsg("getPort() returned Hello port as expected"); - HelloRequest req = new HelloRequest(); - req.setArgument(foo_arg); - TestUtil.logMsg("invoking hello through stub"); - HelloResponse res = port.hello(req); - if (res != null) { - // TEST PASSES if expected RESULT otherwise FAIL - TestUtil.logMsg("HelloRequest: " + req.getArgument()); - TestUtil.logMsg("HelloResponse: " + res.getArgument()); - // TEST PASSES if expected RESULT otherwise FAIL - if (!req.getArgument().equals(res.getArgument())) { - TestUtil.logErr("Expected [" + req.getArgument() - + "] Received response [" + res.getArgument() + "]"); - pass = false; - } else { - TestUtil.logMsg("Port method invocation successful, Expected [" - + req.getArgument() - + "] Received response Received response [" - + res.getArgument() + "]"); - } - } else { - TestUtil.logErr("HelloResponse is null from stub"); - pass = false; - } - } - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean processEprFromDispatch(EndpointReference epr) { - TestUtil.logTrace("processEprFromDispatch"); - boolean pass = true; - try { - TestUtil.logMsg("EndpointReference object=" + epr); - if (epr == null) { - TestUtil.logErr("getEndpointReference() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getEndpointReference() returned EndpointReference object: " + epr); - if (!(epr instanceof W3CEndpointReference)) { - TestUtil.logErr( - "W3CEndpointReference created, but not instanceof W3CEndpointReference"); - pass = false; - } else { - port = (Hello) epr.getPort(Hello.class); - if (port == null) { - TestUtil.logErr("EndpointReference.getPort(Class) returned null"); - pass = false; - } else { - // INVOKE A METHOD AND VERIFY RESULT - TestUtil.logMsg("getPort() returned Hello port as expected"); - Source reqMsg = JAXWS_Util.makeSource(helloReq, "StreamSource"); - TestUtil.logMsg("invoking hello through dispatch"); - Source resMsg = dispatchSrc.invoke(reqMsg); - // TEST PASSES if expected RESULT otherwise FAIL - /* - * expected RESULT=foo - */ - try { - DOMResult dr = JAXWS_Util.getSourceAsDOMResult(resMsg); - TestUtil.logMsg("Returned Response Source=" - + JAXWS_Util.getDOMResultAsString(dr)); - Node documentNode = dr.getNode(); - Node requestResponseNode = documentNode.getFirstChild(); - TestUtil.logMsg("received requestResponseNode localname [" - + requestResponseNode.getLocalName() + "]"); - if (!requestResponseNode.getLocalName() - .startsWith("HelloResponse")) { - TestUtil - .logMsg("The expected response messages were not received"); - pass = false; - } - // The first child is the test name the second(last) is the - // argument - Node argumentNode = requestResponseNode.getLastChild(); - // check for argument element - String argumentElement = argumentNode.getLocalName(); - if (argumentElement.equals("argument")) { - TestUtil.logMsg( - "Method invoked and returned with correct argument value [" - + argumentElement + "]"); - } else { - TestUtil.logMsg( - "Method invoked and returned with incorrect param value, Expected [argument] but received [" - + argumentElement + "]"); - pass = false; - } - // check for "foo" argument string as value of argument element - // node - Node textNode = argumentNode.getFirstChild(); - String item = textNode.getNodeValue(); - if (foo_arg.equals(item)) { - TestUtil.logMsg( - "Method invoked and returned with correct param value [" - + item + "]"); - } else { - TestUtil.logMsg( - "Method invoked and returned with incorrect param value, Expected [" - + foo_arg + "] but received [" + item + "]"); - pass = false; - } - } catch (Exception e) { - e.printStackTrace(); - pass = false; - } - } - } - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/EndpointReference/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/EndpointReference/build.xml deleted file mode 100644 index 35ceb9d778..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/EndpointReference/build.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/EndpointReference/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/EndpointReference/jakartaEE.tokens deleted file mode 100644 index 28dc128adc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/EndpointReference/jakartaEE.tokens +++ /dev/null @@ -1,9 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhelloservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloservice -~ - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Holder/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Holder/Client.java deleted file mode 100644 index ad6d839058..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Holder/Client.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.Holder; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; -import java.math.*; - -import jakarta.xml.ws.Holder; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - private final static Byte myByte = Byte.valueOf(Byte.MAX_VALUE); - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: HolderConstructorTest1 - * - * @assertion_ids: JAXWS:JAVADOC:28; - * - * @test_Strategy: Create instance via Holder() constructor. Verify Holder - * object created successfully. - */ - public void HolderConstructorTest1() throws Fault { - TestUtil.logTrace("HolderConstructorTest1"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via Holder() ..."); - Holder n = new Holder(); - if (n != null) { - TestUtil.logMsg("Holder object created successfully"); - } else { - TestUtil.logErr("Holder object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("HolderConstructorTest1 failed", e); - } - - if (!pass) - throw new Fault("HolderConstructorTest1 failed"); - } - - /* - * @testName: HolderConstructorTest2 - * - * @assertion_ids: JAXWS:JAVADOC:29; - * - * @test_Strategy: Create instance via Holder(byte) constructor. Verify Holder - * object created successfully. - */ - public void HolderConstructorTest2() throws Fault { - TestUtil.logTrace("HolderConstructorTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via Holder(byte) ..."); - Holder n = new Holder(myByte); - if (n != null) { - TestUtil.logMsg("Holder object created successfully"); - } else { - TestUtil.logErr("Holder object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("HolderConstructorTest2 failed", e); - } - - if (!pass) - throw new Fault("HolderConstructorTest2 failed"); - } - - /* - * @testName: getValueTest - * - * @assertion_ids: JAXWS:JAVADOC:28; JAXWS:JAVADOC:29; - * - * @test_Strategy: Test using both constructors. Verify value is set correct - * in each case. - */ - public void getValueTest() throws Fault { - TestUtil.logTrace("getValueTest"); - boolean pass = true; - - if (!getValueTest1()) - pass = false; - if (!getValueTest2()) - pass = false; - - if (!pass) - throw new Fault("getValueTest failed"); - } - - /* - * Create instance via Holder(). Verify value is set to default. - */ - private boolean getValueTest1() throws Fault { - TestUtil.logTrace("getValueTest1"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via Holder() ..."); - Holder n = new Holder(); - if (n != null) { - if (n.value == null) - TestUtil.logMsg("value set as expected to null"); - else { - TestUtil.logMsg("value set unexpected to non-null"); - pass = false; - } - } else { - TestUtil.logErr("Holder object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - /* - * Create instance via Holder(byte). Verify value is set to default. - */ - private boolean getValueTest2() throws Fault { - TestUtil.logTrace("getValueTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via Holder(byte) ..."); - Holder n = new Holder(myByte); - if (n != null) { - Byte v = (Byte) n.value; - if (myByte.equals(v)) - TestUtil.logMsg("value set as expected: " + myByte); - else { - TestUtil.logErr("value: expected - " + myByte + ", received - " + v); - pass = false; - } - } else { - TestUtil.logErr("Holder object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Holder/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Holder/build.xml deleted file mode 100644 index 4d20320195..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Holder/build.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/LogicalMessage/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/LogicalMessage/Client.java deleted file mode 100644 index f0cb3cfde6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/LogicalMessage/Client.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.LogicalMessage; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.*; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.handler.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.api.jakarta_xml_ws.LogicalMessage."; - - private static final String SHARED_CLIENT_PKG = "com.sun.ts.tests.jaxws.sharedclients.doclithelloclient."; - - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "Hello3Port"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "dlhelloservice.endpoint.3"; - - private static final String WSDLLOC_URL = "dlhelloservice.wsdlloc.3"; - - private String url = null; - - private URL wsdlurl = null; - - private Hello3 port = null; - - private BindingProvider bp = null; - - private Binding binding = null; - - private List listOfBindings = new ArrayList(); - - private List portHandlerChain = null; - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService.class; - - static HelloService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - private boolean setupPorts() { - boolean result = true; - TestUtil.logTrace("entering setupPorts"); - try { - if (modeProperty.equals("standalone")) { - getPortsStandalone(); - } else { - getPortsJavaEE(); - } - } catch (Exception e) { - TestUtil.logErr("Could not setup stubs properly"); - TestUtil.printStackTrace(e); - result = false; - } - TestUtil.logTrace("leaving setupPorts"); - return result; - - } - - private void getPortsStandalone() throws Exception { - getPorts(); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - getTargetEndpointAddress(port); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - private void getPorts() throws Exception { - TestUtil.logTrace("entering getPorts"); - - TestUtil.logMsg("Get port = " + PORT_NAME); - port = (Hello3) service.getPort(Hello3.class); - TestUtil.logMsg("port=" + port); - - TestUtil.logMsg("Get binding for port = " + PORT_NAME); - bp = (BindingProvider) port; - binding = bp.getBinding(); - portHandlerChain = binding.getHandlerChain(); - TestUtil.logMsg("Port HandlerChain =" + portHandlerChain); - TestUtil.logMsg("Port HandlerChain size = " + portHandlerChain.size()); - - listOfBindings.add(binding); - - TestUtil.logTrace("leaving getPorts"); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (HelloService) JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, - SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HelloService) getSharedObject(); - - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: SetGetPayloadSourceTest - * - * @assertion_ids: JAXWS:JAVADOC:30; JAXWS:JAVADOC:32; JAXWS:SPEC:6002; - * WS4EE:SPEC:5005; JAXWS:SPEC:5000; JAXWS:SPEC:5001; JAXWS:SPEC:5002; - * JAXWS:SPEC:5003; JAXWS:SPEC:7000; JAXWS:SPEC:7002; JAXWS:SPEC:7008; - * JAXWS:SPEC:7009; - * - * @test_Strategy: Test the various getPayload and setPayload methods in the - * handlers - */ - public void SetGetPayloadSourceTest() throws Fault { - TestUtil.logTrace("SetGetPayloadSourceTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } else { - try { - String expected = "client:OutboundClientLogicalHandler_getsetPayloadSource:InboundServerLogicalHandler_getsetPayloadSource:Hello3Impl:OutboundServerLogicalHandler_getsetPayloadSource:InboundClientLogicalHandler_getsetPayloadSource"; - - Hello3Request hello3Req = new Hello3Request(); - hello3Req.setTestname("setgetPayloadSourceTest"); - hello3Req.setArgument("client"); - - Hello3Response hello3Res = port.hello(hello3Req); - String actual = hello3Res.getArgument(); - TestUtil.logMsg("Hello3Response=" + actual); - if (!actual.equals(expected)) { - TestUtil.logErr("Error: Did not get expected result:"); - TestUtil.logErr("expected=" + expected); - TestUtil.logErr("actual=" + actual); - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - } - if (!pass) - throw new Fault("SetGetPayloadSourceTest failed"); - } - - /* - * @testName: SetGetPayloadJAXBContextTest - * - * @assertion_ids: JAXWS:JAVADOC:31; JAXWS:JAVADOC:33; JAXWS:SPEC:6002; - * WS4EE:SPEC:5005; JAXWS:SPEC:5000; JAXWS:SPEC:5001; JAXWS:SPEC:5002; - * JAXWS:SPEC:5003; JAXWS:SPEC:7000; JAXWS:SPEC:7002; JAXWS:SPEC:7008; - * JAXWS:SPEC:7009; - * - * @test_Strategy: Test the various getPayload and setPayload methods in the - * handlers - */ - public void SetGetPayloadJAXBContextTest() throws Fault { - TestUtil.logTrace("SetGetPayloadJAXBContextTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } else { - try { - String expected = "client:OutboundClientLogicalHandler_getsetPayloadJAXBContext:InboundServerLogicalHandler_getsetPayloadJAXBContext:Hello3Impl:OutboundServerLogicalHandler_getsetPayloadJAXBContext:InboundClientLogicalHandler_getsetPayloadJAXBContext"; - - Hello3Request hello3Req = new Hello3Request(); - hello3Req.setTestname("setgetPayloadJAXBContextTest"); - hello3Req.setArgument("client"); - - Hello3Response hello3Res = port.hello(hello3Req); - String actual = hello3Res.getArgument(); - TestUtil.logMsg("Hello3Response=" + actual); - if (!actual.equals(expected)) { - TestUtil.logErr("Error: Did not get expected result:"); - TestUtil.logErr("expected=" + expected); - TestUtil.logErr("actual=" + actual); - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - } - if (!pass) - throw new Fault("SetGetPayloadJAXBContextTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/LogicalMessage/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/LogicalMessage/build.xml deleted file mode 100644 index 985593d704..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/LogicalMessage/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/LogicalMessage/handler.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/LogicalMessage/handler.xml deleted file mode 100644 index 57a255bc5b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/LogicalMessage/handler.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - ClientLogicalHandler - com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.ClientLogicalHandler - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/LogicalMessage/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/LogicalMessage/jakartaEE.tokens deleted file mode 100644 index 2857fd456c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/LogicalMessage/jakartaEE.tokens +++ /dev/null @@ -1,9 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhelloservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloservice -HANDLERCHAIN=@HandlerChain(name = " ", file = "handler.xml") - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/ProtocolException/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/ProtocolException/Client.java deleted file mode 100644 index 7030406430..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/ProtocolException/Client.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.ProtocolException; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.util.*; -import java.rmi.*; - -import jakarta.xml.ws.*; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: ProtocolExceptionConstructorTest1 - * - * @assertion_ids: JAXWS:JAVADOC:34; - * - * @test_Strategy: Create instance via ProtocolException() constructor. Verify - * ProtocolException object created successfully. - */ - public void ProtocolExceptionConstructorTest1() throws Fault { - TestUtil.logTrace("ProtocolExceptionConstructorTest1"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via ProtocolException() ..."); - ProtocolException e = new ProtocolException(); - if (e != null) { - TestUtil.logMsg("ProtocolException object created successfully"); - } else { - TestUtil.logErr("ProtocolException object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("ProtocolExceptionConstructorTest1 failed", e); - } - - if (!pass) - throw new Fault("ProtocolExceptionConstructorTest1 failed"); - } - - /* - * @testName: ProtocolExceptionConstructorTest2 - * - * @assertion_ids: JAXWS:JAVADOC:36; - * - * @test_Strategy: Create instance via ProtocolException(String, Throwable). - * Verify ProtocolException object created successfully. - */ - public void ProtocolExceptionConstructorTest2() throws Fault { - TestUtil.logTrace("ProtocolExceptionConstructorTest2"); - boolean pass = true; - String detailMsg = "a detail message"; - Exception foo = new Exception("foo"); - try { - TestUtil.logMsg( - "Create instance via " + " ProtocolException(String, Throwable) ..."); - ProtocolException e = new ProtocolException(detailMsg, foo); - if (e != null) { - TestUtil.logMsg("ProtocolException object created successfully"); - String msg = e.getMessage(); - if (msg.equals(detailMsg)) - TestUtil.logMsg("detail message match: " + detailMsg); - else { - TestUtil.logErr("detail message mismatch - expected: " + detailMsg - + ", received: " + msg); - pass = false; - } - } else { - TestUtil.logErr("ProtocolException object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("ProtocolExceptionConstructorTest2 failed", e); - } - - if (!pass) - throw new Fault("ProtocolExceptionConstructorTest2 failed"); - } - - /* - * @testName: ProtocolExceptionConstructorTest3 - * - * @assertion_ids: JAXWS:JAVADOC:35; - * - * @test_Strategy: Create instance via ProtocolException(String). Verify - * ProtocolException object created successfully. - */ - public void ProtocolExceptionConstructorTest3() throws Fault { - TestUtil.logTrace("ProtocolExceptionConstructorTest3"); - boolean pass = true; - String detailMsg = "a detail message"; - try { - TestUtil - .logMsg("Create instance via " + " ProtocolException(String) ..."); - ProtocolException e = new ProtocolException(detailMsg); - if (e != null) { - TestUtil.logMsg("ProtocolException object created successfully"); - String msg = e.getMessage(); - if (msg.equals(detailMsg)) - TestUtil.logMsg("detail message match: " + detailMsg); - else { - TestUtil.logErr("detail message mismatch - expected: " + detailMsg - + ", received: " + msg); - pass = false; - } - } else { - TestUtil.logErr("ProtocolException object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("ProtocolExceptionConstructorTest3 failed", e); - } - - if (!pass) - throw new Fault("ProtocolExceptionConstructorTest3 failed"); - } - - /* - * @testName: ProtocolExceptionConstructorTest4 - * - * @assertion_ids: JAXWS:JAVADOC:37; - * - * @test_Strategy: Create instance via ProtocolException(Throwable). Verify - * ProtocolException object created successfully. - */ - public void ProtocolExceptionConstructorTest4() throws Fault { - TestUtil.logTrace("ProtocolExceptionConstructorTest4"); - boolean pass = true; - Exception foo = new Exception("foo"); - try { - TestUtil - .logMsg("Create instance via " + " ProtocolException(Throwable) ..."); - ProtocolException e = new ProtocolException(foo); - if (e != null) { - TestUtil.logMsg("ProtocolException object created successfully"); - } else { - TestUtil.logErr("ProtocolException object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("ProtocolExceptionConstructorTest4 failed", e); - } - - if (!pass) - throw new Fault("ProtocolExceptionConstructorTest4 failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/ProtocolException/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/ProtocolException/build.xml deleted file mode 100644 index 3509671ed4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/ProtocolException/build.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Provider/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Provider/Client.java deleted file mode 100644 index afb782fbf3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Provider/Client.java +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.Provider; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import javax.xml.namespace.QName; -import java.net.*; -import java.util.*; - -import com.sun.ts.tests.jaxws.sharedclients.dlhelloproviderclient.*; -import jakarta.xml.bind.JAXBContext; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.xml.soap.*; -import javax.xml.transform.*; - -public class Client extends ServiceEETest { - // need to create jaxbContext - private static final ObjectFactory of = new ObjectFactory(); - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String SHARED_CLIENT_PKG = "com.sun.ts.tests.jaxws.sharedclients.dlhelloproviderclient."; - - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private static final String PORT_NAME2 = "Hello2Port"; - - private static final String PORT_NAME3 = "Hello3Port"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private QName PORT_QNAME2 = new QName(NAMESPACEURI, PORT_NAME2); - - private QName PORT_QNAME3 = new QName(NAMESPACEURI, PORT_NAME3); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "dlhelloproviderservice.endpoint.1"; - - private static final String ENDPOINT_URL2 = "dlhelloproviderservice.endpoint.2"; - - private static final String ENDPOINT_URL3 = "dlhelloproviderservice.endpoint.3"; - - private static final String WSDLLOC_URL = "dlhelloproviderservice.wsdlloc.1"; - - private String url = null; - - private String url2 = null; - - private String url3 = null; - - private URL wsdlurl = null; - - private Dispatch dispatchJaxb = null; - - private Dispatch dispatchSM = null; - - private Dispatch dispatchSrc = null; - - String bindingID = null; - - private static final Class JAXB_OBJECT_FACTORY = com.sun.ts.tests.jaxws.sharedclients.dlhelloproviderclient.ObjectFactory.class; - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.dlhelloproviderclient.HelloService.class; - - static HelloService service = null; - - private JAXBContext createJAXBContext() { - try { - return JAXBContext.newInstance(JAXB_OBJECT_FACTORY); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - private Dispatch createDispatchJAXB() throws Exception { - return service.createDispatch(PORT_QNAME, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - private Dispatch createDispatchSOAPMessage() throws Exception { - return service.createDispatch(PORT_QNAME, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE); - } - - private Dispatch createDispatchSourcePayLoad() throws Exception { - return service.createDispatch(PORT_QNAME, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL2); - url2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL3); - url3 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("Service Endpoint URL2: " + url2); - TestUtil.logMsg("Service Endpoint URL3: " + url3); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (HelloService) JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, - SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HelloService) getSharedObject(); - } - - bindingID = new String(SOAPBinding.SOAP11HTTP_BINDING); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: invokeTest1 - * - * @assertion_ids: JAXWS:SPEC:7002; JAXWS:JAVADOC:38; JAXWS:SPEC:7008; - * WS4EE:SPEC:5001; JAXWS:JAVADOC:78; JAXWS:JAVADOC:79; JAXWS:JAVADOC:80; - * JAXWS:JAVADOC:81; JAXWS:SPEC:5000; JAXWS:SPEC:5001; JAXWS:SPEC:5002; - * JAXWS:SPEC:5003; JAXWS:SPEC:7000; JAXWS:SPEC:7009; JAXWS:SPEC:6003; - * JAXWS:JAVADOC:117; JAXWS:JAVADOC:7; WS4EE:SPEC:5005; JAXWS:SPEC:6001; - * JAXWS:SPEC:7012; - * - * @test_Strategy: - */ - public void invokeTest1() throws Fault { - TestUtil.logTrace("invokeTest1"); - boolean pass = true; - HelloRequest helloReq = null; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument("sendSource"); - } catch (Exception e) { - e.printStackTrace(); - } - HelloResponse helloRes = null; - try { - dispatchJaxb = createDispatchJAXB(); - helloRes = (HelloResponse) dispatchJaxb.invoke(helloReq); - TestUtil.logMsg("HelloRequest=" + helloReq.getArgument()); - TestUtil.logMsg("HelloResponse=" + helloRes.getArgument()); - if (!helloRes.getArgument().equals(helloReq.getArgument())) - pass = false; - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTest1 failed"); - } - - /* - * @testName: invokeTest2 - * - * @assertion_ids: JAXWS:SPEC:7002; JAXWS:JAVADOC:38; JAXWS:SPEC:7008; - * WS4EE:SPEC:5001; JAXWS:JAVADOC:78; JAXWS:JAVADOC:79; JAXWS:JAVADOC:80; - * JAXWS:JAVADOC:81; JAXWS:SPEC:5000; JAXWS:SPEC:5001; JAXWS:SPEC:5002; - * JAXWS:SPEC:5003; JAXWS:SPEC:7000; JAXWS:SPEC:7009; JAXWS:SPEC:6003; - * JAXWS:JAVADOC:117; JAXWS:JAVADOC:7; WS4EE:SPEC:5005; JAXWS:SPEC:6001; - * JAXWS:SPEC:7012; - * - * @test_Strategy: - */ - public void invokeTest2() throws Fault { - TestUtil.logTrace("invokeTest2"); - boolean pass = true; - HelloRequest helloReq = null; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument("sendBean"); - } catch (Exception e) { - e.printStackTrace(); - } - HelloResponse helloRes = null; - try { - // Using generic Service object - jakarta.xml.ws.Service service = jakarta.xml.ws.Service.create(SERVICE_QNAME); - service.addPort(PORT_QNAME, bindingID, url); - dispatchJaxb = service.createDispatch(PORT_QNAME, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD); - helloRes = (HelloResponse) dispatchJaxb.invoke(helloReq); - TestUtil.logMsg("HelloRequest=" + helloReq.getArgument()); - TestUtil.logMsg("HelloResponse=" + helloRes.getArgument()); - if (!helloRes.getArgument().equals(helloReq.getArgument())) - pass = false; - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTest2 failed"); - } - - /* - * @testName: invokeTest3 - * - * @assertion_ids: JAXWS:SPEC:7002; JAXWS:JAVADOC:38; JAXWS:SPEC:7008; - * WS4EE:SPEC:5001; JAXWS:JAVADOC:78; JAXWS:JAVADOC:79; JAXWS:JAVADOC:80; - * JAXWS:JAVADOC:81; JAXWS:SPEC:5000; JAXWS:SPEC:5001; JAXWS:SPEC:5002; - * JAXWS:SPEC:5003; JAXWS:SPEC:7000; JAXWS:SPEC:7009; JAXWS:SPEC:6003; - * JAXWS:JAVADOC:117; JAXWS:JAVADOC:7; WS4EE:SPEC:5005; JAXWS:SPEC:6001; - * JAXWS:SPEC:7012; - * - * @test_Strategy: do an invoke with the payload set to payload and a source - * being sent over the wire - */ - public void invokeTest3() throws Fault { - TestUtil.logTrace("invokeTest3"); - boolean pass = true; - HelloRequest helloReq = null; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument("sendBean"); - } catch (Exception e) { - e.printStackTrace(); - } - HelloResponse helloRes = null; - try { - // Using generic Service object - jakarta.xml.ws.Service service = jakarta.xml.ws.Service.create(SERVICE_QNAME); - service.addPort(PORT_QNAME2, bindingID, url2); - dispatchJaxb = service.createDispatch(PORT_QNAME2, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD); - helloRes = (HelloResponse) dispatchJaxb.invoke(helloReq); - TestUtil.logMsg("HelloRequest=" + helloReq.getArgument()); - TestUtil.logMsg("HelloResponse=" + helloRes.getArgument()); - if (!helloRes.getArgument().equals("responseBean")) { - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTest3 failed"); - } - - /* - * @testName: invokeTest4 - * - * @assertion_ids: JAXWS:SPEC:7002; JAXWS:JAVADOC:38; JAXWS:SPEC:7008; - * WS4EE:SPEC:5001; JAXWS:JAVADOC:78; JAXWS:JAVADOC:79; JAXWS:JAVADOC:80; - * JAXWS:JAVADOC:81; JAXWS:SPEC:5000; JAXWS:SPEC:5001; JAXWS:SPEC:5002; - * JAXWS:SPEC:5003; JAXWS:SPEC:7000; JAXWS:SPEC:7009; JAXWS:SPEC:6003; - * JAXWS:JAVADOC:117; JAXWS:JAVADOC:7; WS4EE:SPEC:5005; JAXWS:SPEC:6001; - * JAXWS:SPEC:7012; - * - * @test_Strategy: do an invoke with the payload set to message and a - * SOAPMessage being sent over the wire - */ - public void invokeTest4() throws Fault { - TestUtil.logTrace("invokeTest4"); - boolean pass = true; - HelloResponse helloRes = null; - try { - // Using generic Service object - jakarta.xml.ws.Service service = jakarta.xml.ws.Service.create(SERVICE_QNAME); - service.addPort(PORT_QNAME2, bindingID, url2); - dispatchSM = service.createDispatch(PORT_QNAME2, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE); - - String helloReq = "sendBean"; - - SOAPMessage reqMsg = JAXWS_Util.makeSOAPMessage(helloReq); - TestUtil.logTrace("sending the following SOAPMessage:"); - JAXWS_Util.dumpSOAPMessage(reqMsg); - - SOAPMessage respMsg = (SOAPMessage) dispatchSM.invoke(reqMsg); - TestUtil.logTrace("The following SOAPMessage was received:"); - JAXWS_Util.dumpSOAPMessage(respMsg); - - String resStr = JAXWS_Util.getSOAPMessageAsString(respMsg); - if (resStr.indexOf("responseBean") == -1) { - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTest4 failed"); - } - - /* - * @testName: invokeTest5 - * - * @assertion_ids: JAXWS:SPEC:7002; JAXWS:JAVADOC:38; JAXWS:SPEC:7008; - * WS4EE:SPEC:5001; JAXWS:JAVADOC:78; JAXWS:JAVADOC:79; JAXWS:JAVADOC:80; - * JAXWS:JAVADOC:81; JAXWS:SPEC:5000; JAXWS:SPEC:5001; JAXWS:SPEC:5002; - * JAXWS:SPEC:5003; JAXWS:SPEC:7000; JAXWS:SPEC:7009; JAXWS:SPEC:6003; - * JAXWS:JAVADOC:117; JAXWS:JAVADOC:7; WS4EE:SPEC:5005; JAXWS:SPEC:6001; - * JAXWS:SPEC:7012; - * - * @test_Strategy: do an invoke with the payload set to payload and a Source - * being sent over the wire - */ - public void invokeTest5() throws Fault { - TestUtil.logTrace("invokeTest5"); - boolean pass = true; - HelloResponse helloRes = null; - try { - // Using generic Service object - jakarta.xml.ws.Service service = jakarta.xml.ws.Service.create(SERVICE_QNAME); - service.addPort(PORT_QNAME3, bindingID, url3); - dispatchSrc = service.createDispatch(PORT_QNAME3, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - - String helloReq = "sendSource"; - - Source reqMsg = JAXWS_Util.makeSource(helloReq, "StreamSource"); - - Source ds = dispatchSrc.invoke(reqMsg); - TestUtil.logMsg("ds=" + ds); - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTest5 failed"); - } - - /* - * @testName: invokeTest6 - * - * @assertion_ids: JAXWS:SPEC:7002; JAXWS:JAVADOC:38; JAXWS:SPEC:7008; - * WS4EE:SPEC:6001; JAXWS:JAVADOC:78; JAXWS:JAVADOC:79; JAXWS:JAVADOC:80; - * JAXWS:JAVADOC:81; JAXWS:SPEC:6000; JAXWS:SPEC:6001; JAXWS:SPEC:6002; - * JAXWS:SPEC:6003; JAXWS:SPEC:7000; JAXWS:SPEC:7009; JAXWS:SPEC:6003; - * JAXWS:JAVADOC:117; JAXWS:JAVADOC:7; WS4EE:SPEC:6006; JAXWS:SPEC:6001; - * JAXWS:SPEC:7012; JAXWS:SPEC:5000; - * - * @test_Strategy: Test provider endpoint using JAXB request object which - * sends Empty Payload response back - */ - public void invokeTest6() throws Fault { - TestUtil.logTrace("invokeTest6"); - boolean pass = true; - HelloRequest helloReq = null; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument("sendEmptyStreamSource"); - } catch (Exception e) { - e.printStackTrace(); - } - Object o = null; - try { - dispatchJaxb = createDispatchJAXB(); - o = dispatchJaxb.invoke(helloReq); - TestUtil.logMsg("o=" + o); - if (o != null) - pass = false; - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTest6 failed"); - } - - /* - * @testName: invokeTest7 - * - * @assertion_ids: JAXWS:SPEC:7002; JAXWS:JAVADOC:38; JAXWS:SPEC:7008; - * WS4EE:SPEC:6001; JAXWS:JAVADOC:78; JAXWS:JAVADOC:79; JAXWS:JAVADOC:80; - * JAXWS:JAVADOC:81; JAXWS:SPEC:6000; JAXWS:SPEC:6001; JAXWS:SPEC:6002; - * JAXWS:SPEC:6003; JAXWS:SPEC:7000; JAXWS:SPEC:7009; JAXWS:SPEC:6003; - * JAXWS:JAVADOC:117; JAXWS:JAVADOC:7; WS4EE:SPEC:6006; JAXWS:SPEC:6001; - * JAXWS:SPEC:7012; JAXWS:SPEC:5000; - * - * @test_Strategy: Test provider endpoint using Source request object and - * sends Empty Payload response back as an Empty StreamSource, DOMSource or - * SAXSource. - */ - public void invokeTest7() throws Fault { - TestUtil.logTrace("invokeTest7"); - boolean pass = true; - String[] helloReq = { - "sendEmptyStreamSource", - "sendEmptyDOMSource", - "sendEmptySAXSource" }; - String[] streamAs = { "StreamSource", "DOMSource", "SAXSource" }; - try { - // Using generic Service object - jakarta.xml.ws.Service service = jakarta.xml.ws.Service.create(SERVICE_QNAME); - service.addPort(PORT_QNAME3, bindingID, url3); - dispatchSrc = service.createDispatch(PORT_QNAME3, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - for (int i = 0; i < streamAs.length; i++) { - TestUtil.logMsg("Send request as (" + streamAs[i] - + ") and check for empty payload response as a " + streamAs[i]); - Source reqMsg = JAXWS_Util.makeSource(helloReq[i], streamAs[i]); - Source ds = dispatchSrc.invoke(reqMsg); - TestUtil.logMsg("ds=" + ds); - if (ds != null) - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTest7 failed"); - } - - /* - * @testName: invokeTest8 - * - * @assertion_ids: JAXWS:SPEC:7002; JAXWS:JAVADOC:38; JAXWS:SPEC:7008; - * WS4EE:SPEC:6001; JAXWS:JAVADOC:78; JAXWS:JAVADOC:79; JAXWS:JAVADOC:80; - * JAXWS:JAVADOC:81; JAXWS:SPEC:6000; JAXWS:SPEC:6001; JAXWS:SPEC:6002; - * JAXWS:SPEC:6003; JAXWS:SPEC:7000; JAXWS:SPEC:7009; JAXWS:SPEC:6003; - * JAXWS:JAVADOC:117; JAXWS:JAVADOC:7; WS4EE:SPEC:6006; JAXWS:SPEC:6001; - * JAXWS:SPEC:7012; JAXWS:SPEC:5000; - * - * @test_Strategy: Test provider endpoint using JAXB request object for oneway - * op and sends Empty Payload null back - */ - public void invokeTest8() throws Fault { - TestUtil.logTrace("invokeTest8"); - boolean pass = true; - HelloOneWayRequest helloOneWayReq = null; - try { - helloOneWayReq = of.createHelloOneWayRequest(); - helloOneWayReq.setArgument("sendEmptyStreamSource"); - } catch (Exception e) { - e.printStackTrace(); - } - try { - dispatchJaxb = createDispatchJAXB(); - dispatchJaxb.invokeOneWay(helloOneWayReq); - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTest8 failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Provider/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Provider/build.xml deleted file mode 100644 index 2f737061ef..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Provider/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Provider/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Provider/jakartaEE.tokens deleted file mode 100644 index 60bea91f3b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Provider/jakartaEE.tokens +++ /dev/null @@ -1,8 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhelloproviderservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.dlhelloproviderclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloproviderservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloproviderservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloproviderservice - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/RespectBindingFeature/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/RespectBindingFeature/Client.java deleted file mode 100644 index 19042c93bf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/RespectBindingFeature/Client.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.RespectBindingFeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; -import java.math.*; - -import jakarta.xml.ws.RespectBindingFeature; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: RespectBindingFeatureConstructorTest - * - * @assertion_ids: JAXWS:JAVADOC:151; - * - * @test_Strategy: Create instance via RespectBindingFeature() constructor. - * Verify RespectBindingFeature object created successfully. - */ - public void RespectBindingFeatureConstructorTest() throws Fault { - TestUtil.logTrace("RespectBindingFeatureConstructorTest"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via RespectBindingFeature() ..."); - RespectBindingFeature n = new RespectBindingFeature(); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logErr( - "RespectBindingFeature object created successfully, but RespectBindingFeature is not enabled"); - pass = false; - } else { - TestUtil.logMsg("RespectBindingFeature object created successfully"); - } - } else { - TestUtil.logErr("RespectBindingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("RespectBindingFeatureConstructorTest failed", e); - } - - if (!pass) { - throw new Fault("RespectBindingFeatureConstructorTest failed"); - } - } - - /* - * @testName: RespectBindingFeatureConstructorTest2 - * - * @assertion_ids: JAXWS:JAVADOC:152; - * - * @test_Strategy: Create instance via RespectBindingFeature(true) - * constructor. Verify RespectBindingFeature object created successfully. - */ - public void RespectBindingFeatureConstructorTest2() throws Fault { - TestUtil.logTrace("RespectBindingFeatureConstructorTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via RespectBindingFeature(true) ..."); - RespectBindingFeature n = new RespectBindingFeature(true); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logErr( - "RespectBindingFeature object created successfully, but RespectBinding is not enabled"); - pass = false; - } else { - TestUtil.logMsg("RespectBindingFeature object created successfully"); - } - } else { - TestUtil.logErr("RespectBindingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("RespectBindingFeatureConstructorTest2 failed", e); - } - - if (!pass) { - throw new Fault("RespectBindingFeatureConstructorTest2 failed"); - } - } - - /* - * @testName: RespectBindingFeatureConstructorTest3 - * - * @assertion_ids: JAXWS:JAVADOC:152; - * - * @test_Strategy: Create instance via RespectBindingFeature(false) - * constructor. Verify RespectBindingFeature object created successfully. - */ - public void RespectBindingFeatureConstructorTest3() throws Fault { - TestUtil.logTrace("RespectBindingFeatureConstructorTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via RespectBindingFeature(false) ..."); - RespectBindingFeature n = new RespectBindingFeature(false); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logMsg( - "RespectBindingFeature object created successfully, RespectBinding is correctly not enabled"); - } else { - TestUtil.logErr( - "RespectBindingFeature object created successfully, but RespectBinding is incorrectly enabled."); - pass = false; - } - } else { - TestUtil.logErr("RespectBindingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("RespectBindingFeatureConstructorTest3 failed", e); - } - - if (!pass) { - throw new Fault("RespectBindingFeatureConstructorTest3 failed"); - } - } - - /* - * @testName: getIDTest - * - * @assertion_ids: JAXWS:JAVADOC:150; - * - * @test_Strategy: Test getting the unique identifier for this - * RespectBindingFeature object. Verify value returned is set correctly. - */ - public void getIDTest() throws Fault { - TestUtil.logTrace("getIDTest"); - boolean pass = true; - - try { - TestUtil.logMsg("Create instance via RespectBindingFeature(true) ..."); - RespectBindingFeature n = new RespectBindingFeature(true); - if (n != null) { - if (!(RespectBindingFeature.ID.equals(n.getID()))) { - TestUtil.logErr( - "RespectBindingFeature object created with incorrect ID, expected [" - + RespectBindingFeature.ID + "], received [" + n.getID() - + "]"); - pass = false; - } else { - TestUtil.logMsg( - "RespectBindingFeature object created successfully with correct ID, expected [" - + RespectBindingFeature.ID + "], received [" + n.getID() - + "]"); - } - } else { - TestUtil.logErr("RespectBindingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getIDTest failed", e); - } - - if (!pass) { - throw new Fault("getIDTest failed"); - } - } - - /* - * @testName: isEnabledTest - * - * @assertion_ids: JAXWS:JAVADOC:161; - * - * @test_Strategy: Test setting isEnabled of RespectBindingFeature object. Get - * enabled value and verify value returned is set correctly. - */ - public void isEnabledTest() throws Fault { - TestUtil.logTrace("isEnabledTest"); - boolean pass = true; - - try { - TestUtil.logMsg("Create instance via RespectBindingFeature() ..."); - RespectBindingFeature n = new RespectBindingFeature(); - if (n != null) { - boolean isEnabled = n.isEnabled(); - if (isEnabled == true) { - // got returned correct value, now try setting it to new value - TestUtil.logMsg("Returned correct isEnabled value, received [" - + n.isEnabled() + "]"); - } else { - TestUtil.logMsg("Returned incorrect isEnabled value, expected [" - + new Boolean(true) + "], received [" + n.isEnabled() + "]"); - pass = false; - } - // now create with enabled set to false, verify isEnabled correctly - // returns false - TestUtil.logMsg("Create instance via RespectBindingFeature(false) ..."); - RespectBindingFeature n1 = new RespectBindingFeature(false); - if (n1 != null) { - isEnabled = n1.isEnabled(); - if (isEnabled == false) { - // got returned correct value, now try setting it to new value - TestUtil.logMsg("Returned correct isEnabled value, received [" - + n1.isEnabled() + "]"); - } else { - TestUtil.logMsg("Returned incorrect isEnabled value, expected [" - + new Boolean(false) + "], received [" + n1.isEnabled() + "]"); - pass = false; - } - } else { - TestUtil.logErr( - "RespectBindingFeature object not created for constructor RespectBindingFeature(false)"); - pass = false; - } - } else { - TestUtil.logErr( - "RespectBindingFeature object not created for default constructor RespectBindingFeature()"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("isEnabledTest failed", e); - } - - if (!pass) { - throw new Fault("isEnabledTest failed"); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/RespectBindingFeature/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/RespectBindingFeature/build.xml deleted file mode 100644 index 445f05fba6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/RespectBindingFeature/build.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Response/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Response/Client.java deleted file mode 100644 index ae34a5fc9c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Response/Client.java +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.Response; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; - -import javax.xml.namespace.QName; - -import jakarta.xml.bind.JAXBContext; - -import javax.xml.transform.Source; - -public class Client extends ServiceEETest { - // need to create jaxbContext - private static final ObjectFactory of = new ObjectFactory(); - - private String helloReq = "foo"; - - private String helloResp = "foo"; - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.api.jakarta_xml_ws.Response."; - - private static final String SHARED_CLIENT_PKG = "com.sun.ts.tests.jaxws.sharedclients.doclithelloclient."; - - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME; - - private QName PORT_QNAME; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "dlhelloservice.endpoint.1"; - - private static final String WSDLLOC_URL = "dlhelloservice.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private Dispatch dispatchJaxb = null; - - private Dispatch dispatchSrc = null; - - private static final Class JAXB_OBJECT_FACTORY = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.ObjectFactory.class; - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService.class; - - static HelloService service = null; - - private JAXBContext createJAXBContext() { - try { - return JAXBContext.newInstance(JAXB_OBJECT_FACTORY); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - // Initialize QNAMES used in the test - SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (HelloService) JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, - SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HelloService) getSharedObject(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - private Dispatch createDispatchJAXB() throws Exception { - return service.createDispatch(PORT_QNAME, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - private Dispatch createDispatchSource() throws Exception { - return service.createDispatch(PORT_QNAME, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - /* - * @testName: getXMLTest - * - * @assertion_ids: JAXWS:JAVADOC:9; WS4EE:SPEC:4005; WS4EE:SPEC:4006; - * WS4EE:SPEC:4007; - * - * @test_Strategy: Get a Response using the invokeAsync method passing - * an stream that contains xml and verify the response returned via "get()" is - * correct - */ - public void getXMLTest() throws Fault { - TestUtil.logTrace("getXMLTest"); - boolean pass = true; - Collection requestList = new ArrayList(); - requestList.add(JAXWS_Util.makeSource(helloReq, "DOMSource")); - requestList.add(JAXWS_Util.makeSource(helloReq, "StreamSource")); - requestList.add(JAXWS_Util.makeSource(helloReq, "SAXSource")); - Collection responseList = new ArrayList(); - responseList.add(JAXWS_Util.makeSource(helloResp, "DOMSource")); - responseList.add(JAXWS_Util.makeSource(helloResp, "StreamSource")); - responseList.add(JAXWS_Util.makeSource(helloResp, "SAXSource")); - Collection typeList = new ArrayList(); - typeList.add("DOMSource"); - typeList.add("StreamSource"); - typeList.add("SAXSource"); - int i = 0; - for (Iterator iter = requestList.iterator(); iter.hasNext();) { - try { - Source requestObject = iter.next(); - - Source sourceResponse = (Source) ((List) responseList).get(i); - String sSrcResponse = JAXWS_Util.getDOMResultAsString( - JAXWS_Util.getSourceAsDOMResult(sourceResponse)); - dispatchSrc = createDispatchSource(); - TestUtil.logMsg("Send: " + sSrcResponse); - Response roResponse = dispatchSrc.invokeAsync(requestObject); - - String dataType = (String) ((List) typeList).get(i); - TestUtil.logMsg("Testing " + dataType + " data"); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!roResponse.isDone()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - Source srcResponse = roResponse.get(); - String sResponse = JAXWS_Util - .getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(srcResponse)); - TestUtil.logMsg("Recv: " + sResponse); - if (sResponse.indexOf("HelloResponse") == -1 - || sResponse.indexOf("foo") == -1) { - TestUtil.logErr("unexpected Response results"); - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - i++; - } - if (!pass) - throw new Fault("getXMLTest failed"); - } - - /* - * @testName: getContextXMLTest - * - * @assertion_ids: JAXWS:JAVADOC:9; JAXWS:JAVADOC:42; WS4EE:SPEC:4005; - * WS4EE:SPEC:4006; WS4EE:SPEC:4007; - * - * @test_Strategy: Get a Response using the invokeAsync method passing - * an stream that contains xml and get the JAXWSontext from that object - */ - public void getContextXMLTest() throws Fault { - TestUtil.logTrace("getContextXMLTest"); - boolean pass = true; - Source sRequest = JAXWS_Util.makeSource(helloReq, "StreamSource"); - try { - dispatchSrc = createDispatchSource(); - Response roResponse = dispatchSrc.invokeAsync(sRequest); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!roResponse.isDone()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - java.util.Map jrc = roResponse.getContext(); - if (jrc != null) { - TestUtil.logMsg("Properties/Keys from java.util.Map:"); - int i = 1; - for (Iterator iter = jrc.keySet().iterator(); iter.hasNext();) { - TestUtil.logMsg("Property[" + i + "]=" + (String) iter.next()); - i++; - } - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("getContextXMLTest failed"); - } - - /* - * @testName: getJAXBTest - * - * @assertion_ids: JAXWS:JAVADOC:9; WS4EE:SPEC:4005; WS4EE:SPEC:4006; - * WS4EE:SPEC:4007; - * - * @test_Strategy: Get a Response using the invokeAsync method passing - * a JAXB Object and verify the response returned via "get()" is correct - */ - public void getJAXBTest() throws Fault { - TestUtil.logTrace("getJAXBTest"); - boolean pass = true; - HelloRequest helloReq = null; - String param = "foo"; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument(param); - } catch (Exception e) { - pass = false; - TestUtil.logErr( - "The follow exception was generated while creating the request object."); - e.printStackTrace(); - } - if (pass) { - HelloResponse hResponse = null; - try { - dispatchJaxb = createDispatchJAXB(); - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - Response res = dispatchJaxb.invokeAsync(helloReq); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!res.isDone()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - hResponse = (HelloResponse) res.get(); - String response = hResponse.getArgument(); - if (!helloReq.getArgument().equals(param)) { - pass = false; - TestUtil.logErr("The result return was in error:"); - TestUtil.logErr(" Expected result:" + param); - TestUtil.logErr(" Actual result:" + response); - } else { - TestUtil.logMsg("Actual result:" + response); - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - } - if (!pass) - throw new Fault("getJAXBTest failed"); - } - - /* - * @testName: getContextJAXBTest - * - * @assertion_ids: JAXWS:JAVADOC:9; JAXWS:JAVADOC:42; WS4EE:SPEC:4005; - * WS4EE:SPEC:4006; WS4EE:SPEC:4007; - * - * @test_Strategy: Get a Response using the invokeAsync method passing - * an stream that contains xml and get the JAXWSontext from that object - */ - public void getContextJAXBTest() throws Fault { - TestUtil.logTrace("getContextJAXBTest"); - boolean pass = true; - HelloRequest helloReq = null; - String param = "foo"; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument(param); - } catch (Exception e) { - pass = false; - TestUtil.logErr( - "The follow exception was generated while creating the request object."); - e.printStackTrace(); - } - if (pass) { - HelloResponse hResponse = null; - try { - dispatchJaxb = createDispatchJAXB(); - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - Response res = dispatchJaxb.invokeAsync(helloReq); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!res.isDone()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - java.util.Map jrc = res.getContext(); - if (jrc != null) { - TestUtil.logMsg("Properties/Keys from java.util.Map:"); - int i = 1; - for (Iterator iter = jrc.keySet().iterator(); iter.hasNext();) { - TestUtil.logMsg("Property[" + i + "]=" + (String) iter.next()); - i++; - } - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - } - if (!pass) - throw new Fault("getContextJAXBTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Response/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Response/build.xml deleted file mode 100644 index 29750489ba..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Response/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Response/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Response/jakartaEE.tokens deleted file mode 100644 index 28dc128adc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Response/jakartaEE.tokens +++ /dev/null @@ -1,9 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhelloservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloservice -~ - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service/Client.java deleted file mode 100644 index 92ccf39b16..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service/Client.java +++ /dev/null @@ -1,1599 +0,0 @@ -/* - * Copyright (c) 2007, 2022 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.Service; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.EndpointReference; - -import javax.xml.transform.Source; - -import javax.naming.InitialContext; -import jakarta.xml.bind.JAXBContext; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.api.jakarta_xml_ws.Service."; - - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private QName SERVICE_QNAME; - - private QName PORT_QNAME; - - private QName PORT2_QNAME; - - private QName NONEXISTANT_PORT_QNAME; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private static final String PORT2_NAME = "Hello2Port"; - - private static final String NONEXISTANT_PORT_NAME = "BadPort"; - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService.class; - - private static final Class SEI_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.Hello.class; - - private static final Class SEI2_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.Hello2.class; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "dlhelloservice.endpoint.1"; - - private static final String ENDPOINT2_URL = "dlhelloservice.endpoint.2"; - - private static final String WSDLLOC_URL = "dlhelloservice.wsdlloc.1"; - - private static final String WSDLLOC2_URL = "dlhelloservice.wsdlloc.2"; - - private String url = null; - - private String url2 = null; - - private URL wsdlurl = null; - - private URL wsdlurl2 = null; - - private EndpointReference epr = null; - - private WebServiceFeature[] wsfmtomtrue = { new MTOMFeature(true) }; - - private WebServiceFeature[] wsfmtomfalse = { new MTOMFeature(false) }; - - private WebServiceFeature[] wsftcktrue = { new TCKFeature(true) }; - - private WebServiceFeature[] wsftckfalse = { new TCKFeature(false) }; - - private WebServiceFeature[] wsftrue = { new AddressingFeature(true) }; - - private WebServiceFeature[] wsffalse = { new AddressingFeature(false) }; - - static HelloService service = null; - - private String SERVICE_NAME_WITH_WSDL = "wsw2jdlhelloservice"; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT2_URL); - url2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC2_URL); - wsdlurl2 = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("Service Endpoint URL2: " + url2); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - TestUtil.logMsg("WSDL Location URL2: " + wsdlurl2); - } - - private static final Class JAXB_OBJECT_FACTORY = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.ObjectFactory.class; - - private JAXBContext createJAXBContext() { - try { - return JAXBContext.newInstance(JAXB_OBJECT_FACTORY); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - private Dispatch createDispatchJAXB(jakarta.xml.ws.Service service) - throws Exception { - return service.createDispatch(PORT_QNAME, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - private Dispatch createDispatchJAXB(jakarta.xml.ws.Service service, - WebServiceFeature[] wsf) throws Exception { - return service.createDispatch(PORT_QNAME, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD, wsf); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - // Initialize QNAMES used in the test - SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - PORT2_QNAME = new QName(NAMESPACEURI, PORT2_NAME); - NONEXISTANT_PORT_QNAME = new QName(NAMESPACEURI, NONEXISTANT_PORT_NAME); - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - getTestURLs(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: createTest1 - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4003; JAXWS:SPEC:4009; - * JAXWS:SPEC:4010; JAXWS:JAVADOC:48; JAXWS:SPEC:6003; - * - * @test_Strategy: Call jakarta.xml.ws.Service.create(QName) to return a service - * instance. - */ - public void createTest1() throws Fault { - TestUtil.logTrace("createTest1"); - boolean pass = true; - jakarta.xml.ws.Service service = null; - TestUtil.logMsg("Call jakarta.xml.ws.Service.create(QName) ..."); - try { - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(SERVICE_QNAME); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - if (service == null) { - TestUtil.logErr("service is null"); - pass = false; - } else - TestUtil.logMsg("service is " + service); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("createTest1 failed", e); - } - - if (!pass) - throw new Fault("createTest1 failed"); - } - - /* - * @testName: createTest2 - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4003; JAXWS:SPEC:4009; - * JAXWS:SPEC:4010; JAXWS:JAVADOC:47; JAXWS:SPEC:6003; - * - * @test_Strategy: Call jakarta.xml.ws.Service.create(URL, QName) to return a - * service instance. - */ - public void createTest2() throws Fault { - TestUtil.logTrace("createTest2"); - boolean pass = true; - jakarta.xml.ws.Service service = null; - TestUtil.logMsg("Call jakarta.xml.ws.Service.create(URL, QName) ..."); - try { - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - if (service == null) { - TestUtil.logErr("service is null"); - pass = false; - } else - TestUtil.logMsg("service is " + service); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("createTest2 failed", e); - } - - if (!pass) - throw new Fault("createTest2 failed"); - } - - /* - * @testName: createWithWSFTest1 - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4003; JAXWS:SPEC:4009; - * JAXWS:SPEC:4010; JAXWS:JAVADOC:217; JAXWS:SPEC:6003; JAXWS:SPEC:4000; - * JAXWS:SPEC:4031; - * - * @test_Strategy: Call jakarta.xml.ws.Service.create(QName, - * WebServiceFeature[]) to return a service instance. Pass in a - * WebServiceFeature that the endpoint supports. A valid service object should - * be returned with that WebServiceFeature enabled. - */ - public void createWithWSFTest1() throws Fault { - TestUtil.logTrace("createWithWSFTest1"); - boolean pass = true; - jakarta.xml.ws.Service service = null; - TestUtil.logMsg( - "Call jakarta.xml.ws.Service.create(QName, WebServiceFeature[]) ..."); - TestUtil.logMsg("Pass in AddressingFeature(true) as WebServiceFeature ..."); - try { - if (modeProperty.equals("standalone")) { - service = getService(SERVICE_QNAME, wsftrue); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - if (service == null) { - TestUtil.logErr("service is null"); - pass = false; - } else - TestUtil.logMsg("service is " + service); - } catch (WebServiceException e) { - TestUtil.logMsg( - "Caught WebServiceException (Service based features must not be supported)"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("createWithWSFTest1 failed", e); - } - - if (!pass) - throw new Fault("createWithWSFTest1 failed"); - } - - /* - * @testName: createWithWSFTest2 - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4003; JAXWS:SPEC:4009; - * JAXWS:SPEC:4010; JAXWS:JAVADOC:216; JAXWS:SPEC:6003; JAXWS:SPEC:4031; - * - * @test_Strategy: Call jakarta.xml.ws.Service.create(URL, QName, - * WebServiceFeature[]) to return a service instance. Pass in a - * WebServiceFeature that the endpoint supports. A valid service object should - * be returned with that WebServiceFeature enabled. - */ - public void createWithWSFTest2() throws Fault { - TestUtil.logTrace("createWithWSFTest2"); - boolean pass = true; - jakarta.xml.ws.Service service = null; - TestUtil.logMsg( - "Call jakarta.xml.ws.Service.create(URL, QName, WebServiceFeature[]) ..."); - TestUtil.logMsg("Pass in AddressingFeature(true) as WebServiceFeature ..."); - try { - if (modeProperty.equals("standalone")) { - service = getService(wsdlurl, SERVICE_QNAME, wsftrue); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - if (service == null) { - TestUtil.logErr("service is null"); - pass = false; - } else - TestUtil.logMsg("service is " + service); - } catch (WebServiceException e) { - TestUtil.logMsg( - "Caught WebServiceException (Service based features must not be supported)"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("createWithWSFTest2 failed", e); - } - - if (!pass) - throw new Fault("createWithWSFTest2 failed"); - } - - /* - * @testName: createWithWSFNegativeTest1 - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4003; JAXWS:SPEC:4009; - * JAXWS:SPEC:4010; JAXWS:JAVADOC:217; JAXWS:SPEC:6003; - * - * @test_Strategy: Call jakarta.xml.ws.Service.create(QName, - * WebServiceFeature[]) to return a service instance. Pass in a - * WebServiceFeature that the endpoint doesn't support. API should throw back - * a WebServiceException. - */ - public void createWithWSFNegativeTest1() throws Fault { - TestUtil.logTrace("createWithWSFNegativeTest1"); - boolean pass = true; - jakarta.xml.ws.Service service = null; - TestUtil.logMsg( - "Call jakarta.xml.ws.Service.create(QName, WebServiceFeature[]) ..."); - TestUtil.logMsg("Pass in TCKFeature(true) as WebServiceFeature ..."); - TestUtil.logMsg( - "API must throw WebServiceException as endpoint does not know TCKFeature(true) ..."); - try { - if (modeProperty.equals("standalone")) { - service = getService(SERVICE_QNAME, wsftcktrue); - TestUtil.logErr("Did not throw expected WebServiceException"); - pass = false; - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - if (!pass) { - if (service == null) { - TestUtil.logErr("service is null"); - pass = false; - } else - TestUtil.logMsg("service is " + service); - } - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("createWithWSFNegativeTest1 failed", e); - } - - if (!pass) - throw new Fault("createWithWSFNegativeTest1 failed"); - } - - /* - * @testName: createWithWSFNegativeTest2 - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4003; JAXWS:SPEC:4009; - * JAXWS:SPEC:4010; JAXWS:JAVADOC:216; JAXWS:SPEC:6003; - * - * @test_Strategy: Call jakarta.xml.ws.Service.create(URL, QName, - * WebServiceFeature[]) to return a service instance. Pass in a - * WebServiceFeature that the endpoint doesn't support. API should throw back - * a WebServiceException. - */ - public void createWithWSFNegativeTest2() throws Fault { - TestUtil.logTrace("createWithWSFNegativeTest2"); - boolean pass = true; - jakarta.xml.ws.Service service = null; - TestUtil.logMsg( - "Call jakarta.xml.ws.Service.create(URL, QName, WebServiceFeature[]) ..."); - TestUtil.logMsg("Pass in TCKFeature(true) as WebServiceFeature ..."); - TestUtil.logMsg( - "API must throw WebServiceException as endpoint does not know TCKFeature(true) ..."); - try { - if (modeProperty.equals("standalone")) { - service = getService(wsdlurl, SERVICE_QNAME, wsftcktrue); - TestUtil.logErr("Did not throw expected WebServiceException"); - pass = false; - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - if (!pass) { - if (service == null) { - TestUtil.logErr("service is null"); - pass = false; - } else - TestUtil.logMsg("service is " + service); - } - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("createWithWSFNegativeTest2 failed", e); - } - - if (!pass) - throw new Fault("createWithWSFNegativeTest2 failed"); - } - - /* - * @testName: GetPort1PosTest1WithWsdl - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4009; JAXWS:SPEC:4010; - * JAXWS:JAVADOC:52; JAXWS:JAVADOC:122; JAXWS:JAVADOC:116; - * - * @test_Strategy: Call Service.getPort(QName, Class) to return a dynamic - * proxy for the service port. Pass a valid port name with WSDL access. Verify - * that the method returns a dynamic proxy. - */ - public void GetPort1PosTest1WithWsdl() throws Fault { - TestUtil.logTrace("GetPort1PosTest1WithWsdl"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, SERVICE_CLASS); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg( - "Test getPort (valid port name/WSDL access) - positive test 1"); - TestUtil.logMsg("Call Service.getPort(QName, Class)"); - TestUtil.logMsg("Should find port"); - Hello tests = (Hello) service.getPort(PORT_QNAME, Hello.class); - if (tests == null) { - TestUtil.logErr("getPort(QName, Class) returned null"); - pass = false; - } else if (!(tests instanceof Hello)) { - TestUtil.logErr( - "getPort(QName, Class) did not" + " return instance of Hello"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetPort1PosTest1WithWsdl failed", e); - } - - if (!pass) - throw new Fault("GetPort1PosTest1WithWsdl failed"); - } - - /* - * @testName: GetPortTest1WithFeatures - * - * @assertion_ids: JAXWS:JAVADOC:155; JAXWS:JAVADOC:181; JAXWS:SPEC:4026 - * - * @test_Strategy: Call Service.getPort(QName, Class, WebServiceFeature ...) - * to return a dynamic proxy for the service port. Pass a valid port name with - * WSDL access. Verify that the method returns a dynamic proxy. - */ - public void GetPortTest1WithFeatures() throws Fault { - TestUtil.logTrace("GetPortTest1WithFeatures"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, SERVICE_CLASS); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg( - "Test getPort (valid port name/WSDL access) AddressingFeature(true)"); - TestUtil - .logMsg("Call Service.getPort(QName, Class, WebServiceFeature ...)"); - TestUtil.logMsg("Should find port"); - Hello2 tests = (Hello2) service.getPort(PORT2_QNAME, Hello2.class, - wsftrue); - if (tests == null) { - TestUtil.logErr( - "getPort(QName, Class, WebServiceFeature ...) returned null"); - pass = false; - } else if (!(tests instanceof Hello2)) { - TestUtil.logErr("getPort(QName, Class, WebServiceFeature ...) did not" - + " return instance of Hello2"); - pass = false; - } - TestUtil.logMsg( - "Test getPort (valid port name/WSDL access) AddressingFeature(false)"); - TestUtil - .logMsg("Call Service.getPort(QName, Class, WebServiceFeature ...)"); - TestUtil.logMsg("Should find port"); - tests = (Hello2) service.getPort(PORT2_QNAME, Hello2.class, wsffalse); - if (tests == null) { - TestUtil.logErr( - "getPort(QName, Class, WebServiceFeature ...) returned null"); - pass = false; - } else if (!(tests instanceof Hello2)) { - TestUtil.logErr("getPort(QName, Class, WebServiceFeature ...) did not" - + " return instance of Hello2"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetPortTest1WithFeatures failed", e); - } - - if (!pass) - throw new Fault("GetPortTest1WithFeatures failed"); - } - - /* - * @testName: GetPortTest2WithFeatures - * - * @assertion_ids: JAXWS:JAVADOC:156; JAXWS:JAVADOC:183; JAXWS:SPEC:4025 - * - * @test_Strategy: Call Service.getPort(Class, WebServiceFeature ...) to - * return a dynamic proxy for the service port. Pass a valid port name with - * WSDL access. Verify that the method returns a dynamic proxy. - */ - public void GetPortTest2WithFeatures() throws Fault { - TestUtil.logTrace("GetPortTest2WithFeatures"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, SERVICE_CLASS); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg( - "Test getPort (valid port name/WSDL access) AddressingFeature(true)"); - TestUtil.logMsg("Call Service.getPort(Class, WebServiceFeature ...)"); - TestUtil.logMsg("Should find port"); - Hello2 tests = (Hello2) service.getPort(Hello2.class, wsftrue); - if (tests == null) { - TestUtil.logErr("getPort(Class, WebServiceFeature ...) returned null"); - pass = false; - } else if (!(tests instanceof Hello2)) { - TestUtil.logErr("getPort(Class, WebServiceFeature ...) did not" - + " return instance of Hello2"); - pass = false; - } - TestUtil.logMsg( - "Test getPort (valid port name/WSDL access) AddressingFeature(false)"); - TestUtil.logMsg("Call Service.getPort(Class, WebServiceFeature ...)"); - TestUtil.logMsg("Should find port"); - tests = (Hello2) service.getPort(Hello2.class, wsffalse); - if (tests == null) { - TestUtil.logErr("getPort(Class, WebServiceFeature ...) returned null"); - pass = false; - } else if (!(tests instanceof Hello2)) { - TestUtil.logErr("getPort(Class, WebServiceFeature ...) did not" - + " return instance of Hello2"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetPortTest2WithFeatures failed", e); - } - - if (!pass) - throw new Fault("GetPortTest2WithFeatures failed"); - } - - /* - * @testName: GetPortTest3WithFeatures - * - * @assertion_ids: JAXWS:JAVADOC:157; JAXWS:JAVADOC:182; JAXWS:SPEC:4027; - * JAXWS:JAVADOC:177; - * - * @test_Strategy: Call Service.getPort(EndpointReference, Class, - * WebServiceFeature ...) to return a dynamic proxy for the service port. Pass - * a valid port name with WSDL access. Verify that the method returns a - * dynamic proxy. - */ - public void GetPortTest3WithFeatures() throws Fault { - TestUtil.logTrace("GetPortTest3WithFeatures"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, SERVICE_CLASS); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - - Hello2 tests2 = (Hello2) service.getPort(PORT2_QNAME, Hello2.class); - epr = ((BindingProvider) tests2).getEndpointReference(); - TestUtil - .logMsg("EndpointReference for port2 Hello2 is: " + epr.toString()); - - TestUtil.logMsg( - "Test getPort (valid port name/WSDL access) AddressingFeature(true)"); - TestUtil.logMsg( - "Call Service.getPort(EndpointReference, Class, WebServiceFeature ...)"); - TestUtil.logMsg("Should find port"); - Hello2 tests = (Hello2) service.getPort(epr, Hello2.class, wsftrue); - if (tests == null) { - TestUtil - .logErr("getPort(epr, Class, WebServiceFeature ...) returned null"); - pass = false; - } else if (!(tests instanceof Hello2)) { - TestUtil.logErr( - "getPort(EndpointReference, Class, WebServiceFeature ...) did not" - + " return instance of Hello2"); - pass = false; - } - TestUtil.logMsg( - "Test getPort (valid port name/WSDL access) AddressingFeature(false)"); - TestUtil.logMsg( - "Call Service.getPort(EndpointReference, Class, WebServiceFeature ...)"); - TestUtil.logMsg("Should find port"); - tests = (Hello2) service.getPort(epr, Hello2.class, wsffalse); - if (tests == null) { - TestUtil.logErr( - "getPort(EndpointReference, Class, WebServiceFeature ...) returned null"); - pass = false; - } else if (!(tests instanceof Hello2)) { - TestUtil.logErr( - "getPort(EndpointReference, Class, WebServiceFeature ...) did not" - + " return instance of Hello2"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetPortTest3WithFeatures failed", e); - } - - if (!pass) - throw new Fault("GetPortTest3WithFeatures failed"); - } - - /* - * @testName: GetPort1NegTest1WithWsdl - * - * @assertion_ids: JAXWS:SPEC:4001; JAXWS:SPEC:4011; JAXWS:SPEC:4013; - * JAXWS:JAVADOC:52; JAXWS:JAVADOC:122; JAXWS:JAVADOC:116; - * - * @test_Strategy: Call Service.getPort(QName, Class) to return a dynamic - * proxy for the service port. Pass a valid port name with WSDL access. Verify - * that the method returns a dynamic proxy. Verify that an exception occurs - * due to port not found. Expect a WebServiceException. - */ - public void GetPort1NegTest1WithWsdl() throws Fault { - TestUtil.logTrace("GetPort1NegTest1WithWsdl"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, SERVICE_CLASS); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg( - "Test getPort (invalid port name/WSDL access) - negative test 1"); - TestUtil.logMsg("INVALID_PORT_QNAME=" + NONEXISTANT_PORT_QNAME); - TestUtil.logMsg("Call Service.getPort(QName, Class)"); - TestUtil.logMsg("Should not find port (expect WebServiceException)"); - Hello tests = (Hello) service.getPort(NONEXISTANT_PORT_QNAME, - Hello.class); - TestUtil.logErr("Did not throw expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetPort1NegTest1WithWsdl failed", e); - } - - if (!pass) - throw new Fault("GetPort1NegTest1WithWsdl failed"); - } - - /* - * @testName: GetPort2PosTest1WithWsdl - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4009; JAXWS:SPEC:4010; - * JAXWS:JAVADOC:53; JAXWS:JAVADOC:123; JAXWS:JAVADOC:116; - * - * @test_Strategy: Call Service.getPort(Class) to return a dynamic proxy for - * the service port. Pass a valid SEI class. Access to WSDL metadata. Verify - * behavior. - */ - public void GetPort2PosTest1WithWsdl() throws Fault { - TestUtil.logTrace("GetPort2PosTest1WithWsdl"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, SERVICE_CLASS); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg( - "Test getPort (valid SEI class/WSDL access) - positive test 1"); - TestUtil.logMsg("Call Service.getPort(Class)"); - TestUtil.logMsg("Should find port"); - Hello tests = (Hello) service.getPort(Hello.class); - if (tests == null) { - TestUtil.logErr("getPort(Class) returned null"); - pass = false; - } else if (!(tests instanceof Hello)) { - TestUtil.logErr("getPort(Class) did not" + " return instance of Hello"); - pass = false; - } - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetPort2PosTest1WithWsdl failed", e); - } - - if (!pass) - throw new Fault("GetPort2PosTest1WithWsdl failed"); - } - - /* - * @testName: GetPort2NegTest1WithWsdl - * - * @assertion_ids: JAXWS:SPEC:4001; JAXWS:SPEC:4011; JAXWS:SPEC:4013; - * JAXWS:JAVADOC:53; JAXWS:JAVADOC:123; JAXWS:JAVADOC:116; - * - * @test_Strategy: Call Service.getPort(Class) to return a dynamic proxy for - * the service port. Pass an invalid SEI class. WSDL metadata access. Verify - * behavior. Expect WebServiceException. - */ - public void GetPort2NegTest1WithWsdl() throws Fault { - TestUtil.logTrace("GetPort2NegTest1WithWsdl"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, SERVICE_CLASS); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg( - "Test getPort (invalid SEI class/WSDL access) - negative test 1"); - TestUtil.logMsg("Call Service.getPort(Class)"); - TestUtil.logMsg("Should not find port (expect Exception)"); - Hello tests = (Hello) service - .getPort((Class) java.util.regex.Pattern.class); - TestUtil.logErr("Did not throw expected Exception"); - TestUtil.logErr("hello port=" + tests); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException"); - } catch (Exception e) { - TestUtil.logMsg("Caught expected Exception"); - } - - if (!pass) - throw new Fault("GetPort2NegTest1WithWsdl failed"); - } - - /* - * @testName: GetPortsTest1WithWsdl - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4009; JAXWS:JAVADOC:54; - * JAXWS:JAVADOC:124; JAXWS:JAVADOC:116; - * - * @test_Strategy: Call Service.getPorts() to return a list of qualified names - * of the ports grouped by this service. Verify that the method returns a list - * of qualified names of the ports grouped by this service. Create a Service - * object with access to WSDL metadata. - */ - public void GetPortsTest1WithWsdl() throws Fault { - TestUtil.logTrace("GetPortsTest1WithWsdl"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, SERVICE_CLASS); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg("Test getPorts with (WSDL access) - positive test 1"); - TestUtil.logMsg("Call Service.getPorts()"); - TestUtil.logMsg("Expect a non empty iterator of ports"); - Iterator i = service.getPorts(); - if (!i.hasNext()) { - TestUtil.logErr("getPorts() returned empty iterator (unexpected)"); - pass = false; - } else { - int count = 0; - while (i.hasNext()) { - i.next(); - count++; - } - TestUtil.logMsg("getPorts() returned count of " + count); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetPortsTest1WithWsdl failed", e); - } - - if (!pass) - throw new Fault("GetPortsTest1WithWsdl failed"); - } - - /* - * @testName: GetServiceNameTest1 - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4009; JAXWS:JAVADOC:55; - * JAXWS:JAVADOC:125; JAXWS:JAVADOC:116; - * - * @test_Strategy: Call Service.getServiceName() to return the name of this - * service. - */ - public void GetServiceNameTest1() throws Fault { - TestUtil.logTrace("GetServiceNameTest1"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, SERVICE_CLASS); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg("Get service name via Service.getServiceName()"); - QName sname = service.getServiceName(); - TestUtil.logMsg( - "ServiceName = " + SERVICE_QNAME + "\ngetServiceName() = " + sname); - if (!sname.equals(SERVICE_QNAME)) { - TestUtil.logErr("getServiceName() returned wrong QName"); - TestUtil.logErr("Expected " + SERVICE_QNAME + "\nGot " + sname); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetServiceNameTest1 failed", e); - } - - if (!pass) - throw new Fault("GetServiceNameTest1 failed"); - } - - /* - * @testName: GetWSDLDocumentLocationTest1 - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4009; JAXWS:JAVADOC:56; - * JAXWS:JAVADOC:126; JAXWS:JAVADOC:116; - * - * @test_Strategy: Call Service.getWSDLDocumentLocation() to return the - * location of the WSDL document for this service. - */ - public void GetWSDLDocumentLocationTest1() throws Fault { - TestUtil.logTrace("GetWSDLDocumentLocationTest1"); - boolean pass = false; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, SERVICE_CLASS); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg("Call Service.getWSDLDocumentLocation() to get WSDL url"); - URL url = service.getWSDLDocumentLocation(); - TestUtil.logMsg("WSDLURL=" + url); - if (url != null) { - TestUtil.logMsg("WSDLURL is not null (expected)"); - pass = true; - } else - TestUtil.logErr("WSDLURL is null (unexpected)"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetWSDLDocumentLocationTest1 failed", e); - } - - if (!pass) - throw new Fault("GetWSDLDocumentLocationTest1 failed"); - } - - /* - * @testName: GetHandlerResolverTest1WithWsdl - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4009; JAXWS:JAVADOC:51; - * JAXWS:JAVADOC:121; JAXWS:JAVADOC:116; - * - * @test_Strategy: Call Service.getHandlerResolver() to get the configured - * HandlerResolver. Access to WSDL metadata. Verify behavior. - */ - public void GetHandlerResolverTest1WithWsdl() throws Fault { - TestUtil.logTrace("GetHandlerResolverTest1WithWsdl"); - boolean pass = false; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, SERVICE_CLASS); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg("Call Service.getHandlerResolver() - should pass"); - HandlerResolver hr = service.getHandlerResolver(); - pass = true; - } catch (WebServiceException e) { - TestUtil.logErr("Caught unexpected WebServiceException"); - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetHandlerResolverTest1WithWsdl failed", e); - } - - if (!pass) - throw new Fault("GetHandlerResolverTest1WithWsdl failed"); - } - - /* - * @testName: SetHandlerResolverTest1WithWsdl - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4009; JAXWS:SPEC:4010; - * JAXWS:JAVADOC:58; JAXWS:JAVADOC:128; - * - * @test_Strategy: Call Service.getHandlerResolver() to get the configured - * HandlerResolver. Access to WSDL metadata. Verify behavior. - */ - public void SetHandlerResolverTest1WithWsdl() throws Fault { - TestUtil.logTrace("SetHandlerResolverTest1WithWsdl"); - boolean pass = false; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, SERVICE_CLASS); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg("Call Service.getHandlerResolver() - should pass"); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - return new ArrayList(); - } - }); - pass = true; - } catch (WebServiceException e) { - TestUtil.logErr("Caught unexpected WebServiceException"); - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SetHandlerResolverTest1WithWsdl failed", e); - } - - if (!pass) - throw new Fault("SetHandlerResolverTest1WithWsdl failed"); - } - - /* - * @testName: CreateDispatchTest1WithWsdl - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4009; JAXWS:SPEC:4014; - * JAXWS:JAVADOC:49; JAXWS:JAVADOC:119; - * - * @test_Strategy: Create a Dispatch object using the constructor via - * Service.createDispatch(QName, Source, Mode). Verify that the Dispatch - * object was successfully created. - */ - public void CreateDispatchTest1WithWsdl() throws Fault { - TestUtil.logTrace("CreateDispatchTest1WithWsdl"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg( - "Create Dispatch object via Service.createDispatch(QName, Source, Mode)"); - Dispatch dispatch = service.createDispatch(PORT_QNAME, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - if (dispatch == null) { - TestUtil.logErr("Service.createDispatch() returned null"); - pass = false; - } else - TestUtil.logMsg("Dispatch object was successfully created"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("CreateDispatchTest1WithWsdl failed", e); - } - - if (!pass) - throw new Fault("CreateDispatchTest1WithWsdl failed"); - } - - /* - * @testName: CreateDispatchTest2WithWsdl - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4009; JAXWS:SPEC:4010; - * JAXWS:SPEC:4014; JAXWS:JAVADOC:49; JAXWS:JAVADOC:119; JAXWS:JAVADOC:218; - * JAXWS:JAVADOC:241; - * - * @test_Strategy: Create a Dispatch object using the constructor via - * Service.createDispatch(QName, JAXBContext, Mode). Verify that the Dispatch - * object was successfully created. - */ - public void CreateDispatchTest2WithWsdl() throws Fault { - TestUtil.logTrace("CreateDispatchTest2WithWsdl"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg( - "Create Dispatch object via Service.createDispatch(QName, JAXBContext, Mode)"); - Dispatch dispatch = createDispatchJAXB(service); - if (dispatch == null) { - TestUtil.logErr("Service.createDispatch() returned null"); - pass = false; - } else - TestUtil.logMsg("Dispatch object was successfully created"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("CreateDispatchTest2WithWsdl failed", e); - } - - if (!pass) - throw new Fault("CreateDispatchTest2WithWsdl failed"); - } - - /* - * @testName: CreateDispatchTest1WithFeatures - * - * @assertion_ids: JAXWS:JAVADOC:153; JAXWS:JAVADOC:179; - * - * @test_Strategy: Create a Dispatch object using the constructor via - * Service.createDispatch(QName, Source, Mode, WebsServiceFeature ...). Verify - * that the Dispatch object was successfully created. - */ - public void CreateDispatchTest1WithFeatures() throws Fault { - TestUtil.logTrace("CreateDispatchTest1WithFeatures"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg( - "Create Dispatch via Service.createDispatch(QName, Source, Mode, WebServiceFeature ...) - Addressing(true)"); - Dispatch dispatch = service.createDispatch(PORT2_QNAME, - Source.class, jakarta.xml.ws.Service.Mode.PAYLOAD, wsftrue); - if (dispatch == null) { - TestUtil.logErr("Service.createDispatch() returned null"); - pass = false; - } else - TestUtil.logMsg("Dispatch object was successfully created"); - TestUtil.logMsg( - "Create Dispatch via Service.createDispatch(QName, Source, Mode, WebServiceFeature ...) - Addressing(false)"); - dispatch = service.createDispatch(PORT2_QNAME, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD, wsffalse); - if (dispatch == null) { - TestUtil.logErr("Service.createDispatch() returned null"); - pass = false; - } else - TestUtil.logMsg("Dispatch object was successfully created"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("CreateDispatchTest1WithFeatures failed", e); - } - - if (!pass) - throw new Fault("CreateDispatchTest1WithFeatures failed"); - } - - /* - * @testName: CreateDispatchTest2WithFeatures - * - * @assertion_ids: JAXWS:JAVADOC:219; JAXWS:JAVADOC:242; - * - * @test_Strategy: Create a Dispatch object using the constructor via - * Service.createDispatch(QName, JAXBContext, Mode, WebsServiceFeature ...). - * Verify that the Dispatch object was successfully created. - */ - public void CreateDispatchTest2WithFeatures() throws Fault { - TestUtil.logTrace("CreateDispatchTest2WithFeatures"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg( - "Create Dispatch via Service.createDispatch(QName, JAXBContext, Mode, WebServiceFeature ...) - Addressing(true)"); - Dispatch dispatch = createDispatchJAXB(service, wsftrue); - if (dispatch == null) { - TestUtil.logErr( - "Service.createDispatch(QName, JAXBContext, Mode, WebServiceFeature ...) returned null"); - pass = false; - } else - TestUtil.logMsg("Dispatch object was successfully created"); - TestUtil.logMsg( - "Create Dispatch via Service.createDispatch(QName, JAXBContext, Mode, WebServiceFeature ...) - Addressing(false)"); - dispatch = createDispatchJAXB(service, wsffalse); - if (dispatch == null) { - TestUtil.logErr( - "Service.createDispatch(QName, JAXBContext, Mode, WebServiceFeature ...) returned null"); - pass = false; - } else - TestUtil.logMsg("Dispatch object was successfully created"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("CreateDispatchTest2WithFeatures failed", e); - } - - if (!pass) - throw new Fault("CreateDispatchTest2WithFeatures failed"); - } - - /* - * @testName: CreateDispatchObjectUsingEPRWithWFTrueTest - * - * @assertion_ids: JAXWS:JAVADOC:154; JAXWS:JAVADOC:180; - * - * @test_Strategy: Create a Dispatch object using the constructor via Service. - * createDispatch(EndpointReference, Source, Mode, WebServiceFeature ...). - * Verify that the Dispatch object was successfully created using EPR. - */ - public void CreateDispatchObjectUsingEPRWithWFTrueTest() throws Fault { - TestUtil.logTrace("CreateDispatchObjectUsingEPRWithWFTrueTest"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - - Hello2 tests2 = (Hello2) service.getPort(PORT2_QNAME, Hello2.class); - epr = ((BindingProvider) tests2).getEndpointReference(); - TestUtil - .logMsg("EndpointReference for port2 Hello2 is: " + epr.toString()); - - TestUtil.logMsg( - "Create Dispatch via Service.createDispatch(EndpointReference, Source, Mode, WebServiceFeature ...) - Addressing(true)"); - String bindingID = new String(SOAPBinding.SOAP11HTTP_BINDING); - Dispatch dispatch = service.createDispatch(epr, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD, wsftrue); - if (dispatch == null) { - TestUtil.logErr("Service.createDispatch() returned null"); - pass = false; - } else - TestUtil.logMsg("Dispatch object was successfully created"); - TestUtil.logMsg( - "Create Dispatch via Service.createDispatch(EndpointReference, Source, Mode, WebServiceFeature ...) - Addressing(false)"); - dispatch = service.createDispatch(epr, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD, wsffalse); - if (dispatch == null) { - TestUtil.logErr("Service.createDispatch() returned null"); - pass = false; - } else - TestUtil.logMsg("Dispatch object was successfully created"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("CreateDispatchObjectUsingEPRWithWFTrueTest failed", e); - } - - if (!pass) - throw new Fault("CreateDispatchObjectUsingEPRWithWFTrueTest failed"); - } - - /* - * @testName: CreateDispatchObjectUsingEPRWithWFTrueTest2 - * - * @assertion_ids: JAXWS:JAVADOC:220; - * - * @test_Strategy: Create a Dispatch object using the constructor via Service. - * createDispatch(EndpointReference, JAXBContext, Mode, WebServiceFeature - * ...). Verify that the Dispatch object was successfully created using EPR. - */ - public void CreateDispatchObjectUsingEPRWithWFTrueTest2() throws Fault { - TestUtil.logTrace("CreateDispatchObjectUsingEPRWithWFTrueTest2"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - - Hello2 tests2 = (Hello2) service.getPort(PORT2_QNAME, Hello2.class); - epr = ((BindingProvider) tests2).getEndpointReference(); - TestUtil - .logMsg("EndpointReference for port2 Hello2 is: " + epr.toString()); - - TestUtil.logMsg( - "Create Dispatch via Service.createDispatch(EndpointReference, JAXBContext, Mode, WebServiceFeature ...) - Addressing(true)"); - String bindingID = new String(SOAPBinding.SOAP11HTTP_BINDING); - Dispatch dispatch = service.createDispatch(epr, - createJAXBContext(), jakarta.xml.ws.Service.Mode.PAYLOAD, wsftrue); - if (dispatch == null) { - TestUtil.logErr("Service.createDispatch() returned null"); - pass = false; - } else - TestUtil.logMsg("Dispatch object was successfully created"); - TestUtil.logMsg( - "Create Dispatch via Service.createDispatch(EndpointReference, JAXBContext, Mode, WebServiceFeature ...) - Addressing(false)"); - dispatch = service.createDispatch(epr, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD, wsffalse); - if (dispatch == null) { - TestUtil.logErr("Service.createDispatch() returned null"); - pass = false; - } else - TestUtil.logMsg("Dispatch object was successfully created"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("CreateDispatchObjectUsingEPRWithWFTrueTest2 failed", e); - } - - if (!pass) - throw new Fault("CreateDispatchObjectUsingEPRWithWFTrueTest2 failed"); - } - - /* - * @testName: CreateDispatchExceptionTest1WithWsdl - * - * @assertion_ids: JAXWS:SPEC:4001; JAXWS:SPEC:4014; JAXWS:SPEC:4016; - * JAXWS:SPEC:4015; JAXWS:JAVADOC:49; - * - * @test_Strategy: Create a Dispatch object using the constructor via - * Service.createDispatch(QName, Object, Mode). Pass an invalid port for the - * QName. Verify that the call to createDispatch() throws a - * WebServiceException. - */ - public void CreateDispatchExceptionTest1WithWsdl() throws Fault { - TestUtil.logTrace("CreateDispatchExceptionTest1WithWsdl"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil.logMsg( - "Call Service.createDispatch(QName, Object, Mode) with invalid QName"); - TestUtil.logMsg("INVALID_PORT_QNAME=" + NONEXISTANT_PORT_QNAME); - String bindingID = new String(SOAPBinding.SOAP11HTTP_BINDING); - service.addPort(PORT_QNAME, bindingID, url); - Dispatch dispatch = service.createDispatch(NONEXISTANT_PORT_QNAME, - Source.class, jakarta.xml.ws.Service.Mode.PAYLOAD); - TestUtil.logErr( - "Service.createDispatch(QName. Object, Mode) did not throw expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("CreateDispatchExceptionTest1WithWsdl failed", e); - } - - if (!pass) - throw new Fault("CreateDispatchExceptionTest1WithWsdl failed"); - } - - /* - * @testName: CreatePortTest1WithWsdl - * - * @assertion_ids: JAXWS:SPEC:4000; JAXWS:SPEC:4009; JAXWS:SPEC:4010; - * JAXWS:JAVADOC:46; JAXWS:JAVADOC:118; - * - * @test_Strategy: Create a port for service using Service.addPort( - * javax.xml.namespace.QName, java.net.String, java.lang.String). - */ - public void CreatePortTest1WithWsdl() throws Fault { - TestUtil.logTrace("CreatePortTest1WithWsdl"); - boolean pass = true; - try { - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(SERVICE_QNAME); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - TestUtil - .logMsg("Create a port via Service.addPort(QName, String, String)"); - String bindingID = new String(SOAPBinding.SOAP11HTTP_BINDING); - service.addPort(NONEXISTANT_PORT_QNAME, bindingID, url); - TestUtil.logMsg("Service.addPort() call was successfull"); - } catch (Exception e) { - TestUtil.logErr("Service.addPort() call was unsuccessfull"); - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("CreatePortTest1WithWsdl failed", e); - } - - if (!pass) - throw new Fault("CreatePortTest1WithWsdl failed"); - } - - /* - * @testName: getExecutorTest - * - * @assertion_ids: JAXWS:SPEC:4002; JAXWS:SPEC:4003; JAXWS:SPEC:4009; - * JAXWS:SPEC:4005; JAXWS:JAVADOC:50; JAXWS:JAVADOC:120; - * - * @test_Strategy: Get the Executor for this instance. - */ - public void getExecutorTest() throws Fault { - TestUtil.logTrace("getExecutorTest"); - boolean pass = true; - try { - java.util.concurrent.Executor executor = new java.util.concurrent.ScheduledThreadPoolExecutor( - 1); - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - service.setExecutor(executor); - java.util.concurrent.Executor executor2 = service.getExecutor(); - if (executor == null) { - TestUtil.logErr("executor is null"); - pass = false; - } else { - TestUtil.logTrace("executor is not null"); - if (executor != executor2) { - TestUtil.logErr( - "The executor that was set was not the same one returned by the get"); - pass = false; - } else { - TestUtil.logTrace("The executors are the same for the set and get"); - } - } - } catch (Exception e) { - TestUtil.logErr("Service.getExecutor() call was unsuccessfull"); - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getExecutorTest failed", e); - } - - if (!pass) - throw new Fault("getExecutorTest failed"); - } - - /* - * @testName: setExecutorTest - * - * @assertion_ids: JAXWS:SPEC:4002; JAXWS:SPEC:4003; JAXWS:SPEC:4009; - * JAXWS:SPEC:4005; JAXWS:JAVADOC:57; JAXWS:JAVADOC:127; - * - * @test_Strategy: Set the Executor for this instance. - */ - public void setExecutorTest() throws Fault { - TestUtil.logTrace("setExecutorTest"); - boolean pass = true; - try { - java.util.concurrent.Executor executor = new java.util.concurrent.ScheduledThreadPoolExecutor( - 1); - jakarta.xml.ws.Service service = null; - if (modeProperty.equals("standalone")) { - service = JAXWS_Util.getService(wsdlurl, SERVICE_QNAME); - } else { - TestUtil.logMsg("Get Initial Context"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("Get JAXWS service instance with WSDL"); - service = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL); - } - service.setExecutor(executor); - if (executor == null) { - TestUtil.logErr("executor is null"); - pass = false; - } else { - TestUtil.logTrace("executor is not null"); - } - } catch (Exception e) { - TestUtil.logErr("Service.setExecutor() call was unsuccessfull"); - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("setExecutorTest failed", e); - } - - if (!pass) - throw new Fault("setExecutorTest failed"); - } - - private jakarta.xml.ws.Service getService(QName sname, - WebServiceFeature[] wsfeatures) throws Exception { - TestUtil.logMsg("JAXWS_Util:getService(QName, WebServiceFeature[])"); - jakarta.xml.ws.Service service = null; - TestUtil.logMsg("QNAME=" + sname); - TestUtil.logMsg( - "Creating Service via jakarta.xml.ws.Service.create(QName, WebServiceFeature[])"); - service = jakarta.xml.ws.Service.create(sname, wsfeatures); - if (service == null) - TestUtil.logErr( - "FATAL: jakarta.xml.ws.Service.create(QName, WebServiceFeature[]) returned a null"); - return service; - } - - private jakarta.xml.ws.Service getService(URL wsdlurl, QName sname, - WebServiceFeature[] wsfeatures) throws Exception { - TestUtil.logMsg("JAXWS_Util:getService(URL, QName, WebServiceFeature[])"); - jakarta.xml.ws.Service service = null; - if (wsdlurl != null) - TestUtil.logMsg("URL=" + wsdlurl.toString()); - TestUtil.logMsg("QName=" + sname); - TestUtil.logMsg( - "Creating Service via jakarta.xml.ws.Service.create(URL, QName, WebServiceFeature[])"); - service = jakarta.xml.ws.Service.create(wsdlurl, sname, wsfeatures); - if (service == null) - TestUtil.logErr( - "FATAL: jakarta.xml.ws.Service.create(URL, QName, WebServiceFeature[]) returned a null"); - return service; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service/TCKFeature.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service/TCKFeature.java deleted file mode 100644 index 4905b18bd8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service/TCKFeature.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 56891 2009-02-24 15:46:00Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.Service; - -import jakarta.xml.ws.WebServiceFeature; - -public final class TCKFeature extends WebServiceFeature { - public static final String ID = "http://www.w3.org/2004/08/soap/features/tck-feature"; - - public TCKFeature() { - this.enabled = true; - } - - public TCKFeature(boolean enabled) { - this.enabled = enabled; - } - - public String getID() { - return ID; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service/build.xml deleted file mode 100644 index b4a3534f7a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service/jakartaEE.tokens deleted file mode 100644 index 28dc128adc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service/jakartaEE.tokens +++ /dev/null @@ -1,9 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhelloservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloservice -~ - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service_Mode/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service_Mode/Client.java deleted file mode 100644 index 53396e8808..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service_Mode/Client.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.Service_Mode; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; - -import jakarta.xml.ws.*; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // Expected Enum Constant Summary - private final static jakarta.xml.ws.Service.Mode expectedEnums[] = { - jakarta.xml.ws.Service.Mode.MESSAGE, jakarta.xml.ws.Service.Mode.PAYLOAD, }; - - private boolean findEnums(jakarta.xml.ws.Service.Mode[] args) { - boolean pass = true; - boolean found; - for (jakarta.xml.ws.Service.Mode a : args) { - found = false; - TestUtil.logMsg("Searching expected list of enums for " + a); - for (jakarta.xml.ws.Service.Mode b : expectedEnums) { - if (a == b) { - found = true; - break; - } - } - if (!found) { - pass = false; - TestUtil.logErr("No enum found for " + a); - } else { - TestUtil.logMsg("Enum found for " + a); - } - } - return pass; - } - - private void printEnums(jakarta.xml.ws.Service.Mode[] args) { - TestUtil.logMsg("Print Enums"); - TestUtil.logMsg("-----------"); - for (jakarta.xml.ws.Service.Mode c : args) - TestUtil.logMsg("" + c); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: valuesTest - * - * @assertion_ids: JAXWS:JAVADOC:60; JAXWS:JAVADOC:61; - * - * @test_Strategy: Verify jakarta.xml.ws.Service.Mode.values() returns array - * containing the constants of this enum type. - */ - public void valuesTest() throws Fault { - TestUtil.logTrace("valuesTest"); - boolean pass = true; - try { - TestUtil.logMsg("Call jakarta.xml.ws.Service.Mode.values() ..."); - jakarta.xml.ws.Service.Mode[] methods = jakarta.xml.ws.Service.Mode.values(); - printEnums(methods); - pass = findEnums(methods); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("valuesTest failed", e); - } - - if (!pass) - throw new Fault("valuesTest failed"); - } - - /* - * @testName: valueOfTest - * - * @assertion_ids: JAXWS:JAVADOC:59; - * - * @test_Strategy: Verify jakarta.xml.ws.Service.Mode.valueOf(String name) - * returns the enum constant of this type with specified name. - */ - public void valueOfTest() throws Fault { - TestUtil.logTrace("valuesTest"); - boolean pass = true; - try { - TestUtil.logMsg("Call jakarta.xml.ws.Service.Mode.valueOf(MESSAGE) ..."); - jakarta.xml.ws.Service.Mode method = jakarta.xml.ws.Service.Mode - .valueOf("MESSAGE"); - if (method != jakarta.xml.ws.Service.Mode.MESSAGE) { - TestUtil.logErr( - "jakarta.xml.ws.Service.Mode.valueOf(MESSAGE) failed:" + " expected: " - + jakarta.xml.ws.Service.Mode.MESSAGE + ", received: " + method); - pass = false; - } else { - TestUtil.logMsg("jakarta.xml.ws.Service.Mode.valueOf(MESSAGE) passed"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("valuesTest failed", e); - } - - if (!pass) - throw new Fault("valuesTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service_Mode/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service_Mode/build.xml deleted file mode 100644 index a25e429579..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/Service_Mode/build.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/Client.java deleted file mode 100644 index 49580cae30..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/Client.java +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.WebServiceContext; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; - -import java.net.*; -import java.util.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.sharedclients.hellosecureclient.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - private String username = ""; - - private String password = ""; - - private String unauthUsername = ""; - - private String unauthPassword = ""; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String UserNameProp = "user"; - - private static final String PasswordProp = "password"; - - private static final String unauthUserNameProp = "authuser"; - - private static final String unauthPasswordProp = "authpassword"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.api.jakarta_xml_ws.WebServiceContext."; - - // service and port information - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "hellosecureservice.endpoint.1"; - - private static final String WSDLLOC_URL = "hellosecureservice.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - Hello port = null; - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.hellosecureclient.HelloService.class; - - static HelloService service = null; - - private void getPorts() throws Exception { - TestUtil.logMsg("Get port = " + PORT_NAME); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port=" + port); - } - - private void getPortsStandalone() throws Exception { - getPorts(); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (Hello) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - HelloService.class, PORT_QNAME, Hello.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; user; - * password; authuser; authpassword; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - username = p.getProperty(UserNameProp); - password = p.getProperty(PasswordProp); - unauthUsername = p.getProperty(unauthUserNameProp); - unauthPassword = p.getProperty(unauthPasswordProp); - TestUtil.logMsg("Username=" + username + ", Password=" + password); - TestUtil.logMsg("unauthUsername=" + unauthUsername + ", unauthPassword=" - + unauthPassword); - modeProperty = p.getProperty(MODEPROP); - - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (HelloService) JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, - SERVICE_CLASS); - getPortsStandalone(); - JAXWS_Util.setUserNameAndPassword(port, username, password); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HelloService) getSharedObject(); - getPortsJavaEE(); - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: getMessageContextTest - * - * @assertion_ids: JAXWS:JAVADOC:69; WS4EE:SPEC:5004; - * - * @test_Strategy: Call WebServiceContext.getMessageContext() api. - * - * Description - */ - public void getMessageContextTest() throws Fault { - boolean pass = true; - try { - TestUtil.logMsg( - "getMessageContextTest: test access to MessageContext information"); - pass = port.getMessageContextTest(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("getMessageContextTest failed", e); - } - - if (!pass) - throw new Fault("getMessageContextTest failed"); - } - - /* - * @testName: getEndpointReferenceTest - * - * @assertion_ids: JAXWS:JAVADOC:158; JAXWS:SPEC:5028; - * - * @test_Strategy: Call - * getEndpointReference(org.w3c.dom.Element...referenceParameters) and ensure - * that EndpointReference was able to be retrieved. - * - * Description - */ - public void getEndpointReferenceTest() throws Fault { - boolean pass = true; - try { - TestUtil.logMsg( - "getEndpointReferenceTest: test access to EndpointReference information"); - pass = port.getEndpointReferenceTest(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("getEndpointReferenceTest failed", e); - } - - if (!pass) { - throw new Fault("getEndpointReferenceTest failed"); - } - } - - /* - * @testName: getEndpointReference2Test - * - * @assertion_ids: JAXWS:JAVADOC:159; JAXWS:SPEC:5028; - * - * @test_Strategy: Call getEndpointReference(java.lang.Class class, - * org.w3c.dom.Element...referenceParameters) and ensure that - * EndpointReference was able to be retrieved. - * - * Description - */ - public void getEndpointReference2Test() throws Fault { - boolean pass = true; - try { - TestUtil.logMsg( - "getEndpointReference2Test: test access to MessageContext information"); - pass = port.getEndpointReference2Test(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("getEndpointReference2Test failed", e); - } - - if (!pass) - throw new Fault("getEndpointReference2Test failed"); - } - - /* - * @testName: getUserPrincipalTest - * - * @assertion_ids: JAXWS:JAVADOC:70; WS4EE:SPEC:5004; - * - * @test_Strategy: Call WebServiceContext.getUserPrincipal() api. - * - * Description - */ - public void getUserPrincipalTest() throws Fault { - boolean pass = true; - try { - TestUtil.logMsg( - "getUserPrincipalTest: test access to UserPrincipal information"); - pass = port.getUserPrincipalTest(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("getUserPrincipalTest failed", e); - } - - if (!pass) - throw new Fault("getUserPrincipalTest failed"); - } - - /* - * @testName: isUserInRoleTest - * - * @assertion_ids: JAXWS:JAVADOC:71; WS4EE:SPEC:5004; - * - * @test_Strategy: Call WebServiceContext.getisUserInRole() api. - * - * Description - */ - public void isUserInRoleTest() throws Fault { - boolean pass = true; - try { - TestUtil - .logMsg("isUserInRoleTest: test access to isUserInRole information"); - TestUtil.logMsg("Invoking RPC method isUserInRoleTest() and " - + "expect true for Adminstrator role ..."); - boolean yes = port.isUserInRoleTest("Administrator"); - if (yes) - TestUtil.logMsg("Administrator role - correct"); - else { - TestUtil.logErr("Not Administrator role - incorrect"); - pass = false; - } - TestUtil.logMsg("Invoking RPC method isUserInRoleTest() and " - + "expect false for Manager role ..."); - yes = port.isUserInRoleTest("Manager"); - if (!yes) { - TestUtil.logMsg("Not Manager role - correct"); - } else { - TestUtil.logErr("Manager role - incorrect"); - pass = false; - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("isUserInRoleTest failed", e); - } - - if (!pass) - throw new Fault("isUserInRoleTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/WSWebServiceContext_wsappclient_vehicle_client.jar.sun-application-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/WSWebServiceContext_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 74ed9edcda..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/WSWebServiceContext_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - service/wsw2jhellosecureservice - - com.sun.ts.tests.jaxws.sharedclients.hellosecureclient.Hello - - http://helloservice.org/wsdl - HelloPort - - - jakarta.xml.ws.security.auth.password - j2ee - - - jakarta.xml.ws.security.auth.username - j2ee - - - http://webServerHost.1:webServerPort.1/WSHelloSecureService_web/jaxws/Hello?WSDL - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/WSWebServiceContext_wsejb_vehicle_client.jar.sun-application-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/WSWebServiceContext_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index ea056baca7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/WSWebServiceContext_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - WSWebServiceContext_wsejb_vehicle - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/WSWebServiceContext_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/WSWebServiceContext_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 8cfd29c20e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/WSWebServiceContext_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - WSWebServiceContext_wsejb_vehicle - - service/wsw2jhellosecureservice - - com.sun.ts.tests.jaxws.sharedclients.hellosecureclient.Hello - - http://helloservice.org/wsdl - HelloPort - - - jakarta.xml.ws.security.auth.password - j2ee - - - jakarta.xml.ws.security.auth.username - j2ee - - - http://webServerHost.1:webServerPort.1/WSHelloSecureService_web/jaxws/Hello?WSDL - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/WSWebServiceContext_wsservlet_vehicle_web.war.sun-web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/WSWebServiceContext_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index 6acae2944f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/WSWebServiceContext_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - service/wsw2jhellosecureservice - - com.sun.ts.tests.jaxws.sharedclients.hellosecureclient.Hello - - http://helloservice.org/wsdl - HelloPort - - - jakarta.xml.ws.security.auth.password - j2ee - - - jakarta.xml.ws.security.auth.username - j2ee - - - http://webServerHost.1:webServerPort.1/WSHelloSecureService_web/jaxws/Hello?WSDL - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/build.xml deleted file mode 100644 index ae5d7bdeb2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/jakartaEE.tokens deleted file mode 100644 index e2ad206cee..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jhellosecureservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.hellosecureclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jhellosecureservice -SERVICEREFNAMEWSEJB=service/wsw2jhellosecureservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jhellosecureservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/wsappclient_vehicle_client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/wsappclient_vehicle_client.xml deleted file mode 100644 index 2dfb4e7058..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/wsappclient_vehicle_client.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - TS app client vehicle - WSWebServiceContext_wsappclient_vehicle_client - - service/wsw2jhellosecureservice - jakarta.xml.ws.Service - META-INF/wsdl/WSHelloSecureService.wsdl - - com.sun.ts.tests.jaxws.sharedclients.hellosecureclient.Hello - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/wsejb_vehicle_ejb.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/wsejb_vehicle_ejb.xml deleted file mode 100644 index 03704ae1ce..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/wsejb_vehicle_ejb.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Ejb1 - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicleRemote - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicle - Stateful - Container - - service/wsw2jhellosecureservice - jakarta.xml.ws.Service - META-INF/wsdl/WSHelloSecureService.wsdl - - com.sun.ts.tests.jaxws.sharedclients.hellosecureclient.Hello - - - - - - - - - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - Remote - runTest - - Required - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/wsservlet_vehicle_web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/wsservlet_vehicle_web.xml deleted file mode 100644 index 5a2e0e7c82..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceContext/wsservlet_vehicle_web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - WSWebServiceContext_wsservlet_vehicle - - WSServlet_VehicleLogicalName - com.sun.ts.tests.common.vehicle.wsservlet.WSServletVehicle - - - WSServlet_VehicleLogicalName - /wsservlet_vehicle - - - 54 - - - service/wsw2jhellosecureservice - jakarta.xml.ws.Service - WEB-INF/wsdl/WSHelloSecureService.wsdl - - com.sun.ts.tests.jaxws.sharedclients.hellosecureclient.Hello - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceException/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceException/Client.java deleted file mode 100644 index 892b043891..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceException/Client.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.WebServiceException; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; - -import jakarta.xml.ws.*; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: WebServiceExceptionConstructorTest1 - * - * @assertion_ids: JAXWS:JAVADOC:72; - * - * @test_Strategy: Create instance via WebServiceException() constructor. - * Verify WebServiceException object created successfully. - */ - public void WebServiceExceptionConstructorTest1() throws Fault { - TestUtil.logTrace("WebServiceExceptionConstructorTest1"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via WebServiceException() ..."); - WebServiceException e = new WebServiceException(); - if (e != null) { - TestUtil.logMsg("WebServiceException object created successfully"); - } else { - TestUtil.logErr("WebServiceException object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebServiceExceptionConstructorTest1 failed", e); - } - - if (!pass) - throw new Fault("WebServiceExceptionConstructorTest1 failed"); - } - - /* - * @testName: WebServiceExceptionConstructorTest2 - * - * @assertion_ids: JAXWS:JAVADOC:74; - * - * @test_Strategy: Create instance via WebServiceException(String, Throwable). - * Verify WebServiceException object created successfully. - */ - public void WebServiceExceptionConstructorTest2() throws Fault { - TestUtil.logTrace("WebServiceExceptionConstructorTest2"); - boolean pass = true; - String detailMsg = "a detail message"; - Exception foo = new Exception("foo"); - try { - TestUtil.logMsg("Create instance via " - + " WebServiceException(String, Throwable) ..."); - WebServiceException e = new WebServiceException(detailMsg, foo); - if (e != null) { - TestUtil.logMsg("WebServiceException object created successfully"); - String msg = e.getMessage(); - if (msg.equals(detailMsg)) - TestUtil.logMsg("detail message match: " + detailMsg); - else { - TestUtil.logErr("detail message mismatch - expected: " + detailMsg - + ", received: " + msg); - pass = false; - } - } else { - TestUtil.logErr("WebServiceException object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebServiceExceptionConstructorTest2 failed", e); - } - - if (!pass) - throw new Fault("WebServiceExceptionConstructorTest2 failed"); - } - - /* - * @testName: WebServiceExceptionConstructorTest3 - * - * @assertion_ids: JAXWS:JAVADOC:73; - * - * @test_Strategy: Create instance via WebServiceException(String). Verify - * WebServiceException object created successfully. - */ - public void WebServiceExceptionConstructorTest3() throws Fault { - TestUtil.logTrace("WebServiceExceptionConstructorTest3"); - boolean pass = true; - String detailMsg = "a detail message"; - try { - TestUtil - .logMsg("Create instance via " + " WebServiceException(String) ..."); - WebServiceException e = new WebServiceException(detailMsg); - if (e != null) { - TestUtil.logMsg("WebServiceException object created successfully"); - String msg = e.getMessage(); - if (msg.equals(detailMsg)) - TestUtil.logMsg("detail message match: " + detailMsg); - else { - TestUtil.logErr("detail message mismatch - expected: " + detailMsg - + ", received: " + msg); - pass = false; - } - } else { - TestUtil.logErr("WebServiceException object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebServiceExceptionConstructorTest3 failed", e); - } - - if (!pass) - throw new Fault("WebServiceExceptionConstructorTest3 failed"); - } - - /* - * @testName: WebServiceExceptionConstructorTest4 - * - * @assertion_ids: JAXWS:JAVADOC:75; - * - * @test_Strategy: Create instance via WebServiceException(Throwable). Verify - * WebServiceException object created successfully. - */ - public void WebServiceExceptionConstructorTest4() throws Fault { - TestUtil.logTrace("WebServiceExceptionConstructorTest4"); - boolean pass = true; - Exception foo = new Exception("foo"); - try { - TestUtil.logMsg( - "Create instance via " + " WebServiceException(Throwable) ..."); - WebServiceException e = new WebServiceException(foo); - if (e != null) { - TestUtil.logMsg("WebServiceException object created successfully"); - } else { - TestUtil.logErr("WebServiceException object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebServiceExceptionConstructorTest4 failed", e); - } - - if (!pass) - throw new Fault("WebServiceExceptionConstructorTest4 failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceException/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceException/build.xml deleted file mode 100644 index a4a43fbde9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServiceException/build.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServicePermission/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServicePermission/Client.java deleted file mode 100644 index 7869d61108..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServicePermission/Client.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws.WebServicePermission; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; - -import jakarta.xml.ws.*; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: WebServicePermissionConstructorTest1 - * - * @assertion_ids: JAXWS:JAVADOC:76; - * - * @test_Strategy: Create instance via WebServicePermission(String) - * constructor. Verify WebServicePermission object created successfully. - */ - public void WebServicePermissionConstructorTest1() throws Fault { - TestUtil.logTrace("WebServicePermissionConstructorTest1"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via WebServicePermission(String) ..."); - WebServicePermission e = new WebServicePermission("thename"); - if (e != null) { - TestUtil.logMsg("WebServicePermission object created successfully"); - } else { - TestUtil.logErr("WebServicePermission object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebServicePermissionConstructorTest1 failed", e); - } - - if (!pass) - throw new Fault("WebServicePermissionConstructorTest1 failed"); - } - - /* - * @testName: WebServicePermissionConstructorTest2 - * - * @assertion_ids: JAXWS:JAVADOC:77; - * - * @test_Strategy: Create instance via WebServicePermission(String, String) - * constructor. Verify WebServicePermission object created successfully. - */ - public void WebServicePermissionConstructorTest2() throws Fault { - TestUtil.logTrace("WebServicePermissionConstructorTest2"); - boolean pass = true; - try { - TestUtil.logMsg( - "Create instance via WebServicePermission(String, String) ..."); - WebServicePermission e = new WebServicePermission("thename", null); - if (e != null) { - TestUtil.logMsg("WebServicePermission object created successfully"); - } else { - TestUtil.logErr("WebServicePermission object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebServicePermissionConstructorTest2 failed", e); - } - - if (!pass) - throw new Fault("WebServicePermissionConstructorTest2 failed"); - } - - /* - * @testName: WebServicePermissionConstructorTest2a - * - * @assertion_ids: JAXWS:JAVADOC:77; - * - * @test_Strategy: Create instance via WebServicePermission(String, String) - * constructor. Verify WebServicePermission object created successfully. - */ - public void WebServicePermissionConstructorTest2a() throws Fault { - TestUtil.logTrace("WebServicePermissionConstructorTest2a"); - boolean pass = true; - try { - TestUtil.logMsg( - "Create instance via WebServicePermission(String, String) ..."); - WebServicePermission e = new WebServicePermission("thename", - "someaction"); - if (e != null) { - TestUtil.logMsg("WebServicePermission object created successfully"); - } else { - TestUtil.logErr("WebServicePermission object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebServicePermissionConstructorTest2a failed", e); - } - - if (!pass) - throw new Fault("WebServicePermissionConstructorTest2a failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServicePermission/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServicePermission/build.xml deleted file mode 100644 index 10b558ca6d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/WebServicePermission/build.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/build.xml deleted file mode 100644 index dea08a1ce2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalHandler/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalHandler/Client.java deleted file mode 100644 index 824f90f47d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalHandler/Client.java +++ /dev/null @@ -1,4356 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_handler.LogicalHandler; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.*; - -import java.io.*; -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.ProtocolException; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String HARNESSHOST = "harness.host"; - - private String harnessHost = null; - - private static final String HARNESSLOGPORT = "harness.log.port"; - - private String harnessLogPort = null; - - private static final String TRACEFLAG = "harness.log.traceflag"; - - private String harnessLogTraceFlag = "false"; // false or true - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String WSDLLOC_URL = "dlhandlerservice.wsdlloc.1"; - - private static final String ENDPOINT1_URL = "dlhandlerservice.endpoint.1"; - - private static final String ENDPOINT2_URL = "dlhandlerservice.endpoint.2"; - - private static final String ENDPOINT4_URL = "dlhandlerservice.endpoint.4"; - - private String url1 = null; - - private String url2 = null; - - private String url4 = null; - - private URL wsdlurl = null; - - // service and port information - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private static final String SERVICE_NAME = "DLHandlerService"; - - private static final String PORT_NAME1 = "HelloPort"; - - private static final String PORT_NAME2 = "Hello2Port"; - - private static final String PORT_NAME4 = "GetTrackerDataPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private QName PORT_QNAME2 = new QName(NAMESPACEURI, PORT_NAME2); - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.DLHandlerService.class; - - private static final String THEBINDINGPROTOCOL = jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING; - - private static final String LOGICAL = "Logical"; - - private static final String TEST_TYPE = LOGICAL + "Test"; - - private Handler handler = null; - - Hello port1 = null; - - Hello2 port2 = null; - - GetTrackerData port4 = null; - - static DLHandlerService service = null; - - BindingProvider bp1 = null; - - BindingProvider bp2 = null; - - BindingProvider bp4 = null; - - Binding binding1 = null; - - Binding binding2 = null; - - Binding binding4 = null; - - List listOfBindings = new ArrayList(); - - List port1HandlerChain = null; - - List port2HandlerChain = null; - - List port4HandlerChain = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT1_URL); - url1 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT2_URL); - url2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT4_URL); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint1 URL: " + url1); - TestUtil.logMsg("Service Endpoint2 URL: " + url2); - TestUtil.logMsg("Service Endpoint4 URL: " + url4); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private boolean setupPorts() { - boolean result = true; - TestUtil.logTrace("entering setupPorts"); - try { - if (modeProperty.equals("standalone")) { - getPortsStandalone(); - } else { - getPortsJavaEE(); - } - } catch (Exception e) { - TestUtil.logErr("Could not setup stubs properly"); - TestUtil.printStackTrace(e); - result = false; - } - TestUtil.logTrace("leaving setupPorts"); - return result; - - } - - private void getPortsStandalone() throws Exception { - getPorts(); - JAXWS_Util.setTargetEndpointAddress(port1, url1); - JAXWS_Util.setTargetEndpointAddress(port2, url2); - JAXWS_Util.setTargetEndpointAddress(port4, url4); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - getTargetEndpointAddress(port1, port2, port4); - } - - private void getTargetEndpointAddress(Object port1, Object port2, - Object port4) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port1=" + port1); - String url1 = JAXWS_Util.getTargetEndpointAddress(port1); - TestUtil.logMsg("Target Endpoint Address=" + url1); - TestUtil.logMsg("Get Target Endpoint Address for port2=" + port2); - String url2 = JAXWS_Util.getTargetEndpointAddress(port2); - TestUtil.logMsg("Target Endpoint Address=" + url2); - TestUtil.logMsg("Get Target Endpoint Address for port4=" + port4); - String url4 = JAXWS_Util.getTargetEndpointAddress(port4); - TestUtil.logMsg("Target Endpoint Address=" + url4); - } - - private void getPorts() throws Exception { - TestUtil.logTrace("entering getPorts"); - - TestUtil.logMsg("Get port 1 = " + PORT_NAME1); - port1 = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port1=" + port1); - - TestUtil.logMsg("Get port 2 = " + PORT_NAME2); - port2 = (Hello2) service.getPort(Hello2.class); - TestUtil.logMsg("port2=" + port2); - - TestUtil.logMsg("Get port 4 = " + PORT_NAME4); - port4 = (GetTrackerData) service.getPort(GetTrackerData.class); - TestUtil.logMsg("port4=" + port4); - - TestUtil.logMsg("Get binding for port 1 = " + PORT_NAME1); - bp1 = (BindingProvider) port1; - binding1 = bp1.getBinding(); - port1HandlerChain = binding1.getHandlerChain(); - TestUtil.logMsg("Port1 HandlerChain =" + port1HandlerChain); - TestUtil.logMsg("Port1 HandlerChain size = " + port1HandlerChain.size()); - - TestUtil.logMsg("------------------------------------------------------"); - - TestUtil.logMsg("Get binding for port 2 = " + PORT_NAME2); - bp2 = (BindingProvider) port2; - binding2 = bp2.getBinding(); - port2HandlerChain = binding2.getHandlerChain(); - TestUtil.logMsg("Port2 HandlerChain=" + port2HandlerChain); - TestUtil.logMsg("Port2 HandlerChain size = " + port2HandlerChain.size()); - - TestUtil.logMsg("------------------------------------------------------"); - - TestUtil.logMsg("Get binding for port 4 = " + PORT_NAME4); - bp4 = (BindingProvider) port4; - binding4 = bp4.getBinding(); - port4HandlerChain = binding4.getHandlerChain(); - TestUtil.logMsg("Port4 HandlerChain=" + port4HandlerChain); - TestUtil.logMsg("Port4 HandlerChain size = " + port4HandlerChain.size()); - - listOfBindings.add(binding1); - listOfBindings.add(binding2); - listOfBindings.add(binding4); - - TestUtil.logTrace("leaving getPorts"); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (DLHandlerService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (DLHandlerService) getSharedObject(); - } - - try { - harnessHost = p.getProperty(HARNESSHOST); - } catch (Exception e) { - harnessHost = null; - } - try { - harnessLogPort = p.getProperty(HARNESSLOGPORT); - } catch (Exception e) { - harnessLogPort = null; - } - try { - harnessLogTraceFlag = p.getProperty(TRACEFLAG); - } catch (Exception e) { - harnessLogTraceFlag = "false"; - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: ClientLogicalHandlerTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9012; - * JAXWS:SPEC:9014; JAXWS:SPEC:9015.1; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * WS4EE:SPEC:6010; WS4EE:SPEC:6015.1; WS4EE:SPEC:6015.2; WS4EE:SPEC:6015.3; - * WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; WS4EE:SPEC:6051; - * - * @test_Strategy: Invoke an RPC method and ensure that the client-side - * logical message handler callbacks are called. - */ - public void ClientLogicalHandlerTest() throws Fault { - TestUtil.logTrace("ClientLogicalHandlerTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientSOAPHandler1, ClientLogicalHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler1(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler2(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler3(); - handlerList.add(handler); - } - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("Getting existing Handlers for Port1"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding1.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding1.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ClientLogicalTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - TestUtil.logMsg("Verify handleMessage()/init callbacks"); - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerCallBacks("Client", LOGICAL, - clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg( - "Verifying callbacks where LogicalHandlers were called before SOAPHandlers on Client-Side"); - if (!Handler_Util.VerifyLogicalVerseSOAPHandlerOrder(clientSideMsgs)) { - TestUtil.logErr( - "Client-Side Logical verses SOAP Handler Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg( - "Client-Side Logical verses SOAP Handler Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientLogicalHandlerTest failed"); - } - - /* - * @testName: ServerLogicalHandlerTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.1; JAXWS:SPEC:9017; JAXWS:SPEC:9018; WS4EE:SPEC:6010; - * WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; WS4EE:SPEC:6051; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerLogicalHandlerTest() throws Fault { - TestUtil.logTrace("ServerLogicalHandlerTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ServerLogicalTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - MyResultType mr = null; - try { - mr = port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - if (mr != null) { - String result = mr.getErrors(); - if (!result.equals("")) { - pass = false; - TestUtil - .logErr("The serverside tests for MessageContext.Scope failed:" - + result); - } - } - - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyHandlerCallBacks("Server", LOGICAL, - serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg( - "Verifying callbacks where LogicalHandlers are called before SOAPHandlers on Server-Side"); - if (!Handler_Util.VerifyLogicalVerseSOAPHandlerOrder(serverSideMsgs)) { - TestUtil.logErr( - "Server-Side Logical verses SOAP Handler Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg( - "Server-Side Logical verses SOAP Handler Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault("ServerLogicalHandlerTest failed"); - } - - /* - * @testName: ClientLogicalInboundHandleMessageThrowsRuntimeExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9015.4.2; JAXWS:SPEC:9016.1; JAXWS:SPEC:9017; - * JAXWS:SPEC:9018; WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler4 throws a RuntimeException in handleMessage method - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doInbound() - * ClientLogicalHandler4.handleMessage().doInbound() ClientLogicalHandler4 - * Throwing an inbound RuntimeException ClientLogicalHandler6.close() - * ClientLogicalHandler4.close() ClientLogicalHandler5.close() - */ - public void ClientLogicalInboundHandleMessageThrowsRuntimeExceptionTest() - throws Fault { - TestUtil.logTrace( - "ClientLogicalInboundHandleMessageThrowsRuntimeExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientLogicalInboundHandleMessageThrowsRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting RuntimeException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientLogicalHandler4.handleMessage throwing an inbound RuntimeException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", LOGICAL, - false, Constants.INBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalInboundHandleMessageThrowsRuntimeExceptionTest failed"); - } - - /* - * @testName: ClientLogicalInboundHandleMessageThrowsSOAPFaultTest - * - * @assertion_ids: JAXWS:SPEC:9015.3.2; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler4 throws a SOAPFaultException in handleMessage method - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doInbound() - * ClientLogicalHandler4.handleMessage().doInbound() ClientLogicalHandler4 - * Throwing an inbound SOAPFaultException ClientLogicalHandler6.close() - * ClientLogicalHandler4.close() ClientLogicalHandler5.close() - */ - public void ClientLogicalInboundHandleMessageThrowsSOAPFaultTest() - throws Fault { - TestUtil.logTrace("ClientLogicalInboundHandleMessageThrowsSOAPFaultTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction("ClientLogicalInboundHandleMessageThrowsSOAPFaultTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg( - "Expecting WebServiceException that wraps a SOAPFaultException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "SOAPFaultException: ClientLogicalHandler4.handleMessage throwing an inbound SOAPFaultException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected WebServiceException text"); - else { - TestUtil.logErr("Did not get expected WebServiceException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandleMessageExceptionCallBacks("Client", - LOGICAL, clientSideMsgs, Constants.INBOUND)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalInboundHandleMessageThrowsSOAPFaultTest failed"); - } - - /* - * @testName: ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest - * - * @assertion_ids: JAXWS:SPEC:9015.3.1; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler4 throws a SOAPFaultException in handleMessage method - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() ClientLogicalHandler4 - * Throwing an inbound SOAPFaultException ClientLogicalHandler4.close() - * ClientLogicalHandler5.close() - */ - public void ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest() - throws Fault { - TestUtil.logTrace("ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction("ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting SOAPFaultException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected SOAPFaultException"); - pass = false; - } catch (SOAPFaultException e) { - TestUtil.logMsg("Did get expected SOAPFaultException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientLogicalHandler4.handleMessage throwing an outbound SOAPFaultException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected SOAPFaultException text"); - else { - TestUtil.logErr("Did not get expected SOAPFaultException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandleMessageExceptionCallBacks("Client", - LOGICAL, clientSideMsgs, Constants.OUTBOUND)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest failed"); - } - - /* - * @testName: ServerLogicalInboundHandleMessageThrowsRuntimeExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9015.4.1; JAXWS:SPEC:9016.1; JAXWS:SPEC:9017; - * JAXWS:SPEC:9018; WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ServerLogicalHandler4 throws a RuntimeException in handleMessage method - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerLogicalHandler6.handleMessage().doInbound() - * ServerLogicalHandler4.handleMessage().doInbound() ServerLogicalHandler4 - * Throwing an inbound RuntimeException ServerLogicalHandler4.close() - * ServerLogicalHandler6.close() - */ - public void ServerLogicalInboundHandleMessageThrowsRuntimeExceptionTest() - throws Fault { - TestUtil.logTrace( - "ServerLogicalInboundHandleMessageThrowsRuntimeExceptionTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerLogicalInboundHandleMessageThrowsRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg( - "Expecting SOAPFaultException wrapped in a WebServiceException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - if (e instanceof jakarta.xml.ws.soap.SOAPFaultException) - TestUtil.logMsg("Did get expected nested SOAPFaultException"); - else { - TestUtil.logErr("Did not get expected nested SOAPFaultException"); - TestUtil.printStackTrace(e); - pass = false; - } - String tmp = "ServerLogicalHandler4.handleMessage throwing an inbound RuntimeException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected nested SOAPFaultException text"); - else { - TestUtil - .logErr("Did not get expected nested SOAPFaultException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Server", LOGICAL, - false, Constants.INBOUND, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault( - "ServerLogicalInboundHandleMessageThrowsRuntimeExceptionTest failed"); - } - - /* - * @testName: ServerLogicalInboundHandleMessageThrowsSOAPFaultTest - * - * @assertion_ids: JAXWS:SPEC:9015.3.1; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ServerLogicalHandler4 throws a RuntimeException in handleMessage method - * while processing an inbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerLogicalHandler6.handleMessage().doInbound() - * ServerLogicalHandler4.handleMessage().doInbound() ServerLogicalHandler4 - * Throwing an inbound SOAPFaultException ServerLogicalHandler6.handleFault() - * ServerLogicalHandler4.close() ServerLogicalHandler6.close() - */ - public void ServerLogicalInboundHandleMessageThrowsSOAPFaultTest() - throws Fault { - TestUtil.logTrace("ServerLogicalInboundHandleMessageThrowsSOAPFaultTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("ServerLogicalInboundHandleMessageThrowsSOAPFaultTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg( - "Expecting SOAPFaultException wrapped by a WebServiceException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - if (e instanceof jakarta.xml.ws.soap.SOAPFaultException) - TestUtil.logMsg("Did get expected nested SOAPFaultException"); - else { - TestUtil.logErr("Did not get expected nested SOAPFaultException"); - TestUtil.printStackTrace(e); - pass = false; - } - String tmp = "ServerLogicalHandler4.handleMessage throwing an inbound SOAPFaultException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected nested SOAPFaultException text"); - else { - TestUtil - .logErr("Did not get expected nested SOAPFaultException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandleMessageExceptionCallBacks("Server", - LOGICAL, serverSideMsgs, Constants.INBOUND)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault( - "ServerLogicalInboundHandleMessageThrowsSOAPFaultTest failed"); - } - - /* - * @testName: ServerLogicalOutboundHandleMessageThrowsSOAPFaultTest - * - * @assertion_ids: JAXWS:SPEC:9015.3.2; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ServerLogicalHandler4 throws a SOAPFaultException in handleMessage method - * while processing an outbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerLogicalHandler6.handleMessage().doInbound() - * ServerLogicalHandler4.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doOutbound() - * ServerLogicalHandler4.handleMessage().doOutbound() ServerLogicalHandler4 - * Throwing an outbound SOAPFaultException ServerLogicalHandler5.close() - * ServerLogicalHandler4.close() ServerLogicalHandler6.close() - */ - public void ServerLogicalOutboundHandleMessageThrowsSOAPFaultTest() - throws Fault { - TestUtil.logTrace("ServerLogicalOutboundHandleMessageThrowsSOAPFaultTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("ServerLogicalOutboundHandleMessageThrowsSOAPFaultTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg( - "Expecting SOAPFaultException wrapped by a WebServiceException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - if (e instanceof jakarta.xml.ws.soap.SOAPFaultException) - TestUtil.logMsg("Did get expected nested SOAPFaultException"); - else { - TestUtil.logErr("Did not get expected nested SOAPFaultException"); - TestUtil.printStackTrace(e); - pass = false; - } - String tmp = "ServerLogicalHandler4.handleMessage throwing an outbound SOAPFaultException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected nested SOAPFaultException text"); - else { - TestUtil - .logErr("Did not get expected nested SOAPFaultException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandleMessageExceptionCallBacks("Server", - LOGICAL, serverSideMsgs, Constants.OUTBOUND)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault( - "ServerLogicalOutboundHandleMessageThrowsSOAPFaultTest failed"); - } - - /* - * @testName: ClientLogicalOutboundHandleMessageThrowsRuntimeExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9015.4.1; JAXWS:SPEC:9016.1; JAXWS:SPEC:9017; - * JAXWS:SPEC:9018; WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; - * - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler4 throws a RuntimeException in handleMessage method - * while processing an outbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() ClientLogicalHandler4 - * Throwing an inbound RuntimeException ClientLogicalHandler4.close() - * ClientLogicalHandler5.close() - */ - public void ClientLogicalOutboundHandleMessageThrowsRuntimeExceptionTest() - throws Fault { - TestUtil.logTrace( - "ClientLogicalOutboundHandleMessageThrowsRuntimeExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientLogicalOutboundHandleMessageThrowsRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting RuntimeException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientLogicalHandler4.handleMessage throwing an outbound RuntimeException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", LOGICAL, - false, Constants.OUTBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalOutboundHandleMessageThrowsRuntimeExceptionTest failed"); - } - - /* - * @testName: ServerLogicalOutboundHandleMessageThrowsRuntimeExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9015.4.2; JAXWS:SPEC:9016.1; JAXWS:SPEC:9017; - * JAXWS:SPEC:9018; WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; - * - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ServerLogicalHandler4 throws a RuntimeException in handleMessage method - * while processing an outbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerLogicalHandler6.handleMessage().doInbound() - * ServerLogicalHandler4.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doOutbound() - * ServerLogicalHandler4.handleMessage().doOutbound() ServerLogicalHandler4 - * Throwing an outbound RuntimeException ServerLogicalHandler5.close() - * ServerLogicalHandler4.close() ServerLogicalHandler6.close() - */ - public void ServerLogicalOutboundHandleMessageThrowsRuntimeExceptionTest() - throws Fault { - TestUtil.logTrace( - "ServerLogicalOutboundHandleMessageThrowsRuntimeExceptionTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerLogicalOutboundHandleMessageThrowsRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg( - "Expecting RuntimeException wrapped by a WebServiceException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - if (e instanceof jakarta.xml.ws.soap.SOAPFaultException) - TestUtil.logMsg("Did get expected nested SOAPFaultException"); - else { - TestUtil.logErr("Did not get expected nested SOAPFaultException"); - TestUtil.printStackTrace(e); - pass = false; - } - String tmp = "ServerLogicalHandler4.handleMessage throwing an outbound RuntimeException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected nested RuntimeException text"); - else { - TestUtil - .logErr("Did not get expected nested RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Server", LOGICAL, - false, Constants.OUTBOUND, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault( - "ServerLogicalOutboundHandleMessageThrowsRuntimeExceptionTest failed"); - } - - /* - * @testName: ServerEndpointRemoteRuntimeExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9016.4; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side - * handlers callbacks are called. Endpoint throws a RuntimeException that is - * wrapped by a WebServiceException - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerLogicalHandler6.handleMessage().doInbound() - * ServerLogicalHandler4.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doInbound() - * ServerLogicalHandler5.handleFault() ServerLogicalHandler4.handleFault() - * ServerLogicalHandler6.handleFault() ServerLogicalHandler5.close() - * ServerLogicalHandler4.close() ServerLogicalHandler6.close() - * - */ - public void ServerEndpointRemoteRuntimeExceptionTest() throws Fault { - TestUtil.logTrace("ServerEndpointRemoteRuntimeExceptionTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("EndpointRemoteRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg( - "Expecting RuntimeException wrapped by a WebServiceException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - if (baos.toString().indexOf("RuntimeException") > -1) - TestUtil.logMsg("Did get expected nested RuntimeException"); - else { - TestUtil.logErr("Did not get expected nested RuntimeException"); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Server", LOGICAL, - true, "", serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault("ServerEndpointRemoteRuntimeExceptionTest failed"); - } - - /* - * @testName: ServerEndpointRemoteSOAPFaultExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9016.3; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side - * handler callbacks are called. Endpoint throws a SOAPFaultException that is - * wrapped by a WebServiceException - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerLogicalHandler6.handleMessage().doInbound() - * ServerLogicalHandler4.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doInbound() - * ServerLogicalHandler5.handleFault() ServerLogicalHandler4.handleFault() - * ServerLogicalHandler6.handleFault() ServerLogicalHandler5.close() - * ServerLogicalHandler4.close() ServerLogicalHandler6.close() - * - */ - public void ServerEndpointRemoteSOAPFaultExceptionTest() throws Fault { - TestUtil.logTrace("ServerEndpointRemoteSOAPFaultExceptionTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("EndpointRemoteSOAPFaultExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg( - "Expecting SOAPFaultException wrapped by a WebServiceException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - if (baos.toString().indexOf("SOAPFaultException") > -1) - TestUtil.logMsg("Did get expected nested SOAPFaultException"); - else { - TestUtil.logErr("Did not get expected nested SOAPFaultException"); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Server", LOGICAL, - true, "", serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault("ServerEndpointRemoteSOAPFaultExceptionTest failed"); - } - - /* - * @testName: ServerLogicalInboundHandleMessageFalseTest - * - * @assertion_ids: JAXWS:SPEC:9015.2.1; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; JAXWS:SPEC:11003; JAXWS:SPEC:10007 - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ServerLogicalHandler4 returns false in the handleMessage method while - * processing an inbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerLogicalHandler6.handleMessage().doInbound() - * ServerLogicalHandler4.handleMessage().doInbound() - * ServerLogicalHandler6.handleMessage().doOutbound() - * ServerLogicalHandler4.close() ServerLogicalHandler6.close() - */ - public void ServerLogicalInboundHandleMessageFalseTest() throws Fault { - TestUtil.logTrace("ServerLogicalInboundHandleMessageFalseTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("ServerLogicalInboundHandleMessageFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port2.doHandlerTest2(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandleMessageFalseCallBacks("Server", LOGICAL, - serverSideMsgs, Constants.INBOUND)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault("ServerLogicalInboundHandleMessageFalseTest failed"); - } - - /* - * @testName: ServerLogicalOutboundHandleMessageFalseTest - * - * @assertion_ids: JAXWS:SPEC:9015.2.2; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ServerLogicalHandler4 returns false in the handleMessage method while - * processing an outbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerLogicalHandler6.handleMessage().doInbound() - * ServerLogicalHandler4.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doOutbound() - * ServerLogicalHandler4.handleMessage().doOutbound() - * ServerLogicalHandler5.close() ServerLogicalHandler4.close() - * ServerLogicalHandler6.close() - */ - public void ServerLogicalOutboundHandleMessageFalseTest() throws Fault { - TestUtil.logTrace("ServerLogicalOutboundHandleMessageFalseTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("ServerLogicalOutboundHandleMessageFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port2.doHandlerTest2(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandleMessageFalseCallBacks("Server", LOGICAL, - serverSideMsgs, Constants.OUTBOUND)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault("ServerLogicalOutboundHandleMessageFalseTest failed"); - } - - /* - * @testName: ClientLogicalInboundHandleMessageFalseTest - * - * @assertion_ids: JAXWS:SPEC:9015.2.2; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler4 returns false in the handleMessage method while - * processing an inbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doInbound() - * ClientLogicalHandler4.handleMessage().doInbound() - * ClientLogicalHandler6.close() ClientLogicalHandler4.close() - * ClientLogicalHandler5.close() - */ - public void ClientLogicalInboundHandleMessageFalseTest() throws Fault { - TestUtil.logTrace("ClientLogicalInboundHandleMessageFalseTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction("ClientLogicalInboundHandleMessageFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port2.doHandlerTest2(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandleMessageFalseCallBacks("Client", LOGICAL, - clientSideMsgs, Constants.INBOUND)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientLogicalInboundHandleMessageFalseTest failed"); - } - - /* - * @testName: ClientLogicalOutboundHandleMessageFalseTest - * - * @assertion_ids: JAXWS:SPEC:9015.2.1; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler4 returns false in the handleMessage method while - * processing an outbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() - * ClientLogicalHandler5.handleMessage().doInbound() - * ClientLogicalHandler4.close() ClientLogicalHandler5.close() - */ - public void ClientLogicalOutboundHandleMessageFalseTest() throws Fault { - TestUtil.logTrace("ClientLogicalOutboundHandleMessageFalseTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction("ClientLogicalOutboundHandleMessageFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port2.doHandlerTest2(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandleMessageFalseCallBacks("Client", LOGICAL, - clientSideMsgs, Constants.OUTBOUND)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientLogicalOutboundHandleMessageFalseTest failed"); - } - - /* - * @testName: ClientLogicalOutboundHandleFaultFalseTest - * - * @assertion_ids: JAXWS:SPEC:9016.2; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleFault callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler6 throws a SOAPFaultException ClientLogicalHandler4 - * returns a false for handleFault method while processing an outbound - * message. ------------------------------------------------------- This is - * the expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doOutbound() ClientLogicalHandler6 - * Throwing an outbound SOAPFaultException ClientLogicalHandler4.handleFault() - * ClientLogicalHandler6.close() ClientLogicalHandler4.close() - * ClientLogicalHandler5.close() - * - */ - public void ClientLogicalOutboundHandleFaultFalseTest() throws Fault { - TestUtil.logTrace("ClientLogicalOutboundHandleFaultFalseTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction("ClientLogicalOutboundHandleFaultFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting RuntimeException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientLogicalHandler6.handleMessage throws SOAPFaultException for ClientLogicalOutboundHandleFaultFalseTest"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandleFaultFalseCallBacks("Client", LOGICAL, - clientSideMsgs, Constants.OUTBOUND)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientLogicalOutboundHandleFaultFalseTest failed"); - } - - /* - * @testName: ServerLogicalInboundHandleFaultFalseTest - * - * @assertion_ids: JAXWS:SPEC:9016.2; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ServerLogicalHandler5 throws a SOAPFaultException ServerLogicalHandler4 - * returns a false for handleFault method while processing an outbound - * message. ------------------------------------------------------- This is - * the expected order ------------------------------------------------------- - * ServerLogicalHandler6.handleMessage().doInbound() - * ServerLogicalHandler4.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doInbound() ServerLogicalHandler5 - * Throwing an inbound SOAPFaultException ServerLogicalHandler4.handleFault() - * ServerLogicalHandler5.close() ServerLogicalHandler4.close() - * ServerLogicalHandler6.close() - */ - public void ServerLogicalInboundHandleFaultFalseTest() throws Fault { - TestUtil.logTrace("ServerLogicalInboundHandleFaultFalseTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("ServerLogicalInboundHandleFaultFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting RuntimeException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ServerLogicalHandler5.handleMessage throws SOAPFaultException for ServerLogicalInboundHandleFaultFalseTest"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandleFaultFalseCallBacks("Server", LOGICAL, - serverSideMsgs, Constants.INBOUND)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault("ServerLogicalInboundHandleFaultFalseTest failed"); - } - - /* - * @testName: ClientLogicalOutboundHandleFaultThrowsRuntimeExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9016.4; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler6 throws a SOAPFaultException ClientLogicalHandler4 - * throws a RuntimeException in handleFault method processing an inbound - * message. ------------------------------------------------------- This is - * the expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doOutbound() ClientLogicalHandler6 - * Throwing an outbound SOAPFaultException ClientLogicalHandler4.handleFault() - * ClientLogicalHandler4 Throwing an inbound RuntimeException - * ClientLogicalHandler6.close() ClientLogicalHandler4.close() - * ClientLogicalHandler5.close() - */ - public void ClientLogicalOutboundHandleFaultThrowsRuntimeExceptionTest() - throws Fault { - TestUtil - .logTrace("ClientLogicalOutboundHandleFaultThrowsRuntimeExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientLogicalOutboundHandleFaultThrowsRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - try { - TestUtil.logMsg("Expecting RuntimeException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientLogicalHandler4.handleFault throwing an inbound RuntimeException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandleFaultRuntimeExceptionCallBacks("Client", - LOGICAL, clientSideMsgs, Constants.OUTBOUND)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalOutboundHandleFaultThrowsRuntimeExceptionTest failed"); - } - - /* - * @testName: ServerLogicalInboundHandleFaultThrowsRuntimeExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9016.4; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ServerLogicalHandler5 throws a SOAPFaultException ServerLogicalHandler4 - * throws a RuntimeException in the handleFault method processing an outbound - * message. ------------------------------------------------------- This is - * the expected order ------------------------------------------------------- - * ServerLogicalHandler6.handleMessage().doInbound() - * ServerLogicalHandler4.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doInbound() ServerLogicalHandler5 - * Throwing an inbound SOAPFaultException ServerLogicalHandler4.handleFault() - * ServerLogicalHandler4 Throwing an outbound RuntimeException - * ServerLogicalHandler5.close() ServerLogicalHandler4.close() - * ServerLogicalHandler6.close() - */ - public void ServerLogicalInboundHandleFaultThrowsRuntimeExceptionTest() - throws Fault { - TestUtil - .logTrace("ServerLogicalInboundHandleFaultThrowsRuntimeExceptionTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerLogicalInboundHandleFaultThrowsRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting RuntimeException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ServerLogicalHandler4.handleFault throwing an outbound RuntimeException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandleFaultRuntimeExceptionCallBacks("Server", - LOGICAL, serverSideMsgs, Constants.INBOUND)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault( - "ServerLogicalInboundHandleFaultThrowsRuntimeExceptionTest failed"); - } - - /* - * @testName: ClientLogicalOutboundHandleFaultThrowsSOAPFaultExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9016.3; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler6 throws a SOAPFaultException ClientLogicalHandler4 - * throws a SOAPFaultException in the handleFault method processing an inbound - * message. ------------------------------------------------------- This is - * the expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doOutbound() ClientLogicalHandler6 - * Throwing an outbound SOAPFaultException ClientLogicalHandler4.handleFault() - * ClientLogicalHandler4 Throwing an inbound SOAPFaultException - * ClientLogicalHandler6.close() ClientLogicalHandler4.close() - * ClientLogicalHandler5.close() - */ - public void ClientLogicalOutboundHandleFaultThrowsSOAPFaultExceptionTest() - throws Fault { - TestUtil.logTrace( - "ClientLogicalOutboundHandleFaultThrowsSOAPFaultExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientLogicalOutboundHandleFaultThrowsSOAPFaultExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - try { - TestUtil.logMsg( - "Expecting WebServiceException that wraps a SOAPFaultException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "SOAPFaultException: ClientLogicalHandler4.handleFault throwing an inbound SOAPFaultException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected WebServiceException text"); - else { - TestUtil.logErr("Did not get expected WebServiceException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandleFaultSOAPFaultExceptionCallBacks("Client", - LOGICAL, clientSideMsgs, Constants.OUTBOUND)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalOutboundHandleFaultThrowsSOAPFaultExceptionTest failed"); - } - - /* - * @testName: ServerLogicalInboundHandleFaultThrowsSOAPFaultExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9016.3; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ServerLogicalHandler5 throws a SOAPFaultException ServerLogicalHandler4 - * throws a SOAPFaultException in handleFailt method processing an outbound - * message. ------------------------------------------------------- This is - * the expected order ------------------------------------------------------- - * ServerLogicalHandler6.handleMessage().doInbound() - * ServerLogicalHandler4.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doInbound() ServerLogicalHandler5 - * Throwing an inbound SOAPFaultException ServerLogicalHandler4.handleFault() - * ServerLogicalHandler4 Throwing an outbound SOAPFaultException - * ServerLogicalHandler5.close() ServerLogicalHandler4.close() - * ServerLogicalHandler6.close() - */ - public void ServerLogicalInboundHandleFaultThrowsSOAPFaultExceptionTest() - throws Fault { - TestUtil.logTrace( - "ServerLogicalInboundHandleFaultThrowsSOAPFaultExceptionTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerLogicalInboundHandleFaultThrowsSOAPFaultExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting SOAPFaultException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected SOAPFaultException"); - pass = false; - } catch (SOAPFaultException e) { - TestUtil.logMsg("Did get expected SOAPFaultException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ServerLogicalHandler4.handleFault throwing an outbound SOAPFaultException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected SOAPFaultException text"); - else { - TestUtil.logErr("Did not get expected SOAPFaultException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandleFaultSOAPFaultExceptionCallBacks("Server", - LOGICAL, serverSideMsgs, Constants.INBOUND)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault( - "ServerLogicalInboundHandleFaultThrowsSOAPFaultExceptionTest failed"); - } - - /* - * @testName: ServerLogicalInboundHandlerThrowsSOAPFaultToClientHandlersTest - * - * @assertion_ids: JAXWS:SPEC:9016; JAXWS:SPEC:9016.2; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side handler - * callbacks are called by the JAXWS RUNTIME. Server handler throws a - * SOAPFaultException while processing an inbound message and Client should - * properly process exception. - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doOutbound() - * ClientLogicalHandler6.handleFault() ClientLogicalHandler6 received - * SOAPFault from Inbound ServerLogicalHandler6 ClientLogicalHandler6.close() - * ClientLogicalHandler4.close() ClientLogicalHandler5.close() - * - * ServerLogicalHandler6.handleMessage().doInbound() ServerLogicalHandler6 - * Throwing an inbound SOAPFaultException ServerLogicalHandler6.close() - * - */ - public void ServerLogicalInboundHandlerThrowsSOAPFaultToClientHandlersTest() - throws Fault { - TestUtil.logTrace( - "ServerLogicalInboundHandlerThrowsSOAPFaultToClientHandlersTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - }); - - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerLogicalInboundHandlerThrowsSOAPFaultToClientHandlersTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - try { - TestUtil.logMsg("Expecting RuntimeException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ServerLogicalHandler6.handleMessage throws SOAPFaultException for ServerLogicalInboundHandlerThrowsSOAPFaultToClientHandlersTest"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyServerToClientHandlerExceptionCallBacks( - "Client", LOGICAL, Constants.OUTBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyServerToClientHandlerExceptionCallBacks( - "Server", LOGICAL, Constants.INBOUND, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ServerLogicalInboundHandlerThrowsSOAPFaultToClientHandlersTest failed"); - } - - /* - * @testName: ServerLogicalOutboundHandlerThrowsSOAPFaultToClientHandlersTest - * - * @assertion_ids: JAXWS:SPEC:9016; JAXWS:SPEC:9016.2; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side handler - * callbacks are called by the JAXWS RUNTIME. Server handler throws a - * SOAPFaultException while processing an inbound message and Client should - * properly process exception. - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doOutbound() - * ClientLogicalHandler6.handleFault() ClientLogicalHandler6 received - * SOAPFault from Outbound ServerLogicalHandler6 ClientLogicalHandler6.close() - * ClientLogicalHandler4.close() ClientLogicalHandler5.close() - * - * ServerLogicalHandler6.handleMessage().doInbound() - * ServerLogicalHandler4.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doInbound() - * ServerLogicalHandler5.handleMessage().doOutbound() - * ServerLogicalHandler4.handleMessage().doOutbound() - * ServerLogicalHandler6.handleMessage().doOutbound() ServerLogicalHandler6 - * Throwing an inbound SOAPFaultException ServerLogicalHandler6.close() - * - */ - public void ServerLogicalOutboundHandlerThrowsSOAPFaultToClientHandlersTest() - throws Fault { - TestUtil.logTrace( - "ServerLogicalOutboundHandlerThrowsSOAPFaultToClientHandlersTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - }); - - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerLogicalOutboundHandlerThrowsSOAPFaultToClientHandlersTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - try { - TestUtil.logMsg("Expecting RuntimeException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ServerLogicalHandler6.handleMessage throws SOAPFaultException for ServerLogicalOutboundHandlerThrowsSOAPFaultToClientHandlersTest"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyServerToClientHandlerExceptionCallBacks( - "Client", LOGICAL, Constants.INBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyServerToClientHandlerExceptionCallBacks( - "Server", LOGICAL, Constants.OUTBOUND, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ServerLogicalOutboundHandlerThrowsSOAPFaultToClientHandlersTest failed"); - } - - /* - * @testName: ClientLogicalInboundHandleMessageThrowsWebServiceExceptionTest - * - * @assertion_ids: JAXWS:SPEC:4021; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler4 throws a WebServiceException in handleMessage method - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doInbound() - * ClientLogicalHandler4.handleMessage().doInbound() ClientLogicalHandler4 - * Throwing an inbound WebServiceException ClientLogicalHandler6.close() - * ClientLogicalHandler4.close() ClientLogicalHandler5.close() - */ - public void ClientLogicalInboundHandleMessageThrowsWebServiceExceptionTest() - throws Fault { - TestUtil.logTrace( - "ClientLogicalInboundHandleMessageThrowsWebServiceExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientLogicalInboundHandleMessageThrowsWebServiceExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting WebServiceException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientLogicalHandler4.handleMessage throwing an inbound WebServiceException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected WebServiceException text"); - else { - TestUtil.logErr("Did not get expected WebServiceException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", LOGICAL, - false, Constants.INBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalInboundHandleMessageThrowsWebServiceExceptionTest failed"); - } - - /* - * @testName: ClientLogicalOutboundHandleMessageThrowsWebServiceExceptionTest - * - * @assertion_ids: JAXWS:SPEC:4021; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler4 throws a WebServiceException in handleMessage method - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() ClientLogicalHandler4 - * Throwing an outbound WebServiceException ClientLogicalHandler4.close() - * ClientLogicalHandler5.close() - */ - public void ClientLogicalOutboundHandleMessageThrowsWebServiceExceptionTest() - throws Fault { - TestUtil.logTrace( - "ClientLogicalOutboundHandleMessageThrowsWebServiceExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientLogicalOutboundHandleMessageThrowsWebServiceExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting WebServiceException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientLogicalHandler4.handleMessage throwing an outbound WebServiceException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected WebServiceException text"); - else { - TestUtil.logErr("Did not get expected WebServiceException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", LOGICAL, - false, Constants.OUTBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalOutboundHandleMessageThrowsWebServiceExceptionTest failed"); - } - - /* - * @testName: ClientLogicalInboundHandleMessageThrowsProtocolExceptionTest - * - * @assertion_ids: JAXWS:SPEC:4021; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler4 throws a ProtocolException in handleMessage method - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doOutbound() - * ClientLogicalHandler6.handleMessage().doInbound() - * ClientLogicalHandler4.handleMessage().doInbound() ClientLogicalHandler4 - * Throwing an inbound ProtocolException ClientLogicalHandler6.close() - * ClientLogicalHandler4.close() ClientLogicalHandler5.close() - */ - public void ClientLogicalInboundHandleMessageThrowsProtocolExceptionTest() - throws Fault { - TestUtil.logTrace( - "ClientLogicalInboundHandleMessageThrowsProtocolExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientLogicalInboundHandleMessageThrowsProtocolExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting ProtocolException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected ProtocolException"); - pass = false; - } catch (ProtocolException e) { - TestUtil.logMsg("Did get expected ProtocolException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientLogicalHandler4.handleMessage throwing an inbound ProtocolException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected ProtocolException text"); - else { - TestUtil.logErr("Did not get expected ProtocolException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", LOGICAL, - false, Constants.INBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalInboundHandleMessageThrowsProtocolExceptionTest failed"); - } - - /* - * @testName: ClientLogicalOutboundHandleMessageThrowsProtocolExceptionTest - * - * @assertion_ids: JAXWS:SPEC:4021; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. - * ClientLogicalHandler4 throws a ProtocolException in handleMessage method - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientLogicalHandler5.handleMessage().doOutbound() - * ClientLogicalHandler4.handleMessage().doOutbound() ClientLogicalHandler4 - * Throwing an outbound ProtocolException ClientLogicalHandler4.close() - * ClientLogicalHandler5.close() - */ - public void ClientLogicalOutboundHandleMessageThrowsProtocolExceptionTest() - throws Fault { - TestUtil.logTrace( - "ClientLogicalOutboundHandleMessageThrowsProtocolExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME2)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME2); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port2"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding2.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding2.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientLogicalOutboundHandleMessageThrowsProtocolExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting ProtocolException"); - port2.doHandlerTest2(ma); - TestUtil.logErr("Did not get expected ProtocolException"); - pass = false; - } catch (ProtocolException e) { - TestUtil.logMsg("Did get expected ProtocolException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientLogicalHandler4.handleMessage throwing an outbound ProtocolException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected ProtocolException text"); - else { - TestUtil.logErr("Did not get expected ProtocolException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", LOGICAL, - false, Constants.OUTBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalOutboundHandleMessageThrowsProtocolExceptionTest failed"); - } - - private void purgeServerSideTrackerData() { - try { - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("purge"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - port4.getTrackerData(gtda); - } catch (Exception e) { - TestUtil.logErr("Call to purge server-side tracker data failed:" + e); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalHandler/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalHandler/build.xml deleted file mode 100644 index adf07dee1b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalHandler/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalHandler/handler_process_flow.pdf b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalHandler/handler_process_flow.pdf deleted file mode 100644 index 781c2693ca..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalHandler/handler_process_flow.pdf and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalHandler/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalHandler/jakartaEE.tokens deleted file mode 100644 index 61d4049e7b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalHandler/jakartaEE.tokens +++ /dev/null @@ -1,11 +0,0 @@ -WSRAnn=@jakarta.xml.ws.WebServiceRef(name="service/wsdlhandlerservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.DLHandlerService -URLALIAS=/jaxws/Hello -URLALIAS2=/jaxws/Hello2 -URLALIAS4=/jaxws/GetTrackerData -WEBSERVICEDESCRIPTION=DLHandlerService -SERVICEREFNAMEWSSERVLET=service/wsdlhandlerservice -SERVICEREFNAMEWSEJB=service/wsdlhandlerservice -SERVICEREFNAMEWSAPPCLIENT=service/wsdlhandlerservice - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalMessageContext/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalMessageContext/Client.java deleted file mode 100644 index 69153a4dfc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalMessageContext/Client.java +++ /dev/null @@ -1,980 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_handler.LogicalMessageContext; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.handler.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.activation.DataHandler; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String HARNESSHOST = "harness.host"; - - private String harnessHost = null; - - private static final String HARNESSLOGPORT = "harness.log.port"; - - private String harnessLogPort = null; - - private static final String TRACEFLAG = "harness.log.traceflag"; - - private String harnessLogTraceFlag = "false"; // false or true - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String WSDLLOC_URL = "dlhandlerservice.wsdlloc.1"; - - private static final String ENDPOINT1_URL = "dlhandlerservice.endpoint.1"; - - private static final String ENDPOINT4_URL = "dlhandlerservice.endpoint.4"; - - private static final String CTXROOT = "dlhandlerservice.ctxroot.1"; - - private String url1 = null; - - private String url4 = null; - - private URL wsdlurl = null; - - private String ctxroot = null; - - // service and port information - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private static final String SERVICE_NAME = "DLHandlerService"; - - private static final String PORT_NAME1 = "HelloPort"; - - private static final String PORT_NAME4 = "GetTrackerDataPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.DLHandlerService.class; - - private static final String THEBINDINGPROTOCOL = jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING; - - private static final String LOGICAL = "Logical"; - - private static final String TEST_TYPE = LOGICAL + "Test"; - - private Handler handler = null; - - Hello port1 = null; - - GetTrackerData port4 = null; - - static DLHandlerService service = null; - - BindingProvider bp1 = null; - - BindingProvider bp4 = null; - - Binding binding1 = null; - - Binding binding4 = null; - - List listOfBindings = new ArrayList(); - - List port1HandlerChain = null; - - List port4HandlerChain = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT1_URL); - url1 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT4_URL); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - ctxroot = JAXWS_Util.getURLFromProp(CTXROOT); - TestUtil.logMsg("Service Endpoint1 URL: " + url1); - TestUtil.logMsg("Service Endpoint4 URL: " + url4); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - TestUtil.logMsg("Context Root: " + ctxroot); - - } - - private boolean setupPorts() { - boolean result = true; - TestUtil.logTrace("entering setupPorts"); - try { - if (modeProperty.equals("standalone")) { - getPortsStandalone(); - } else { - getPortsJavaEE(); - } - } catch (Exception e) { - TestUtil.logErr("Could not setup stubs properly"); - TestUtil.printStackTrace(e); - result = false; - } - TestUtil.logTrace("leaving setupPorts"); - return result; - - } - - private void getPortsStandalone() throws Exception { - getPorts(); - JAXWS_Util.setTargetEndpointAddress(port1, url1); - JAXWS_Util.setTargetEndpointAddress(port4, url4); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - getTargetEndpointAddress(port1, port4); - } - - private void getTargetEndpointAddress(Object port1, Object port4) - throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port1=" + port1); - String url1 = JAXWS_Util.getTargetEndpointAddress(port1); - TestUtil.logMsg("Target Endpoint Address=" + url1); - TestUtil.logMsg("Get Target Endpoint Address for port4=" + port4); - String url4 = JAXWS_Util.getTargetEndpointAddress(port4); - TestUtil.logMsg("Target Endpoint Address=" + url4); - } - - private void getPorts() throws Exception { - TestUtil.logTrace("entering getPorts"); - - TestUtil.logMsg("Get port 1 = " + PORT_NAME1); - port1 = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port1=" + port1); - - TestUtil.logMsg("Get port 4 = " + PORT_NAME4); - port4 = (GetTrackerData) service.getPort(GetTrackerData.class); - TestUtil.logMsg("port4=" + port4); - - TestUtil.logMsg("Get binding for port 1 = " + PORT_NAME1); - bp1 = (BindingProvider) port1; - binding1 = bp1.getBinding(); - port1HandlerChain = binding1.getHandlerChain(); - TestUtil.logMsg("Port1 HandlerChain =" + port1HandlerChain); - TestUtil.logMsg("Port1 HandlerChain size = " + port1HandlerChain.size()); - - TestUtil.logMsg("------------------------------------------------------"); - - TestUtil.logMsg("Get binding for port 4 = " + PORT_NAME4); - bp4 = (BindingProvider) port4; - binding4 = bp4.getBinding(); - port4HandlerChain = binding4.getHandlerChain(); - TestUtil.logMsg("Port4 HandlerChain=" + port4HandlerChain); - TestUtil.logMsg("Port4 HandlerChain size = " + port4HandlerChain.size()); - - listOfBindings.add(binding1); - listOfBindings.add(binding4); - - TestUtil.logTrace("leaving getPorts"); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (DLHandlerService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (DLHandlerService) getSharedObject(); - } - - try { - harnessHost = p.getProperty(HARNESSHOST); - } catch (Exception e) { - harnessHost = null; - } - try { - harnessLogPort = p.getProperty(HARNESSLOGPORT); - } catch (Exception e) { - harnessLogPort = null; - } - try { - harnessLogTraceFlag = p.getProperty(TRACEFLAG); - } catch (Exception e) { - harnessLogTraceFlag = "false"; - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: ClientMessageContextTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:JAVADOC:91; JAXWS:JAVADOC:92; JAXWS:JAVADOC:93; JAXWS:JAVADOC:94; - * JAXWS:JAVADOC:95; JAXWS:JAVADOC:90; JAXWS:SPEC:9022; JAXWS:SPEC:9023; - * JAXWS:SPEC:9024; JAXWS:SPEC:9025; JAXWS:SPEC:9026; JAXWS:SPEC:9041; - * WS4EE:SPEC:6012; WS4EE:SPEC:6002; WS4EE:SPEC:6008; WS4EE:SPEC:6039; - * WS4EE:SPEC:6047; - * - * @test_Strategy: Invoke an RPC method and ensure that the client-side - * logical message context callbacks are called. - */ - public void ClientMessageContextTest() throws Fault { - TestUtil.logTrace("ClientMessageContextTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientSOAPHandler1, ClientLogicalHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler1(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler2(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler3(); - handlerList.add(handler); - } - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("Getting existing Handlers for Port1"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding1.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding1.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - if (pass) { - - TestUtil.logMsg("Getting RequestContext to set a property"); - java.util.Map rc = bp1.getRequestContext(); - Iterator iterator = rc.keySet().iterator(); - if (iterator.hasNext()) { - String key = (String) iterator.next(); - TestUtil.logMsg("Request context key=" + key); - rc.put("ClientToClientProp", "client"); - } else { - TestUtil.logErr( - "The request context returned from BindingProvider.getRequestContext() was empty"); - pass = false; - } - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ClientMessageContextTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - MyResultType mr = null; - try { - mr = port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (mr != null) { - String errors = mr.getErrors(); - if (errors != null) { - if (!errors.equals("")) { - TestUtil.logErr( - "ERROR: The following errors were reported by the endpoint:" - + errors); - pass = false; - } - } - } - - boolean clientLogicalMessageScopeAppProp = false; - boolean clientLogicalMessageScopeHandlerProp = false; - boolean clientToClientProp = false; - - TestUtil.logTrace("Getting ResponseContext"); - rc = bp1.getResponseContext(); - if (rc == null) { - TestUtil.logErr( - "The response context returned from BindingProvider.getResponseContext() was null"); - pass = false; - } else { - iterator = rc.keySet().iterator(); - while (iterator.hasNext()) { - Object o = iterator.next(); - TestUtil.logTrace("Object Property=" + o); - if (o instanceof String) { - String key = (String) o; - if (key.equals( - "INBOUNDClientLogicalMessageScopeAppPropSetByHandler3")) { - clientLogicalMessageScopeAppProp = true; - TestUtil.logTrace( - "Found INBOUNDClientLogicalMessageScopeAppPropSetByHandler3"); - } - if (key.equals( - "INBOUNDClientLogicalMessageScopeHandlerPropSetByHandler3")) { - clientLogicalMessageScopeHandlerProp = true; - TestUtil.logTrace( - "Found INBOUNDClientLogicalMessageScopeHandlerPropSetByHandler3"); - } - if (key.equals("ClientToClientProp")) { - clientToClientProp = true; - TestUtil.logTrace("Found ClientToClientProp"); - Object o1 = rc.get("ClientToClientProp"); - if (o1 instanceof String) { - String value = (String) o1; - String expected = "clientOUTBOUNDClientLogicalHandler2INBOUNDClientLogicalHandler2"; - if (!value.equals(expected)) { - TestUtil - .logErr("The value of ClientToClientProp was wrong"); - TestUtil.logErr("Expected = " + expected); - TestUtil.logErr("Actual = " + value); - pass = false; - } - } else { - TestUtil.logErr( - "The value of ClientToClientProp was not a String"); - pass = false; - - } - } - } - } - if (!clientLogicalMessageScopeAppProp) { - TestUtil.logErr( - "The property INBOUNDClientLogicalMessageScopeAppPropSetByHandler3 was not accessible by the client"); - pass = false; - } - if (!clientToClientProp) { - TestUtil.logErr( - "The property ClientToClientProp was not accessible by the client"); - pass = false; - } - if (clientLogicalMessageScopeHandlerProp) { - TestUtil.logErr( - "The property INBOUNDClientLogicalMessageScopeHandlerPropSetByHandler3 was accessible by the client"); - pass = false; - } - } - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMCMsgs = HandlerTracker.getListMessages2(); - List clientSideLMCMsgs = HandlerTracker.getListMessages4(); - - // verify client-side callbacks - TestUtil.logMsg("Verifying MessageContext callbacks on Client-Side"); - if (!Handler_Util.VerifyMessageContextCallBacks("Client", LOGICAL, - clientSideMCMsgs)) { - TestUtil - .logErr("Client-Side MessageContext Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side MessageContext Callbacks are (correct)"); - } - - TestUtil - .logMsg("Verifying LogicalMessageContext callbacks on Client-Side"); - if (!Handler_Util.VerifyLogicalOrSOAPMessageContextCallBacks("Client", - LOGICAL, clientSideLMCMsgs)) { - TestUtil.logErr( - "Client-Side LogicalMessageContext Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg( - "Client-Side LogicalMessageContext Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientMessageContextTest failed"); - } - - /* - * @testName: ServerMessageContextTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:JAVADOC:91; JAXWS:JAVADOC:92; JAXWS:JAVADOC:93; JAXWS:JAVADOC:94; - * JAXWS:JAVADOC:95; JAXWS:SPEC:9022; JAXWS:SPEC:9023; JAXWS:SPEC:9024; - * JAXWS:SPEC:9025; JAXWS:SPEC:9026; JAXWS:SPEC:9041; WS4EE:SPEC:6012; - * WS4EE:SPEC:6002; WS4EE:SPEC:6008; WS4EE:SPEC:6039; WS4EE:SPEC:6047; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerMessageContextTest() throws Fault { - TestUtil.logTrace("ServerMessageContextTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ServerMessageContextTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - MyResultType mr = null; - try { - mr = port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (mr != null) { - String errors = mr.getErrors(); - if (!errors.equals("")) { - TestUtil.logErr( - "ERROR: The following errors were reported by the endpoint:" - + errors); - pass = false; - } - } - - List serverSideMCMsgs = null; - List serverSideLMCMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages2"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMCMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - gtda.setAction("getArrayMessages4"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideLMCMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying MessageContext callbacks on Server-Side"); - if (!Handler_Util.VerifyMessageContextCallBacks("Server", LOGICAL, - serverSideMCMsgs)) { - TestUtil - .logErr("Server-Side MessageContext Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side MessageContext Callbacks are (correct)"); - } - TestUtil - .logMsg("Verifying LogicalMessageContext callbacks on Server-Side"); - if (!Handler_Util.VerifyLogicalOrSOAPMessageContextCallBacks("Server", - LOGICAL, serverSideLMCMsgs)) { - TestUtil.logErr( - "Server-Side LogicalMessageContext Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg( - "Server-Side LogicalMessageContext Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault("ServerMessageContextTest failed"); - } - - /* - * @testName: ContextPropertiesTest - * - * @assertion_ids: JAXWS:SPEC:9026; JAXWS:SPEC:9027; JAXWS:SPEC:9033; - * JAXWS:SPEC:9034; JAXWS:SPEC:9035; JAXWS:SPEC:9036; JAXWS:SPEC:9037; - * JAXWS:SPEC:9038; JAXWS:SPEC:9039; JAXWS:SPEC:9040; WS4EE:SPEC:6012; - * WS4EE:SPEC:6002; WS4EE:SPEC:6008; WS4EE:SPEC:6047; - * - * @test_Strategy: Invoke an RPC method and ensure that the various - * MessageContext and LogicalMessageContext properties are accessible - */ - public void ContextPropertiesTest() throws Fault { - TestUtil.logTrace("ContextPropertiesTest"); - boolean pass = true; - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler2(); - handlerList.add(handler); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } else { - - try { - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - - ma.setAction("ContextPropertiesTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - URL url1; - url1 = ctsurl.getURL("http", hostname, portnum, - ctxroot + "/attach.text"); - TestUtil.logMsg("url1=" + url1); - DataHandler dh1 = new DataHandler(url1); - Holder attach1 = new Holder(); - attach1.value = dh1; - MyResult2 mr = null; - try { - mr = port1.doHandlerAttachmentTest(ma, attach1); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (mr != null) { - String errors = mr.getErrors(); - if (!errors.equals("")) { - TestUtil.logErr( - "ERROR: The following errors were reported by the endpoint:" - + errors); - pass = false; - } - } - - if (mr != null) { - List lResults = mr.getResult(); - JAXWS_Util.dumpList(mr.getResult()); - - if (JAXWS_Util.looseIndexOf(lResults, - "Endpoint:MessageContext.INBOUND_MESSAGE_ATTACHMENTS=key[0]") == -1) { - TestUtil.logErr( - "The property MessageContext.INBOUND_MESSAGE_ATTACHMENTS did not contain an attachment in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "Found Endpoint:MessageContext.INBOUND_MESSAGE_ATTACHMENTS=key[0]"); - } - if (JAXWS_Util.looseIndexOf(lResults, - "Endpoint:MessageContext.INBOUND_MESSAGE_ATTACHMENTS=key[1]") >= 0) { - TestUtil.logErr( - "The property MessageContext.INBOUND_MESSAGE_ATTACHMENTS contained more than one attachment in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "Found Endpoint:MessageContext.INBOUND_MESSAGE_ATTACHMENTS=key[1]"); - } - if (lResults.indexOf( - "Endpoint:MessageContext.HTTP_REQUEST_METHOD=POST") == -1) { - TestUtil.logErr( - "The property MessageContext.HTTP_REQUEST_METHOD was not POST in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "Found Endpoint:MessageContext.HTTP_REQUEST_METHOD=POST"); - } - if (JAXWS_Util.looseIndexOf(lResults, - "Endpoint:MessageContext.HTTP_REQUEST_HEADERS=value[0]=") == -1) { - TestUtil.logErr( - "The property MessageContext.HTTP_REQUEST_HEADERS did not contain any headers in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "The property MessageContext.HTTP_REQUEST_HEADERS did contain headers in the endpoint"); - } - if (lResults.indexOf( - "Endpoint:MessageContext.HTTP_RESPONSE_HEADERS=null") == -1) { - TestUtil.logErr( - "The property MessageContext.HTTP_RESPONSE_HEADERS was not null in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "The property MessageContext.HTTP_RESPONSE_HEADERS was null in the endpoint"); - } - if (lResults - .indexOf("Endpoint:MessageContext.SERVLET_REQUEST=null") >= 0) { - TestUtil.logErr( - "The property MessageContext.SERVLET_REQUEST was null in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "The property MessageContext.SERVLET_REQUEST was not null in the endpoint"); - } - if (lResults - .indexOf("Endpoint:MessageContext.SERVLET_RESPONSE=null") >= 0) { - TestUtil.logErr( - "The property MessageContext.SERVLET_RESPONSE was null in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "The property MessageContext.SERVLET_RESPONSE was not null in the endpoint"); - } - if (lResults - .indexOf("Endpoint:MessageContext.SERVLET_CONTEXT=null") >= 0) { - TestUtil.logErr( - "The property MessageContext.SERVLET_CONTEXT was null in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "The property MessageContext.SERVLET_CONTEXT was not null in the endpoint"); - } - } - - if (mr != null) { - String endpointErrors = mr.getErrors(); - if (!endpointErrors.equals("")) { - TestUtil.logErr("Erors:" + endpointErrors); - pass = false; - } - } - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMCMsgs = HandlerTracker.getListMessages2(); - - List serverSideMCMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages2"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMCMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - // verify client-side callbacks - TestUtil.logMsg( - "Verifying MessageContext and LogicalMessageContext propterty callbacks on Client-Side"); - if (!Handler_Util.VerifyStandardMessageContextPropertiesCallBacks( - "Client", LOGICAL, clientSideMCMsgs)) { - TestUtil - .logErr("Client-Side MessageContext Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side MessageContext Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - TestUtil.logMsg( - "Verifying MessageContext and LogicalMessageContext propterty callbacks on Server-Side"); - if (!Handler_Util.VerifyStandardMessageContextPropertiesCallBacks( - "Server", LOGICAL, serverSideMCMsgs)) { - TestUtil - .logErr("Server-Side MessageContext Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side MessageContext Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault("ContextPropertiesTest failed"); - } - - private void purgeServerSideTrackerData() { - try { - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("purge"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - port4.getTrackerData(gtda); - } catch (Exception e) { - TestUtil.logErr("Call to purge server-side tracker data failed:" + e); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalMessageContext/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalMessageContext/build.xml deleted file mode 100644 index 786603c9b8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalMessageContext/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalMessageContext/handler_process_flow.pdf b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalMessageContext/handler_process_flow.pdf deleted file mode 100644 index 781c2693ca..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalMessageContext/handler_process_flow.pdf and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalMessageContext/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalMessageContext/jakartaEE.tokens deleted file mode 100644 index 61d4049e7b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/LogicalMessageContext/jakartaEE.tokens +++ /dev/null @@ -1,11 +0,0 @@ -WSRAnn=@jakarta.xml.ws.WebServiceRef(name="service/wsdlhandlerservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.DLHandlerService -URLALIAS=/jaxws/Hello -URLALIAS2=/jaxws/Hello2 -URLALIAS4=/jaxws/GetTrackerData -WEBSERVICEDESCRIPTION=DLHandlerService -SERVICEREFNAMEWSSERVLET=service/wsdlhandlerservice -SERVICEREFNAMEWSEJB=service/wsdlhandlerservice -SERVICEREFNAMEWSAPPCLIENT=service/wsdlhandlerservice - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/MessageContext/Scope/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/MessageContext/Scope/Client.java deleted file mode 100644 index f7354e49e6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/MessageContext/Scope/Client.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_handler.MessageContext.Scope; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; - -import jakarta.xml.ws.handler.*; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - // Expected Enum Constant Summary - private final static MessageContext.Scope expectedEnums[] = { - MessageContext.Scope.APPLICATION, MessageContext.Scope.HANDLER, }; - - private boolean findEnums(MessageContext.Scope[] args) { - boolean pass = true; - boolean found; - for (MessageContext.Scope a : args) { - found = false; - TestUtil.logMsg("Searching expected list of enums for " + a); - for (MessageContext.Scope b : expectedEnums) { - if (a == b) { - found = true; - break; - } - } - if (!found) { - pass = false; - TestUtil.logErr("No enum found for " + a); - } else { - TestUtil.logMsg("Enum found for " + a); - } - } - return pass; - } - - private void printEnums(MessageContext.Scope[] args) { - TestUtil.logMsg("Print Enums"); - TestUtil.logMsg("-----------"); - for (MessageContext.Scope c : args) - TestUtil.logMsg("" + c); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: valuesTest - * - * @assertion_ids: JAXWS:JAVADOC:95; WS4EE:SPEC:6012; - * - * @test_Strategy: Verify MessageContext.Scope.values() returns array - * containing the constants of this enum type. - */ - public void valuesTest() throws Fault { - TestUtil.logTrace("valuesTest"); - boolean pass = true; - try { - TestUtil.logMsg("Call MessageContext.Scope.values() ..."); - MessageContext.Scope[] methods = MessageContext.Scope.values(); - printEnums(methods); - pass = findEnums(methods); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("valuesTest failed", e); - } - - if (!pass) - throw new Fault("valuesTest failed"); - } - - /* - * @testName: valueOfTest - * - * @assertion_ids: JAXWS:JAVADOC:94; WS4EE:SPEC:6012; - * - * @test_Strategy: Verify MessageContext.Scope.valueOf(String name) returns - * the enum constant of this type with specified name. - */ - public void valueOfTest() throws Fault { - TestUtil.logTrace("valuesTest"); - boolean pass = true; - try { - TestUtil.logMsg("Call MessageContext.Scope.valueOf(APPLICATION) ..."); - MessageContext.Scope method = MessageContext.Scope.valueOf("APPLICATION"); - if (method != MessageContext.Scope.APPLICATION) { - TestUtil.logErr( - "MessageContext.Scope.valueOf(APPLICATION) failed:" + " expected: " - + MessageContext.Scope.APPLICATION + ", received: " + method); - pass = false; - } else { - TestUtil.logMsg("MessageContext.Scope.valueOf(APPLICATION) passed"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("valuesTest failed", e); - } - - if (!pass) - throw new Fault("valuesTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/MessageContext/Scope/WSMessageContextScope_appclient_vehicle_client.jar.sun-application-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/MessageContext/Scope/WSMessageContextScope_appclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 089c420947..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/MessageContext/Scope/WSMessageContextScope_appclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/MessageContext/Scope/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/MessageContext/Scope/build.xml deleted file mode 100644 index 4d33eac6ba..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/MessageContext/Scope/build.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/MessageContext/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/MessageContext/build.xml deleted file mode 100644 index b1fbcbc034..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/MessageContext/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/PortInfo/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/PortInfo/Client.java deleted file mode 100644 index 1f82f1f4fc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/PortInfo/Client.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_handler.PortInfo; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; -import jakarta.xml.ws.handler.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.api.jakarta_xml_ws_handler.PortInfo."; - - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private static final QName SERVICE_QNAME = new QName(NAMESPACEURI, - SERVICE_NAME); - - private static final QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService.class; - - private static final Class SEI_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.Hello.class; - - private static final String BINDING_ID = SOAPBinding.SOAP11HTTP_BINDING; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private static PortInfo pinfo = null; - - static HelloService service = null; - - // URL properties used by the test - private static final String ENDPOINT_URL = "dlhelloservice.endpoint.1"; - - private static final String WSDLLOC_URL = "dlhelloservice.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: PortInfoTest - * - * @assertion_ids: JAXWS:JAVADOC:96; JAXWS:JAVADOC:97; JAXWS:JAVADOC:98; - * - * @test_Strategy: - */ - public void PortInfoTest() throws Fault { - TestUtil.logTrace("PortInfoTest"); - boolean pass = true; - try { - if (modeProperty.equals("standalone")) { - getTestURLs(); - service = (HelloService) JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, - SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HelloService) getSharedObject(); - } - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - TestUtil.logMsg("BindingID=" + info.getBindingID()); - TestUtil.logMsg("ServiceName=" + info.getServiceName()); - TestUtil.logMsg("PortName=" + info.getPortName()); - pinfo = info; - return new ArrayList(); - } - }); - Hello port = (Hello) service.getPort(PORT_QNAME, SEI_CLASS); - BindingProvider bp = (BindingProvider) port; - Binding b = bp.getBinding(); - List hl = b.getHandlerChain(); - TestUtil.logMsg("HandlerChainList=" + hl); - TestUtil.logMsg("HandlerChainSize = " + hl.size()); - TestUtil.logMsg("ServiceName check -> " + pinfo.getServiceName()); - if (!pinfo.getServiceName().equals(SERVICE_QNAME)) { - TestUtil.logErr("ServiceName mismatch, expected: " + SERVICE_QNAME - + ", received: " + pinfo.getServiceName()); - pass = false; - } - TestUtil.logMsg("PortName check -> " + pinfo.getPortName()); - if (!pinfo.getPortName().equals(PORT_QNAME)) { - TestUtil.logErr("PortName mismatch, expected: " + PORT_QNAME - + ", received: " + pinfo.getPortName()); - pass = false; - } - TestUtil.logMsg("BindingID check -> " + pinfo.getBindingID()); - if (!pinfo.getBindingID().equals(BINDING_ID)) { - TestUtil.logErr("BindingID mismatch, expected: " + BINDING_ID - + ", received: " + pinfo.getBindingID()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("PortInfoTest failed", e); - } - - if (!pass) - throw new Fault("PortInfoTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/PortInfo/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/PortInfo/build.xml deleted file mode 100644 index cb99a5ad96..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/PortInfo/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/PortInfo/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/PortInfo/jakartaEE.tokens deleted file mode 100644 index 038da965bd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/PortInfo/jakartaEE.tokens +++ /dev/null @@ -1,8 +0,0 @@ -WSRAnn=@jakarta.xml.ws.WebServiceRef(name="service/wsw2jdlhelloservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloservice - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/build.xml deleted file mode 100644 index 79f641ec97..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPHandler/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPHandler/Client.java deleted file mode 100644 index 18eac63b47..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPHandler/Client.java +++ /dev/null @@ -1,4456 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_handler_soap.SOAPHandler; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.*; - -import java.io.*; -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.ProtocolException; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String HARNESSHOST = "harness.host"; - - private String harnessHost = null; - - private static final String HARNESSLOGPORT = "harness.log.port"; - - private String harnessLogPort = null; - - private static final String TRACEFLAG = "harness.log.traceflag"; - - private String harnessLogTraceFlag = "false"; // false or true - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String WSDLLOC_URL = "dlhandlerservice.wsdlloc.1"; - - private static final String ENDPOINT1_URL = "dlhandlerservice.endpoint.1"; - - private static final String ENDPOINT3_URL = "dlhandlerservice.endpoint.3"; - - private static final String ENDPOINT4_URL = "dlhandlerservice.endpoint.4"; - - private String url1 = null; - - private String url3 = null; - - private String url4 = null; - - private URL wsdlurl = null; - - // service and port information - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private static final String SERVICE_NAME = "DLHandlerService"; - - private static final String PORT_NAME1 = "HelloPort"; - - private static final String PORT_NAME3 = "Hello3Port"; - - private static final String PORT_NAME4 = "GetTrackerDataPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private QName PORT_QNAME3 = new QName(NAMESPACEURI, PORT_NAME3); - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.DLHandlerService.class; - - private static final String THEBINDINGPROTOCOL = jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING; - - private static final String SOAP = "SOAP"; - - private static final String TEST_TYPE = SOAP + "Test"; - - private Handler handler = null; - - Hello port1 = null; - - Hello3 port3 = null; - - GetTrackerData port4 = null; - - static DLHandlerService service = null; - - BindingProvider bp1 = null; - - BindingProvider bp3 = null; - - BindingProvider bp4 = null; - - Binding binding1 = null; - - Binding binding3 = null; - - Binding binding4 = null; - - List listOfBindings = new ArrayList(); - - List port1HandlerChain = null; - - List port3HandlerChain = null; - - List port4HandlerChain = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT1_URL); - url1 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT3_URL); - url3 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT4_URL); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint1 URL: " + url1); - TestUtil.logMsg("Service Endpoint3 URL: " + url3); - TestUtil.logMsg("Service Endpoint4 URL: " + url4); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private boolean setupPorts() { - boolean result = true; - TestUtil.logTrace("entering setupPorts"); - try { - if (modeProperty.equals("standalone")) { - getPortsStandalone(); - } else { - getPortsJavaEE(); - } - } catch (Exception e) { - TestUtil.logErr("Could not setup stubs properly"); - TestUtil.printStackTrace(e); - result = false; - } - TestUtil.logTrace("leaving setupPorts"); - return result; - - } - - private void getPortsStandalone() throws Exception { - getPorts(); - JAXWS_Util.setTargetEndpointAddress(port1, url1); - JAXWS_Util.setTargetEndpointAddress(port3, url3); - JAXWS_Util.setTargetEndpointAddress(port4, url4); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - getTargetEndpointAddress(port1, port3, port4); - } - - private void getTargetEndpointAddress(Object port1, Object port3, - Object port4) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port1=" + port1); - String url1 = JAXWS_Util.getTargetEndpointAddress(port1); - TestUtil.logMsg("Target Endpoint Address=" + url1); - TestUtil.logMsg("Get Target Endpoint Address for port3=" + port3); - String url3 = JAXWS_Util.getTargetEndpointAddress(port3); - TestUtil.logMsg("Target Endpoint Address=" + url3); - TestUtil.logMsg("Get Target Endpoint Address for port4=" + port4); - String url4 = JAXWS_Util.getTargetEndpointAddress(port4); - TestUtil.logMsg("Target Endpoint Address=" + url4); - } - - private void getPorts() throws Exception { - TestUtil.logTrace("entering getPorts"); - - TestUtil.logMsg("Get port 1 = " + PORT_NAME1); - port1 = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port1=" + port1); - - TestUtil.logMsg("Get port 3 = " + PORT_NAME3); - port3 = (Hello3) service.getPort(Hello3.class); - TestUtil.logMsg("port3=" + port3); - - TestUtil.logMsg("Get port 4 = " + PORT_NAME4); - port4 = (GetTrackerData) service.getPort(GetTrackerData.class); - TestUtil.logMsg("port4=" + port4); - - TestUtil.logMsg("Get binding for port 1 = " + PORT_NAME1); - bp1 = (BindingProvider) port1; - binding1 = bp1.getBinding(); - port1HandlerChain = binding1.getHandlerChain(); - TestUtil.logMsg("Port1 HandlerChain =" + port1HandlerChain); - TestUtil.logMsg("Port1 HandlerChain size = " + port1HandlerChain.size()); - - TestUtil.logMsg("------------------------------------------------------"); - - TestUtil.logMsg("Get binding for port 3 = " + PORT_NAME3); - bp3 = (BindingProvider) port3; - binding3 = bp3.getBinding(); - port3HandlerChain = binding3.getHandlerChain(); - TestUtil.logMsg("Port3 HandlerChain=" + port3HandlerChain); - TestUtil.logMsg("Port3 HandlerChain size = " + port3HandlerChain.size()); - - TestUtil.logMsg("------------------------------------------------------"); - - TestUtil.logMsg("Get binding for port 4 = " + PORT_NAME4); - bp4 = (BindingProvider) port4; - binding4 = bp4.getBinding(); - port4HandlerChain = binding4.getHandlerChain(); - TestUtil.logMsg("Port4 HandlerChain=" + port4HandlerChain); - TestUtil.logMsg("Port4 HandlerChain size = " + port4HandlerChain.size()); - - listOfBindings.add(binding1); - listOfBindings.add(binding3); - listOfBindings.add(binding4); - - TestUtil.logTrace("leaving getPorts"); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * harness.log.traceflag; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (DLHandlerService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (DLHandlerService) getSharedObject(); - } - - try { - harnessHost = p.getProperty(HARNESSHOST); - } catch (Exception e) { - harnessHost = null; - } - try { - harnessLogPort = p.getProperty(HARNESSLOGPORT); - } catch (Exception e) { - harnessLogPort = null; - } - try { - harnessLogTraceFlag = p.getProperty(TRACEFLAG); - } catch (Exception e) { - harnessLogTraceFlag = "false"; - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: ClientSOAPHandlerTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:JAVADOC:90; JAXWS:JAVADOC:99; JAXWS:SPEC:9007; JAXWS:SPEC:9012; - * JAXWS:SPEC:9014; JAXWS:SPEC:9015.1; JAXWS:SPEC:9018; WS4EE:SPEC:6010; - * WS4EE:SPEC:6013; WS4EE:SPEC:6015.1; WS4EE:SPEC:6015.2; WS4EE:SPEC:6015.3; - * WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; WS4EE:SPEC:6051; - * - * @test_Strategy: Invoke an RPC method and ensure that the client-side soap - * message handler callbacks are called. - * - */ - public void ClientSOAPHandlerTest() throws Fault { - TestUtil.logTrace("ClientSOAPHandlerTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientSOAPHandler1, ClientLogicalHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler1(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler2(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler3(); - handlerList.add(handler); - } - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - }); - - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("Getting existing Handlers for Port1"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding1.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding1.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ClientSOAPTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - TestUtil.logMsg("Verify handleMessage()/init() callbacks"); - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerCallBacks("Client", SOAP, - clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg( - "Verifying callbacks where SOAPHandlers were called after SOAPHandlers on Client-Side"); - if (!Handler_Util.VerifySOAPVerseLogicalHandlerOrder(clientSideMsgs)) { - TestUtil.logErr( - "Client-Side SOAP verses Logical Handler Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg( - "Client-Side SOAP verses Logical Handler Callbacks are (correct)"); - } - - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientSOAPHandlerTest failed"); - } - - /* - * @testName: ServerSOAPHandlerTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:JAVADOC:90; JAXWS:JAVADOC:99; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.1; JAXWS:SPEC:9018; WS4EE:SPEC:6010; WS4EE:SPEC:6013; - * WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; WS4EE:SPEC:6051; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerSOAPHandlerTest() throws Fault { - TestUtil.logTrace("ServerSOAPHandlerTest"); - boolean pass = true; - try { - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ServerSOAPTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - MyResultType mr = null; - try { - mr = port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (mr != null) { - String result = mr.getErrors(); - if (result != null && !result.equals("")) { - pass = false; - TestUtil - .logErr("The serverside tests for MessageContext.Scope failed:" - + result); - } - } - - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandlerCallBacks("Server", SOAP, - serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg( - "Verifying callbacks where SOAPHandlers are called after LogicalHandlers on Server-Side"); - if (!Handler_Util.VerifySOAPVerseLogicalHandlerOrder(serverSideMsgs)) { - TestUtil.logErr( - "Server-Side SOAP verses Logical Handler Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg( - "Server-Side SOAP verses Logical Handler Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ServerSOAPHandlerTest failed"); - } - - /* - * @testName: ClientSOAPInboundHandleMessageThrowsRuntimeExceptionTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:SPEC:9015.4.2; JAXWS:SPEC:9016.1; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side handler - * callbacks are called by the JAXWS RUNTIME. Client handler throws a - * RuntimeException while processing an inbound message. - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doInbound() - * ClientSOAPHandler4.handleMessage().doInbound() ClientSOAPHandler4 Throwing - * an inbound RuntimeException ClientSOAPHandler6.close() - * ClientSOAPHandler4.close() ClientSOAPHandler5.close() - */ - public void ClientSOAPInboundHandleMessageThrowsRuntimeExceptionTest() - throws Fault { - TestUtil - .logTrace("ClientSOAPInboundHandleMessageThrowsRuntimeExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - }); - - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientSOAPInboundHandleMessageThrowsRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - try { - TestUtil.logMsg("Expecting RuntimeException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientSOAPHandler4.handleMessage throwing an inbound RuntimeException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", SOAP, false, - Constants.INBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientSOAPInboundHandleMessageThrowsRuntimeExceptionTest failed"); - } - - /* - * @testName: ServerSOAPInboundHandleMessageThrowsRuntimeExceptionTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:SPEC:9015.4.1; JAXWS:SPEC:9016.1; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side - * handler callbacks are called. Server handler throws a RuntimeException - * while processing an inbound message. - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * - * ServerSOAPHandler6.handleMessage().doInbound() - * ServerSOAPHandler4.handleMessage().doInbound() ServerSOAPHandler4 Throwing - * an inbound RuntimeException ServerSOAPHandler4.close() - * ServerSOAPHandler6.close() - */ - public void ServerSOAPInboundHandleMessageThrowsRuntimeExceptionTest() - throws Fault { - TestUtil - .logTrace("ServerSOAPInboundHandleMessageThrowsRuntimeExceptionTest"); - boolean pass = true; - try { - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerSOAPInboundHandleMessageThrowsRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting WebServiceException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - if (e instanceof jakarta.xml.ws.soap.SOAPFaultException) - TestUtil.logMsg("Did get expected nested SOAPFaultException"); - else { - TestUtil.logErr("Did not get expected nested SOAPFaultException"); - TestUtil.printStackTrace(e); - pass = false; - } - String tmp = "ServerSOAPHandler4.handleMessage throwing an inbound RuntimeException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected nested SOAPFaultException text"); - else { - TestUtil - .logErr("Did not get expected nested SOAPFaultException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Server", SOAP, false, - Constants.INBOUND, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ServerSOAPInboundHandleMessageThrowsRuntimeExceptionTest failed"); - } - - /* - * @testName: ClientSOAPOutboundHandleMessageThrowsRuntimeExceptionTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:SPEC:9015.4.1; JAXWS:SPEC:9016.1; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side handler - * callbacks are called. Client handler throws a RuntimeException while - * processing an outbound message. - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() ClientSOAPHandler4 Throwing - * an outbound RuntimeException ClientSOAPHandler4.close() - * ClientSOAPHandler5.close() - */ - public void ClientSOAPOutboundHandleMessageThrowsRuntimeExceptionTest() - throws Fault { - TestUtil - .logTrace("ClientSOAPOutboundHandleMessageThrowsRuntimeExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - }); - - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientSOAPOutboundHandleMessageThrowsRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting RuntimeException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", SOAP, false, - Constants.OUTBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e.getMessage()); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientSOAPOutboundHandleMessageThrowsRuntimeExceptionTest failed"); - } - - /* - * @testName: ServerSOAPOutboundHandleMessageThrowsRuntimeExceptionTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:SPEC:9015.4.2; JAXWS:SPEC:9016.1; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side - * handler callbacks are called. Server handler throws a RuntimeException - * while processing an outbound message. - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerSOAPHandler6.handleMessage().doInbound() - * ServerSOAPHandler4.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doOutbound() - * ServerSOAPHandler4.handleMessage().doOutbound() ServerSOAPHandler4 Throwing - * an outbound RuntimeException ServerSOAPHandler5.close() - * ServerSOAPHandler4.close() ServerSOAPHandler6.close() - */ - public void ServerSOAPOutboundHandleMessageThrowsRuntimeExceptionTest() - throws Fault { - TestUtil - .logTrace("ServerSOAPOutboundHandleMessageThrowsRuntimeExceptionTest"); - boolean pass = true; - try { - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerSOAPOutboundHandleMessageThrowsRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting WebServiceException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - if (e instanceof jakarta.xml.ws.soap.SOAPFaultException) - TestUtil.logMsg("Did get expected nested SOAPFaultException"); - else { - TestUtil.logErr("Did not get expected nested SOAPFaultException"); - TestUtil.printStackTrace(e); - pass = false; - } - String tmp = "ServerSOAPHandler4.handleMessage throwing an outbound RuntimeException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected nested SOAPFaultException text"); - else { - TestUtil - .logErr("Did not get expected nested SOAPFaultException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Server", SOAP, false, - Constants.OUTBOUND, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - if (!pass) - throw new Fault( - "ServerSOAPOutboundHandleMessageThrowsRuntimeExceptionTest failed"); - } - - /* - * @testName: ClientSOAPInboundHandleMessageThrowsSOAPFaultExceptionTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:SPEC:9015.3.1; JAXWS:SPEC:9015.4.2; JAXWS:SPEC:9016.1; - * WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side handler - * callbacks are called. Client handler throws a SOAPFaultException while - * processing an inbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doInbound() - * ClientSOAPHandler4.handleMessage().doInbound() ClientSOAPHandler4 Throwing - * an inbound SOAPFaultException ClientSOAPHandler6.close() - * ClientSOAPHandler4.close() ClientSOAPHandler5.close() - */ - public void ClientSOAPInboundHandleMessageThrowsSOAPFaultExceptionTest() - throws Fault { - TestUtil - .logTrace("ClientSOAPInboundHandleMessageThrowsSOAPFaultExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - }); - - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientSOAPInboundHandleMessageThrowsSOAPFaultExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - try { - TestUtil.logTrace( - "Expecting WebServiceException that wraps a SOAPFaultException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "SOAPFaultException: ClientSOAPHandler4.handleMessage throwing an inbound SOAPFaultException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected nested WebServiceException text"); - else { - TestUtil - .logErr("Did not get expected nested WebServiceException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", SOAP, false, - Constants.INBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientSOAPInboundHandleMessageThrowsSOAPFaultExceptionTest failed"); - } - - /* - * @testName: ServerSOAPInboundHandleMessageThrowsSOAPFaultExceptionTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:SPEC:9015.3.1; JAXWS:SPEC:9015.4.1; JAXWS:SPEC:9016.1; - * WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side - * handler callbacks are called. Server handler throws a SOAPFaultException - * while processing an inbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerSOAPHandler6.handleMessage().doInbound() - * ServerSOAPHandler4.handleMessage().doInbound() ServerSOAPHandler4 Throwing - * an inbound SOAPFaultException ServerSOAPHandler6.handleFault() - * ServerSOAPHandler4.close() ServerSOAPHandler6.close() - */ - public void ServerSOAPInboundHandleMessageThrowsSOAPFaultExceptionTest() - throws Fault { - TestUtil - .logTrace("ServerSOAPInboundHandleMessageThrowsSOAPFaultExceptionTest"); - boolean pass = true; - try { - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerSOAPInboundHandleMessageThrowsSOAPFaultExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting WebServiceException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - if (e instanceof jakarta.xml.ws.soap.SOAPFaultException) - TestUtil.logMsg("Did get expected nested SOAPFaultException"); - else { - TestUtil.logErr("Did not get expected nested SOAPFaultException"); - TestUtil.printStackTrace(e); - pass = false; - } - String tmp = "ServerSOAPHandler4.handleMessage throwing an inbound SOAPFaultException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected nested SOAPFaultException text"); - else { - TestUtil - .logErr("Did not get expected nested SOAPFaultException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Server", SOAP, false, - Constants.INBOUND, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - if (!pass) - throw new Fault( - "ServerSOAPInboundHandleMessageThrowsSOAPFaultExceptionTest failed"); - } - - /* - * @testName: ClientSOAPOutboundHandleMessageThrowsSOAPFaultExceptionTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:SPEC:9015.3.1; JAXWS:SPEC:9015.4.1; JAXWS:SPEC:9016.1; - * WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side handler - * callbacks are called. Client handler throws a SOAPFaultException while - * processing an outbound message. - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() ClientSOAPHandler4 Throwing - * an outbound SOAPFaultException ClientSOAPHandler5.handleFault() - * ClientSOAPHandler4.close() ClientSOAPHandler5.close() - */ - public void ClientSOAPOutboundHandleMessageThrowsSOAPFaultExceptionTest() - throws Fault { - TestUtil.logTrace( - "ClientSOAPOutboundHandleMessageThrowsSOAPFaultExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - }); - - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientSOAPOutboundHandleMessageThrowsSOAPFaultExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting SOAPFaultException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected SOAPFaultException"); - pass = false; - } catch (SOAPFaultException e) { - TestUtil.logMsg("Did get expected SOAPFaultException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientSOAPHandler4.handleMessage throwing an outbound SOAPFaultException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected SOAPFaultException text"); - else { - TestUtil.logErr("Did not get expected SOAPFaultException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", SOAP, false, - Constants.OUTBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientSOAPOutboundHandleMessageThrowsSOAPFaultExceptionTest failed"); - } - - /* - * @testName: ServerSOAPOutboundHandleMessageThrowsSOAPFaultExceptionTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:SPEC:9015.3.1; JAXWS:SPEC:9015.4.2; JAXWS:SPEC:9016.1; - * WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side - * handler callbacks are called. Server handler throws a SOAPFaultException - * while processing an outbound message. - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerSOAPHandler6.handleMessage().doInbound() - * ServerSOAPHandler4.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doOutbound() - * ServerSOAPHandler4.handleMessage().doOutbound() ServerSOAPHandler4 Throwing - * an outbound SOAPFaultException ServerSOAPHandler5.close() - * ServerSOAPHandler4.close() ServerSOAPHandler6.close() - */ - public void ServerSOAPOutboundHandleMessageThrowsSOAPFaultExceptionTest() - throws Fault { - TestUtil.logTrace( - "ServerSOAPOutboundHandleMessageThrowsSOAPFaultExceptionTest"); - boolean pass = true; - try { - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerSOAPOutboundHandleMessageThrowsSOAPFaultExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg( - "Expecting SOAPFaultException wrapped by a WebServiceException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - if (e instanceof jakarta.xml.ws.soap.SOAPFaultException) - TestUtil.logMsg("Did get expected nested SOAPFaultException"); - else { - TestUtil.logErr("Did not get expected nested SOAPFaultException"); - TestUtil.printStackTrace(e); - pass = false; - } - String tmp = "ServerSOAPHandler4.handleMessage throwing an outbound SOAPFaultException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected nested SOAPFaultException text"); - else { - TestUtil - .logErr("Did not get expected nested SOAPFaultException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Server", SOAP, false, - Constants.OUTBOUND, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occured: " + e); - pass = false; - } - if (!pass) - throw new Fault( - "ServerSOAPOutboundHandleMessageThrowsSOAPFaultExceptionTest failed"); - } - - /* - * @testName: ServerEndpointRemoteRuntimeExceptionTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:SPEC:9016.4; JAXWS:SPEC:9017; JAXWS:SPEC:9018; WS4EE:SPEC:6008; - * WS4EE:SPEC:6028; WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side - * handler callbacks are called. Endpoint throws a RuntimeException that is - * wrapped by a WebServiceException - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerSOAPHandler6.handleMessage().doInbound() - * ServerSOAPHandler4.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doInbound() - * ServerSOAPHandler5.handleFault() ServerSOAPHandler4.handleFault() - * ServerSOAPHandler6.handleFault() ServerSOAPHandler5.close() - * ServerSOAPHandler4.close() ServerSOAPHandler6.close() - */ - public void ServerEndpointRemoteRuntimeExceptionTest() throws Fault { - TestUtil.logTrace("ServerEndpointRemoteRuntimeExceptionTest"); - boolean pass = true; - try { - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("EndpointRemoteRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg( - "Expecting RuntimeException wrapped by a WebServiceException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - if (baos.toString().indexOf("RuntimeException") > -1) - TestUtil.logMsg("Did get expected nested RuntimeException"); - else { - TestUtil.logErr("Did not get expected nested RuntimeException"); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Server", SOAP, true, - "", serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - if (!pass) - throw new Fault("ServerEndpointRemoteRuntimeExceptionTest failed"); - } - - /* - * @testName: ServerEndpointRemoteSOAPFaultExceptionTest - * - * @assertion_ids: JAXWS:JAVADOC:87; JAXWS:JAVADOC:88; JAXWS:JAVADOC:89; - * JAXWS:SPEC:9016.3; JAXWS:SPEC:9017; JAXWS:SPEC:9018; WS4EE:SPEC:6008; - * WS4EE:SPEC:6028; WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side - * handler callbacks are called. Endpoint throws a SOAPFaultException that is - * wrapped by a WebServiceException - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerSOAPHandler6.handleMessage().doInbound() - * ServerSOAPHandler4.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doInbound() - * ServerSOAPHandler5.handleFault() ServerSOAPHandler4.handleFault() - * ServerSOAPHandler6.handleFault() ServerSOAPHandler5.close() - * ServerSOAPHandler4.close() ServerSOAPHandler6.close() - */ - public void ServerEndpointRemoteSOAPFaultExceptionTest() throws Fault { - TestUtil.logTrace("ServerEndpointRemoteSOAPFaultExceptionTest"); - boolean pass = true; - try { - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("EndpointRemoteSOAPFaultExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg( - "Expecting SOAPFaultException wrapped by a WebServiceException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - if (baos.toString().indexOf("SOAPFaultException") > -1) - TestUtil.logMsg("Did get expected nested SOAPFaultException"); - else { - TestUtil.logErr("Did not get expected nested SOAPFaultException"); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Server", SOAP, true, - "", serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - if (!pass) - throw new Fault("ServerEndpointRemoteSOAPFaultExceptionTest failed"); - } - - /* - * @testName: ServerSOAPInboundHandleMessageFalseTest - * - * @assertion_ids: JAXWS:SPEC:9015.2.1; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ServerSOAPHandler4 - * returns false in the handleMessage method while processing an inbound - * message. ------------------------------------------------------- This is - * the expected order ------------------------------------------------------- - * ServerSOAPHandler6.handleMessage().doInbound() - * ServerSOAPHandler4.handleMessage().doInbound() - * ServerSOAPHandler6.handleMessage().doInbound() ServerSOAPHandler4.close() - * ServerSOAPHandler6.close() - */ - public void ServerSOAPInboundHandleMessageFalseTest() throws Fault { - TestUtil.logTrace("ServerSOAPInboundHandleMessageFalseTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("ServerSOAPInboundHandleMessageFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port3.doHandlerTest3(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandleMessageFalseCallBacks("Server", SOAP, - serverSideMsgs, Constants.INBOUND)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault("ServerSOAPInboundHandleMessageFalseTest failed"); - } - - /* - * @testName: ServerSOAPOutboundHandleMessageFalseTest - * - * @assertion_ids: JAXWS:SPEC:9015.2.2; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ServerSOAPHandler4 - * returns false in the handleMessage method while processing an outbound - * message. ------------------------------------------------------- This is - * the expected order ------------------------------------------------------- - * ServerSOAPHandler6.handleMessage().doInbound() - * ServerSOAPHandler4.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doOutbound() - * ServerSOAPHandler4.handleMessage().doOutbound() ServerSOAPHandler5.close() - * ServerSOAPHandler4.close() ServerSOAPHandler6.close() - */ - public void ServerSOAPOutboundHandleMessageFalseTest() throws Fault { - TestUtil.logTrace("ServerSOAPOutboundHandleMessageFalseTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("ServerSOAPOutboundHandleMessageFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port3.doHandlerTest3(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandleMessageFalseCallBacks("Server", SOAP, - serverSideMsgs, Constants.OUTBOUND)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault("ServerSOAPOutboundHandleMessageFalseTest failed"); - } - - /* - * @testName: ClientSOAPInboundHandleMessageFalseTest - * - * @assertion_ids: JAXWS:SPEC:9015.2.2; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ClientSOAPHandler4 - * returns false in the handleMessage method while processing an inbound - * message. ------------------------------------------------------- This is - * the expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doInbound() - * ClientSOAPHandler4.handleMessage().doInbound() ClientSOAPHandler6.close() - * ClientSOAPHandler4.close() ClientSOAPHandler5.close() - */ - public void ClientSOAPInboundHandleMessageFalseTest() throws Fault { - TestUtil.logTrace("ClientSOAPInboundHandleMessageFalseTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction("ClientSOAPInboundHandleMessageFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port3.doHandlerTest3(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandleMessageFalseCallBacks("Client", SOAP, - clientSideMsgs, Constants.INBOUND)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientSOAPInboundHandleMessageFalseTest failed"); - } - - /* - * @testName: ClientSOAPOutboundHandleMessageFalseTest - * - * @assertion_ids: JAXWS:SPEC:9015.2.1; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ClientSOAPHandler4 - * returns false in the handleMessage method while processing an outbound - * message. ------------------------------------------------------- This is - * the expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() - * ClientSOAPHandler5.handleMessage().doOutbound() ClientSOAPHandler4.close() - * ClientSOAPHandler5.close() - */ - public void ClientSOAPOutboundHandleMessageFalseTest() throws Fault { - TestUtil.logTrace("ClientSOAPOutboundHandleMessageFalseTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientSOAPHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction("ClientSOAPOutboundHandleMessageFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port3.doHandlerTest3(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandleMessageFalseCallBacks("Client", SOAP, - clientSideMsgs, Constants.OUTBOUND)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientSOAPOutboundHandleMessageFalseTest failed"); - } - - /* - * @testName: ClientSOAPOutboundHandleFaultFalseTest - * - * @assertion_ids: JAXWS:SPEC:9016.2; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleFault callbacks are called by the JAXWS RUNTIME. ClientSOAPHandler6 - * throws a SOAPFaultException ClientSOAPHandler4 returns a false for - * handleFault method while processing an outbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doOutbound() ClientSOAPHandler6 Throwing - * an outbound SOAPFaultException ClientSOAPHandler4.handleFault() - * ClientSOAPHandler6.close() ClientSOAPHandler4.close() - * ClientSOAPHandler5.close() - * - */ - public void ClientSOAPOutboundHandleFaultFalseTest() throws Fault { - TestUtil.logTrace("ClientSOAPOutboundHandleFaultFalseTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientSOAPHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction("ClientSOAPOutboundHandleFaultFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting RuntimeException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientSOAPHandler6.handleMessage throws SOAPFaultException for ClientSOAPOutboundHandleFaultFalseTest"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandleFaultFalseCallBacks("Client", SOAP, - clientSideMsgs, Constants.OUTBOUND)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientSOAPOutboundHandleFaultFalseTest failed"); - } - - /* - * @testName: ServerSOAPInboundHandleFaultFalseTest - * - * @assertion_ids: JAXWS:SPEC:9016.2; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ServerSOAPHandler5 - * throws a SOAPFaultException ServerSOAPHandler4 returns a false for - * handleFault method while processing an outbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerSOAPHandler6.handleMessage().doInbound() - * ServerSOAPHandler4.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doInbound() ServerSOAPHandler5 Throwing - * an inbound SOAPFaultException ServerSOAPHandler4.handleFault() - * ServerSOAPHandler5.close() ServerSOAPHandler4.close() - * ServerSOAPHandler6.close() - */ - public void ServerSOAPInboundHandleFaultFalseTest() throws Fault { - TestUtil.logTrace("ServerSOAPInboundHandleFaultFalseTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("ServerSOAPInboundHandleFaultFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting RuntimeException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ServerSOAPHandler5.handleMessage throws SOAPFaultException for ServerSOAPInboundHandleFaultFalseTest"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandleFaultFalseCallBacks("Server", SOAP, - serverSideMsgs, Constants.INBOUND)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault("ServerSOAPInboundHandleFaultFalseTest failed"); - } - - /* - * @testName: ClientSOAPOutboundHandleFaultThrowsRuntimeExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9016.4; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ClientSOAPHandler6 - * throws a SOAPFaultException ClientSOAPHandler4 throws a RuntimeException in - * handleFault method processing an inbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doOutbound() ClientSOAPHandler6 Throwing - * an outbound SOAPFaultException ClientSOAPHandler4.handleFault() - * ClientSOAPHandler4 Throwing an inbound RuntimeException - * ClientSOAPHandler6.close() ClientSOAPHandler4.close() - * ClientSOAPHandler5.close() - */ - public void ClientSOAPOutboundHandleFaultThrowsRuntimeExceptionTest() - throws Fault { - TestUtil - .logTrace("ClientSOAPOutboundHandleFaultThrowsRuntimeExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientSOAPHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction("ClientSOAPOutboundHandleFaultThrowsRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - try { - TestUtil.logMsg("Expecting RuntimeException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientSOAPHandler4.handleFault throwing an inbound RuntimeException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandleFaultRuntimeExceptionCallBacks("Client", - SOAP, clientSideMsgs, Constants.OUTBOUND)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientSOAPOutboundHandleFaultThrowsRuntimeExceptionTest failed"); - } - - /* - * @testName: ServerSOAPInboundHandleFaultThrowsRuntimeExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9016.4; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ServerSOAPHandler5 - * throws a SOAPFaultException ServerSOAPHandler4 throws a RuntimeException in - * the handleFault method processing an outbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerSOAPHandler6.handleMessage().doInbound() - * ServerSOAPHandler4.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doInbound() ServerSOAPHandler5 Throwing - * an inbound SOAPFaultException ServerSOAPHandler4.handleFault() - * ServerSOAPHandler4 Throwing an outbound RuntimeException - * ServerSOAPHandler5.close() ServerSOAPHandler4.close() - * ServerSOAPHandler6.close() - */ - public void ServerSOAPInboundHandleFaultThrowsRuntimeExceptionTest() - throws Fault { - TestUtil.logTrace("ServerSOAPInboundHandleFaultThrowsRuntimeExceptionTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction("ServerSOAPInboundHandleFaultThrowsRuntimeExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting RuntimeException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ServerSOAPHandler4.handleFault throwing an outbound RuntimeException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandleFaultRuntimeExceptionCallBacks("Server", - SOAP, serverSideMsgs, Constants.INBOUND)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault( - "ServerSOAPInboundHandleFaultThrowsRuntimeExceptionTest failed"); - } - - /* - * @testName: ClientSOAPOutboundHandleFaultThrowsSOAPFaultExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9016.3; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ClientSOAPHandler6 - * throws a SOAPFaultException ClientSOAPHandler4 throws a SOAPFaultException - * in the handleFault method processing an inbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doOutbound() ClientSOAPHandler6 Throwing - * an outbound SOAPFaultException ClientSOAPHandler4.handleFault() - * ClientSOAPHandler4 Throwing an inbound SOAPFaultException - * ClientSOAPHandler6.close() ClientSOAPHandler4.close() - * ClientSOAPHandler5.close() - */ - public void ClientSOAPOutboundHandleFaultThrowsSOAPFaultExceptionTest() - throws Fault { - TestUtil - .logTrace("ClientSOAPOutboundHandleFaultThrowsSOAPFaultExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientSOAPHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientSOAPOutboundHandleFaultThrowsSOAPFaultExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - try { - TestUtil.logMsg( - "Expecting WebServiceException that wraps a SOAPFaultException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "SOAPFaultException: ClientSOAPHandler4.handleFault throwing an inbound SOAPFaultException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected WebServiceException text"); - else { - TestUtil.logErr("Did not get expected WebServiceException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandleFaultSOAPFaultExceptionCallBacks("Client", - SOAP, clientSideMsgs, Constants.OUTBOUND)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientSOAPOutboundHandleFaultThrowsSOAPFaultExceptionTest failed"); - } - - /* - * @testName: ServerSOAPInboundHandleFaultThrowsSOAPFaultExceptionTest - * - * @assertion_ids: JAXWS:SPEC:9016.3; WS4EE:SPEC:6008; WS4EE:SPEC:6028; - * WS4EE:SPEC:6005; - * - * @test_Strategy: Invoke an RPC method. Verify that the server-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ServerSOAPHandler5 - * throws a SOAPFaultException ServerSOAPHandler4 throws a SOAPFaultException - * in handleFailt method processing an outbound message. - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ServerSOAPHandler6.handleMessage().doInbound() - * ServerSOAPHandler4.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doInbound() ServerSOAPHandler5 Throwing - * an inbound SOAPFaultException ServerSOAPHandler4.handleFault() - * ServerSOAPHandler4 Throwing an outbound SOAPFaultException - * ServerSOAPHandler5.close() ServerSOAPHandler4.close() - * ServerSOAPHandler6.close() - */ - public void ServerSOAPInboundHandleFaultThrowsSOAPFaultExceptionTest() - throws Fault { - TestUtil - .logTrace("ServerSOAPInboundHandleFaultThrowsSOAPFaultExceptionTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerSOAPInboundHandleFaultThrowsSOAPFaultExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting SOAPFaultException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected SOAPFaultException"); - pass = false; - } catch (SOAPFaultException e) { - TestUtil.logMsg("Did get expected SOAPFaultException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ServerSOAPHandler4.handleFault throwing an outbound SOAPFaultException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected SOAPFaultException text"); - else { - TestUtil.logErr("Did not get expected SOAPFaultException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - GetTrackerDataAction gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyHandleFaultSOAPFaultExceptionCallBacks("Server", - SOAP, serverSideMsgs, Constants.INBOUND)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault( - "ServerSOAPInboundHandleFaultThrowsSOAPFaultExceptionTest failed"); - } - - /* - * @testName: ServerSOAPInboundHandlerThrowsSOAPFaultToClientHandlersTest - * - * @assertion_ids: JAXWS:SPEC:9016; JAXWS:SPEC:9016.2; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side handler - * callbacks are called by the JAXWS RUNTIME. Server handler throws a - * SOAPFaultException while processing an inbound message and Client should - * properly process exception. - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doOutbound() - * ClientSOAPHandler6.handleFault() ClientSOAPHandler6 received SOAPFault from - * Inbound ServerSOAPHandler6 ClientSOAPHandler6.close() - * ClientSOAPHandler4.close() ClientSOAPHandler5.close() - * - * ServerSOAPHandler6.handleMessage().doInbound() ServerSOAPHandler6 Throwing - * an inbound SOAPFaultException ServerSOAPHandler6.close() - * - */ - public void ServerSOAPInboundHandlerThrowsSOAPFaultToClientHandlersTest() - throws Fault { - TestUtil.logTrace( - "ServerSOAPInboundHandlerThrowsSOAPFaultToClientHandlersTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - }); - - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerSOAPInboundHandlerThrowsSOAPFaultToClientHandlersTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - try { - TestUtil.logMsg("Expecting RuntimeException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ServerSOAPHandler6.handleMessage throws SOAPFaultException for ServerSOAPInboundHandlerThrowsSOAPFaultToClientHandlersTest"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyServerToClientHandlerExceptionCallBacks( - "Client", SOAP, Constants.OUTBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyServerToClientHandlerExceptionCallBacks( - "Server", SOAP, Constants.INBOUND, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ServerSOAPInboundHandlerThrowsSOAPFaultToClientHandlersTest failed"); - } - - /* - * @testName: ServerSOAPOutboundHandlerThrowsSOAPFaultToClientHandlersTest - * - * @assertion_ids: JAXWS:SPEC:9016; JAXWS:SPEC:9016.2; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side handler - * callbacks are called by the JAXWS RUNTIME. Server handler throws a - * SOAPFaultException while processing an inbound message and Client should - * properly process exception. - * - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doOutbound() - * ClientSOAPHandler6.handleFault() ClientSOAPHandler6 received SOAPFault from - * Outbound ServerSOAPHandler6 ClientSOAPHandler6.close() - * ClientSOAPHandler4.close() ClientSOAPHandler5.close() - * - * ServerSOAPHandler6.handleMessage().doInbound() - * ServerSOAPHandler4.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doInbound() - * ServerSOAPHandler5.handleMessage().doOutbound() - * ServerSOAPHandler4.handleMessage().doOutbound() - * ServerSOAPHandler6.handleMessage().doOutbound() ServerSOAPHandler6 Throwing - * an inbound SOAPFaultException ServerSOAPHandler6.close() - * - */ - public void ServerSOAPOutboundHandlerThrowsSOAPFaultToClientHandlersTest() - throws Fault { - TestUtil.logTrace( - "ServerSOAPOutboundHandlerThrowsSOAPFaultToClientHandlersTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - }); - - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ServerSOAPOutboundHandlerThrowsSOAPFaultToClientHandlersTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - try { - TestUtil.logMsg("Expecting RuntimeException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected RuntimeException"); - pass = false; - } catch (RuntimeException e) { - TestUtil.logMsg("Did get expected RuntimeException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ServerSOAPHandler6.handleMessage throws SOAPFaultException for ServerSOAPOutboundHandlerThrowsSOAPFaultToClientHandlersTest"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected RuntimeException text"); - else { - TestUtil.logErr("Did not get expected RuntimeException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyServerToClientHandlerExceptionCallBacks( - "Client", SOAP, Constants.INBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - - TestUtil.logMsg("Get server side result back from endpoint"); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideMsgs = null; - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - if (!Handler_Util.VerifyServerToClientHandlerExceptionCallBacks( - "Server", SOAP, Constants.OUTBOUND, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ServerSOAPOutboundHandlerThrowsSOAPFaultToClientHandlersTest failed"); - } - - /* - * @testName: ClientSOAPInboundHandleMessageThrowsWebServiceExceptionTest - * - * @assertion_ids: JAXWS:SPEC:4021; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ClientSOAPHandler4 - * throws a WebServiceException in handleMessage method - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doInbound() - * ClientSOAPHandler4.handleMessage().doInbound() ClientSOAPHandler4 Throwing - * an inbound WebServiceException ClientSOAPHandler6.close() - * ClientSOAPHandler4.close() ClientSOAPHandler5.close() - */ - public void ClientSOAPInboundHandleMessageThrowsWebServiceExceptionTest() - throws Fault { - TestUtil.logTrace( - "ClientSOAPInboundHandleMessageThrowsWebServiceExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientSOAPInboundHandleMessageThrowsWebServiceExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting WebServiceException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientSOAPHandler4.handleMessage throwing an inbound WebServiceException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected WebServiceException text"); - else { - TestUtil.logErr("Did not get expected WebServiceException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", SOAP, false, - Constants.INBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientSOAPInboundHandleMessageThrowsWebServiceExceptionTest failed"); - } - - /* - * @testName: ClientSOAPOutboundHandleMessageThrowsWebServiceExceptionTest - * - * @assertion_ids: JAXWS:SPEC:4021; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ClientSOAPHandler4 - * throws a WebServiceException in handleMessage method - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() ClientSOAPHandler4 Throwing - * an outbound WebServiceException ClientSOAPHandler4.close() - * ClientSOAPHandler5.close() - */ - public void ClientSOAPOutboundHandleMessageThrowsWebServiceExceptionTest() - throws Fault { - TestUtil.logTrace( - "ClientSOAPOutboundHandleMessageThrowsWebServiceExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientSOAPOutboundHandleMessageThrowsWebServiceExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting WebServiceException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Did get expected WebServiceException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientSOAPHandler4.handleMessage throwing an outbound WebServiceException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected WebServiceException text"); - else { - TestUtil.logErr("Did not get expected WebServiceException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", SOAP, false, - Constants.OUTBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientSOAPOutboundHandleMessageThrowsWebServiceExceptionTest failed"); - } - - /* - * @testName: ClientSOAPInboundHandleMessageThrowsProtocolExceptionTest - * - * @assertion_ids: JAXWS:SPEC:4021; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ClientSOAPHandler4 - * throws a ProtocolException in handleMessage method - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doOutbound() - * ClientSOAPHandler6.handleMessage().doInbound() - * ClientSOAPHandler4.handleMessage().doInbound() ClientSOAPHandler4 Throwing - * an inbound ProtocolException ClientSOAPHandler6.close() - * ClientSOAPHandler4.close() ClientSOAPHandler5.close() - */ - public void ClientSOAPInboundHandleMessageThrowsProtocolExceptionTest() - throws Fault { - TestUtil - .logTrace("ClientSOAPInboundHandleMessageThrowsProtocolExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientSOAPInboundHandleMessageThrowsProtocolExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting ProtocolException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected ProtocolException"); - pass = false; - } catch (ProtocolException e) { - TestUtil.logMsg("Did get expected ProtocolException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientSOAPHandler4.handleMessage throwing an inbound ProtocolException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected ProtocolException text"); - else { - TestUtil.logErr("Did not get expected ProtocolException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", SOAP, false, - Constants.INBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientSOAPInboundHandleMessageThrowsProtocolExceptionTest failed"); - } - - /* - * @testName: ClientSOAPOutboundHandleMessageThrowsProtocolExceptionTest - * - * @assertion_ids: JAXWS:SPEC:4021; - * - * @test_Strategy: Invoke an RPC method. Verify that the client-side - * handleMessage callbacks are called by the JAXWS RUNTIME. ClientSOAPHandler4 - * throws a ProtocolException in handleMessage method - * ------------------------------------------------------- This is the - * expected order ------------------------------------------------------- - * ClientSOAPHandler5.handleMessage().doOutbound() - * ClientSOAPHandler4.handleMessage().doOutbound() ClientSOAPHandler4 Throwing - * an outbound ProtocolException ClientSOAPHandler4.close() - * ClientSOAPHandler5.close() - */ - public void ClientSOAPOutboundHandleMessageThrowsProtocolExceptionTest() - throws Fault { - TestUtil - .logTrace("ClientSOAPOutboundHandleMessageThrowsProtocolExceptionTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - - if (info.getPortName().equals(PORT_QNAME3)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME3); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler4 and add to HandlerChain"); - Handler h4 = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler4(); - handlerList.add(h4); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers for Port3"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding3.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding3.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - MyActionType ma = new MyActionType(); - ma.setAction( - "ClientSOAPOutboundHandleMessageThrowsProtocolExceptionTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - TestUtil.logMsg("Expecting ProtocolException"); - port3.doHandlerTest3(ma); - TestUtil.logErr("Did not get expected ProtocolException"); - pass = false; - } catch (ProtocolException e) { - TestUtil.logMsg("Did get expected ProtocolException"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream ps = new PrintStream(baos, true); - e.printStackTrace(ps); - String tmp = "ClientSOAPHandler4.handleMessage throwing an outbound ProtocolException"; - if (baos.toString().indexOf(tmp) > -1) - TestUtil.logMsg("Did get expected ProtocolException text"); - else { - TestUtil.logErr("Did not get expected ProtocolException text"); - TestUtil.logErr("expected:" + tmp); - TestUtil.printStackTrace(e); - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Got unexpected exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - List clientSideMsgs = HandlerTracker.getListMessages1(); - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerExceptionCallBacks("Client", SOAP, false, - Constants.OUTBOUND, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientSOAPOutboundHandleMessageThrowsProtocolExceptionTest failed"); - } - - private void purgeServerSideTrackerData() { - try { - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("purge"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - port4.getTrackerData(gtda); - } catch (Exception e) { - TestUtil.logErr("Call to purge server-side tracker data failed" + e); - } - - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPHandler/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPHandler/build.xml deleted file mode 100644 index 4566acd99a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPHandler/build.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPHandler/handler_process_flow.pdf b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPHandler/handler_process_flow.pdf deleted file mode 100644 index 781c2693ca..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPHandler/handler_process_flow.pdf and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPHandler/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPHandler/jakartaEE.tokens deleted file mode 100644 index db25a0b0a6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPHandler/jakartaEE.tokens +++ /dev/null @@ -1,11 +0,0 @@ -WSRAnn=@jakarta.xml.ws.WebServiceRef(name="service/wsdlhandlerservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.DLHandlerService -URLALIAS=/jaxws/Hello -URLALIAS3=/jaxws/Hello3 -URLALIAS4=/jaxws/GetTrackerData -WEBSERVICEDESCRIPTION=DLHandlerService -SERVICEREFNAMEWSSERVLET=service/wsdlhandlerservice -SERVICEREFNAMEWSEJB=service/wsdlhandlerservice -SERVICEREFNAMEWSAPPCLIENT=service/wsdlhandlerservice - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPMessageContext/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPMessageContext/Client.java deleted file mode 100644 index f1f317a753..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPMessageContext/Client.java +++ /dev/null @@ -1,982 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)Client.java 1.42 05/08/29 - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_handler_soap.SOAPMessageContext; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.handler.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.activation.DataHandler; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String HARNESSHOST = "harness.host"; - - private String harnessHost = null; - - private static final String HARNESSLOGPORT = "harness.log.port"; - - private String harnessLogPort = null; - - private static final String TRACEFLAG = "harness.log.traceflag"; - - private String harnessLogTraceFlag = "false"; // false or true - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String WSDLLOC_URL = "dlhandlerservice.wsdlloc.1"; - - private static final String ENDPOINT1_URL = "dlhandlerservice.endpoint.1"; - - private static final String ENDPOINT4_URL = "dlhandlerservice.endpoint.4"; - - private static final String CTXROOT = "dlhandlerservice.ctxroot.1"; - - private String url1 = null; - - private String url4 = null; - - private URL wsdlurl = null; - - private String ctxroot = null; - - // service and port information - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private static final String SERVICE_NAME = "DLHandlerService"; - - private static final String PORT_NAME1 = "HelloPort"; - - private static final String PORT_NAME4 = "GetTrackerDataPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.DLHandlerService.class; - - private static final String THEBINDINGPROTOCOL = jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING; - - private static final String SOAP = "SOAP"; - - private static final String TEST_TYPE = SOAP + "Test"; - - private Handler handler = null; - - Hello port1 = null; - - GetTrackerData port4 = null; - - static DLHandlerService service = null; - - BindingProvider bp1 = null; - - BindingProvider bp4 = null; - - Binding binding1 = null; - - Binding binding4 = null; - - List listOfBindings = new ArrayList(); - - List port1HandlerChain = null; - - List port4HandlerChain = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT1_URL); - url1 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT4_URL); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - ctxroot = JAXWS_Util.getURLFromProp(CTXROOT); - TestUtil.logMsg("Service Endpoint1 URL: " + url1); - TestUtil.logMsg("Service Endpoint4 URL: " + url4); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - TestUtil.logMsg("Context Root: " + ctxroot); - - } - - private boolean setupPorts() { - boolean result = true; - TestUtil.logTrace("entering setupPorts"); - try { - if (modeProperty.equals("standalone")) { - getPortsStandalone(); - } else { - getPortsJavaEE(); - } - } catch (Exception e) { - TestUtil.logErr("Could not setup stubs properly"); - TestUtil.printStackTrace(e); - result = false; - } - TestUtil.logTrace("leaving setupPorts"); - return result; - - } - - private void getPortsStandalone() throws Exception { - getPorts(); - JAXWS_Util.setTargetEndpointAddress(port1, url1); - JAXWS_Util.setTargetEndpointAddress(port4, url4); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - getTargetEndpointAddress(port1, port4); - } - - private void getTargetEndpointAddress(Object port1, Object port4) - throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port1=" + port1); - String url1 = JAXWS_Util.getTargetEndpointAddress(port1); - TestUtil.logMsg("Target Endpoint Address=" + url1); - TestUtil.logMsg("Get Target Endpoint Address for port4=" + port4); - String url4 = JAXWS_Util.getTargetEndpointAddress(port4); - TestUtil.logMsg("Target Endpoint Address=" + url4); - } - - private void getPorts() throws Exception { - TestUtil.logTrace("entering getPorts"); - - TestUtil.logMsg("Get port 1 = " + PORT_NAME1); - port1 = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port1=" + port1); - - TestUtil.logMsg("Get port 4 = " + PORT_NAME4); - port4 = (GetTrackerData) service.getPort(GetTrackerData.class); - TestUtil.logMsg("port4=" + port4); - - TestUtil.logMsg("Get binding for port 1 = " + PORT_NAME1); - bp1 = (BindingProvider) port1; - binding1 = bp1.getBinding(); - port1HandlerChain = binding1.getHandlerChain(); - TestUtil.logMsg("Port1 HandlerChain =" + port1HandlerChain); - TestUtil.logMsg("Port1 HandlerChain size = " + port1HandlerChain.size()); - - TestUtil.logMsg("------------------------------------------------------"); - - TestUtil.logMsg("Get binding for port 4 = " + PORT_NAME4); - bp4 = (BindingProvider) port4; - binding4 = bp4.getBinding(); - port4HandlerChain = binding4.getHandlerChain(); - TestUtil.logMsg("Port4 HandlerChain=" + port4HandlerChain); - TestUtil.logMsg("Port4 HandlerChain size = " + port4HandlerChain.size()); - - listOfBindings.add(binding1); - listOfBindings.add(binding4); - - TestUtil.logTrace("leaving getPorts"); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * harness.log.traceflag; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (DLHandlerService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (DLHandlerService) getSharedObject(); - } - - try { - harnessHost = p.getProperty(HARNESSHOST); - } catch (Exception e) { - harnessHost = null; - } - try { - harnessLogPort = p.getProperty(HARNESSLOGPORT); - } catch (Exception e) { - harnessLogPort = null; - } - try { - harnessLogTraceFlag = p.getProperty(TRACEFLAG); - } catch (Exception e) { - harnessLogTraceFlag = "false"; - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: ClientMessageContextTest - * - * @assertion_ids: JAXWS:JAVADOC:100; JAXWS:JAVADOC:101; JAXWS:JAVADOC:102; - * JAXWS:JAVADOC:103; JAXWS:SPEC:9022; JAXWS:SPEC:9023; JAXWS:SPEC:9024; - * JAXWS:SPEC:9025; JAXWS:SPEC:9026; JAXWS:SPEC:9041; WS4EE:SPEC:6012; - * WS4EE:SPEC:6013; WS4EE:SPEC:6014; WS4EE:SPEC:6008; WS4EE:SPEC:6002; - * WS4EE:SPEC:6039; WS4EE:SPEC:6047; - * - * @test_Strategy: Invoke an RPC method and ensure that the client-side soap - * message handler callbacks are called. - * - */ - public void ClientMessageContextTest() throws Fault { - TestUtil.logTrace("ClientMessageContextTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler5, ClientLogicalHandler5"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler5(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler5 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler5(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientSOAPHandler1, ClientLogicalHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler1(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler2(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler3(); - handlerList.add(handler); - } - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - }); - - if (!setupPorts()) { - pass = false; - } else { - try { - TestUtil.logMsg("Getting existing Handlers for Port1"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding1.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding1.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "ERROR: Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (pass) { - - TestUtil.logTrace("Getting RequestContext to set a property"); - java.util.Map rc = bp1.getRequestContext(); - if (rc != null) { - rc.put("ClientToClientProp", "client"); - } else { - TestUtil.logErr( - "The request context returned from BindingProvider.getRequestContext() was null"); - pass = false; - } - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ClientMessageContextTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - MyHeaderType mht = new MyHeaderType(); - mht.setHeader("this is the header"); - Holder hmht = new Holder(mht); - - try { - port1.doHandlerHeaderTest1(ma, hmht); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - boolean clientSOAPMessageScopeAppProp = false; - boolean clientSOAPMessageScopeHandlerProp = false; - boolean clientToClientProp = false; - - TestUtil.logTrace("Getting ResponseContext"); - rc = bp1.getResponseContext(); - if (rc == null) { - TestUtil.logErr( - "The response context returned from BindingProvider.getResponseContext() was null"); - pass = false; - } else { - Iterator i = rc.keySet().iterator(); - while (i.hasNext()) { - Object o = i.next(); - TestUtil.logTrace("Object Property=" + o); - if (o instanceof String) { - String key = (String) o; - if (key.equals( - "INBOUNDClientSOAPMessageScopeAppPropSetByHandler3")) { - clientSOAPMessageScopeAppProp = true; - TestUtil.logTrace( - "Found INBOUNDClientSOAPMessageScopeAppPropSetByHandler3"); - } - if (key.equals( - "INBOUNDClientSOAPMessageScopeHandlerPropSetByHandler3")) { - clientSOAPMessageScopeHandlerProp = true; - TestUtil.logTrace( - "Found INBOUNDClientSOAPMessageScopeHandlerPropSetByHandler3"); - } - if (key.equals("ClientToClientProp")) { - clientToClientProp = true; - TestUtil.logTrace("Found ClientToClientProp"); - Object o1 = rc.get("ClientToClientProp"); - if (o1 instanceof String) { - String value = (String) o1; - String expected = "clientOUTBOUNDClientSOAPHandler2INBOUNDClientSOAPHandler2"; - if (!value.equals(expected)) { - TestUtil - .logErr("The value of ClientToClientProp was wrong"); - TestUtil.logErr("Expected = " + expected); - TestUtil.logErr("Actual = " + value); - pass = false; - } - } else { - TestUtil.logErr( - "The value of ClientToClientProp was not a String"); - pass = false; - - } - } - - } - - } - if (!clientSOAPMessageScopeAppProp) { - TestUtil.logErr( - "The property INBOUNDClientSOAPMessageScopeAppPropSetByHandler3 was not accessible by the client"); - pass = false; - } - if (!clientToClientProp) { - TestUtil.logErr( - "The property ClientToClientProp was not accessible by the client"); - pass = false; - } - if (clientSOAPMessageScopeHandlerProp) { - TestUtil.logErr( - "The property INBOUNDClientSOAPMessageScopeHandlerPropSetByHandler3 was accessible by the client"); - pass = false; - } - } - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMCMsgs = HandlerTracker.getListMessages2(); - List clientSideSMCMsgs = HandlerTracker.getListMessages3(); - - // verify client-side callbacks - TestUtil.logMsg("Verifying MessageContext callbacks on Client-Side"); - if (!Handler_Util.VerifyMessageContextCallBacks("Client", SOAP, - clientSideMCMsgs)) { - TestUtil - .logErr("Client-Side MessageContext Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side MessageContext Callbacks are (correct)"); - } - - TestUtil - .logMsg("Verifying LogicalMessageContext callbacks on Client-Side"); - if (!Handler_Util.VerifyLogicalOrSOAPMessageContextCallBacks("Client", - SOAP, clientSideSMCMsgs)) { - TestUtil.logErr( - "Client-Side LogicalMessageContext Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg( - "Client-Side LogicalMessageContext Callbacks are (correct)"); - } - - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientMessageContextTest failed"); - } - - /* - * @testName: ServerMessageContextTest - * - * @assertion_ids: JAXWS:JAVADOC:100; JAXWS:JAVADOC:101; JAXWS:JAVADOC:102; - * JAXWS:JAVADOC:103; JAXWS:SPEC:9022; JAXWS:SPEC:9023; JAXWS:SPEC:9024; - * JAXWS:SPEC:9025; JAXWS:SPEC:9026; JAXWS:SPEC:9041; WS4EE:SPEC:6012; - * WS4EE:SPEC:6013; WS4EE:SPEC:6014; WS4EE:SPEC:6002; WS4EE:SPEC:6039; - * WS4EE:SPEC:6047; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerMessageContextTest() throws Fault { - TestUtil.logTrace("ServerMessageContextTest"); - boolean pass = true; - try { - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ServerMessageContextTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - MyResultType mr = null; - try { - mr = port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (mr != null) { - String result = mr.getErrors(); - if (result != null && !result.equals("")) { - pass = false; - TestUtil - .logErr("The serverside tests for MessageContext.Scope failed:" - + result); - } - } - - List serverSideMCMsgs = null; - List serverSideSMCMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages2"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMCMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - gtda.setAction("getArrayMessages3"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideSMCMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying MessageContext callbacks on Server-Side"); - if (!Handler_Util.VerifyMessageContextCallBacks("Server", SOAP, - serverSideMCMsgs)) { - TestUtil - .logErr("Server-Side MessageContext Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side MessageContext Callbacks are (correct)"); - } - TestUtil - .logMsg("Verifying SOAPMessageContext callbacks on Server-Side"); - if (!Handler_Util.VerifyLogicalOrSOAPMessageContextCallBacks("Server", - SOAP, serverSideSMCMsgs)) { - TestUtil.logErr( - "Server-Side SOAPMessageContext Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil - .logMsg("Server-Side SOAPMessageContext Callbacks are (correct)"); - } - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ServerMessageContextTest failed"); - } - - /* - * @testName: ContextPropertiesTest - * - * @assertion_ids: JAXWS:SPEC:9026; JAXWS:SPEC:9027; JAXWS:SPEC:9033; - * JAXWS:SPEC:9034; JAXWS:SPEC:9035; JAXWS:SPEC:9036; JAXWS:SPEC:9037; - * JAXWS:SPEC:9038; JAXWS:SPEC:9039; JAXWS:SPEC:9040; WS4EE:SPEC:6012; - * WS4EE:SPEC:6013; WS4EE:SPEC:6014; WS4EE:SPEC:6008; WS4EE:SPEC:6002; - * WS4EE:SPEC:6047; - * - * @test_Strategy: Invoke an RPC method and ensure that the various - * MessageContext and SOAPMessageContext properties are accessible - */ - public void ContextPropertiesTest() throws Fault { - TestUtil.logTrace("ContextPropertiesTest"); - boolean pass = true; - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.ClientLogicalHandler2(); - handlerList.add(handler); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else { - - try { - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - - ma.setAction("ContextPropertiesTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - - URL url1; - url1 = ctsurl.getURL("http", hostname, portnum, - ctxroot + "/attach.text"); - TestUtil.logMsg("url1=" + url1); - DataHandler dh1 = new DataHandler(url1); - Holder attach1 = new Holder(); - attach1.value = dh1; - MyResult2 mr = null; - try { - mr = port1.doHandlerAttachmentTest(ma, attach1); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (mr != null) { - String errors = mr.getErrors(); - if (errors != null && !errors.equals("")) { - TestUtil.logErr( - "ERROR: The following errors were reported by the endpoint:" - + errors); - pass = false; - } - } - - List lResults = null; - if (mr != null) { - lResults = mr.getResult(); - JAXWS_Util.dumpList(mr.getResult()); - } - - if (lResults != null) { - - if (JAXWS_Util.looseIndexOf(lResults, - "Endpoint:MessageContext.INBOUND_MESSAGE_ATTACHMENTS=key[0]") == -1) { - TestUtil.logErr( - "The property MessageContext.INBOUND_MESSAGE_ATTACHMENTS did not contain an attachment in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "Found Endpoint:MessageContext.INBOUND_MESSAGE_ATTACHMENTS=key[0]"); - } - if (JAXWS_Util.looseIndexOf(lResults, - "Endpoint:MessageContext.INBOUND_MESSAGE_ATTACHMENTS=key[1]") >= 0) { - TestUtil.logErr( - "The property MessageContext.INBOUND_MESSAGE_ATTACHMENTS contained more than one attachment in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "Found Endpoint:MessageContext.INBOUND_MESSAGE_ATTACHMENTS=key[1]"); - } - if (lResults.indexOf( - "Endpoint:MessageContext.HTTP_REQUEST_METHOD=POST") == -1) { - TestUtil.logErr( - "The property MessageContext.HTTP_REQUEST_METHOD was not POST in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "Found Endpoint:MessageContext.HTTP_REQUEST_METHOD=POST"); - } - if (JAXWS_Util.looseIndexOf(lResults, - "Endpoint:MessageContext.HTTP_REQUEST_HEADERS=value[0]=") == -1) { - TestUtil.logErr( - "The property MessageContext.HTTP_REQUEST_HEADERS did not contain any headers in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "The property MessageContext.HTTP_REQUEST_HEADERS did contain headers in the endpoint"); - } - if (lResults.indexOf( - "Endpoint:MessageContext.HTTP_RESPONSE_HEADERS=null") == -1) { - TestUtil.logErr( - "The property MessageContext.HTTP_RESPONSE_HEADERS was not null in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "The property MessageContext.HTTP_RESPONSE_HEADERS was null in the endpoint"); - } - if (lResults - .indexOf("Endpoint:MessageContext.SERVLET_REQUEST=null") >= 0) { - TestUtil.logErr( - "The property MessageContext.SERVLET_REQUEST was null in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "The property MessageContext.SERVLET_REQUEST was not null in the endpoint"); - } - if (lResults - .indexOf("Endpoint:MessageContext.SERVLET_RESPONSE=null") >= 0) { - TestUtil.logErr( - "The property MessageContext.SERVLET_RESPONSE was null in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "The property MessageContext.SERVLET_RESPONSE was not null in the endpoint"); - } - if (lResults - .indexOf("Endpoint:MessageContext.SERVLET_CONTEXT=null") >= 0) { - TestUtil.logErr( - "The property MessageContext.SERVLET_CONTEXT was null in the endpoint"); - pass = false; - } else { - TestUtil.logTrace( - "The property MessageContext.SERVLET_CONTEXT was not null in the endpoint"); - } - } - - if (mr != null) { - String endpointErrors = mr.getErrors(); - if (endpointErrors != null && !endpointErrors.equals("")) { - TestUtil.logErr("Erors:" + endpointErrors); - pass = false; - } - } - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMCMsgs = HandlerTracker.getListMessages2(); - - List serverSideMCMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages2"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMCMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - // verify client-side callbacks - TestUtil.logMsg( - "Verifying MessageContext and SOAPMessageContext propterty callbacks on Client-Side"); - if (!Handler_Util.VerifyStandardMessageContextPropertiesCallBacks( - "Client", SOAP, clientSideMCMsgs)) { - TestUtil - .logErr("Client-Side MessageContext Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side MessageContext Callbacks are (correct)"); - } - - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - - Handler_Util.clearHandlers(listOfBindings); - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - TestUtil.logMsg( - "Verifying MessageContext and SOAPMessageContext propterty callbacks on Server-Side"); - if (!Handler_Util.VerifyStandardMessageContextPropertiesCallBacks( - "Server", SOAP, serverSideMCMsgs)) { - TestUtil - .logErr("Server-Side MessageContext Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side MessageContext Callbacks are (correct)"); - } - - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port4.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault("ContextPropertiesTest failed"); - } - - private void purgeServerSideTrackerData() { - try { - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("purge"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - port4.getTrackerData(gtda); - } catch (Exception e) { - TestUtil.logErr("Call to purge server-side tracker data failed" + e); - } - - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPMessageContext/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPMessageContext/build.xml deleted file mode 100644 index 68d215ac39..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPMessageContext/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPMessageContext/handler_process_flow.pdf b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPMessageContext/handler_process_flow.pdf deleted file mode 100644 index 781c2693ca..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPMessageContext/handler_process_flow.pdf and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPMessageContext/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPMessageContext/jakartaEE.tokens deleted file mode 100644 index db25a0b0a6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/SOAPMessageContext/jakartaEE.tokens +++ /dev/null @@ -1,11 +0,0 @@ -WSRAnn=@jakarta.xml.ws.WebServiceRef(name="service/wsdlhandlerservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient.DLHandlerService -URLALIAS=/jaxws/Hello -URLALIAS3=/jaxws/Hello3 -URLALIAS4=/jaxws/GetTrackerData -WEBSERVICEDESCRIPTION=DLHandlerService -SERVICEREFNAMEWSSERVLET=service/wsdlhandlerservice -SERVICEREFNAMEWSEJB=service/wsdlhandlerservice -SERVICEREFNAMEWSAPPCLIENT=service/wsdlhandlerservice - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/build.xml deleted file mode 100644 index 607a50741e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_handler_soap/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPBinding/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPBinding/Client.java deleted file mode 100644 index 45fa4dbba2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPBinding/Client.java +++ /dev/null @@ -1,450 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_http.HTTPBinding; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.sharedclients.xmlbinddlhelloproviderclient.*; - -import javax.xml.namespace.QName; -import java.util.*; -import jakarta.xml.bind.JAXBContext; -import jakarta.xml.ws.*; -import jakarta.xml.ws.http.*; -import javax.xml.transform.Source; -import jakarta.xml.ws.handler.*; - -public class Client extends ServiceEETest { - // need to create jaxbContext - private static final ObjectFactory of = new ObjectFactory(); - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.api.jakarta_xml_ws.LogicalMessage."; - - private static final String SHARED_CLIENT_PKG = "com.sun.ts.tests.jaxws.sharedclients.xmlbinddlhelloproviderclient."; - - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.xmlbinddlhelloproviderclient.HelloService.class; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "xmlbinddlhelloproviderservice.endpoint.1"; - - private String url = null; - - private String bindingID = null; - - private Dispatch dispatchSrc = null; - - private Dispatch dispatchJaxb = null; - - static jakarta.xml.ws.Service service = null; - - private Binding binding = null; - - private BindingProvider bpDispatch = null; - - private static final Class JAXB_OBJECT_FACTORY = ObjectFactory.class; - - private String helloReq = "foo"; - - private JAXBContext createJAXBContext() { - try { - return JAXBContext.newInstance(JAXB_OBJECT_FACTORY); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - private Dispatch createDispatchJAXB() throws Exception { - jakarta.xml.ws.Service service = jakarta.xml.ws.Service.create(SERVICE_QNAME); - service.addPort(PORT_QNAME, bindingID, url); - return service.createDispatch(PORT_QNAME, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - private Dispatch createDispatchSource() throws Exception { - jakarta.xml.ws.Service service = jakarta.xml.ws.Service.create(SERVICE_QNAME); - service.addPort(PORT_QNAME, bindingID, url); - return service.createDispatch(PORT_QNAME, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - getTestURLs(); - service = jakarta.xml.ws.Service.create(SERVICE_QNAME); - - bindingID = HTTPBinding.HTTP_BINDING; - dispatchSrc = createDispatchSource(); - bpDispatch = (BindingProvider) dispatchSrc; - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: getHTTPBindingTest - * - * @assertion_ids: JAXWS:SPEC:11000; WS4EE:SPEC:5005; JAXWS:SPEC:7012; - * JAXWS:SPEC:3039; - * - * @test_Strategy: - */ - public void getHTTPBindingTest() throws Fault { - TestUtil.logTrace("getHTTPBindingTest"); - boolean pass = true; - TestUtil.logMsg("Get Binding interface for Dispatch object"); - binding = bpDispatch.getBinding(); - if (binding == null) { - TestUtil.logErr("getBinding() returned null"); - pass = false; - } else { - if (binding instanceof HTTPBinding) { - TestUtil.logMsg("binding is a HTTPBinding instance"); - } else { - TestUtil.logErr("binding is not a HTTPBinding instance"); - pass = false; - } - } - if (!pass) - throw new Fault("getHTTPBindingTest failed"); - } - - /* - * @testName: HTTPBindingConstantsTest - * - * @assertion_ids: JAXWS:SPEC:11000; WS4EE:SPEC:5005; - * - * @test_Strategy: - */ - public void HTTPBindingConstantsTest() throws Fault { - TestUtil.logTrace("HTTPBindingConstantsTest"); - boolean pass = true; - - TestUtil.logMsg("Verify that HTTP_BINDING constant value is correct"); - if (!HTTPBinding.HTTP_BINDING.equals(Constants.EXPECTED_HTTP_BINDING)) { - TestUtil.logErr("HTTP_BINDING is incorrect"); - TestUtil.logErr("Got: [" + HTTPBinding.HTTP_BINDING + "]"); - TestUtil.logErr("Expected: [" + Constants.EXPECTED_HTTP_BINDING + "]"); - pass = false; - } - if (!pass) - throw new Fault("HTTPBindingConstantsTest failed"); - } - - /* - * @testName: invokeTestJAXB - * - * @assertion_ids: JAXWS:SPEC:11000; WS4EE:SPEC:5005; JAXWS:SPEC:7012; - * - * @test_Strategy: - */ - public void invokeTestJAXB() throws Fault { - TestUtil.logTrace("invokeTestJAXB"); - boolean pass = true; - HelloRequest helloReq = null; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument("foo"); - } catch (Exception e) { - e.printStackTrace(); - } - HelloResponse helloRes = null; - try { - dispatchJaxb = createDispatchJAXB(); - binding = ((BindingProvider) dispatchJaxb).getBinding(); - if (binding instanceof HTTPBinding) { - TestUtil.logMsg("binding is a HTTPBinding instance"); - } else { - TestUtil.logErr("binding is not a HTTPBinding instance"); - pass = false; - } - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - TestUtil.logMsg("Calling invoke ...."); - helloRes = (HelloResponse) dispatchJaxb.invoke(helloReq); - TestUtil.logMsg("After invoke ...."); - TestUtil.logMsg("HelloRequest=" + helloReq.getArgument()); - TestUtil.logMsg("HelloResponse=" + helloRes.getArgument()); - if (!helloRes.getArgument().equals(helloReq.getArgument())) - pass = false; - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTestJAXB failed"); - } - - /* - * @testName: invokeTestXML - * - * @assertion_ids: JAXWS:SPEC:4014; JAXWS:JAVADOC:8; WS4EE:SPEC:5005; - * JAXWS:SPEC:7012; - * - * @test_Strategy: - */ - public void invokeTestXML() throws Fault { - TestUtil.logTrace("invokeTestXML"); - boolean pass = true; - Source reqMsg = JAXWS_Util.makeSource(helloReq, "StreamSource"); - String resStr; - try { - TestUtil.logMsg("Calling invoke ...."); - Source resMsg = dispatchSrc.invoke(reqMsg); - TestUtil.logMsg("After invoke ...."); - try { - resStr = JAXWS_Util - .getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(resMsg)); - TestUtil.logMsg("resStr=" + resStr); - } catch (Exception e) { - e.printStackTrace(); - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - if (!pass) - throw new Fault("invokeTestXML failed"); - } - - /* - * @testName: invokeTestJAXBBad - * - * @assertion_ids: JAXWS:SPEC:11000; WS4EE:SPEC:5005; JAXWS:SPEC:6004; - * JAXWS:SPEC:4012; JAXWS:SPEC:4019; - * - * @test_Strategy: - */ - public void invokeTestJAXBBad() throws Fault { - TestUtil.logTrace("invokeTestJAXBBad"); - boolean pass = true; - String helloReq = "Hello Request"; - HelloResponse helloRes = null; - try { - dispatchJaxb = createDispatchJAXB(); - binding = ((BindingProvider) dispatchJaxb).getBinding(); - if (binding instanceof HTTPBinding) { - TestUtil.logMsg("binding is a HTTPBinding instance"); - } else { - TestUtil.logErr("binding is not a HTTPBinding instance"); - pass = false; - } - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - TestUtil.logMsg("Calling invoke ...."); - dispatchJaxb.invoke(helloReq); - TestUtil.logErr("No WebServiceException from bad invoke"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected runtime exception WebServiceException" + e); - } catch (Exception e) { - TestUtil.logErr("Unexpected exception occurred: " + e); - pass = false; - } - if (!pass) - throw new Fault("invokeTestJAXBBad failed"); - } - - /* - * @testName: invokeTestJAXBNull - * - * @assertion_ids: JAXWS:SPEC:11000; WS4EE:SPEC:5005; JAXWS:SPEC:2036; - * JAXWS:SPEC:4013; JAXWS:SPEC:4015; - * - * @test_Strategy: - */ - public void invokeTestJAXBNull() throws Fault { - TestUtil.logTrace("invokeTestJAXBNull"); - boolean pass = true; - HelloRequest helloReq = null; - HelloResponse helloRes = null; - try { - dispatchJaxb = createDispatchJAXB(); - binding = ((BindingProvider) dispatchJaxb).getBinding(); - if (binding instanceof HTTPBinding) { - TestUtil.logMsg("binding is a HTTPBinding instance"); - } else { - TestUtil.logErr("binding is not a HTTPBinding instance"); - pass = false; - } - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - TestUtil.logMsg("Calling invoke ...."); - dispatchJaxb.invoke(helloReq); - TestUtil.logErr("No WebServiceException from bad invoke"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected WebServiceException" + e); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Received unexpected exception", e); - } - if (!pass) - throw new Fault("invokeTestJAXBNull failed"); - } - - /* - * @testName: incompatibleHandlerTest - * - * @assertion_ids: JAXWS:SPEC:10006; - * - * @test_Strategy: - */ - public void incompatibleHandlerTest() throws Fault { - TestUtil.logTrace("incompatibleHandlerTest"); - boolean pass = true; - TestUtil.logMsg("Getting the Binding"); - binding = bpDispatch.getBinding(); - if (binding == null) { - TestUtil.logErr("getBinding() returned null"); - pass = false; - } else { - if (binding instanceof HTTPBinding) { - TestUtil.logMsg("binding is a HTTPBinding instance"); - try { - List handlerList = new ArrayList(); - Handler handler = new com.sun.ts.tests.jaxws.sharedclients.xmlbinddlhelloproviderclient.SOAPHandler(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding.setHandlerChain(handlerList); - TestUtil.logErr( - "Adding an incompatible handler did not throw a WebServiceException"); - pass = false; - } catch (WebServiceException wse) { - // test passed - TestUtil.logTrace("WebServiceException was thrown"); - } - } else { - TestUtil.logErr("binding is not a HTTPBinding instance"); - pass = false; - } - } - if (!pass) - throw new Fault("incompatibleHandlerTest failed"); - } - - /* - * @testName: getEndpointReferenceTest - * - * @assertion_ids: JAXWS:SPEC:5023.4; JAXWS:SPEC:4024; JAXWS:SPEC:5024.4; - * - * @test_Strategy: - */ - public void getEndpointReferenceTest() throws Fault { - TestUtil.logTrace("getEndpointReferenceTest"); - boolean pass = false; - try { - TestUtil - .logMsg("Attempt to get EndpointReference for HTTP Binding object"); - EndpointReference epr = dispatchSrc.getEndpointReference(); - TestUtil.logErr("Did not catch expected UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - TestUtil.logMsg("Caught expected UnsupportedOperationException"); - pass = true; - } catch (Exception e) { - TestUtil.logErr("Received unexpected exception", e); - } - if (!pass) - throw new Fault("getEndpointReferenceTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPBinding/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPBinding/build.xml deleted file mode 100644 index ddbf27a062..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPBinding/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPBinding/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPBinding/jakartaEE.tokens deleted file mode 100644 index e97e4c7304..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPBinding/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsxmlbinddlhelloproviderservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.xmlbinddlhelloproviderclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsxmlbinddlhelloproviderservice -SERVICEREFNAMEWSEJB=service/wsxmlbinddlhelloproviderservice -SERVICEREFNAMEWSAPPCLIENT=service/wsxmlbinddlhelloproviderservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPException/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPException/Client.java deleted file mode 100644 index 17186a4699..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPException/Client.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_http.HTTPException; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; - -import jakarta.xml.ws.http.*; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - private final static int MY_HTTP_STATUS_CODE = 100; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: HTTPExceptionConstructorTest - * - * @assertion_ids: JAXWS:JAVADOC:105; - * - * @test_Strategy: Create instance via HTTPException(int statusCode) - * constructor. Verify HTTPException object created successfully. - */ - public void HTTPExceptionConstructorTest() throws Fault { - TestUtil.logTrace("HTTPExceptionConstructorTest"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via HTTPException() ..."); - HTTPException e = new HTTPException(MY_HTTP_STATUS_CODE); - if (e != null) { - TestUtil.logMsg("HTTPException object created successfully"); - } else { - TestUtil.logErr("HTTPException object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("HTTPExceptionConstructorTest failed", e); - } - - if (!pass) - throw new Fault("HTTPExceptionConstructorTest failed"); - } - - /* - * @testName: getStatusCodeTest - * - * @assertion_ids: JAXWS:JAVADOC:104; - * - * @test_Strategy: Create instance via HTTPException(int statusCode) - * constructor. Verify HTTPException.getStatusCode() returns expected code. - */ - public void getStatusCodeTest() throws Fault { - TestUtil.logTrace("getStatusCodeTest"); - boolean pass = true; - int code; - try { - TestUtil.logMsg("Create instance via HTTPException() ..."); - HTTPException e = new HTTPException(MY_HTTP_STATUS_CODE); - if (e != null) { - TestUtil.logMsg("HTTPException object created successfully"); - } else { - TestUtil.logErr("HTTPException object not created"); - pass = false; - } - code = e.getStatusCode(); - if (code == MY_HTTP_STATUS_CODE) - TestUtil.logMsg( - "getStatusCode returned expected code " + MY_HTTP_STATUS_CODE); - else { - TestUtil.logErr("getStatusCode returned unexpected code, expected " - + MY_HTTP_STATUS_CODE + ", received " + code); - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getStatusCodeTest failed", e); - } - - if (!pass) - throw new Fault("getStatusCodeTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPException/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPException/build.xml deleted file mode 100644 index 65a476ee17..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/HTTPException/build.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/build.xml deleted file mode 100644 index 9cc56c5547..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_http/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/AddressingFeature/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/AddressingFeature/Client.java deleted file mode 100644 index 1fcf5d419d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/AddressingFeature/Client.java +++ /dev/null @@ -1,530 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_soap.AddressingFeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; -import java.math.*; - -import jakarta.xml.ws.soap.AddressingFeature; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - private final static Byte myByte = Byte.valueOf(Byte.MAX_VALUE); - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: AddressingFeatureConstructorTest1 - * - * @assertion_ids: JAXWS:JAVADOC:163; - * - * @test_Strategy: Create instance via AddressingFeature() constructor. Verify - * AddressingFeature object created successfully. - */ - public void AddressingFeatureConstructorTest1() throws Fault { - TestUtil.logTrace("AddressingFeatureConstructorTest1"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via AddressingFeature() ..."); - AddressingFeature n = new AddressingFeature(); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logErr( - "AddressingFeature object created successfully, but Addressing is not enabled"); - pass = false; - } else { - TestUtil.logMsg("AddressingFeature object created successfully"); - } - } else { - TestUtil.logErr("AddressingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("AddressingFeatureConstructorTest1 failed", e); - } - - if (!pass) { - throw new Fault("AddressingFeatureConstructorTest1 failed"); - } - } - - /* - * @testName: AddressingFeatureConstructorTest2 - * - * @assertion_ids: JAXWS:JAVADOC:164; - * - * @test_Strategy: Create instance via AddressingFeature(true) constructor. - * Verify AddressingFeature object created successfully. - */ - public void AddressingFeatureConstructorTest2() throws Fault { - TestUtil.logTrace("AddressingFeatureConstructorTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via AddressingFeature(true) ..."); - AddressingFeature n = new AddressingFeature(true); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logErr( - "AddressingFeature object created successfully, but Addressing is not enabled"); - pass = false; - } else { - TestUtil.logMsg("AddressingFeature object created successfully"); - } - } else { - TestUtil.logErr("AddressingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("AddressingFeatureConstructorTest2 failed", e); - } - - if (!pass) { - throw new Fault("AddressingFeatureConstructorTest2 failed"); - } - } - - /* - * @testName: AddressingFeatureConstructorTest3 - * - * @assertion_ids: JAXWS:JAVADOC:164; - * - * @test_Strategy: Create instance via AddressingFeature(false) constructor. - * Verify AddressingFeature object created successfully. - */ - public void AddressingFeatureConstructorTest3() throws Fault { - TestUtil.logTrace("AddressingFeatureConstructorTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via AddressingFeature(false) ..."); - AddressingFeature n = new AddressingFeature(false); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logMsg( - "AddressingFeature object created successfully, Addressing is correctly not enabled"); - } else { - TestUtil.logErr( - "AddressingFeature object created successfully, but Addressing is incorrectly enabled."); - pass = false; - } - } else { - TestUtil.logErr("AddressingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("AddressingFeatureConstructorTest3 failed", e); - } - - if (!pass) { - throw new Fault("AddressingFeatureConstructorTest3 failed"); - } - } - - /* - * @testName: AddressingFeatureConstructorTest4 - * - * @assertion_ids: JAXWS:JAVADOC:165; - * - * @test_Strategy: Create instance via AddressingFeature(true, true) - * constructor. Verify AddressingFeature object created successfully. - */ - public void AddressingFeatureConstructorTest4() throws Fault { - TestUtil.logTrace("AddressingFeatureConstructorTest4"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via AddressingFeature(true, true) ..."); - AddressingFeature n = new AddressingFeature(true, true); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logErr( - "AddressingFeature object created successfully, but Addressing is not enabled"); - pass = false; - } else if (!(n.isRequired())) { - TestUtil.logErr( - "AddressingFeature object created successfully, but isRequired is not set correctly, expected [true], received [" - + n.isRequired() + "]"); - pass = false; - } else { - TestUtil.logMsg("AddressingFeature object created successfully"); - } - } else { - TestUtil.logErr("AddressingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("AddressingFeatureConstructorTest4 failed", e); - } - - if (!pass) { - throw new Fault("AddressingFeatureConstructorTest4 failed"); - } - } - - /* - * @testName: AddressingFeatureConstructorTest5 - * - * @assertion_ids: JAXWS:JAVADOC:165; - * - * @test_Strategy: Create instance via AddressingFeature(true, false) - * constructor. Verify AddressingFeature object created successfully. - */ - public void AddressingFeatureConstructorTest5() throws Fault { - TestUtil.logTrace("AddressingFeatureConstructorTest5"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via AddressingFeature(true, false) ..."); - AddressingFeature n = new AddressingFeature(true, false); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logErr( - "AddressingFeature object created successfully, but Addressing is not enabled"); - pass = false; - } else if (n.isRequired()) { - TestUtil.logErr( - "AddressingFeature object created successfully, but isRequired is not set correctly, expected [false], received [" - + n.isRequired() + "]"); - pass = false; - } else { - TestUtil.logMsg("AddressingFeature object created successfully"); - } - } else { - TestUtil.logErr("AddressingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("AddressingFeatureConstructorTest5 failed", e); - } - - if (!pass) { - throw new Fault("AddressingFeatureConstructorTest5 failed"); - } - } - - /* - * @testName: AddressingFeatureConstructorTest6 - * - * @assertion_ids: JAXWS:JAVADOC:165; - * - * @test_Strategy: Create instance via AddressingFeature(false, true) - * constructor. Verify AddressingFeature object created successfully. - */ - public void AddressingFeatureConstructorTest6() throws Fault { - TestUtil.logTrace("AddressingFeatureConstructorTest6"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via AddressingFeature(false, true) ..."); - AddressingFeature n = new AddressingFeature(false, true); - if (n != null) { - if (n.isEnabled()) { - TestUtil.logErr( - "AddressingFeature object created successfully, but Addressing is incorrectly enabled"); - pass = false; - } else if (!(n.isRequired())) { - TestUtil.logErr( - "AddressingFeature object created successfully, but isRequired is not set correctly, expected [true], received [" - + n.isRequired() + "]"); - pass = false; - } else { - TestUtil.logMsg("AddressingFeature object created successfully"); - } - } else { - TestUtil.logErr("AddressingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("AddressingFeatureConstructorTest6 failed", e); - } - - if (!pass) { - throw new Fault("AddressingFeatureConstructorTest6 failed"); - } - } - - /* - * @testName: AddressingFeatureConstructorTest7 - * - * @assertion_ids: JAXWS:JAVADOC:165; - * - * @test_Strategy: Create instance via AddressingFeature(false, false) - * constructor. Verify AddressingFeature object created successfully. - */ - public void AddressingFeatureConstructorTest7() throws Fault { - TestUtil.logTrace("AddressingFeatureConstructorTest7"); - boolean pass = true; - try { - TestUtil - .logMsg("Create instance via AddressingFeature(false, false) ..."); - AddressingFeature n = new AddressingFeature(false, false); - if (n != null) { - if (n.isEnabled()) { - TestUtil.logErr( - "AddressingFeature object created successfully, but Addressing is incorrectly enabled"); - pass = false; - } else if (n.isRequired()) { - TestUtil.logErr( - "AddressingFeature object created successfully, but isRequired is not set correctly, expected [false], received [" - + n.isRequired() + "]"); - pass = false; - } else { - TestUtil.logMsg("AddressingFeature object created successfully"); - } - } else { - TestUtil.logErr("AddressingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("AddressingFeatureConstructorTest7 failed", e); - } - - if (!pass) { - throw new Fault("AddressingFeatureConstructorTest7 failed"); - } - } - - /* - * @testName: AddressingFeatureConstructorTest8 - * - * @assertion_ids: JAXWS:JAVADOC:223; - * - * @test_Strategy: Create instance via AddressingFeature(boolean, boolean, - * AddressingFeature.Responses) constructor. Verify AddressingFeature object - * created successfully. - */ - public void AddressingFeatureConstructorTest8() throws Fault { - TestUtil.logTrace("AddressingFeatureConstructorTest8"); - boolean pass = true; - try { - TestUtil.logMsg( - "Create instance via AddressingFeature(boolean, boolean, AddressingFeature.Responses) ..."); - AddressingFeature n = new AddressingFeature(true, true, - AddressingFeature.Responses.ANONYMOUS); - - if (n != null) { - if (!n.isEnabled()) { - TestUtil.logErr( - "AddressingFeature object created successfully, but Addressing is incorrectly not-enabled"); - pass = false; - } else if (!n.isRequired()) { - TestUtil.logErr( - "AddressingFeature object created successfully, but isRequired is not set correctly, expected [true], received [" - + n.isRequired() + "]"); - pass = false; - } else { - TestUtil.logMsg("AddressingFeature object created successfully"); - } - } else { - TestUtil.logErr("AddressingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("AddressingFeatureConstructorTest8 failed", e); - } - - if (!pass) { - throw new Fault("AddressingFeatureConstructorTest8 failed"); - } - } - - /* - * @testName: getIDTest - * - * @assertion_ids: JAXWS:JAVADOC:166; JAXWS:JAVADOC:160; - * - * @test_Strategy: Test getting the unique identifier for this - * AddressingFeature object. Verify value returned is set correctly. - */ - public void getIDTest() throws Fault { - TestUtil.logTrace("getIDTest"); - boolean pass = true; - - try { - TestUtil.logMsg("Create instance via AddressingFeature(true) ..."); - AddressingFeature n = new AddressingFeature(true); - if (n != null) { - if (!(AddressingFeature.ID.equals(n.getID()))) { - TestUtil.logErr( - "AddressingFeature object created with incorrect ID, expected [" - + AddressingFeature.ID + "], received [" + n.getID() + "]"); - pass = false; - } else { - TestUtil.logMsg( - "AddressingFeature object created successfully with correct ID, expected [" - + AddressingFeature.ID + "], received [" + n.getID() + "]"); - } - } else { - TestUtil.logErr("AddressingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getIDTest failed", e); - } - - if (!pass) { - throw new Fault("getIDTest failed"); - } - } - - /* - * @testName: isRequiredTest - * - * @assertion_ids: JAXWS:JAVADOC:166; JAXWS:JAVADOC:167; - * - * @test_Strategy: Test setting isRequired of AddressingFeature object. Get - * value and verify value returned is set correctly. - */ - public void isRequiredTest() throws Fault { - TestUtil.logTrace("isRequiredTest"); - boolean pass = true; - - try { - TestUtil.logMsg("Create instance via AddressingFeature(true, true) ..."); - AddressingFeature n = new AddressingFeature(true, true); - if (n != null) { - boolean isRequired = n.isRequired(); - if (isRequired == true) { - // got returned correct value, now try setting it to new value - n = new AddressingFeature(true, false); - TestUtil.logMsg( - "AddressingFeature object created with correct isRequired, received [" - + n.isRequired() + "] now try setting it to new value [" - + Boolean.valueOf(false) + "]"); - isRequired = n.isRequired(); - if (isRequired == false) { - // get returned correct value - TestUtil.logMsg( - "AddressingFeature object set and retrieved correct isRequired, expected [" - + Boolean.valueOf(false) + "], received [" + n.isRequired() - + "]"); - } else { - TestUtil.logMsg( - "AddressingFeature object created with incorrect isRequired, expected [" - + Boolean.valueOf(false) + "], received [" + n.isRequired() - + "]"); - pass = false; - } - } else { - TestUtil.logMsg( - "AddressingFeature object created with incorrect isRequired, expected [" - + Boolean.valueOf(true) + "], received [" + n.isRequired() - + "]"); - pass = false; - } - } else { - TestUtil.logErr("AddressingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("isRequiredTest failed", e); - } - - if (!pass) { - throw new Fault("isRequiredTest failed"); - } - } - - /* - * @testName: getResponsesTest - * - * @assertion_ids: JAXWS:JAVADOC:222; JAXWS:JAVADOC:224; - * - * @test_Strategy: Create instance via AddressingFeature(boolean, boolean, - * AddressingFeature.Responses) constructor. Verify AddressingFeature object - * created successfully. Verify responses. - */ - public void getResponsesTest() throws Fault { - TestUtil.logTrace("getResponsesTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Create instance via AddressingFeature(boolean, boolean, AddressingFeature.Responses) ..."); - AddressingFeature n = new AddressingFeature(true, true, - AddressingFeature.Responses.ANONYMOUS); - - if (n != null) { - if (n.getResponses() != AddressingFeature.Responses.ANONYMOUS) { - TestUtil.logErr( - "Responses does not match what was set -> AddressingFeature.Responses.ANONYMOUS"); - pass = false; - } else { - TestUtil.logMsg( - "Responses matched what was set -> AddressingFeature.Responses.ANONYMOUS"); - } - } else { - TestUtil.logErr("AddressingFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getResponsesTest failed", e); - } - - if (!pass) { - throw new Fault("getResponsesTest failed"); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/AddressingFeature/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/AddressingFeature/build.xml deleted file mode 100644 index 05826b5777..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/AddressingFeature/build.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/AddressingFeature_Responses/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/AddressingFeature_Responses/Client.java deleted file mode 100644 index 428708cdcd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/AddressingFeature_Responses/Client.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 53493 2007-05-22 17:06:35Z adf $ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_soap.AddressingFeature_Responses; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; - -import jakarta.xml.ws.soap.*; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // Expected Enum Constant Summary - private final static jakarta.xml.ws.soap.AddressingFeature.Responses expectedEnums[] = { - jakarta.xml.ws.soap.AddressingFeature.Responses.ALL, - jakarta.xml.ws.soap.AddressingFeature.Responses.ANONYMOUS, - jakarta.xml.ws.soap.AddressingFeature.Responses.NON_ANONYMOUS, }; - - private boolean findEnums( - jakarta.xml.ws.soap.AddressingFeature.Responses[] args) { - boolean pass = true; - boolean found; - for (jakarta.xml.ws.soap.AddressingFeature.Responses a : args) { - found = false; - TestUtil.logMsg("Searching expected list of enums for " + a); - for (jakarta.xml.ws.soap.AddressingFeature.Responses b : expectedEnums) { - if (a == b) { - found = true; - break; - } - } - if (!found) { - pass = false; - TestUtil.logErr("No enum found for " + a); - } else { - TestUtil.logMsg("Enum found for " + a); - } - } - return pass; - } - - private void printEnums( - jakarta.xml.ws.soap.AddressingFeature.Responses[] args) { - TestUtil.logMsg("Print Enums"); - TestUtil.logMsg("-----------"); - for (jakarta.xml.ws.soap.AddressingFeature.Responses c : args) - TestUtil.logMsg("" + c); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: valuesTest - * - * @assertion_ids: JAXWS:JAVADOC:226; - * - * @test_Strategy: Verify - * jakarta.xml.ws.soap.AddressingFeature.Responses.values() returns array - * containing the constants of this enum type. - */ - public void valuesTest() throws Fault { - TestUtil.logTrace("valuesTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Call jakarta.xml.ws.soap.AddressingFeature.Responses.values() ..."); - jakarta.xml.ws.soap.AddressingFeature.Responses[] responses = jakarta.xml.ws.soap.AddressingFeature.Responses - .values(); - printEnums(responses); - pass = findEnums(responses); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("valuesTest failed", e); - } - - if (!pass) - throw new Fault("valuesTest failed"); - } - - /* - * @testName: valueOfTest - * - * @assertion_ids: JAXWS:JAVADOC:225; - * - * @test_Strategy: Verify - * jakarta.xml.ws.soap.AddressingFeature.Responses.valueOf(String name) returns - * the enum constant of this type with specified name. - */ - public void valueOfTest() throws Fault { - TestUtil.logTrace("valuesTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Call jakarta.xml.ws.soap.AddressingFeature.Responses.valueOf(ALL) ..."); - jakarta.xml.ws.soap.AddressingFeature.Responses responses = jakarta.xml.ws.soap.AddressingFeature.Responses - .valueOf("ALL"); - if (responses != jakarta.xml.ws.soap.AddressingFeature.Responses.ALL) { - TestUtil.logErr( - "jakarta.xml.ws.soap.AddressingFeature.Responses.valueOf(ALL) failed:" - + " expected: " - + jakarta.xml.ws.soap.AddressingFeature.Responses.ALL - + ", received: " + responses); - pass = false; - } else { - TestUtil.logMsg( - "jakarta.xml.ws.soap.AddressingFeature.Responses.valueOf(ALL) passed"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("valuesTest failed", e); - } - - if (!pass) - throw new Fault("valuesTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/AddressingFeature_Responses/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/AddressingFeature_Responses/build.xml deleted file mode 100644 index e5972cc8e5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/AddressingFeature_Responses/build.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/MTOMFeature/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/MTOMFeature/Client.java deleted file mode 100644 index 77f69416a9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/MTOMFeature/Client.java +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_soap.MTOMFeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; -import java.math.*; - -import jakarta.xml.ws.soap.MTOMFeature; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - private final static Byte myByte = Byte.valueOf(Byte.MAX_VALUE); - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: MTOMFeatureDefaultConstructorTest - * - * @assertion_ids: JAXWS:JAVADOC:171; JAXWS:JAVADOC:170; - * - * @test_Strategy: Create instance via MTOMFeature() constructor. Verify - * MTOMFeature object created successfully. - */ - public void MTOMFeatureDefaultConstructorTest() throws Fault { - TestUtil.logTrace("MTOMFeatureDefaultConstructorTest"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via MTOMFeature() ..."); - MTOMFeature n = new MTOMFeature(); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logErr( - "MTOMFeature object created successfully, but MTOM is not enabled"); - pass = false; - } else { - TestUtil.logMsg("MTOMFeature enabled successfully"); - } - if (n.getThreshold() != 0) { - TestUtil.logErr( - "MTOMFeature object created successfully, but Threshold is not 0"); - pass = false; - } else { - TestUtil.logMsg("MTOMFeature threshold set successfully"); - } - - } else { - TestUtil.logErr("MTOMFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MTOMFeatureDefaultConstructorTest failed", e); - } - - if (!pass) { - throw new Fault("MTOMFeatureDefaultConstructorTest failed"); - } - } - - /* - * @testName: MTOMFeatureConstructorTest1 - * - * @assertion_ids: JAXWS:JAVADOC:172; - * - * @test_Strategy: Create instance via MTOMFeature(true) constructor. Verify - * MTOMFeature object created successfully. - */ - public void MTOMFeatureConstructorTest1() throws Fault { - TestUtil.logTrace("MTOMFeatureConstructorTest1"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via MTOMFeature(true) ..."); - MTOMFeature n = new MTOMFeature(true); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logErr( - "MTOMFeature object created successfully, but MTOM is not enabled"); - pass = false; - } else { - TestUtil.logMsg("MTOMFeature object created successfully"); - } - } else { - TestUtil.logErr("MTOMFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MTOMFeatureConstructorTest1 failed", e); - } - - if (!pass) { - throw new Fault("MTOMFeatureConstructorTest1 failed"); - } - } - - /* - * @testName: MTOMFeatureConstructorTest2 - * - * @assertion_ids: JAXWS:JAVADOC:172; - * - * @test_Strategy: Create instance via MTOMFeature(false) constructor. Verify - * MTOMFeature object created successfully. - */ - public void MTOMFeatureConstructorTest2() throws Fault { - TestUtil.logTrace("MTOMFeatureConstructorTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via MTOMFeature(false) ..."); - MTOMFeature n = new MTOMFeature(false); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logMsg( - "MTOMFeature object created successfully, MTOM is correctly not enabled"); - } else { - TestUtil.logErr( - "MTOMFeature object created successfully, but MTOM is incorrectly enabled."); - pass = false; - } - } else { - TestUtil.logErr("MTOMFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MTOMFeatureConstructorTest2 failed", e); - } - - if (!pass) { - throw new Fault("MTOMFeatureConstructorTest2 failed"); - } - } - - /* - * @testName: MTOMFeatureConstructorTest3 - * - * @assertion_ids: JAXWS:JAVADOC:174; JAXWS:JAVADOC:170; - * - * @test_Strategy: Create instance via MTOMFeature(true, int) constructor. - * Verify MTOMFeature object created successfully. - */ - public void MTOMFeatureConstructorTest3() throws Fault { - TestUtil.logTrace("MTOMFeatureConstructorTest3"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via MTOMFeature(true, int) ..."); - MTOMFeature n = new MTOMFeature(true, 100); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logErr( - "MTOMFeature object created successfully, but MTOM is not enabled"); - pass = false; - } else if (n.getThreshold() != 100) { - TestUtil.logErr( - "MTOMFeature object created successfully, but threshold is not set correctly"); - pass = false; - } else { - TestUtil.logMsg("MTOMFeature object created successfully"); - } - } else { - TestUtil.logErr("MTOMFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MTOMFeatureConstructorTest3 failed", e); - } - - if (!pass) { - throw new Fault("MTOMFeatureConstructorTest3 failed"); - } - } - - /* - * @testName: MTOMFeatureConstructorTest4 - * - * @assertion_ids: JAXWS:JAVADOC:174; JAXWS:JAVADOC:170; - * - * @test_Strategy: Create instance via MTOMFeature(false, int) constructor. - * Verify MTOMFeature object created successfully. - */ - public void MTOMFeatureConstructorTest4() throws Fault { - TestUtil.logTrace("MTOMFeatureConstructorTest4"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via MTOMFeature(false, int) ..."); - MTOMFeature n = new MTOMFeature(false, 100); - if (n != null) { - if (n.isEnabled()) { - TestUtil.logErr( - "MTOMFeature object created successfully, but MTOM is incorrectly enabled"); - pass = false; - } else if (n.getThreshold() != 100) { - TestUtil.logErr( - "MTOMFeature object created successfully, but threshold is not set correctly"); - pass = false; - } else { - TestUtil.logMsg("MTOMFeature object created successfully"); - } - } else { - TestUtil.logErr("MTOMFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MTOMFeatureConstructorTest4 failed", e); - } - - if (!pass) { - throw new Fault("MTOMFeatureConstructorTest4 failed"); - } - } - - /* - * @testName: MTOMFeatureConstructorTest5 - * - * @assertion_ids: JAXWS:JAVADOC:173; JAXWS:JAVADOC:170; - * - * @test_Strategy: Create instance via MTOMFeature(int) constructor. Verify - * MTOMFeature object created successfully. - */ - public void MTOMFeatureConstructorTest5() throws Fault { - TestUtil.logTrace("MTOMFeatureConstructorTest5"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via MTOMFeature(int) ..."); - MTOMFeature n = new MTOMFeature(100); - if (n != null) { - if (!(n.isEnabled())) { - TestUtil.logErr( - "MTOMFeature object created successfully, however MTOM should be enabled and is not enabled."); - pass = false; - } else if (n.getThreshold() != 100) { - TestUtil.logErr( - "MTOMFeature object created successfully, but threshold is not set correctly, expected [" - + Integer.valueOf(100) + "] received [" + n.getThreshold() - + "]"); - pass = false; - } else { - TestUtil.logMsg( - "MTOMFeature object created successfully with correct threshold, expected [" - + Integer.valueOf(100) + "] received [" + n.getThreshold() - + "]"); - } - } else { - TestUtil.logErr("MTOMFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MTOMFeatureConstructorTest5 failed", e); - } - - if (!pass) { - throw new Fault("MTOMFeatureConstructorTest5 failed"); - } - } - - /* - * @testName: getIDTest - * - * @assertion_ids: JAXWS:JAVADOC:169; JAXWS:JAVADOC:160; - * - * @test_Strategy: Test getting ID string of MTOMFeature object. Verify value - * returned is set correctly. - */ - public void getIDTest() throws Fault { - TestUtil.logTrace("getIDTest"); - boolean pass = true; - - try { - TestUtil.logMsg("Create instance via MTOMFeature(true) ..."); - MTOMFeature n = new MTOMFeature(true); - if (n != null) { - if (!(MTOMFeature.ID.equals(n.getID()))) { - TestUtil - .logErr("MTOMFeature object created with incorrect ID, expected [" - + MTOMFeature.ID + "], received [" + n.getID() + "]"); - pass = false; - } else { - TestUtil.logMsg( - "MTOMFeature object created successfully with correct ID, expected [" - + MTOMFeature.ID + "], received [" + n.getID() + "]"); - } - } else { - TestUtil.logErr("MTOMFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getIDTest failed", e); - } - - if (!pass) { - throw new Fault("getIDTest failed"); - } - } - - /* - * @testName: getSetThresholdTest - * - * @assertion_ids: JAXWS:JAVADOC:170; - * - * @test_Strategy: Test setting threshold of MTOMFeature object. Get value and - * verify value returned is set correctly. - */ - public void getSetThresholdTest() throws Fault { - TestUtil.logTrace("getSetThresholdTest"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via MTOMFeature(true, 100) ..."); - MTOMFeature n = new MTOMFeature(true, 100); - if (n != null) { - int threshold = n.getThreshold(); - if (threshold == 100) { - // get returned correct value, now try setting it to new value - TestUtil.logMsg( - "MTOMFeature object created with correct threshold, received [" - + n.getThreshold() + "] now try setting it to new value [" - + Integer.valueOf(1000) + "]"); - n = new MTOMFeature(true, 1000); - threshold = n.getThreshold(); - if (threshold == 1000) { - // get returned correct value - TestUtil.logMsg( - "MTOMFeature object set and retrieved correct threshold, expected [" - + Integer.valueOf(1000) + "], received [" + n.getThreshold() - + "]"); - } else { - TestUtil.logMsg( - "MTOMFeature object created with incorrect threshold, expected [" - + Integer.valueOf(1000) + "], received [" + n.getThreshold() - + "]"); - pass = false; - } - } else { - TestUtil.logMsg( - "MTOMFeature object created with incorrect threshold, expected [" - + Integer.valueOf(1000) + "], received [" + n.getThreshold() - + "]"); - pass = false; - } - } else { - TestUtil.logErr("MTOMFeature object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getSetThresholdTest failed", e); - } - - if (!pass) { - throw new Fault("getSetThresholdTest failed"); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/MTOMFeature/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/MTOMFeature/build.xml deleted file mode 100644 index b5d1f271d6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/MTOMFeature/build.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPBinding/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPBinding/Client.java deleted file mode 100644 index 91777b4060..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPBinding/Client.java +++ /dev/null @@ -1,471 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_soap.SOAPBinding; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; - -import jakarta.xml.soap.*; - -public class Client extends ServiceEETest { - // Need to create jaxbContext - private static final ObjectFactory of = new ObjectFactory(); - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.api.jakarta_xml_ws_soap.SOAPBinding."; - - private static final String SHARED_CLIENT_PKG = "com.sun.ts.tests.jaxws.sharedclients.doclithelloclient."; - - // service and port info - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService.class; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "dlhelloservice.endpoint.1"; - - private static final String WSDLLOC_URL = "dlhelloservice.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private static int NUM_ROLES = 3; - - private String uri0 = null; - - private String uri1 = null; - - private String uri2 = null; - - private Binding binding = null; - - private BindingProvider bp = null; - - private Hello port = null; - - static HelloService service = null; - - private void getPorts() throws Exception { - TestUtil.logMsg("Get port = " + PORT_NAME); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port=" + port); - } - - private void getPortsStandalone() throws Exception { - getPorts(); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - // Initialize QNAMES used in the test - SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - Binding binding = null; - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (HelloService) JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, - SERVICE_CLASS); - getPorts(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HelloService) getSharedObject(); - getTestURLs(); - getPorts(); - - } - bp = (BindingProvider) port; - - uri0 = "http://schemas.xmlsoap.org/soap/actor/next"; - uri1 = "http://role1.com/"; - uri2 = "http://role2.com/"; - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: getSOAPBindingTest - * - * @assertion_ids: JAXWS:SPEC:3039; - * - * @test_Strategy: - */ - public void getSOAPBindingTest() throws Fault { - TestUtil.logTrace("getSOAPBindingTest"); - boolean pass = true; - TestUtil.logMsg("Get Binding interface for Dispatch object"); - binding = bp.getBinding(); - if (binding == null) { - TestUtil.logErr("getBinding() returned null"); - pass = false; - } else { - if (binding instanceof SOAPBinding) { - TestUtil.logMsg("binding is a SOAPBinding instance"); - } else { - TestUtil.logErr("binding is not a SOAPBinding instance"); - pass = false; - } - } - if (!pass) - throw new Fault("getSOAPBindingTest failed"); - } - - /* - * @testName: setGetRolesForDispatchObjTest - * - * @assertion_ids: JAXWS:JAVADOC:107; JAXWS:JAVADOC:111; WS4EE:SPEC:5005; - * - * @test_Strategy: - */ - public void setGetRolesForDispatchObjTest() throws Fault { - TestUtil.logTrace("setGetRolesForDispatchObjTest"); - boolean pass = true; - TestUtil.logMsg("Get Binding interface for Dispatch object"); - binding = bp.getBinding(); - java.util.Set roles = null; - if (binding == null) { - TestUtil.logErr("getBinding() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getBinding() returned Binding object (cast to a SOAPBinding object)"); - TestUtil.logMsg( - "Get SOAPBinding interface from Dispatch object Binding interface"); - SOAPBinding soapbinding = (SOAPBinding) binding; - - roles = soapbinding.getRoles(); - TestUtil.logMsg("Roles that are already set are:"); - int j = 0; - for (java.lang.String r : roles) { - TestUtil.logMsg("Role[" + j + "]=" + r); - j++; - } - - TestUtil.logMsg( - "Set roles for Dispatch object by calling SOAPBinding.setRoles()"); - roles = new java.util.HashSet(); - roles.add(uri1); - roles.add(uri2); - soapbinding.setRoles(roles); - TestUtil.logMsg( - "Get roles for Dispatch object by calling SOAPBinding.getRoles()"); - roles = soapbinding.getRoles(); - TestUtil.logMsg("Verify that roles were set correctly"); - if (roles == null) { - TestUtil.logErr("getRoles() returned null (unexpected)"); - pass = false; - } else { - if (roles.size() != NUM_ROLES) { - TestUtil.logErr("Expected " + NUM_ROLES + " roles, got " - + roles.size() + " roles"); - pass = false; - } - TestUtil.logMsg("Roles are:"); - int i = 0; - for (java.lang.String r : roles) { - TestUtil.logMsg("Role[" + i + "]=" + r); - if (!r.equals(uri0) && !r.equals(uri1) && !r.equals(uri2)) { - TestUtil.logErr("Role[" + i + "]=" + r + " was unexpected"); - pass = false; - } - i++; - } - } - } - if (!pass) - throw new Fault("setGetRolesForDispatchObjTest failed"); - } - - /* - * @testName: soapBindingConstantsTest - * - * @assertion_ids: WS4EE:SPEC:5005; - * - * @test_Strategy: - */ - public void soapBindingConstantsTest() throws Fault { - TestUtil.logTrace("soapBindingConstantsTest"); - boolean pass = true; - - TestUtil.logMsg("Verify that SOAP11HTTP_BINDING constant value is correct"); - if (!SOAPBinding.SOAP11HTTP_BINDING - .equals(Constants.EXPECTED_SOAP11HTTP_BINDING)) { - TestUtil.logErr("SOAP11HTTP_BINDING is incorrect"); - TestUtil.logErr("Got: " + SOAPBinding.SOAP11HTTP_BINDING); - TestUtil.logErr("Expected: " + Constants.EXPECTED_SOAP11HTTP_BINDING); - pass = false; - } - TestUtil.logMsg("Verify that SOAP12HTTP_BINDING constant value is correct"); - if (!SOAPBinding.SOAP12HTTP_BINDING - .equals(Constants.EXPECTED_SOAP12HTTP_BINDING)) { - TestUtil.logErr("SOAP12HTTP_BINDING is incorrect"); - TestUtil.logErr("Got: " + SOAPBinding.SOAP12HTTP_BINDING); - TestUtil.logErr("Expected: " + Constants.EXPECTED_SOAP12HTTP_BINDING); - pass = false; - } - TestUtil.logMsg( - "Verify that SOAP11HTTP_MTOM_BINDING constant value is correct"); - if (!SOAPBinding.SOAP11HTTP_MTOM_BINDING - .equals(Constants.EXPECTED_SOAP11HTTP_MTOM_BINDING)) { - TestUtil.logErr("SOAP11HTTP_MTOM_BINDING is incorrect"); - TestUtil.logErr("Got: " + SOAPBinding.SOAP11HTTP_MTOM_BINDING); - TestUtil - .logErr("Expected: " + Constants.EXPECTED_SOAP11HTTP_MTOM_BINDING); - pass = false; - } - TestUtil.logMsg( - "Verify that SOAP12HTTP_MTOM_BINDING constant value is correct"); - if (!SOAPBinding.SOAP12HTTP_MTOM_BINDING - .equals(Constants.EXPECTED_SOAP12HTTP_MTOM_BINDING)) { - TestUtil.logErr("SOAP12HTTP_MTOM_BINDING is incorrect"); - TestUtil.logErr("Got: " + SOAPBinding.SOAP12HTTP_MTOM_BINDING); - TestUtil - .logErr("Expected: " + Constants.EXPECTED_SOAP12HTTP_MTOM_BINDING); - pass = false; - } - if (!pass) - throw new Fault("soapBindingConstantsTest failed"); - } - - /* - * @testName: getMessageFactoryTest - * - * @assertion_ids: JAXWS:JAVADOC:106; WS4EE:SPEC:5005; - * - * @test_Strategy: - */ - public void getMessageFactoryTest() throws Fault { - TestUtil.logTrace("getMessageFactoryTest"); - boolean pass = true; - TestUtil.logMsg("Get Binding interface for Dispatch object"); - binding = bp.getBinding(); - if (binding == null) { - TestUtil.logErr("getBinding() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getBinding() returned Binding object (cast to a SOAPBinding object)"); - TestUtil.logMsg( - "Get SOAPBinding interface from Dispatch object Binding interface"); - SOAPBinding soapbinding = (SOAPBinding) binding; - - MessageFactory factory = soapbinding.getMessageFactory(); - - if (factory != null) { - TestUtil.logMsg("MessageFactory returned is null" + factory); - } else { - TestUtil.logErr("MessageFactory returned is null"); - pass = false; - } - } - if (!pass) - throw new Fault("getMessageFactoryTest failed"); - } - - /* - * @testName: getSOAPFactoryTest - * - * @assertion_ids: JAXWS:JAVADOC:108; WS4EE:SPEC:5005; - * - * @test_Strategy: - */ - public void getSOAPFactoryTest() throws Fault { - TestUtil.logTrace("getSOAPFactoryTest"); - boolean pass = true; - TestUtil.logMsg("Get Binding interface for Dispatch object"); - binding = bp.getBinding(); - if (binding == null) { - TestUtil.logErr("getBinding() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getBinding() returned Binding object (cast to a SOAPBinding object)"); - TestUtil.logMsg( - "Get SOAPBinding interface from Dispatch object Binding interface"); - SOAPBinding soapbinding = (SOAPBinding) binding; - - SOAPFactory factory = soapbinding.getSOAPFactory(); - - if (factory != null) { - TestUtil.logMsg("SOAPFactory returned is null" + factory); - } else { - TestUtil.logErr("SOAPFactory returned is null"); - pass = false; - } - - } - - if (!pass) - throw new Fault("getSOAPFactoryTest failed"); - } - - /* - * @testName: isSetMTOMEnabledTest - * - * @assertion_ids: JAXWS:JAVADOC:109; JAXWS:JAVADOC:110; WS4EE:SPEC:5005; - * WS4EE:SPEC:5006; JAXWS:SPEC:10023; - * - * @test_Strategy: - */ - public void isSetMTOMEnabledTest() throws Fault { - TestUtil.logTrace("isSetMTOMEnabledTest"); - boolean pass = true; - TestUtil.logMsg("Get Binding interface for Dispatch object"); - binding = bp.getBinding(); - if (binding == null) { - TestUtil.logErr("getBinding() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getBinding() returned Binding object (cast to a SOAPBinding object)"); - TestUtil.logMsg( - "Get SOAPBinding interface from Dispatch object Binding interface"); - SOAPBinding soapbinding = (SOAPBinding) binding; - - TestUtil.logMsg("Checking MTOMEnabled for false"); - boolean enabled = soapbinding.isMTOMEnabled(); - if (enabled) { - TestUtil.logErr("MTOM is enabled and should be disabled"); - pass = false; - } else { - TestUtil.logMsg("MTOM is disabled as expected"); - } - - TestUtil.logMsg("Setting MTOMEnabled"); - soapbinding.setMTOMEnabled(true); - - TestUtil.logMsg("Checking MTOMEnabled for true"); - enabled = soapbinding.isMTOMEnabled(); - if (!enabled) { - TestUtil.logErr("MTOM is disabled and should be enabled"); - pass = false; - } else { - TestUtil.logMsg("MTOM is enabled as expected"); - } - - } - if (!pass) - throw new Fault("isSetMTOMEnabledTest failed"); - - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPBinding/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPBinding/build.xml deleted file mode 100644 index c1759e9dd5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPBinding/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPBinding/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPBinding/jakartaEE.tokens deleted file mode 100644 index 28dc128adc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPBinding/jakartaEE.tokens +++ /dev/null @@ -1,9 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhelloservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloservice -~ - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPFaultException/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPFaultException/Client.java deleted file mode 100644 index f58b9dfe69..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPFaultException/Client.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_soap.SOAPFaultException; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; - -import javax.xml.namespace.QName; -import jakarta.xml.ws.soap.*; -import jakarta.xml.soap.*; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - private jakarta.xml.soap.Detail detail = null; - - private jakarta.xml.soap.DetailEntry detailentry = null; - - private jakarta.xml.soap.SOAPFault soapfault = null; - - private jakarta.xml.soap.Name name = null; - - private jakarta.xml.soap.MessageFactory msgfactory = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - try { - // Create a soap message factory instance. - TestUtil.logMsg("Create a SOAP MessageFactory instance"); - msgfactory = jakarta.xml.soap.MessageFactory.newInstance(); - - // Create a soap message. - TestUtil.logMsg("Create a SOAPMessage"); - jakarta.xml.soap.SOAPMessage soapmsg = msgfactory.createMessage(); - - // Retrieve the soap part from the soap message.. - TestUtil.logMsg("Get SOAP Part"); - jakarta.xml.soap.SOAPPart sp = soapmsg.getSOAPPart(); - - // Retrieve the envelope from the soap part. - TestUtil.logMsg("Get SOAP Envelope"); - jakarta.xml.soap.SOAPEnvelope envelope = sp.getEnvelope(); - - // Retrieve the soap body from the envelope. - TestUtil.logMsg("Get SOAP Body"); - jakarta.xml.soap.SOAPBody body = envelope.getBody(); - - // Add a soap fault to the soap body. - soapfault = body.addFault(); - - // Add a detail to the soap fault. - detail = soapfault.addDetail(); - name = envelope.createName("GetLastTradePrice", "WOMBAT", - "http://www.wombat.org/trader"); - detailentry = detail.addDetailEntry(name); - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: SOAPFaultExceptionConstructorTest - * - * @assertion_ids: JAXWS:JAVADOC:113; - * - * @test_Strategy: Create instance via SOAPFaultException constructor. Verify - * SOAPFaultException object created successfully. - */ - public void SOAPFaultExceptionConstructorTest() throws Fault { - TestUtil.logTrace("SOAPFaultExceptionConstructorTest"); - boolean pass = true; - TestUtil.logMsg( - "Create instance via SOAPFaultException(jakarta.xml.soap.SOAPFault"); - SOAPFaultException sf = new SOAPFaultException(soapfault); - if (sf != null) { - TestUtil.logMsg("SOAPFaultException object created successfully"); - } else { - TestUtil.logErr("SOAPFaultException object not created"); - pass = false; - } - - if (!pass) - throw new Fault("SOAPFaultExceptionConstructorTest failed"); - } - - /* - * @testName: getFaultTest - * - * @assertion_ids: JAXWS:JAVADOC:112; - * - * @test_Strategy: Create instance via SOAPFaultException constructor. Get the - * embedded SOAPFault instance and verify it is what was set. - */ - public void getFaultTest() throws Fault { - TestUtil.logTrace("getFaultTest"); - SOAPFault theFault; - boolean pass = true; - TestUtil.logMsg( - "Create instance via SOAPFaultException(jakarta.xml.soap.SOAPFault"); - SOAPFaultException sf = new SOAPFaultException(soapfault); - if (sf != null) { - TestUtil.logMsg("SOAPFaultException object created successfully"); - theFault = sf.getFault(); - if (theFault.equals(soapfault)) { - TestUtil.logMsg("SOAPFault returned match"); - } else { - TestUtil.logErr("SOAPFault returned mismatch - expected: " + soapfault - + ", received: " + theFault); - pass = false; - } - } else { - TestUtil.logErr("SOAPFaultException object not created"); - pass = false; - } - - if (!pass) - throw new Fault("getFaultTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPFaultException/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPFaultException/build.xml deleted file mode 100644 index 6531ee0b2a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/SOAPFaultException/build.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/build.xml deleted file mode 100644 index 7f91dbc12b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_soap/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReference/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReference/Client.java deleted file mode 100644 index 95b8541520..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReference/Client.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_wsaddressing.W3CEndpointReference; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.util.*; - -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import javax.xml.namespace.QName; -import javax.xml.transform.stream.StreamResult; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.EprUtil; - -public class Client extends ServiceEETest { - - private static String xmlSource = "
http://localhost:8080/WSDLHelloService_web/jaxws/Hello
wsns:Hellowsns:HelloService
"; - - private static final String URLENDPOINT = "http://localhost:8080/WSDLHelloService_web/jaxws/Hello"; - - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private static final String PORT_TYPE_NAME = "Hello"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private QName PORT_TYPE_QNAME = new QName(NAMESPACEURI, PORT_TYPE_NAME); - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: - */ - - public void setup(String[] args, Properties p) throws Fault { - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: W3CEndpointReferenceConstructorTest - * - * @assertion_ids: JAXWS:JAVADOC:184; - * - * @test_Strategy: - */ - public void W3CEndpointReferenceConstructorTest() throws Fault { - TestUtil.logTrace("W3CEndpointReferenceConstructorTest"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via W3CEndpointReference() ..."); - W3CEndpointReference e = new W3CEndpointReference( - JAXWS_Util.makeSource(xmlSource, "StreamSource")); - if (e != null) { - TestUtil.logMsg("W3CEndpointReference object created successfully"); - } else { - TestUtil.logErr("W3CEndpointReference object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("W3CEndpointReferenceConstructorTest failed", e); - } - - if (!pass) - throw new Fault("W3CEndpointReferenceConstructorTest failed"); - } - - /* - * @testName: writeToTest - * - * @assertion_ids: JAXWS:JAVADOC:185; - * - * @test_Strategy: - */ - public void writeToTest() throws Fault { - TestUtil.logTrace("writeToTest"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via W3CEndpointReference() ..."); - W3CEndpointReference epr = new W3CEndpointReference( - JAXWS_Util.makeSource(xmlSource, "StreamSource")); - if (epr != null) { - TestUtil.logMsg("W3CEndpointReference object created successfully"); - } else { - TestUtil.logErr("W3CEndpointReference object not created"); - pass = false; - } - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg("writeTo(): " + baos.toString()); - TestUtil.logMsg( - "Now perform an epr.readFrom() of the results from epr.writeTo()"); - epr = new W3CEndpointReference( - JAXWS_Util.makeSource(baos.toString(), "StreamSource")); - TestUtil.logMsg("Validate the EPR for correctness (Verify MetaData)"); - if (!EprUtil.validateEPR(epr, URLENDPOINT, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.TRUE)) { - pass = false; - TestUtil.logErr("writeTo failed to write out xml source as expected"); - } else - TestUtil.logMsg("writeTo passed to write out xml source as expected"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("writeToTest failed", e); - } - - if (!pass) - throw new Fault("writeToTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReference/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReference/build.xml deleted file mode 100644 index 9bcecce57f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReference/build.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReferenceBuilder/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReferenceBuilder/Client.java deleted file mode 100644 index b503b2b501..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReferenceBuilder/Client.java +++ /dev/null @@ -1,970 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 51088 2003-12-03 17:00:09Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.api.jakarta_xml_ws_wsaddressing.W3CEndpointReferenceBuilder; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.wsa.common.EprUtil; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import javax.xml.namespace.QName; -import javax.xml.transform.dom.*; - -import org.w3c.dom.*; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private static final String PORT_TYPE_NAME = "Hello"; - - private static final QName SERVICE_QNAME = new QName(NAMESPACEURI, - SERVICE_NAME); - - private static final QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private static final QName PORT_TYPE_QNAME = new QName(NAMESPACEURI, - PORT_TYPE_NAME); - - private static final QName MyExtensionAttr = new QName( - "http://extensions.org/ext", "MyExtensionAttr"); - - private static final String MyExtensionAttrValue = "Hello"; - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService.class; - - private static String xmlRefParam1 = "Hello"; - - private static String xmlRefParam2 = "There"; - - private static String xmlMyExtensionElement = "MyExtensionElementValue"; - - private static String xmlInterfaceName = "wsns:Hello"; - - private static String xmlServiceName = "wsns:HelloService"; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private static final String ENDPOINT_URL = "dlhelloservice.endpoint.1"; - - private static final String WSDLLOC_URL = "dlhelloservice.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private Hello port = null; - - W3CEndpointReferenceBuilder builder = null; - - static HelloService service = null; - - private void getPorts() throws Exception { - TestUtil.logMsg("Get port = " + PORT_NAME); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port=" + port); - } - - private void getPortsStandalone() throws Exception { - getPorts(); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - - if (modeProperty.equals("standalone")) { - getTestURLs(); - TestUtil.logMsg("Create Service object"); - service = (HelloService) JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, - SERVICE_CLASS); - getPortsStandalone(); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HelloService) getSharedObject(); - getPortsJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - builder = new W3CEndpointReferenceBuilder(); - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: W3CEndpointReferenceBuilderConstructorTest - * - * @assertion_ids: JAXWS:JAVADOC:204; - * - * @test_Strategy: Create instance via W3CEndpointReferenceBuilder() - * constructor. Verify W3CEndpointReferenceBuilder object created - * successfully. - */ - public void W3CEndpointReferenceBuilderConstructorTest() throws Fault { - TestUtil.logTrace("W3CEndpointReferenceBuilderConstructorTest"); - boolean pass = true; - try { - TestUtil.logMsg("Create instance via W3CEndpointReferenceBuilder() ..."); - W3CEndpointReferenceBuilder b = new W3CEndpointReferenceBuilder(); - if (b != null) { - TestUtil - .logMsg("W3CEndpointReferenceBuilder object created successfully"); - } else { - TestUtil.logErr("W3CEndpointReferenceBuilder object not created"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("W3CEndpointReferenceBuilderConstructorTest failed", e); - } - - if (!pass) - throw new Fault("W3CEndpointReferenceBuilderConstructorTest failed"); - } - - /* - * @testName: addressNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:198; - * - * @test_Strategy: Call address() api. - * - */ - public void addressNULLTest() throws Fault { - TestUtil.logTrace("addressNULLTest"); - boolean pass = true; - try { - builder = builder.address(null); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("addressNULLTest failed", e); - } - - if (!pass) - throw new Fault("addressNULLTest failed"); - } - - /* - * @testName: addressNonNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:198; - * - * @test_Strategy: Call address() api. - * - */ - public void addressNonNULLTest() throws Fault { - TestUtil.logTrace("addressNonNULLTest"); - boolean pass = true; - try { - builder = builder.address(url); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("addressNonNULLTest failed", e); - } - - if (!pass) - throw new Fault("addressNonNULLTest failed"); - } - - /* - * @testName: serviceNameNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:203; - * - * @test_Strategy: Call serviceName() api. - * - */ - public void serviceNameNULLTest() throws Fault { - TestUtil.logTrace("serviceNameNULLTest"); - boolean pass = true; - try { - builder = builder.serviceName(null); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("serviceNameNULLTest failed", e); - } - - if (!pass) - throw new Fault("serviceNameNULLTest failed"); - } - - /* - * @testName: serviceNameNonNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:203; - * - * @test_Strategy: Call serviceName() api. - * - */ - public void serviceNameNonNULLTest() throws Fault { - TestUtil.logTrace("serviceNameNonNULLTest"); - boolean pass = true; - try { - builder = builder.serviceName(SERVICE_QNAME); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("serviceNameNonNULLTest failed", e); - } - - if (!pass) - throw new Fault("serviceNameNonNULLTest failed"); - } - - /* - * @testName: interfaceNameNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:280; - * - * @test_Strategy: Call interfaceName() api. - * - */ - public void interfaceNameNULLTest() throws Fault { - TestUtil.logTrace("interfaceNameNULLTest"); - boolean pass = true; - try { - builder = builder.interfaceName(null); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("interfaceNameNULLTest failed", e); - } - - if (!pass) - throw new Fault("interfaceNameNULLTest failed"); - } - - /* - * @testName: interfaceNameNonNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:280; - * - * @test_Strategy: Call interfaceName() api. - * - */ - public void interfaceNameNonNULLTest() throws Fault { - TestUtil.logTrace("interfaceNameNonNULLTest"); - boolean pass = true; - try { - builder = builder.interfaceName(PORT_TYPE_QNAME); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("interfaceNameNonNULLTest failed", e); - } - - if (!pass) - throw new Fault("interfaceNameNonNULLTest failed"); - } - - /* - * @testName: endpointNameNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:200; - * - * @test_Strategy: Call endpointName() api. - * - */ - public void endpointNameNULLTest() throws Fault { - TestUtil.logTrace("endpointNameNULLTest"); - boolean pass = true; - try { - builder = builder.serviceName(SERVICE_QNAME); - builder = builder.endpointName(null); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("endpointNameNULLTest failed", e); - } - - if (!pass) - throw new Fault("endpointNameNULLTest failed"); - } - - /* - * @testName: endpointNameNonNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:200; - * - * @test_Strategy: Call endpointName() api. - * - */ - public void endpointNameNonNULLTest() throws Fault { - TestUtil.logTrace("endpointNameNonNULLTest"); - boolean pass = true; - try { - builder = builder.serviceName(SERVICE_QNAME); - builder = builder.endpointName(PORT_QNAME); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("endpointNameNonNULLTest failed", e); - } - - if (!pass) - throw new Fault("endpointNameNonNULLTest failed"); - } - - /* - * @testName: endpointNameIllegalStateExceptionTest - * - * @assertion_ids: JAXWS:JAVADOC:200; - * - * @test_Strategy: Call endpointName() api. Test for IllegalStateException. - * - */ - public void endpointNameIllegalStateExceptionTest() throws Fault { - TestUtil.logTrace("endpointNameIllegalStateExceptionTest"); - boolean pass = true; - try { - builder = builder.endpointName(PORT_QNAME); - TestUtil.logErr("Did not throw expected IllegalStateException"); - pass = false; - } catch (IllegalStateException e) { - TestUtil.logMsg("Caught expected IllegalStateException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("endpointNameIllegalStateExceptionTest failed", e); - } - - if (!pass) - throw new Fault("endpointNameIllegalStateExceptionTest failed"); - } - - /* - * @testName: wsdlDocumentLocationNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:205; - * - * @test_Strategy: Call wsdlDocumentLocation() api. - * - */ - public void wsdlDocumentLocationNULLTest() throws Fault { - TestUtil.logTrace("wsdlDocumentLocationNULLTest"); - boolean pass = true; - try { - builder = builder.wsdlDocumentLocation(null); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("wsdlDocumentLocationNULLTest failed", e); - } - - if (!pass) - throw new Fault("wsdlDocumentLocationNULLTest failed"); - } - - /* - * @testName: wsdlDocumentLocationNonNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:205; - * - * @test_Strategy: Call wsdlDocumentLocation() api. - * - */ - public void wsdlDocumentLocationNonNULLTest() throws Fault { - TestUtil.logTrace("wsdlDocumentLocationNonNULLTest"); - boolean pass = true; - try { - builder = builder.wsdlDocumentLocation(wsdlurl.toString()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("wsdlDocumentLocationNonNULLTest failed", e); - } - - if (!pass) - throw new Fault("wsdlDocumentLocationNonNULLTest failed"); - } - - /* - * @testName: metadataNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:201; - * - * @test_Strategy: Call metadata() api. Test for IllegalArgumentException. - * - */ - public void metadataNULLTest() throws Fault { - TestUtil.logTrace("metadataNULLTest"); - boolean pass = true; - try { - builder = builder.metadata(null); - TestUtil.logErr("Passing NULL metadata should have thrown exception"); - pass = false; - } catch (IllegalArgumentException e) { - TestUtil.logMsg("Caught expected IllegalArgumentException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("metadataNULLTest failed", e); - } - - if (!pass) - throw new Fault("metadataNULLTest failed"); - } - - /* - * @testName: metadataNonNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:201; - * - * @test_Strategy: Call metadata() api. - * - */ - public void metadataNonNULLTest() throws Fault { - TestUtil.logTrace("metadataNonNULLTest"); - boolean pass = true; - try { - DOMSource domsrc = (DOMSource) JAXWS_Util.makeSource(xmlServiceName, - "DOMSource"); - Document document = (Document) domsrc.getNode(); - XMLUtils.xmlDumpDOMNodes(document, false); - builder = builder.metadata(document.getDocumentElement()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("metadataNonNULLTest failed", e); - } - - if (!pass) - throw new Fault("metadataNonNULLTest failed"); - } - - /* - * @testName: attributeNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:278; - * - * @test_Strategy: Call attribute() api. Test for IllegalArgumentException. - * - */ - public void attributeNULLTest() throws Fault { - TestUtil.logTrace("attributeNULLTest"); - boolean pass = true; - try { - builder = builder.attribute(null, null); - TestUtil.logErr("Passing NULL should have thrown exception"); - pass = false; - } catch (IllegalArgumentException e) { - TestUtil.logMsg("Caught expected IllegalArgumentException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("attributeNULLTest failed", e); - } - - if (!pass) - throw new Fault("attributeNULLTest failed"); - } - - /* - * @testName: attributeNonNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:278; - * - * @test_Strategy: Call attribute() api. - * - */ - public void attributeNonNULLTest() throws Fault { - TestUtil.logTrace("attributeNonNULLTest"); - boolean pass = true; - try { - builder = builder.attribute(MyExtensionAttr, MyExtensionAttrValue); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("attributeNonNULLTest failed", e); - } - - if (!pass) - throw new Fault("attributeNonNULLTest failed"); - } - - /* - * @testName: elementNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:279; - * - * @test_Strategy: Call element() api. Test for IllegalArgumentException. - * - */ - public void elementNULLTest() throws Fault { - TestUtil.logTrace("elementNULLTest"); - boolean pass = true; - try { - builder = builder.element(null); - TestUtil.logErr("Passing NULL should have thrown exception"); - pass = false; - } catch (IllegalArgumentException e) { - TestUtil.logMsg("Caught expected IllegalArgumentException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("elementNULLTest failed", e); - } - - if (!pass) - throw new Fault("elementNULLTest failed"); - } - - /* - * @testName: elementNonNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:279; - * - * @test_Strategy: Call element() api. - * - */ - public void elementNonNULLTest() throws Fault { - TestUtil.logTrace("elementNonNULLTest"); - boolean pass = true; - try { - DOMSource domsrc = (DOMSource) JAXWS_Util - .makeSource(xmlMyExtensionElement, "DOMSource"); - Document document = (Document) domsrc.getNode(); - builder = builder.element(document.getDocumentElement()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("elementNonNULLTest failed", e); - } - - if (!pass) - throw new Fault("elementNonNULLTest failed"); - } - - /* - * @testName: referenceParameterNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:202; - * - * @test_Strategy: Call referenceParameter() api. Test for - * IllegalArgumentException. - * - */ - public void referenceParameterNULLTest() throws Fault { - TestUtil.logTrace("referenceParameterNULLTest"); - boolean pass = true; - try { - builder = builder.referenceParameter(null); - TestUtil.logErr( - "Passing NULL referenceParameter should have thrown exception"); - pass = false; - } catch (IllegalArgumentException e) { - TestUtil.logMsg("Caught expected IllegalArgumentException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("referenceParameterNULLTest failed", e); - } - - if (!pass) - throw new Fault("referenceParameterNULLTest failed"); - } - - /* - * @testName: referenceParameterNonNULLTest - * - * @assertion_ids: JAXWS:JAVADOC:202; - * - * @test_Strategy: Call referenceParameter() api. - * - */ - public void referenceParameterNonNULLTest() throws Fault { - TestUtil.logTrace("referenceParameterNonNULLTest"); - boolean pass = true; - try { - DOMSource domsrc = (DOMSource) JAXWS_Util.makeSource(xmlRefParam1, - "DOMSource"); - Document document = (Document) domsrc.getNode(); - builder = builder.referenceParameter(document.getDocumentElement()); - domsrc = (DOMSource) JAXWS_Util.makeSource(xmlRefParam2, "DOMSource"); - document = (Document) domsrc.getNode(); - builder = builder.referenceParameter(document.getDocumentElement()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("referenceParameterNonNULLTest failed", e); - } - - if (!pass) - throw new Fault("referenceParameterNonNULLTest failed"); - } - - /* - * @testName: buildTest1 - * - * @assertion_ids: JAXWS:JAVADOC:206; - * - * @test_Strategy: Call build() api. Use calls to address() and metadata() to - * build the EndpointReference. - * - */ - public void buildTest1() throws Fault { - TestUtil.logTrace("buildTest1"); - boolean pass = true; - try { - builder = builder.address(url); - DOMSource domsrc = (DOMSource) JAXWS_Util.makeSource(xmlInterfaceName, - "DOMSource"); - Document document = (Document) domsrc.getNode(); - builder = builder.metadata(document.getDocumentElement()); - domsrc = (DOMSource) JAXWS_Util.makeSource(xmlServiceName, "DOMSource"); - document = (Document) domsrc.getNode(); - builder = builder.metadata(document.getDocumentElement()); - W3CEndpointReference epr = builder.build(); - DOMResult dr = new DOMResult(); - epr.writeTo(dr); - XMLUtils.xmlDumpDOMNodes(dr.getNode(), false); - if (!EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.TRUE)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("buildTest1 failed", e); - } - - if (!pass) - throw new Fault("buildTest1 failed"); - } - - /* - * @testName: buildTest2 - * - * @assertion_ids: JAXWS:JAVADOC:206; - * - * @test_Strategy: Call build() api. Use calls to address(), metadata(), - * element() and attribute() and to build the EndpointReference. - * - */ - public void buildTest2() throws Fault { - TestUtil.logTrace("buildTest2"); - boolean pass = true; - try { - builder = builder.address(url); - builder = builder.attribute(MyExtensionAttr, MyExtensionAttrValue); - DOMSource domsrc = (DOMSource) JAXWS_Util - .makeSource(xmlMyExtensionElement, "DOMSource"); - Document document = (Document) domsrc.getNode(); - builder = builder.element(document.getDocumentElement()); - domsrc = (DOMSource) JAXWS_Util.makeSource(xmlInterfaceName, "DOMSource"); - document = (Document) domsrc.getNode(); - builder = builder.metadata(document.getDocumentElement()); - domsrc = (DOMSource) JAXWS_Util.makeSource(xmlServiceName, "DOMSource"); - document = (Document) domsrc.getNode(); - builder = builder.metadata(document.getDocumentElement()); - W3CEndpointReference epr = builder.build(); - DOMResult dr = new DOMResult(); - epr.writeTo(dr); - XMLUtils.xmlDumpDOMNodes(dr.getNode(), false); - if (!EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.TRUE)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("buildTest2 failed", e); - } - - if (!pass) - throw new Fault("buildTest2 failed"); - } - - /* - * @testName: buildTest3 - * - * @assertion_ids: JAXWS:JAVADOC:206; - * - * @test_Strategy: Call build() api. Call all the api's to build an - * EndpointReference from scratch. - * - */ - public void buildTest3() throws Fault { - TestUtil.logTrace("buildTest3"); - boolean pass = true; - try { - builder = builder.address(url); - DOMSource domsrc = (DOMSource) JAXWS_Util.makeSource(xmlInterfaceName, - "DOMSource"); - Document document = (Document) domsrc.getNode(); - builder = builder.metadata(document.getDocumentElement()); - builder = builder.serviceName(SERVICE_QNAME); - builder = builder.endpointName(PORT_QNAME); - builder = builder.wsdlDocumentLocation(wsdlurl.toString()); - domsrc = (DOMSource) JAXWS_Util.makeSource(xmlRefParam1, "DOMSource"); - document = (Document) domsrc.getNode(); - builder = builder.referenceParameter(document.getDocumentElement()); - domsrc = (DOMSource) JAXWS_Util.makeSource(xmlRefParam2, "DOMSource"); - document = (Document) domsrc.getNode(); - builder = builder.referenceParameter(document.getDocumentElement()); - W3CEndpointReference epr = builder.build(); - DOMResult dr = new DOMResult(); - epr.writeTo(dr); - XMLUtils.xmlDumpDOMNodes(dr.getNode(), false); - if (!EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.TRUE, wsdlurl.toString())) - pass = false; - if (!EprUtil.validateReferenceParameter(dr.getNode(), "MyParam1", - "Hello")) - pass = false; - if (!EprUtil.validateReferenceParameter(dr.getNode(), "MyParam2", - "There")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("buildTest3 failed", e); - } - - if (!pass) - throw new Fault("buildTest3 failed"); - } - - /* - * @testName: buildTest4 - * - * @assertion_ids: JAXWS:JAVADOC:206; - * - * @test_Strategy: Call build() api. Call all the api's to build an - * EndpointReference from scratch. - * - */ - public void buildTest4() throws Fault { - TestUtil.logTrace("buildTest4"); - boolean pass = true; - try { - builder = builder.address(url); - builder = builder.serviceName(SERVICE_QNAME); - builder = builder.endpointName(PORT_QNAME); - builder = builder.interfaceName(PORT_TYPE_QNAME); - builder = builder.wsdlDocumentLocation(wsdlurl.toString()); - DOMSource domsrc = (DOMSource) JAXWS_Util.makeSource(xmlRefParam1, - "DOMSource"); - Document document = (Document) domsrc.getNode(); - builder = builder.referenceParameter(document.getDocumentElement()); - domsrc = (DOMSource) JAXWS_Util.makeSource(xmlRefParam2, "DOMSource"); - document = (Document) domsrc.getNode(); - builder = builder.referenceParameter(document.getDocumentElement()); - W3CEndpointReference epr = builder.build(); - DOMResult dr = new DOMResult(); - epr.writeTo(dr); - XMLUtils.xmlDumpDOMNodes(dr.getNode(), false); - if (!EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.TRUE, wsdlurl.toString())) - pass = false; - if (!EprUtil.validateReferenceParameter(dr.getNode(), "MyParam1", - "Hello")) - pass = false; - if (!EprUtil.validateReferenceParameter(dr.getNode(), "MyParam2", - "There")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("buildTest4 failed", e); - } - - if (!pass) - throw new Fault("buildTest4 failed"); - } - - /* - * @testName: buildIllegalStateExceptionTest1 - * - * @assertion_ids: JAXWS:JAVADOC:206; - * - * @test_Strategy: Call build() api. Test for IllegalStateException. - * - */ - public void buildIllegalStateExceptionTest1() throws Fault { - TestUtil.logTrace("buildIllegalStateExceptionTest1"); - boolean pass = true; - try { - W3CEndpointReference epr = builder.build(); - TestUtil.logErr("Did not throw expected IllegalStateException"); - pass = false; - } catch (IllegalStateException e) { - TestUtil.logMsg("Caught expected IllegalStateException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("buildIllegalStateExceptionTest1 failed", e); - } - - if (!pass) - throw new Fault("buildIllegalStateExceptionTest1 failed"); - } - - /* - * @testName: buildIllegalStateExceptionTest2 - * - * @assertion_ids: JAXWS:JAVADOC:206; - * - * @test_Strategy: Call build() api. Test for IllegalStateException. - * - */ - public void buildIllegalStateExceptionTest2() throws Fault { - TestUtil.logTrace("buildIllegalStateExceptionTest2"); - boolean pass = true; - try { - builder = builder.endpointName(PORT_QNAME); - W3CEndpointReference epr = builder.build(); - TestUtil.logErr("Did not throw expected IllegalStateException"); - pass = false; - } catch (IllegalStateException e) { - TestUtil.logMsg("Caught expected IllegalStateException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("buildIllegalStateExceptionTest2 failed", e); - } - - if (!pass) - throw new Fault("buildIllegalStateExceptionTest2 failed"); - } - - /* - * @testName: buildIllegalStateExceptionTest3 - * - * @assertion_ids: JAXWS:JAVADOC:206; - * - * @test_Strategy: Call build() api. Test for IllegalStateException. - * - */ - public void buildIllegalStateExceptionTest3() throws Fault { - TestUtil.logTrace("buildIllegalStateExceptionTest3"); - boolean pass = true; - try { - builder = builder.wsdlDocumentLocation("http://bogus.org/bogus"); - W3CEndpointReference epr = builder.build(); - TestUtil.logErr("Did not throw expected IllegalStateException"); - pass = false; - } catch (IllegalStateException e) { - TestUtil.logMsg("Caught expected IllegalStateException"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("buildIllegalStateExceptionTest3 failed", e); - } - - if (!pass) - throw new Fault("buildIllegalStateExceptionTest3 failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReferenceBuilder/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReferenceBuilder/build.xml deleted file mode 100644 index b750295de1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReferenceBuilder/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReferenceBuilder/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReferenceBuilder/jakartaEE.tokens deleted file mode 100644 index e9beafdda0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/W3CEndpointReferenceBuilder/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhelloservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.HelloService -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/build.xml deleted file mode 100644 index fb432b6514..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/api/jakarta_xml_ws_wsaddressing/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/build.xml deleted file mode 100644 index d803931f61..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/build.xml deleted file mode 100644 index 152157c38b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/build.xml deleted file mode 100644 index 81286394ea..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/build.xml deleted file mode 100644 index b1e7354547..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/build.xml deleted file mode 100644 index cbb0b013f0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/build.xml deleted file mode 100644 index 715cba737a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/client/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/client/Client.java deleted file mode 100644 index 6f91623737..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/client/Client.java +++ /dev/null @@ -1,1335 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; - -import javax.xml.namespace.QName; - -import java.util.*; - -import java.math.BigInteger; -import java.math.BigDecimal; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import javax.xml.datatype.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.client."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "j2wdlmarshalltest.endpoint.1"; - - private static final String WSDLLOC_URL = "j2wdlmarshalltest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - // ServiceName and PortName mapping configuration going java-to-wsdl - private static final String SERVICE_NAME = "MarshallTestService"; - - private static final String PORT_NAME = "MarshallTestPort"; - - private static final String NAMESPACEURI = "http://marshalltestservice.org/wsdl"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - MarshallTest port = null; - - static MarshallTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (MarshallTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MarshallTestService.class, PORT_QNAME, MarshallTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (MarshallTest) service.getPort(MarshallTest.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - getTargetEndpointAddress(port); - // JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - private JavaBean JavaBean_data[] = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (MarshallTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - JavaBean_data = new JavaBean[2]; - JavaBean_data[0] = new JavaBean(); - JavaBean_data[1] = new JavaBean(); - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - // ==================================================================== - // Java Primitive Types - // ==================================================================== - - /* - * @testName: MarshallPrimitiveTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; JAXWS:SPEC:10011; - * JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3057; JAXWS:SPEC:7000; - * JAXWS:SPEC:3058; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each primitive type pass its value as input to the - * corresponding RPC method and receive it back as the return value. Compare - * results of each value/type of what was sent and what was returned. Verify - * they are equal. - * - * Description Java primititive types and the corresponding Java classes: - * boolean,byte,short,int,long,float,double as well as: - * Boolean,Byte,Short,Integer,Long,Float,Double - */ - public void MarshallPrimitiveTest() throws Fault { - TestUtil.logMsg("MarshallPrimitiveTest"); - boolean pass = true; - - if (!booleanTest()) - pass = false; - if (!BooleanTest()) - pass = false; - if (!byteTest()) - pass = false; - if (!ByteTest()) - pass = false; - if (!shortTest()) - pass = false; - if (!ShortTest()) - pass = false; - if (!intTest()) - pass = false; - if (!IntegerTest()) - pass = false; - if (!longTest()) - pass = false; - if (!LongTest()) - pass = false; - if (!floatTest()) - pass = false; - if (!FloatTest()) - pass = false; - if (!doubleTest()) - pass = false; - if (!DoubleTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallPrimitiveTest failed"); - } - - // ==================================================================== - // Standard Java Classes - // ==================================================================== - - /* - * @testName: MarshallStandardJavaClassesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; JAXWS:SPEC:10011; - * JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3057; JAXWS:SPEC:7000; - * JAXWS:SPEC:3058; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * standard java class type. For each standard java class above pass its value - * as input to the corresponding RPC method and receive it back as the return - * value. Compare results of each value/type of what was sent sent and what - * was returned. Verify they are equal. - * - * Description Standard Java Classes: o java.lang.String o java.util.Calendar - * o java.math.BigInteger o java.math.BigDecimal - */ - public void MarshallStandardJavaClassesTest() throws Fault { - TestUtil.logMsg("MarshallStandardJavaClassesTest"); - boolean pass = true; - - if (!StringTest()) - pass = false; - if (!CalendarTest()) - pass = false; - if (!BigIntegerTest()) - pass = false; - if (!BigDecimalTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallStandardJavaClassesTest failed"); - } - - // ==================================================================== - // Java Array Single-Dimensional for all supported JAX-WS types - // ==================================================================== - - /* - * @testName: MarshallJavaArrayTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; JAXWS:SPEC:10011; - * JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3057; JAXWS:SPEC:7000; - * JAXWS:SPEC:3058; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, invoke the RPC methods for each - * java type supported. For each java type supported pass an arrary of values - * as input to the corresponding RPC method and receive it back as the return - * value. Compare results of each array type of what was sent and what was - * returned. Verify they are equal. - * - * Description Single dimensional Java arrays are tested. - */ - public void MarshallJavaArrayTest() throws Fault { - TestUtil.logMsg("MarshallJavaArrayTest"); - boolean pass = true; - - if (!booleanArrayTest()) - pass = false; - if (!byteArrayTest()) - pass = false; - if (!shortArrayTest()) - pass = false; - if (!intArrayTest()) - pass = false; - if (!longArrayTest()) - pass = false; - if (!floatArrayTest()) - pass = false; - if (!doubleArrayTest()) - pass = false; - if (!wrapperBooleanArrayTest()) - pass = false; - if (!wrapperByteArrayTest()) - pass = false; - if (!wrapperShortArrayTest()) - pass = false; - if (!wrapperIntArrayTest()) - pass = false; - if (!wrapperLongArrayTest()) - pass = false; - if (!wrapperFloatArrayTest()) - pass = false; - if (!wrapperDoubleArrayTest()) - pass = false; - if (!StringArrayTest()) - pass = false; - if (!CalendarArrayTest()) - pass = false; - if (!BigIntegerArrayTest()) - pass = false; - if (!BigDecimalArrayTest()) - pass = false; - if (!JavaBeanArrayTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallJavaArrayTest failed"); - } - - // ==================================================================== - // Service Specific Exception - // ==================================================================== - - /* - * @testName: MarshallServiceExceptionTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; JAXWS:SPEC:10011; - * JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3057; JAXWS:SPEC:7000; - * JAXWS:SPEC:3058; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method - * ServiceExceptionTest that generates a fault condition. Verify a fault - * condition occurs. - * - * Description A client can invoke an RPC method via generated stub and - * receive a fault. - */ - public void MarshallServiceExceptionTest() throws Fault { - TestUtil.logMsg("MarshallServiceExceptionTest"); - boolean pass = true; - TestUtil.logMsg("Throwing a ServiceException from JAXWS Service"); - try { - try { - port.myServiceExceptionTest(); - TestUtil.logErr("no fault occurred"); - pass = false; - } catch (Throwable response) { - TestUtil.logMsg("a fault occurred: " + response); - TestUtil.logMsg("response=" + response); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallServiceExceptionTest failed", e); - } - - if (!pass) - throw new Fault("MarshallServiceExceptionTest failed"); - } - - // ==================================================================== - // JavaBeans Class - // ==================================================================== - - /* - * @testName: MarshallJavaBeanTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; JAXWS:SPEC:10011; - * JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3057; JAXWS:SPEC:7000; - * JAXWS:SPEC:3058; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method - * JavaBeanTest. Pass a JavaBean value to the RPC method and receive it back - * as the return value. Compare results of JavaBean value from what was sent - * and what was returned. Verify they are equal. - * - * Description A client can invoke an RPC method via generated stub passing a - * JavaBean value as input argument and receiving a JavaBean value as a return - * value. - */ - public void MarshallJavaBeanTest() throws Fault { - TestUtil.logMsg("MarshallJavaBeanTest"); - boolean pass = true; - - init_JavaBean_Data(); - JavaBean values[] = JavaBean_data; - JavaBean response; - TestUtil.logMsg( - "Passing/Returning JavaBean JavaBean class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.javaBeanTest(values[i]); - if (!compareJavaBeans(values[i], response)) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallJavaBeanTest failed", e); - } - - if (!pass) - throw new Fault("MarshallJavaBeanTest failed"); - } - - // ==================================================================== - // The void type - // ==================================================================== - - /* - * @testName: MarshallVoidTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; JAXWS:SPEC:10011; - * JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3057; JAXWS:SPEC:7000; - * JAXWS:SPEC:3058; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method voidTest. - * Verify normal invocation and return. - * - * Description A client can invoke an RPC method via generated stub and handle - * void type. - */ - public void MarshallVoidTest() throws Fault { - TestUtil.logMsg("MarshallVoidTest"); - boolean pass = true; - TestUtil.logMsg("Handling a void type to/from JAXWS Service"); - try { - port.voidTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallVoidTest failed", e); - } - - if (!pass) - throw new Fault("MarshallVoidTest failed"); - } - - private boolean printTestStatus(boolean pass, String test) { - if (pass) - TestUtil.logMsg("" + test + " ... PASSED"); - else - TestUtil.logErr("" + test + " ... FAILED"); - - return pass; - } - - private boolean booleanTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(booleanTest)"); - boolean pass = true; - Boolean values[] = JAXWS_Data.Boolean_nonull_data; - Boolean response; - TestUtil.logMsg("Passing/Returning Boolean data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.booleanTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Boolean")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(booleanTest)"); - return pass; - } - - private boolean BooleanTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(BooleanTest)"); - boolean pass = true; - Boolean values[] = JAXWS_Data.Boolean_data; - Boolean response; - try { - TestUtil.logMsg("Passing/Returning Boolean class to/from JAXWS Service"); - for (int i = 0; i < values.length; i++) { - response = port.wrapperBooleanTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Boolean")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(BooleanTest)"); - return pass; - } - - private boolean byteTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(byteTest)"); - boolean pass = true; - Byte values[] = JAXWS_Data.Byte_nonull_data; - Byte response; - TestUtil.logMsg("Passing/Returning Byte data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.byteTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Byte")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(byteTest)"); - return pass; - } - - private boolean ByteTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(ByteTest)"); - boolean pass = true; - Byte values[] = JAXWS_Data.Byte_data; - Byte response; - TestUtil.logMsg("Passing/Returning Byte class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.wrapperByteTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Byte")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(ByteTest)"); - return pass; - } - - private boolean shortTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(shortTest)"); - boolean pass = true; - Short values[] = JAXWS_Data.Short_nonull_data; - Short response; - TestUtil.logMsg("Passing/Returning Short data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.shortTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Short")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(shortTest)"); - return pass; - } - - private boolean ShortTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(ShortTest)"); - boolean pass = true; - Short values[] = JAXWS_Data.Short_data; - Short response; - TestUtil.logMsg("Passing/Returning Short class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - if (values[i] == null) - continue; - response = port.wrapperShortTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Short")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(ShortTest)"); - return pass; - } - - private boolean intTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(intTest)"); - boolean pass = true; - Integer values[] = JAXWS_Data.Integer_nonull_data; - Integer response; - TestUtil.logMsg("Passing/Returning Integer data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.intTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Integer")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(intTest)"); - return pass; - } - - private boolean IntegerTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(IntegerTest)"); - boolean pass = true; - Integer values[] = JAXWS_Data.Integer_data; - Integer response; - TestUtil.logMsg("Passing/Returning Integer class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.wrapperIntegerTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Integer")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(IntegerTest)"); - return pass; - } - - private boolean longTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(longTest)"); - boolean pass = true; - Long values[] = JAXWS_Data.Long_nonull_data; - Long response; - TestUtil.logMsg("Passing/Returning Long data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.longTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Long")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(longTest)"); - return pass; - } - - private boolean LongTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(LongTest)"); - boolean pass = true; - Long values[] = JAXWS_Data.Long_data; - Long response; - TestUtil.logMsg("Passing/Returning Long class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.wrapperLongTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Long")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(LongTest)"); - return pass; - } - - private boolean floatTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(floatTest)"); - boolean pass = true; - Float values[] = JAXWS_Data.Float_nonull_data; - Float response; - TestUtil.logMsg("Passing/Returning Float data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.floatTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Float")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(floatTest)"); - return pass; - } - - private boolean FloatTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(FloatTest)"); - boolean pass = true; - Float values[] = JAXWS_Data.Float_data; - Float response; - TestUtil.logMsg("Passing/Returning Float class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.wrapperFloatTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Float")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(FloatTest)"); - return pass; - } - - private boolean doubleTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(doubleTest)"); - boolean pass = true; - Double values[] = JAXWS_Data.Double_nonull_data; - Double response; - TestUtil.logMsg("Passing/Returning Double data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.doubleTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Double")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(doubleTest)"); - return pass; - } - - private boolean DoubleTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(DoubleTest)"); - boolean pass = true; - Double values[] = JAXWS_Data.Double_data; - Double response; - TestUtil.logMsg("Passing/Returning Double class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.wrapperDoubleTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "Double")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(DoubleTest)"); - return pass; - } - - private boolean StringTest() { - TestUtil.logMsg("MarshallStandardJavaClassesTest:(StringTest)"); - boolean pass = true; - String values[] = JAXWS_Data.String_data; - String response; - try { - TestUtil.logMsg("Passing/Returning String class to/from JAXWS Service"); - for (int i = 0; i < values.length; i++) { - response = port.stringTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "String")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStandardJavaClassesTest:(StringTest)"); - return pass; - } - - private boolean CalendarTest() { - TestUtil.logMsg("MarshallStandardJavaClassesTest:(CalendarTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - XMLGregorianCalendar response; - TestUtil.logMsg("Passing/Returning Calendar class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.calendarTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, - "XMLGregorianCalendar")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStandardJavaClassesTest:(CalendarTest)"); - return pass; - } - - private boolean BigIntegerTest() { - TestUtil.logMsg("MarshallStandardJavaClassesTest:(BigIntegerTest)"); - boolean pass = true; - BigInteger values[] = JAXWS_Data.BigInteger_data; - BigInteger response; - TestUtil.logMsg("Passing/Returning BigInteger class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.bigIntegerTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "BigInteger")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStandardJavaClassesTest:(BigIntegerTest)"); - return pass; - } - - private boolean BigDecimalTest() { - TestUtil.logMsg("MarshallStandardJavaClassesTest:(BigDecimalTest)"); - boolean pass = true; - BigDecimal values[] = JAXWS_Data.BigDecimal_data; - BigDecimal response; - TestUtil.logMsg("Passing/Returning BigDecimal class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.bigDecimalTest(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, "BigDecimal")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStandardJavaClassesTest:(BigDecimalTest)"); - return pass; - } - - private boolean booleanArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(booleanArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Boolean_nonull_data; - List response; - TestUtil.logMsg("Passing/Returning boolean array to/from JAXWS Service"); - try { - response = port.booleanArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Boolean"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(booleanArrayTest)"); - return pass; - } - - private boolean byteArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(byteArrayTest)"); - boolean pass = true; - byte[] values = JAXWS_Data.byte_data; - byte[] response; - try { - response = port.byteArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "byte"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(byteArrayTest)"); - return pass; - } - - private boolean shortArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(shortArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Short_nonull_data; - List response; - try { - response = port.shortArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Short"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(shortArrayTest)"); - return pass; - } - - private boolean intArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(intArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Integer_nonull_data; - List response; - try { - response = port.intArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Integer"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(intArrayTest)"); - return pass; - } - - private boolean longArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(longArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Long_nonull_data; - List response; - try { - response = port.longArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Long"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(longArrayTest)"); - return pass; - } - - private boolean floatArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(floatArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Float_nonull_data; - List response; - try { - response = port.floatArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Float"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(floatArrayTest)"); - return pass; - } - - private boolean doubleArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(doubleArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Double_nonull_data; - List response; - try { - response = port.doubleArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Double"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(doubleArrayTest)"); - return pass; - } - - private boolean wrapperBooleanArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(wrapperBooleanArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Boolean_nonull_data; - List response; - TestUtil.logMsg("Passing/Returning boolean array to/from JAXWS Service"); - try { - response = port.wrapperBooleanArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Boolean"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(wrapperBooleanArrayTest)"); - return pass; - } - - private boolean wrapperByteArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(wrapperByteArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Byte_nonull_data; - List response; - try { - response = port.wrapperByteArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Byte"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(wrapperByteArrayTest)"); - return pass; - } - - private boolean wrapperShortArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(wrapperShortArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Short_nonull_data; - List response; - try { - response = port.wrapperShortArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Short"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(wrapperShortArrayTest)"); - return pass; - } - - private boolean wrapperIntArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(wrapperIntArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Integer_nonull_data; - List response; - try { - response = port.wrapperIntArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Integer"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(wrapperIntArrayTest)"); - return pass; - } - - private boolean wrapperLongArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(wrapperLongArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Long_nonull_data; - List response; - try { - response = port.wrapperLongArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Long"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(wrapperLongArrayTest)"); - return pass; - } - - private boolean wrapperFloatArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(wrapperFloatArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Float_nonull_data; - List response; - try { - response = port.wrapperFloatArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Float"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(wrapperFloatArrayTest)"); - return pass; - } - - private boolean wrapperDoubleArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(wrapperDoubleArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_Double_nonull_data; - List response; - try { - response = port.wrapperDoubleArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Double"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(wrapperDoubleArrayTest)"); - return pass; - } - - private boolean StringArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(StringArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_String_nonull_data; - List response; - try { - response = port.stringArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "String"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(StringArrayTest)"); - return pass; - } - - private boolean CalendarArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(CalendarArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_XMLGregorianCalendar_nonull_data; - List response; - try { - response = port.calendarArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, - "XMLGregorianCalendar"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - ; - } - printTestStatus(pass, "MarshallJavaArrayTest:(CalendarArrayTest)"); - return pass; - } - - private boolean BigIntegerArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(BigIntegerArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_BigInteger_nonull_data; - List response; - try { - response = port.bigIntegerArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "BigInteger"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(BigIntegerArrayTest)"); - return pass; - } - - private boolean BigDecimalArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(BigDecimalArrayTest)"); - boolean pass = true; - List values = JAXWS_Data.list_BigDecimal_nonull_data; - List response; - try { - response = port.bigDecimalArrayTest(values); - pass = JAXWS_Data.compareArrayValues(values, response, "BigDecimal"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(BigDecimalArrayTest)"); - return pass; - } - - private boolean JavaBeanArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(JavaBeanArrayTest)"); - boolean pass = true; - - init_JavaBean_Data(); - List list_JavaBean_data = (List) Arrays - .asList(JavaBean_data); - List values = list_JavaBean_data; - List response; - try { - JAXWS_Data.dumpListValues(values); - response = port.javaBeanArrayTest(values); - JAXWS_Data.dumpListValues(response); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(JavaBeanArrayTest)"); - return pass; - } - - private void init_JavaBean_Data() { - JavaBean_data[0].setMyBoolean(false); - JavaBean_data[0].setMyByte(Byte.MIN_VALUE); - JavaBean_data[0].setMyShort(Short.MIN_VALUE); - JavaBean_data[0].setMyInt(Integer.MIN_VALUE); - JavaBean_data[0].setMyLong(Long.MIN_VALUE); - JavaBean_data[0].setMyFloat(Float.MIN_VALUE); - JavaBean_data[0].setMyDouble(Double.MIN_VALUE); - JavaBean_data[0].setMyBoolean1(Boolean.valueOf("false")); - JavaBean_data[0].setMyByte1(Byte.valueOf(Byte.MIN_VALUE)); - JavaBean_data[0].setMyShort1(Short.valueOf(Short.MIN_VALUE)); - JavaBean_data[0].setMyInt1(Integer.valueOf(Integer.MIN_VALUE)); - JavaBean_data[0].setMyLong1(Long.valueOf(Long.MIN_VALUE)); - JavaBean_data[0].setMyFloat1(Float.valueOf(Float.MIN_VALUE)); - JavaBean_data[0].setMyDouble1(Double.valueOf(Double.MIN_VALUE)); - JavaBean_data[0].setMyString(""); - JavaBean_data[0].setMyBigInteger(JAXWS_Data.BigInteger_data[0]); - JavaBean_data[0].setMyBigDecimal(JAXWS_Data.BigDecimal_data[0]); - JavaBean_data[0].setMyCalendar(JAXWS_Data.XMLGregorianCalendar_data[0]); - - JavaBean_data[1].setMyBoolean(true); - JavaBean_data[1].setMyByte(Byte.MAX_VALUE); - JavaBean_data[1].setMyShort(Short.MAX_VALUE); - JavaBean_data[1].setMyInt(Integer.MAX_VALUE); - JavaBean_data[1].setMyLong(Long.MAX_VALUE); - JavaBean_data[1].setMyFloat(Float.MAX_VALUE); - JavaBean_data[1].setMyDouble(Double.MAX_VALUE); - JavaBean_data[1].setMyBoolean1(Boolean.valueOf("true")); - JavaBean_data[1].setMyByte1(Byte.valueOf(Byte.MAX_VALUE)); - JavaBean_data[1].setMyShort1(Short.valueOf(Short.MAX_VALUE)); - JavaBean_data[1].setMyInt1(Integer.valueOf(Integer.MAX_VALUE)); - JavaBean_data[1].setMyLong1(Long.valueOf(Long.MAX_VALUE)); - JavaBean_data[1].setMyFloat1(Float.valueOf(Float.MAX_VALUE)); - JavaBean_data[1].setMyDouble1(Double.valueOf(Double.MAX_VALUE)); - JavaBean_data[1].setMyString(""); - JavaBean_data[1].setMyBigInteger(JAXWS_Data.BigInteger_data[1]); - JavaBean_data[1].setMyBigDecimal(JAXWS_Data.BigDecimal_data[1]); - JavaBean_data[1].setMyCalendar(JAXWS_Data.XMLGregorianCalendar_data[1]); - - } - - public String toStringJavaBean(JavaBean v) { - return "myBoolean: " + v.isMyBoolean() + ", myByte: " + v.getMyByte() - + ", myShort: " + v.getMyShort() + ", myInt: " + v.getMyInt() - + ", myLong: " + v.getMyLong() + ", myFloat: " + v.getMyFloat() - + ", myDouble: " + v.getMyDouble() + ", myBoolean1: " + v.isMyBoolean1() - + ", myByte1: " + v.getMyByte1() + ", myShort1: " + v.getMyShort1() - + ", myInt1: " + v.getMyInt1() + ", myLong1: " + v.getMyLong1() - + ", myFloat1: " + v.getMyFloat1() + ", myDouble1: " + v.getMyDouble1() - + ", myString: " + v.getMyString() + ", myBigInteger: " - + v.getMyBigInteger() + ", myBigDecimal: " + v.getMyBigDecimal() - + ", myCalendar: " + v.getMyCalendar(); - } - - public boolean compareJavaBeans(JavaBean e, JavaBean r) { - return e.isMyBoolean() == r.isMyBoolean() && e.getMyByte() == r.getMyByte() - && e.getMyShort() == r.getMyShort() && e.getMyInt() == r.getMyInt() - && e.getMyLong() == r.getMyLong() && e.getMyFloat() == r.getMyFloat() - && e.getMyDouble() == r.getMyDouble() - && e.isMyBoolean1().equals(r.isMyBoolean1()) - && e.getMyByte1().equals(r.getMyByte1()) - && e.getMyShort1().equals(r.getMyShort1()) - && e.getMyInt1().equals(r.getMyInt1()) - && e.getMyLong1().equals(r.getMyLong1()) - && e.getMyFloat1().equals(r.getMyFloat1()) - && e.getMyDouble1().equals(r.getMyDouble1()) - && e.getMyString().equals(r.getMyString()) - && e.getMyBigInteger().equals(r.getMyBigInteger()) - && e.getMyBigDecimal().equals(r.getMyBigDecimal()) && JAXWS_Data - .compareXMLGregorianCalendars(e.getMyCalendar(), r.getMyCalendar()); - } - - // ================================================================== - // Various utility classes used for dumping/comparing data - // ================================================================== - - private void dumpArrayValues(Object o, String t) { - System.out.println("JAXWS_Data:dumpArrayValues"); - System.out.println("Dumping " + t + " array, size=" + getArraySize(o, t)); - if (t.equals("JavaBean")) { - JavaBean[] v = (JavaBean[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + toStringJavaBean(v[i])); - } - } - - private int getArraySize(Object o, String t) { - System.out.println("JAXWS_Data:getArraySize"); - if (t.equals("JavaBean")) { - return ((JavaBean[]) o).length; - } - return -1; - } - - private boolean compareValues(Object e, Object r, String t) { - boolean pass = true; - - if (t.equals("JavaBean")) { - JavaBean exp = (JavaBean) e; - JavaBean rec = (JavaBean) r; - if (rec == exp) - return true; - if ((rec == null && exp != null) || (rec != null && exp == null)) { - pass = false; - } else if (!compareJavaBeans(exp, rec)) { - System.out.println("Value Mismatch: expected " + toStringJavaBean(exp) - + ", received " + toStringJavaBean(rec)); - pass = false; - } - } - return pass; - } - - private boolean compareArrayValues(Object e, Object r, String t) { - System.out.println("compareArrayValues"); - boolean pass = true; - - if (t.equals("JavaBean")) { - JavaBean[] exp = (JavaBean[]) e; - JavaBean[] rec = (JavaBean[]) r; - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!compareJavaBeans(exp[i], rec[i])) { - System.out - .println("Array Mismatch: expected " + toStringJavaBean(exp[i]) - + ", received " + toStringJavaBean(rec[i])); - pass = false; - } - } - } - return pass; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/client/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/client/build.xml deleted file mode 100644 index 4e6efb16b5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/client/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/client/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/client/jakartaEE.tokens deleted file mode 100644 index c97f35701c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/client/jakartaEE.tokens +++ /dev/null @@ -1,6 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdlmarshalltestservice") -SERVICE=com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.client.MarshallTestService -URLALIAS=/jaxws/MarshallTest -SERVICEREFNAMEWSSERVLET=service/wsj2wdlmarshalltestservice -SERVICEREFNAMEWSEJB=service/wsj2wdlmarshalltestservice -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdlmarshalltestservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/build.xml deleted file mode 100644 index 083f9e166f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/client/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/client/Client.java deleted file mode 100644 index d9ebd9224d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/client/Client.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; - -import javax.xml.namespace.QName; - -import java.util.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.client."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "j2wdlnosei.endpoint.1"; - - private static final String WSDLLOC_URL = "j2wdlnosei.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - // ServiceName and PortName mapping configuration going java-to-wsdl - private static final String SERVICE_NAME = "EchoService"; - - private static final String PORT_NAME = "EchoPort"; - - private static final String NAMESPACEURI = "http://echo.org/wsdl"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - Echo port = null; - - static EchoService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (Echo) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, EchoService.class, - PORT_QNAME, Echo.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (Echo) service.getPort(Echo.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - getTargetEndpointAddress(port); - // JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (EchoService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: test - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3036; - * - * @test_Strategy: - * - * Description - */ - public void test() throws Fault { - TestUtil.logMsg("test"); - boolean pass = true; - - if (!stringTest()) - pass = false; - if (!stringArrayTest()) - pass = false; - - if (!pass) - throw new Fault("test failed"); - } - - public boolean stringTest() throws Fault { - TestUtil.logMsg("stringTest"); - boolean pass = true; - String request = "Mary"; - - try { - String response = port.echoString(request); - if (!JAXWS_Data.compareValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("stringTest failed", e); - } - return pass; - } - - public boolean stringArrayTest() throws Fault { - TestUtil.logMsg("stringArrayTest"); - boolean pass = true; - List request = JAXWS_Data.list_String_nonull_data; - - try { - List response = port.echoStringArray(request); - if (!JAXWS_Data.compareArrayValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("stringArrayTest failed", e); - } - return pass; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/client/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/client/build.xml deleted file mode 100644 index c376c6fb3d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/client/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/client/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/client/jakartaEE.tokens deleted file mode 100644 index dd3aef5ed5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/nosei/client/jakartaEE.tokens +++ /dev/null @@ -1,6 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdlechoservice") -SERVICE=com.sun.ts.tests.jaxws.ee.j2w.document.literal.nosei.client.EchoService -URLALIAS=/jaxws/Echo -SERVICEREFNAMEWSSERVLET=service/wsj2wdlechoservice -SERVICEREFNAMEWSEJB=service/wsj2wdlechoservice -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdlechoservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/build.xml deleted file mode 100644 index 2b750a451d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/client/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/client/Client.java deleted file mode 100644 index d6731be79a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/client/Client.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.restful.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; -import java.io.InputStream; -import java.io.ByteArrayOutputStream; - -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import java.util.Properties; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.sharedclients.HttpClient; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.j2w.document.literal.restful.client."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "j2wdlrestful.endpoint.1"; - - private String url = null; - - /* - * GET http://host:port/WSJ2WDLRESTFUL/jaxws/tokens?token=1 - * http://host:port/WSJ2WDLRESTFUL/jaxws/tokens/token/1 - * - * PUT http://host:port/WSJ2WDLRESTFUL/jaxws/tokens?token=15&value=1000 - * http://host:port/WSJ2WDLRESTFUL/jaxws/tokens/token/16/value/1001 - * - * DELETE http://host:port/WSJ2WDLRESTFUL/jaxws/tokens?token=15 - * http://host:port/WSJ2WDLRESTFUL/jaxws/tokens/token/16 - */ - - private static String queryString = "?token=1"; - - private static String pathInfo = "/token/1"; - - private static String putqueryString = "?token=15&value=1000"; - - private static String putpathInfo = "/token/16/value/1001"; - - private static String putgetqueryString = "?token=15"; - - private static String putgetpathInfo = "/token/16"; - - private static String deletequeryString = "?token=5"; - - private static String deletegetqueryString = "?token=5"; - - HttpClient httpClient; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - getTestURLs(); - httpClient = new HttpClient(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: testGETwithQUERYSTRING - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3036; - * - * @test_Strategy: - * - * Description - */ - public void testGETwithQUERYSTRING() throws Fault { - boolean pass = true; - try { - httpClient.setUrl(url.toString() + queryString); - httpClient.setMethod("GET"); - process(); - } catch (Exception e) { - e.printStackTrace(); - pass = false; - } - if (!pass) - throw new Fault("testGETwithQUERYSTRING failed"); - } - - /* - * @testName: testGETwithPATHINFO - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3036; - * - * @test_Strategy: - * - * Description - */ - public void testGETwithPATHINFO() throws Fault { - - boolean pass = true; - try { - httpClient.setUrl(url.toString() + pathInfo); - httpClient.setMethod("GET"); - process(); - } catch (Exception e) { - e.printStackTrace(); - pass = false; - } - if (!pass) - throw new Fault("testGETwithPATHINFO failed"); - } - - /* - * @testName: testPUTwithQUERYSTRING - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3036; - * - * @test_Strategy: - * - * Description - */ - public void testPUTwithQUERYSTRING() throws Fault { - boolean pass = true; - try { - httpClient.setUrl(url.toString() + putqueryString); - httpClient.setMethod("PUT"); - process(); - httpClient.setUrl(url.toString() + putgetqueryString); - httpClient.setMethod("GET"); - process(); - } catch (Exception e) { - e.printStackTrace(); - pass = false; - } - if (!pass) - throw new Fault("testPUTwithQUERYSTRING failed"); - } - - /* - * @testName: testPUTwithPATHINFO - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3036; - * - * @test_Strategy: - * - * Description - */ - public void testPUTwithPATHINFO() throws Fault { - - boolean pass = true; - try { - httpClient.setUrl(url.toString() + putpathInfo); - httpClient.setMethod("PUT"); - process(); - httpClient.setUrl(url.toString() + putgetpathInfo); - httpClient.setMethod("GET"); - process(); - } catch (Exception e) { - e.printStackTrace(); - pass = false; - } - if (!pass) - throw new Fault("testPUTwithPATHINFO failed"); - } - - /* - * @testName: testDELETEwithQUERYSTRING - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3036; - * - * @test_Strategy: - * - * Description - */ - public void testDELETEwithQUERYSTRING() throws Fault { - boolean pass = true; - try { - httpClient.setUrl(url.toString() + deletequeryString); - httpClient.setMethod("DELETE"); - process(); - httpClient.setUrl(url.toString() + deletegetqueryString); - httpClient.setMethod("GET"); - process(); - } catch (Exception e) { - e.printStackTrace(); - pass = false; - } - if (!pass) - throw new Fault("testDELETEwithQUERYSTRING failed"); - } - - /* - * @testName: testPOST - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3012; JAXWS:SPEC:3036; - * - * @test_Strategy: - * - * Description - */ - public void testPOST() throws Fault { - - boolean pass = true; - try { - httpClient.setUrl(url.toString() + putpathInfo); - httpClient.setMethod("POST"); - // TODO - } catch (Exception e) { - e.printStackTrace(); - pass = false; - } - if (!pass) - throw new Fault("testPOST failed"); - } - - private Source process() throws Exception { - return process(null); - } - - private Source process(InputStream is) throws Exception { - InputStream responseIs = httpClient.makeRequest(is); - StreamSource source = new StreamSource(responseIs); - printSource(source); - return source; - } - - private 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); - System.out.println("**** Response ******" + bos.toString()); - System.out.println(""); - bos.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/client/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/client/build.xml deleted file mode 100644 index 4fe1a8ca47..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/client/build.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/TokensImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/TokensImpl.java deleted file mode 100644 index ec017fb8b8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/TokensImpl.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.restful.server; - -import java.io.ByteArrayInputStream; -import java.util.StringTokenizer; - -import jakarta.annotation.Resource; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; -import jakarta.xml.ws.Provider; -import jakarta.xml.ws.WebServiceContext; -import jakarta.xml.ws.WebServiceProvider; -import jakarta.xml.ws.Service; -import jakarta.xml.ws.ServiceMode; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.ws.http.HTTPException; -import jakarta.xml.ws.http.HTTPBinding; -import jakarta.xml.ws.BindingType; -import java.util.Hashtable; - -@WebServiceProvider -@BindingType(value = HTTPBinding.HTTP_BINDING) -public class TokensImpl implements Provider { - - @Resource - protected WebServiceContext wsContext; - - private Hashtable tokens; - - private String method, query, path; - - public TokensImpl() { - tokens = new Hashtable(); - tokens.put("1", Integer.valueOf(25)); - tokens.put("2", Integer.valueOf(5)); - tokens.put("3", Integer.valueOf(50)); - tokens.put("4", Integer.valueOf(75)); - tokens.put("5", Integer.valueOf(125)); - tokens.put("6", Integer.valueOf(225)); - tokens.put("7", Integer.valueOf(20)); - tokens.put("8", Integer.valueOf(10)); - tokens.put("9", Integer.valueOf(1)); - tokens.put("10", Integer.valueOf(2)); - } - - public Source invoke(Source source) { - try { - MessageContext mc = wsContext.getMessageContext(); - method = (String) mc.get(MessageContext.HTTP_REQUEST_METHOD); - query = (String) mc.get(MessageContext.QUERY_STRING); - path = (String) mc.get(MessageContext.PATH_INFO); - System.out.println("Request Method = " + method); - System.out.println("Query String = " + query); - System.out.println("PathInfo = " + path); - if (method.equals("GET")) { - return doGet(); - } else if (method.equals("PUT")) { - return doPut(); - } else if (method.equals("DELETE")) { - return doDelete(); - } else if (method.equals("POST")) { - return doPost(); - } else - throw new HTTPException(400); - } catch (Exception e) { - e.printStackTrace(); - throw new HTTPException(500); - } - } - - private Source doPut() { - System.out.println("Processing PUT request ..."); - if (query != null && query.contains("token=")) { - return doPutSource(query); - } else if (path != null && path.contains("/token")) { - return doPutSource(path); - } else { - throw new HTTPException(404); - } - } - - private Source doPutSource(String str) { - StringTokenizer st = new StringTokenizer(str, "=&/"); - st.nextToken(); - String key = st.nextToken(); - st.nextToken(); - String value = st.nextToken(); - tokens.put(key, new Integer(value)); - String body = "" - + "token" + key + "=" + value + " PUT" - + ""; - Source source = new StreamSource(new ByteArrayInputStream(body.getBytes())); - return source; - } - - private Source doDelete() { - System.out.println("Processing DELETE request ..."); - if (query != null && query.contains("token=")) { - return doDeleteSource(query); - } else if (path != null && path.contains("/token")) { - return doDeleteSource(path); - } else { - throw new HTTPException(404); - } - } - - private Source doDeleteSource(String str) { - StringTokenizer st = new StringTokenizer(str, "=&/"); - st.nextToken(); - String key = st.nextToken(); - tokens.remove(key); - String body = "" - + "token=" + key + " DELETE" + ""; - Source source = new StreamSource(new ByteArrayInputStream(body.getBytes())); - return source; - } - - private Source doPost() { - System.out.println("Processing POST request ..."); - return null; - } - - private Source doGet() { - System.out.println("Processing GET request ..."); - if (query != null && query.contains("token=")) { - return doGetSource(query); - } else if (path != null && path.contains("/token")) { - return doGetSource(path); - } else { - throw new HTTPException(404); - } - } - - private Source doGetSource(String str) { - StringTokenizer st = new StringTokenizer(str, "=&/"); - st.nextToken(); - String key = st.nextToken(); - Integer value = (Integer) tokens.get(key); - String response; - if (value == null) - response = "token=" + key + " not found"; - else - response = "" + value; - String body = "" - + response + ""; - Source source = new StreamSource(new ByteArrayInputStream(body.getBytes())); - return source; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/build.xml deleted file mode 100644 index 22a48c6c81..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/build.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/jakartaEE.tokens deleted file mode 100644 index 326bc361a7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/jakartaEE.tokens +++ /dev/null @@ -1,4 +0,0 @@ -IMPL=com.sun.ts.tests.jaxws.ee.j2w.document.literal.restful.server.TokensImpl -URLALIAS=/jaxws/tokens/* -SERVLETNAME=com.sun.ts.tests.jaxws.ee.j2w.document.literal.restful.server.TokensImpl -WEBSERVICEDESCRIPTION=TokensDesc diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/standalone-sun-jaxws.xml deleted file mode 100644 index a260f46dd4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/standalone.web.xml deleted file mode 100644 index 76a5457e14..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/restful/server/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WDLRESTFULApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Restful-Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Restful-Test -/jaxws/tokens/* - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/build.xml deleted file mode 100644 index 58fbdee282..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/client/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/client/Client.java deleted file mode 100644 index 371d677de7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/client/Client.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.sessionmaintaintest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; - -import jakarta.xml.ws.BindingProvider; - -import javax.xml.namespace.QName; - -import java.util.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.j2w.document.literal.sessionmaintaintest.client."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "j2wdlsessionmaintaintest.endpoint.1"; - - private static final String WSDLLOC_URL = "j2wdlsessionmaintaintest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - // ServiceName and PortName mapping configuration going java-to-wsdl - private static final String SERVICE_NAME = "TestService"; - - private static final String PORT_NAME = "TestPort"; - - private static final String NAMESPACEURI = "http://test.org/wsdl"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - Test port = null; - - static TestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (Test) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, TestService.class, - PORT_QNAME, Test.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (Test) service.getPort(Test.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - getTargetEndpointAddress(port); - // JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (TestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: SessionMaintainPropertyNotSetTest - * - * @assertion_ids: WS4EE:SPEC:5004; JAXWS:JAVADOC:69; JAXWS:JAVADOC:129; - * JAXWS:SPEC:4005; - * - * @test_Strategy: With maintain property set to false, session should not be - * maintained. - * - */ - - public void SessionMaintainPropertyNotSetTest() throws Fault { - TestUtil.logMsg("SessionMaintainPropertyNotSetTest"); - boolean pass = true; - - try { - String id = port.getSessionId(); - if (port.compareSessionId(id)) { - TestUtil - .logErr("Client session was maintain when it should not have been"); - pass = false; - } else - TestUtil.logMsg("Client session is not maintained"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SessionMaintainPropertyNotSetTest failed", e); - } - if (!pass) - throw new Fault("SessionMaintainPropertyNotSetTest failed"); - - } - - /* - * @testName: SessionMaintainPropertySetToFalseTest - * - * @assertion_ids: WS4EE:SPEC:5004; JAXWS:JAVADOC:69; JAXWS:JAVADOC:129; - * JAXWS:SPEC:4005; - * - * @test_Strategy: With maintain property set to false, session should not be - * maintained. - * - */ - - public void SessionMaintainPropertySetToFalseTest() throws Fault { - TestUtil.logMsg("SessionMaintainPropertySetToFalseTest"); - boolean pass = true; - - try { - Map requestContext = ((BindingProvider) port) - .getRequestContext(); - requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, - Boolean.FALSE); - String id = port.getSessionId(); - if (port.compareSessionId(id)) { - TestUtil - .logErr("Client session was maintain when it should not have been"); - pass = false; - } else { - TestUtil.logMsg("Client session is not maintained"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SessionMaintainPropertySetToFalseTest failed", e); - } - if (!pass) - throw new Fault("SessionMaintainPropertySetToFalseTest failed"); - - } - - /* - * @testName: SessionMaintainPropertySetToTrueTest - * - * @assertion_ids: WS4EE:SPEC:5004; JAXWS:JAVADOC:69; JAXWS:JAVADOC:129; - * JAXWS:SPEC:4005; - * - * @test_Strategy: With maintain property set to true, session should be - * maintained. - * - */ - - public void SessionMaintainPropertySetToTrueTest() throws Fault { - TestUtil.logMsg("SessionMaintainPropertySetToTrueTest"); - boolean pass = true; - - try { - Map requestContext = ((BindingProvider) port) - .getRequestContext(); - requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, - Boolean.TRUE); - String id = port.getSessionId(); - if (!port.compareSessionId(id)) { - TestUtil - .logErr("Client session was not maintain when it should have been"); - pass = false; - } else - TestUtil.logMsg("Client session is maintained"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SessionMaintainPropertySetToTrueTest failed", e); - } - if (!pass) - throw new Fault("SessionMaintainPropertySetToTrueTest failed"); - - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/client/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/client/build.xml deleted file mode 100644 index 209d29c15d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/client/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/client/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/client/jakartaEE.tokens deleted file mode 100644 index 521d8b0a06..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/client/jakartaEE.tokens +++ /dev/null @@ -1,6 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdltestservice") -SERVICE=com.sun.ts.tests.jaxws.ee.j2w.document.literal.sessionmaintaintest.client.TestService -URLALIAS=/jaxws/Test -SERVICEREFNAMEWSSERVLET=service/wsj2wdltestservice -SERVICEREFNAMEWSEJB=service/wsj2wdltestservice -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdltestservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/build.xml deleted file mode 100644 index a0e0aad28d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/jakartaEE.tokens deleted file mode 100644 index ed4fde78fc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdltestservice") -SERVICE=com.sun.ts.tests.jaxws.ee.j2w.document.literal.sessionmaintaintest.server.TestService -IMPL=com.sun.ts.tests.jaxws.ee.j2w.document.literal.sessionmaintaintest.server.TestImpl -SEI=com.sun.ts.tests.jaxws.ee.j2w.document.literal.sessionmaintaintest.server.Test -NAMESPACEURI=http://test.org/wsdl -PORT=TestPort -URLALIAS=/jaxws/Test -SERVLETNAME=com.sun.ts.tests.jaxws.ee.j2w.document.literal.sessionmaintaintest.server.TestImpl -WEBSERVICEDESCRIPTION=TestService -SERVICEREFNAMEWSSERVLET=service/wsj2wdltestservice -SERVICEREFNAMEWSEJB=service/wsj2wdltestservice -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdltestservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/standalone-sun-jaxws.xml deleted file mode 100644 index 43dbc37def..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/standalone.web.xml deleted file mode 100644 index a9b172b7b7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/sessionmaintaintest/server/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WDLSMTApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Test -/jaxws/Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/build.xml deleted file mode 100644 index 6913ccc591..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/Client.java deleted file mode 100644 index 58009b8215..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/Client.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 53493 2007-05-22 17:06:35Z adf $ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.document.literal.webmethod.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; - -import javax.xml.namespace.QName; - -import java.util.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.j2w.document.literal.webmethod.client."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "j2wdlwebmethod.endpoint.1"; - - private static final String WSDLLOC_URL = "j2wdlwebmethod.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - // ServiceName and PortName mapping configuration going java-to-wsdl - private static final String SERVICE_NAME = "TestService"; - - private static final String PORT_NAME = "TestPort"; - - private static final String NAMESPACEURI = "http://test.org/wsdl"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - Test port = null; - - static TestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (Test) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, TestService.class, - PORT_QNAME, Test.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (Test) service.getPort(Test.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - getTargetEndpointAddress(port); - // JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (TestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - private void assertEquals(String s1, String s2, String m) throws Fault { - TestUtil.logMsg("assert method exists for " + m); - if (!s1.equals(s2)) - throw new Fault("" + m); - else - TestUtil.logMsg("method exists for " + m); - } - - private void assertMethodNonExistant(String m) throws Fault { - TestUtil.logMsg("assert method does not exist for " + m); - try { - port.getClass().getMethod(m, new Class[] { String.class }); - throw new Fault("" + m + " should not be a Web Method"); - } catch (NoSuchMethodException e) { - TestUtil.logMsg("method does not exist for " + m); - } - } - - /* - * @testName: webMethodTestMapping - * - * @assertion_ids: JAXWS:SPEC:3010; JAXWS:SPEC:3011; JAXWS:SPEC:3006; - * JAXWS:SPEC:3036; - * - * @test_Strategy: - * - * Description - */ - public void webMethodTestMapping() throws Fault { - TestUtil.logMsg("webMethodTestMapping"); - boolean pass = true; - - try { - // Methods (method1,method3,method4,method5,overridetoString) should exist - assertEquals("foo", port.method1("foo"), - "webMethodTestMapping: port.method1"); - assertEquals("foo", port.method3("foo"), - "webMethodTestMapping: port.method3"); - assertEquals("foo", port.method4("foo"), - "webMethodTestMapping: port.method4"); - assertEquals("foo", port.method5("foo"), - "webMethodTestMapping: port.method5"); - assertEquals("TestImplBaseBase", port.overridetoString(), - "webMethodTestMapping: port.overridetoString"); - - // Methods (method2,method6-9) should not exist - assertMethodNonExistant("webMethodTestMapping: port.method2"); - assertMethodNonExistant("webMethodTestMapping: port.method6"); - assertMethodNonExistant("webMethodTestMapping: port.method7"); - assertMethodNonExistant("webMethodTestMapping: port.method8"); - assertMethodNonExistant("webMethodTestMapping: port.method9"); - assertMethodNonExistant("webMethodTestMapping: port.method10"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("webMethodTestMapping failed", e); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/build.xml deleted file mode 100644 index d406d2cdbb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/jakartaEE.tokens deleted file mode 100644 index f136d4523e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/client/jakartaEE.tokens +++ /dev/null @@ -1,6 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdltestservice") -SERVICE=com.sun.ts.tests.jaxws.ee.j2w.document.literal.webmethod.client.TestService -URLALIAS=/jaxws/Test -SERVICEREFNAMEWSSERVLET=service/wsj2wdltestservice -SERVICEREFNAMEWSEJB=service/wsj2wdltestservice -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdltestservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/build.xml deleted file mode 100644 index 83a074f156..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/build.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/jakartaEE.tokens deleted file mode 100644 index 799b76d191..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdltestservice") -SERVICE=com.sun.ts.tests.jaxws.ee.j2w.document.literal.webmethod.server.TestService -IMPL=com.sun.ts.tests.jaxws.ee.j2w.document.literal.webmethod.server.TestImpl -SEI=com.sun.ts.tests.jaxws.ee.j2w.document.literal.webmethod.server.Test -NAMESPACEURI=http://test.org/wsdl -PORT=TestPort -URLALIAS=/jaxws/Test -SERVLETNAME=com.sun.ts.tests.jaxws.ee.j2w.document.literal.webmethod.server.TestImpl -WEBSERVICEDESCRIPTION=TestService -SERVICEREFNAMEWSSERVLET=service/wsj2wdltestservice -SERVICEREFNAMEWSEJB=service/wsj2wdltestservice -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdltestservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/standalone-sun-jaxws.xml deleted file mode 100644 index 6f5ca21ec1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/standalone.web.xml deleted file mode 100644 index ef5ef8951c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/document/literal/webmethod/server/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WDLWEBMETHODApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Test -/jaxws/Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/build.xml deleted file mode 100644 index db0643ec14..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/build.xml deleted file mode 100644 index ddd262fdf3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/Client.java deleted file mode 100644 index df22e2bf23..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/Client.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest1; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.net.*; - -import java.util.Properties; -import com.sun.ts.tests.jaxws.common.*; - -import javax.xml.namespace.QName; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - // ServiceName and PortName mapping configuration going java-to-wsdl - private static final String SERVICE_NAME = "HandlerChainTestService"; - - private static final String PORT_NAME = "HandlerChainTestPort"; - - private static final String NAMESPACEURI = "http://handlerchaintestservice.org/wsdl"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - // URL properties used by the test - private static final String ENDPOINT_URL = "j2wrlhandlerchaintest1.endpoint.1"; - - private static final String WSDLLOC_URL = "j2wrlhandlerchaintest1.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - HandlerChainTest port = null; - - static HandlerChainTestService service = null; - - private TSURL ctsurl = new TSURL(); - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortJavaEE() throws Exception { - port = (HandlerChainTest) service.getHandlerChainTestPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - private void getPortStandalone() throws Exception { - port = (HandlerChainTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - HandlerChainTestService.class, PORT_QNAME, HandlerChainTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HandlerChainTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: HandlerChainOnImplTest - * - * @assertion_ids: JAXWS:SPEC:9009.3; WS4EE:SPEC:6007 - * - * @test_Strategy: Use a handler that is specified on the Impl and see that it - * transforms the body - */ - public void HandlerChainOnImplTest() throws Fault { - TestUtil.logMsg("HandlerChainOnImplTest"); - boolean pass = true; - String expected1 = "OutboundServerLogicalHandler"; - String expected2 = "InboundServerLogicalHandler"; - String expected3 = "InboundServerSOAPHandler"; - String expected4 = "OutboundServerSOAPHandler"; - try { - String result = port.helloWorld("HandlerChainOnImplTest"); - TestUtil.logMsg("Return value = " + result); - if (result.indexOf(expected1) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected1 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected2) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected2 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected3) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected3 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected4) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected4 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - } catch (Throwable t) { - t.printStackTrace(); - throw new Fault(t.toString()); - } - - if (!pass) - throw new Fault("HandlerChainOnImplTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/build.xml deleted file mode 100644 index aa5009497c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest1/build.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/Client.java deleted file mode 100644 index e50e02d7d7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/Client.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.handlerchaintest2; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.net.*; - -import java.util.Properties; -import com.sun.ts.tests.jaxws.common.*; - -import javax.xml.namespace.QName; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - // ServiceName and PortName mapping configuration going java-to-wsdl - private static final String SERVICE_NAME = "HandlerChainTestService"; - - private static final String PORT_NAME = "HandlerChainTestPort"; - - private static final String NAMESPACEURI = "http://handlerchaintestservice.org/wsdl"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - // URL properties used by the test - private static final String ENDPOINT_URL = "j2wrlhandlerchaintest2.endpoint.1"; - - private static final String WSDLLOC_URL = "j2wrlhandlerchaintest2.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - HandlerChainTest port = null; - - static HandlerChainTestService service = null; - - private TSURL ctsurl = new TSURL(); - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortJavaEE() throws Exception { - port = (HandlerChainTest) service.getHandlerChainTestPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - private void getPortStandalone() throws Exception { - port = (HandlerChainTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - HandlerChainTestService.class, PORT_QNAME, HandlerChainTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HandlerChainTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: HandlerChainOnSEITest - * - * @assertion_ids: JAXWS:SPEC:9009.1 - * - * @test_Strategy: Use a handler that is specified on the SEI and see that it - * transforms the body - */ - public void HandlerChainOnSEITest() throws Fault { - TestUtil.logMsg("HandlerChainOnSEITest"); - boolean pass = true; - String expected1 = "OutboundServerLogicalHandler"; - String expected2 = "InboundServerLogicalHandler"; - String expected3 = "InboundServerSOAPHandler"; - String expected4 = "OutboundServerSOAPHandler"; - try { - String result = port.helloWorld("HandlerChainOnSEITest"); - TestUtil.logMsg("Return value = " + result); - if (result.indexOf(expected1) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected1 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected2) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected2 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected3) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected3 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected4) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected4 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - } catch (Throwable t) { - t.printStackTrace(); - throw new Fault(t.toString()); - } - - if (!pass) - throw new Fault("HandlerChainOnSEITest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/build.xml deleted file mode 100644 index a88ead1fc4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/handlerchaintest2/build.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/build.xml deleted file mode 100644 index 910f64328b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/client/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/client/Client.java deleted file mode 100644 index 1633858bd9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/client/Client.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.nosei.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; - -import javax.xml.namespace.QName; - -import java.util.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.nosei.client."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "j2wrlnosei.endpoint.1"; - - private static final String WSDLLOC_URL = "j2wrlnosei.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - // ServiceName and PortName mapping configuration going java-to-wsdl - private static final String SERVICE_NAME = "EchoService"; - - private static final String PORT_NAME = "EchoPort"; - - private static final String NAMESPACEURI = "http://echo.org/wsdl"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - Echo port = null; - - static EchoService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (Echo) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, EchoService.class, - PORT_QNAME, Echo.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (Echo) service.getPort(Echo.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - getTargetEndpointAddress(port); - // JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (EchoService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: echoTest - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3013; JAXWS:SPEC:3036; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: - * - * Description - */ - public void echoTest() throws Fault { - TestUtil.logMsg("echoTest"); - boolean pass = true; - - if (!stringTest()) - pass = false; - if (!stringArrayTest()) - pass = false; - - if (!pass) - throw new Fault("echoTest failed"); - } - - public boolean stringTest() throws Fault { - TestUtil.logMsg("stringTest"); - boolean pass = true; - String request = "Mary"; - - try { - String response = port.echoString(request); - if (!JAXWS_Data.compareValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("stringTest failed", e); - } - return pass; - } - - public boolean stringArrayTest() throws Fault { - TestUtil.logMsg("stringArrayTest"); - boolean pass = true; - String values[] = JAXWS_Data.String_nonull_data; - List expect = (List) Arrays.asList(values); - - try { - StringArray request = new StringArray(); - for (int i = 0; i < values.length; i++) - request.getItem().add(values[i]); - StringArray response = port.echoStringArray(request); - List actual = response.getItem(); - if (!JAXWS_Data.compareArrayValues(expect, actual, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("stringArrayTest failed", e); - } - return pass; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/client/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/client/build.xml deleted file mode 100644 index 8500301a54..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/client/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/client/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/client/jakartaEE.tokens deleted file mode 100644 index 0c9d0afab6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/client/jakartaEE.tokens +++ /dev/null @@ -1,6 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlechoservice") -SERVICE=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.nosei.client.EchoService -URLALIAS=/jaxws/Echo -SERVICEREFNAMEWSSERVLET=service/wsj2wrlechoservice -SERVICEREFNAMEWSEJB=service/wsj2wrlechoservice -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlechoservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/build.xml deleted file mode 100644 index 88b31f5d54..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/jakartaEE.tokens deleted file mode 100644 index fd712a806d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlechoservice") -SERVICE=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.nosei.server.EchoService -IMPL=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.nosei.server.EchoImpl -SEI=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.nosei.server.Echo -NAMESPACEURI=http://echo.org/wsdl -PORT=EchoPort -URLALIAS=/jaxws/Echo -SERVLETNAME=com.sun.ts.tests.jaxws.ee.j2w.rpc.literal.nosei.server.EchoImpl -WEBSERVICEDESCRIPTION=EchoService -SERVICEREFNAMEWSSERVLET=service/wsj2wrlechoservice -SERVICEREFNAMEWSEJB=service/wsj2wrlechoservice -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlechoservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/standalone-sun-jaxws.xml deleted file mode 100644 index 26567edc3f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/standalone.web.xml deleted file mode 100644 index 200a97e725..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/j2w/rpc/literal/nosei/server/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WRLNOSEIApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Echo -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Echo -/jaxws/Echo - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/build.xml deleted file mode 100644 index 5533ffbb6f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/build.xml deleted file mode 100644 index 5375985478..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/build.xml deleted file mode 100644 index ba56f09520..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/Client.java deleted file mode 100644 index 9ca290d9e1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/Client.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.asynctest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; - -public class Client extends ServiceEETest { - // need to create jaxbContext - private static final ObjectFactory of = new ObjectFactory(); - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.asynctest.client."; - - // service and port information - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jasynctest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jasynctest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - Hello port = null; - - static HelloService service = null; - - private class HelloCallbackHandler implements AsyncHandler { - private HelloResponse output; - - public void handleResponse(Response response) { - try { - output = response.get(); - } catch (ExecutionException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - HelloResponse getResponse() { - return output; - } - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (Hello) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - HelloService.class, PORT_QNAME, Hello.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setTargetEndpointAddress(port, url); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HelloService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: invokeSynchronousTest - * - * @assertion_ids: JAXWS:SPEC:2032; JAXWS:SPEC:2033; JAXWS:SPEC:2034; - * JAXWS:SPEC:2034; JAXWS:SPEC:2035; JAXWS:SPEC:2038; JAXWS:SPEC:2039; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke an RPC method using - * synchronous method. - * - * Description A client can invoke an RPC method via generated stub. - */ - public void invokeSynchronousTest() throws Fault { - TestUtil.logTrace("invokeSynchronousTest"); - boolean pass = true; - String reqStr = "foo"; - String resStr = "Hello, foo!"; - try { - HelloRequest helloReq = of.createHelloRequest(); - helloReq.setString(reqStr); - HelloResponse helloRes = port.hello(helloReq); - String result = helloRes.getResult(); - TestUtil.logMsg("result=" + result); - if (!result.equals(resStr)) { - TestUtil.logErr("expected: " + resStr + ", received: " + result); - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - - if (!pass) - throw new Fault("invokeSynchronousTest failed"); - } - - /* - * @testName: invokeAsyncPollTest - * - * @assertion_ids: JAXWS:SPEC:2032; JAXWS:SPEC:2033; JAXWS:SPEC:2034; - * JAXWS:SPEC:2034; JAXWS:SPEC:2035; JAXWS:SPEC:2038; JAXWS:SPEC:2039; - * WS4EE:SPEC:4006; WS4EE:SPEC:4007; WS4EE:SPEC:4008; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke an RPC method using - * AsyncPoll method. - * - * Description A client can invoke an RPC method via generated stub. - */ - public void invokeAsyncPollTest() throws Fault { - TestUtil.logTrace("invokeAsyncPollTest"); - boolean pass = true; - String reqStr = "foo"; - String resStr = "Hello, foo!"; - try { - HelloRequest helloReq = of.createHelloRequest(); - helloReq.setString(reqStr); - Response response = port.helloAsync(helloReq); - TestUtil.logMsg("Polling and waiting for data ..."); - Object lock = new Object(); - while (!response.isDone()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - HelloResponse helloRes = response.get(); - String result = helloRes.getResult(); - TestUtil.logMsg("result=" + result); - if (!result.equals(resStr)) { - TestUtil.logErr("expected: " + resStr + ", received: " + result); - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - - if (!pass) - throw new Fault("invokeAsyncPollTest failed"); - } - - /* - * @testName: invokeAsyncCallbackTest - * - * @assertion_ids: JAXWS:SPEC:2032; JAXWS:SPEC:2033; JAXWS:SPEC:2034; - * JAXWS:SPEC:2034; JAXWS:SPEC:2035; JAXWS:SPEC:2038; JAXWS:SPEC:2039; - * WS4EE:SPEC:4006; WS4EE:SPEC:4007; WS4EE:SPEC:4008; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke an RPC method using - * AsyncCallback method. - * - * Description A client can invoke an RPC method via generated stub. - */ - public void invokeAsyncCallbackTest() throws Fault { - TestUtil.logTrace("invokeAsyncCallbackTest"); - boolean pass = true; - String reqStr = "foo"; - String resStr = "Hello, foo!"; - try { - HelloRequest helloReq = of.createHelloRequest(); - helloReq.setString(reqStr); - HelloCallbackHandler callbackHandler = new HelloCallbackHandler(); - Future response = port.helloAsync(helloReq, callbackHandler); - TestUtil.logMsg("Waiting for Callback to complete to obtain data ..."); - Object lock = new Object(); - while (!response.isDone()) { - synchronized (lock) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - } - HelloResponse helloRes = callbackHandler.getResponse(); - String result = helloRes.getResult(); - TestUtil.logMsg("result=" + result); - if (!result.equals(resStr)) { - TestUtil.logErr("expected: " + resStr + ", received: " + result); - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - - if (!pass) - throw new Fault("invokeAsyncCallbackTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/build.xml deleted file mode 100644 index 9e6cdcf496..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/customfile-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/customfile-client.xml deleted file mode 100644 index 16045c79ab..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/customfile-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - true - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/jakartaEE.tokens deleted file mode 100644 index 88c66bb470..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/client/jakartaEE.tokens +++ /dev/null @@ -1,10 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlasynctest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.asynctest.client.HelloService -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.asynctest.client.Hello -NAMESPACEURI=http://helloservice.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlasynctest -SERVICEREFNAMEWSEJB=service/wsw2jdlasynctest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlasynctest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/HelloImpl.java deleted file mode 100644 index 61a3c93a83..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/HelloImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.asynctest.server; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "HelloService", targetNamespace = "http://helloservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JDLAsyncTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.asynctest.server.Hello") - -public class HelloImpl implements Hello { - - public HelloResponse hello(HelloRequest request) { - HelloResponse response = null; - System.out.println("Hello, " + request.getString() + "!"); - response = new HelloResponse(); - response.setResult("Hello, " + request.getString() + "!"); - return response; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/WSW2JDLAsyncTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/WSW2JDLAsyncTestService.wsdl deleted file mode 100644 index 85029bde41..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/WSW2JDLAsyncTestService.wsdl +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/build.xml deleted file mode 100644 index beda3efa53..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/customfile-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/customfile-server.xml deleted file mode 100644 index 39bf53fe90..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/customfile-server.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/jakartaEE.tokens deleted file mode 100644 index 052af46a5b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlasynctest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.asynctest.server.HelloService -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.asynctest.server.HelloImpl -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.asynctest.server.Hello -NAMESPACEURI=http://helloservice.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.document.literal.asynctest.server.HelloImpl -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlasynctest -SERVICEREFNAMEWSEJB=service/wsw2jdlasynctest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlasynctest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/standalone-sun-jaxws.xml deleted file mode 100644 index be5ee7fbd2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/standalone.web.xml deleted file mode 100644 index 64cc41428b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/asynctest/server/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLAsyncTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -/jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/build.xml deleted file mode 100644 index 106c5e60d3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/Client.java deleted file mode 100644 index 4af5e687d7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/Client.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.catalogtest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; -import java.util.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - private static final long serialVersionUID = 1L; - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.catalogtest."; - - // service and port information - private static final String NAMESPACEURI = "http://catalogtestservice.org/wsdl"; - - private static final String SERVICE_NAME = "CatalogTestService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jdlcatalogtest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jdlcatalogtest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - transient Hello port = null; - - static CatalogTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (CatalogTestService) getSharedObject(); - getTestURLs(); - } - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: TestCatalogWithValidSystemIdAndValidURIValidWSDL - * - * @assertion_ids: JAXWS:SPEC:4020; WS4EE:SPEC:5007; WS4EE:SPEC:35; - * WS4EE:SPEC:4014; - * - * @test_Strategy: Positive test case for oasis catalogs. Valid SystemId and - * valid URI pointing to a valid WSDL. Must pass. - */ - public void TestCatalogWithValidSystemIdAndValidURIValidWSDL() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestCatalogWithValidSystemIdAndValidURIValidWSDL"); - TestUtil.logMsg("Get port via wsdl catalog with Valid URI/Valid WSDL"); - if (modeProperty.equals("standalone")) { - port = (Hello) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - CatalogTestService.class, PORT_QNAME, Hello.class); - TestUtil.logMsg("port=" + port); - JAXWS_Util.setTargetEndpointAddress(port, url); - } else { - TestUtil.logMsg("service=" + service); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port=" + port); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - HelloRequest request = new HelloRequest(); - request.setString("Hello There!"); - HelloResponse response = port.hello(request); - TestUtil.logMsg("response=" + response.getString()); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: test failed"); - TestUtil.logErr( - "Invocation should have succeeded (Valid URI/Valid WSDL in catalog)"); - throw new Fault("TestCatalogWithValidSystemIdAndValidURIValidWSDL failed", - e); - } - - if (!pass) - throw new Fault( - "TestCatalogWithValidSystemIdAndValidURIValidWSDL failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/HelloImpl.java deleted file mode 100644 index 9ced55e43d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/HelloImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.catalogtest; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "CatalogTestService", targetNamespace = "http://catalogtestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JDLCatalogTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.catalogtest.Hello") -public class HelloImpl implements Hello { - - public HelloResponse hello(HelloRequest req) { - HelloResponse resp = null; - System.out.println("Hello, " + req.getString() + "!"); - 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/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/WSW2JDLCatalogTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/WSW2JDLCatalogTestService.wsdl deleted file mode 100644 index 96ae2e034f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/WSW2JDLCatalogTestService.wsdl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/build.xml deleted file mode 100644 index e8aa7dc529..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/customfile.xml deleted file mode 100644 index eb40b0823c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/jakartaEE.tokens deleted file mode 100644 index 69f9df9c49..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlcatalogtest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.catalogtest.CatalogTestService -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.catalogtest.HelloImpl -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.catalogtest.Hello -NAMESPACEURI=http://catalogtestservice.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.document.literal.catalogtest.HelloImpl -WEBSERVICEDESCRIPTION=CatalogTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlcatalogtest -SERVICEREFNAMEWSEJB=service/wsw2jdlcatalogtest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlcatalogtest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/standalone-sun-jaxws.xml deleted file mode 100644 index 6adb280418..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/standalone.web.xml deleted file mode 100644 index 9cad60c3ce..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/catalogtest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - -WSW2JDLCatalogTestApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - Hello - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - Hello - /jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/build.xml deleted file mode 100644 index 31677daca1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/Client.java deleted file mode 100644 index e9071a9435..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/Client.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.embedded; - -import com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.embedded.custom.pkg.*; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; - -import java.net.*; -import java.util.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - // need to create jaxbContext - private static final ObjectFactory of = new ObjectFactory(); - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.embedded."; - - // service and port information - private static final String NAMESPACEURI = "http://customizationembeddedtest.org/wsdl"; - - private static final String SERVICE_NAME = "myService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jcustomizationembeddedtest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jcustomizationembeddedtest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - Hello port = null; - - static CustomizationEmbeddedTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (Hello) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - CustomizationEmbeddedTestService.class, PORT_QNAME, Hello.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (Hello) JAXWS_Util.getPort(service, PORT_QNAME, Hello.class); - // port = (Hello) service.getMyHelloPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - // Initialize QName's used in the test - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (CustomizationEmbeddedTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: CustomizationEmbeddedTest - * - * @assertion_ids: JAXWS:SPEC:8000; JAXWS:SPEC:8001; JAXWS:SPEC:8002; - * JAXWS:SPEC:8005; JAXWS:SPEC:8006; JAXWS:SPEC:8007; JAXWS:SPEC:8010; - * JAXWS:SPEC:8012; JAXWS:SPEC:8013; JAXWS:SPEC:2064; JAXWS:SPEC:2023; - * JAXWS:SPEC:2028; JAXWS:SPEC:7000; JAXWS:SPEC:8009; - * - * @test_Strategy: Embedded annotations in the wsdl are used to change aspects - * of the wsdl file. If the endpoint is reachable then the customization - * worked. - * - * - * - */ - public void CustomizationEmbeddedTest() throws Fault { - TestUtil.logTrace("CustomizationEmbeddedTest"); - boolean pass = true; - String reqStr = "Hello"; - String reqStr2 = "World"; - String resStr = "Hello, World!"; - try { - // wrapper style - TestUtil.logMsg("Testing wrapper style enableWrapperStyle=true ..."); - String result = port.hello1(reqStr); - TestUtil.logMsg("result=" + result); - if (!result.equals(resStr)) { - TestUtil.logErr("expected: " + resStr + ", received: " + result); - pass = false; - } - - // non-wrapper style - TestUtil.logMsg("Testing non-wrapper style enableWrapperStyle=false ..."); - Hello2 hello2 = of.createHello2(); - hello2.setArgument(reqStr); - HelloResponse h = port.hello2(hello2); - result = h.getResponse(); - TestUtil.logMsg("result=" + result); - if (!result.equals(resStr)) { - TestUtil.logErr("expected: " + resStr + ", received: " + result); - pass = false; - } - - // non-wrapper style - TestUtil.logMsg("Testing non-wrapper style enableWrapperStyle=false ..."); - HelloRequest3 hello3 = of.createHelloRequest3(); - hello3.setHelloRequest1(reqStr); - hello3.setHelloRequest2(reqStr2); - HelloResponse3 h3 = port.hello3(hello3); - result = h3.getResponse(); - TestUtil.logMsg("result=" + result); - if (!result.equals(resStr)) { - TestUtil.logErr("expected: " + resStr + ", received: " + result); - pass = false; - } - - TestUtil.logMsg("Testing Fault Exception Case ..."); - hello3 = of.createHelloRequest3(); - hello3.setHelloRequest1("HelloException"); - hello3.setHelloRequest2(reqStr2); - try { - port.hello3(hello3); - TestUtil.logErr("HelloException expected but not thrown"); - pass = false; - } catch (HelloException e) { - TestUtil.logMsg("Got expected HelloException"); - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - - if (!pass) - throw new Fault("CustomizationEmbeddedTest failed"); - } - - /* - * @testName: jaxbCustomizationTest - * - * @assertion_ids: JAXWS:SPEC:8005; - * - * @test_Strategy: A jaxb customization test - * - */ - public void jaxbCustomizationTest() throws Fault { - TestUtil.logTrace("jaxbCustomizationTest"); - boolean pass = true; - String resStr = "FooBarPopeyeOlive"; - EchoRequest echoRequest = new EchoRequest(); - Name[] names = { new Name(), new Name() }; - names[0].setFirst("Foo"); - names[0].setLast("Bar"); - names[1].setFirst("Popeye"); - names[1].setLast("Olive"); - echoRequest.setName(names); - try { - TestUtil.logMsg("Testing jaxb customization test ..."); - EchoResponse echoResponse = port.echo(echoRequest); - String result = echoResponse.getReturn(); - if (!result.equals(resStr)) { - TestUtil.logErr("expected: " + resStr + ", received: " + result); - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - - if (!pass) - throw new Fault("jaxbCustomizationTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/HelloImpl.java deleted file mode 100644 index c93daa37ca..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/HelloImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.embedded; - -import com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.embedded.custom.pkg.HelloException; - -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "myService", targetNamespace = "http://customizationembeddedtest.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JDLCustomizationEmbeddedTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.embedded.Hello") - -public class HelloImpl implements Hello { - public String hello1(String helloArgument) { - System.out.println("in CustomizationEmbeddedTestService:HelloImpl:hello1"); - return helloArgument + ", World!"; - } - - public HelloResponse hello2(Hello2 helloArgument) { - System.out.println("in CustomizationEmbeddedTestService:HelloImpl:hello2"); - HelloResponse h = new HelloResponse(); - h.setResponse(helloArgument.getArgument() + ", World!"); - return h; - } - - public HelloResponse3 hello3(HelloRequest3 helloRequest3) - throws HelloException { - System.out.println("in CustomizationEmbeddedTestService:HelloImpl:hello3"); - if (helloRequest3.getHelloRequest1().equals("HelloException")) { - HelloFaultMessage hfm = new HelloFaultMessage(); - hfm.setFault1("foo"); - hfm.setFault2("bar"); - throw new HelloException("This is the HelloException fault", hfm); - } else { - HelloResponse3 h = new HelloResponse3(); - h.setResponse(helloRequest3.getHelloRequest1() + ", " - + helloRequest3.getHelloRequest2() + "!"); - return h; - } - } - - public EchoResponse echo(EchoRequest echoRequest) { - System.out.println("in CustomizationEmbeddedTestService:HelloImpl:echo"); - Name[] names = echoRequest.getName(); - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < names.length; i++) - sb.append(names[i].getFirst() + names[i].getLast()); - EchoResponse echoResponse = new EchoResponse(); - echoResponse.setReturn(sb.toString()); - return echoResponse; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/WSW2JDLCustomizationEmbeddedTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/WSW2JDLCustomizationEmbeddedTestService.wsdl deleted file mode 100644 index 17f9506333..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/WSW2JDLCustomizationEmbeddedTestService.wsdl +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - false - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - true - - - - - - - - - - false - - - - - - - - - - - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/build.xml deleted file mode 100644 index b3b32a97a6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/customfile.xml deleted file mode 100644 index 43930355da..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/jakartaEE.tokens deleted file mode 100644 index d0d75e1f12..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlcustomizationembeddedtest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.embedded.custom.pkg.CustomizationEmbeddedTestService -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.embedded.HelloImpl -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.embedded.Hello -NAMESPACEURI=http://customizationembeddedtest.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.embedded.HelloImpl -WEBSERVICEDESCRIPTION=CustomizationEmbeddedTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlcustomizationembeddedtest -SERVICEREFNAMEWSEJB=service/wsw2jdlcustomizationembeddedtest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlcustomizationembeddedtest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/standalone-sun-jaxws.xml deleted file mode 100644 index ca0b172603..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/standalone.web.xml deleted file mode 100644 index bdc5940e78..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/embedded/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLCustomizationEmbeddedTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -/jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/Client.java deleted file mode 100644 index 574051f83f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/Client.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.external; - -import com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.external.custom.pkg.*; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - // need to create jaxbContext - private static final ObjectFactory of = new ObjectFactory(); - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.external."; - - // service and port information - private static final String NAMESPACEURI = "http://customizationexternaltest.org/wsdl"; - - private static final String SERVICE_NAME = "myService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jcustomizationexternaltest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jcustomizationexternaltest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - Hello port = null; - - static CustomizationExternalTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (Hello) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - CustomizationExternalTestService.class, PORT_QNAME, Hello.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (Hello) JAXWS_Util.getPort(service, PORT_QNAME, Hello.class); - // port = (Hello) service.getMyHelloPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (CustomizationExternalTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: CustomizationExternalTest - * - * @assertion_ids: JAXWS:SPEC:8000; JAXWS:SPEC:8001; JAXWS:SPEC:8003; - * JAXWS:SPEC:8004; JAXWS:SPEC:8005; JAXWS:SPEC:8006; JAXWS:SPEC:8007; - * JAXWS:SPEC:8008; JAXWS:SPEC:8010; JAXWS:SPEC:8012; JAXWS:SPEC:8013; - * JAXWS:SPEC:2064; JAXWS:SPEC:7000; JAXWS:SPEC:8009; - * - * @test_Strategy: An external customization file is used to change aspects of - * the wsdl file. If the endpoint is reachable then the customization worked. - * - */ - public void CustomizationExternalTest() throws Fault { - TestUtil.logTrace("CustomizationExternalTest"); - boolean pass = true; - String reqStr = "Hello"; - String resStr = "Hello, World!"; - try { - HelloElement helloReq = of.createHelloElement(); - helloReq.setArgument(reqStr); - Holder holder = new Holder(); - holder.value = helloReq; - port.myHello(holder); - String result = holder.value.getArgument(); - TestUtil.logMsg("result=" + result); - if (!result.equals(resStr)) { - TestUtil.logErr("expected: " + resStr + ", received: " + result); - pass = false; - } - TestUtil.logMsg("Testing Fault Exception Case ..."); - helloReq.setArgument("Exception Case"); - holder.value = helloReq; - try { - port.myHello(holder); - TestUtil.logErr( - "CustomizationExternalTestException expected but not thrown"); - pass = false; - } catch (CustomizationExternalTestException e) { - TestUtil.logMsg("Got expected CustomizationExternalTestException"); - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - - if (!pass) - throw new Fault("CustomizationExternalTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/HelloImpl.java deleted file mode 100644 index b4886ba2a8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/HelloImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.external; - -import com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.external.custom.pkg.CustomizationExternalTestException; - -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "myService", targetNamespace = "http://customizationexternaltest.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JDLCustomizationExternalTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.external.Hello") - -public class HelloImpl implements Hello { - public void myHello(jakarta.xml.ws.Holder helloArgument) - throws CustomizationExternalTestException { - System.out.println("in CustomizationExternalTestService:HelloImpl:myHello"); - if (helloArgument.value.getArgument().equals("Exception Case")) { - HelloFaultMessage hfm = new HelloFaultMessage(); - hfm.setFault1("foo"); - hfm.setFault2("bar"); - throw new CustomizationExternalTestException( - "This is the CustomizationExternalTestException fault", hfm); - } else - helloArgument.value - .setArgument(helloArgument.value.getArgument() + ", World!"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/WSW2JDLCustomizationExternalTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/WSW2JDLCustomizationExternalTestService.wsdl deleted file mode 100644 index 165f3d90af..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/WSW2JDLCustomizationExternalTestService.wsdl +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/build.xml deleted file mode 100644 index 9a5ea4a721..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/customfile.xml deleted file mode 100644 index 0cdb75d0d5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/customfile.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - false - true - - - - - - - - - - - - - false - - - - - - true - - - - - false - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/customfile2.xml deleted file mode 100644 index 7d42c90370..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/customfile2.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/jakartaEE.tokens deleted file mode 100644 index 860c0d346c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlcustomizationexternaltest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.external.custom.pkg.CustomizationExternalTestService -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.external.HelloImpl -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.external.Hello -NAMESPACEURI=http://customizationexternaltest.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.document.literal.customization.external.HelloImpl -WEBSERVICEDESCRIPTION=CustomizationExternalTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlcustomizationexternaltest -SERVICEREFNAMEWSEJB=service/wsw2jdlcustomizationexternaltest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlcustomizationexternaltest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/standalone-sun-jaxws.xml deleted file mode 100644 index e213d660c9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/standalone.web.xml deleted file mode 100644 index b177d1757e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/customization/external/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLCustomizationExternalTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -/jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/Client.java deleted file mode 100644 index 4110882de8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/Client.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.net.*; - -import jakarta.xml.ws.*; -import java.util.Properties; -import com.sun.ts.tests.jaxws.common.*; - -import javax.xml.namespace.QName; -import jakarta.xml.bind.JAXBContext; - -public class Client extends ServiceEETest { - - private static final ObjectFactory of = new ObjectFactory(); - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - // ServiceName and PortName mapping configuration going java-to-wsdl - private static final String SERVICE_NAME = "HandlerChainTestService"; - - private static final String PORT_NAME = "HandlerChainTestPort"; - - private static final String NAMESPACEURI = "http://handlerchaintestservice.org/wsdl"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jdlhandlerchaintest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jdlhandlerchaintest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - HandlerChainTest port = null; - - static HandlerChainTestService service = null; - - private TSURL ctsurl = new TSURL(); - - private Dispatch dispatchJaxb = null; - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest.HandlerChainTestService.class; - - private static final Class JAXB_OBJECT_FACTORY = com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest.ObjectFactory.class; - - private JAXBContext createJAXBContext() { - try { - return JAXBContext.newInstance(JAXB_OBJECT_FACTORY); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - private Dispatch createDispatchJAXB() throws Exception { - return service.createDispatch(PORT_QNAME, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortJavaEE() throws Exception { - port = (HandlerChainTest) service.getHandlerChainTestPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - private void getPortStandalone() throws Exception { - service = (HandlerChainTestService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, SERVICE_CLASS); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HandlerChainTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: HandlerChainOnProviderTest - * - * @assertion_ids: JAXWS:SPEC:9009.2 - * - * @test_Strategy: Use a handler that is specified on the Provider and see - * that it transforms the body - */ - public void HandlerChainOnProviderTest() throws Fault { - TestUtil.logMsg("HandlerChainOnProviderTest"); - boolean pass = true; - String expected1 = "OutboundServerLogicalHandler"; - String expected2 = "InboundServerLogicalHandler"; - String expected3 = "InboundServerSOAPHandler"; - String expected4 = "OutboundServerSOAPHandler"; - - HelloRequest helloReq = null; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument("HandlerChainOnProviderTest"); - } catch (Exception e) { - e.printStackTrace(); - } - HelloResponse helloRes = null; - try { - dispatchJaxb = createDispatchJAXB(); - helloRes = (HelloResponse) dispatchJaxb.invoke(helloReq); - String result = helloRes.getArgument(); - TestUtil.logMsg("Return value = " + result); - if (result.indexOf(expected1) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected1 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected2) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected2 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected3) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected3 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected4) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected4 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - } catch (Throwable t) { - t.printStackTrace(); - throw new Fault(t.toString()); - } - - if (!pass) - throw new Fault("HandlerChainOnProviderTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/HandlerChainTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/HandlerChainTestImpl.java deleted file mode 100644 index 2bd43e1e16..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/HandlerChainTestImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest; - -import jakarta.xml.ws.*; -import java.io.StringReader; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; -import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.dom.DOMSource; - -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import jakarta.jws.HandlerChain; - -@HandlerChain(name = "", file = "server-handler.xml") -@WebServiceProvider(serviceName = "HandlerChainTestService", portName = "HandlerChainTestPort", targetNamespace = "http://handlerchaintestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JHandlerChainTestService.wsdl") -@BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http") -@ServiceMode(value = jakarta.xml.ws.Service.Mode.PAYLOAD) - -public class HandlerChainTestImpl implements Provider { - - private static final jakarta.xml.bind.JAXBContext jaxbContext = createJAXBContext(); - - public jakarta.xml.bind.JAXBContext getJAXBContext() { - return jaxbContext; - } - - private static jakarta.xml.bind.JAXBContext createJAXBContext() { - try { - return jakarta.xml.bind.JAXBContext.newInstance( - com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest.ObjectFactory.class); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - public Source invoke(Source req) { - System.out.println("**** Received in Provider Impl ******"); - DOMResult dr = null; - try { - dr = JAXWS_Util.getSourceAsDOMResult(req); - System.out.println("-> Source=" + JAXWS_Util.getDOMResultAsString(dr)); - - } catch (Exception e) { - System.out.println("Exception: failed getDOMResultAsString ... " + e); - } - try { - HelloRequest request = recvBean(new DOMSource(dr.getNode())); - String arg = request.getArgument(); - String response = "" - + arg + ""; - System.out.println("Sending response=" + response); - Source source = new StreamSource(new StringReader(response)); - return source; - } catch (Exception e) { - e.printStackTrace(); - throw new WebServiceException("Provider endpoint failed", e); - } - } - - private HelloRequest recvBean(Source req) { - System.out.println("*** recvBean ***"); - HelloRequest helloReq = null; - try { - helloReq = (HelloRequest) jaxbContext.createUnmarshaller().unmarshal(req); - System.out.println("argument=" + helloReq.getArgument()); - } catch (Exception e) { - System.out.println("Received an exception while parsing the source"); - e.printStackTrace(); - } - return helloReq; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/LogicalHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/LogicalHandler.java deleted file mode 100644 index aebd0b5167..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/LogicalHandler.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest; - -import jakarta.xml.ws.handler.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import java.io.StringReader; -import javax.xml.transform.stream.StreamSource; - -public class LogicalHandler - implements jakarta.xml.ws.handler.LogicalHandler { - private final String HANDLER_NAME = "ServerLogicalHandler"; - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "HandlerChainOnProviderTest")) { - HandlerChainOnProviderTest(context, direction); - } else { - System.out.println( - "didn't find HandlerChainOnProviderTest message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void HandlerChainOnProviderTest(LogicalMessageContext context, - String direction) { - System.out.println("in " + HANDLER_NAME + ":HandlerChainOnProviderTest"); - - Handler_Util.dumpMsg(context); - - String tmp = Handler_Util.getMessageAsString(context); - String newTmp = tmp.replaceAll("HandlerChainOnProviderTest", - "HandlerChainOnProviderTest" + direction + HANDLER_NAME); - context.getMessage().setPayload(new StreamSource(new StringReader(newTmp))); - Handler_Util.dumpMsg(context); - - System.out - .println("exiting " + HANDLER_NAME + ":HandlerChainOnProviderTest"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/SOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/SOAPHandler.java deleted file mode 100644 index 4405ac43ae..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/SOAPHandler.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest; - -import com.sun.ts.lib.util.*; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Iterator; - -import com.sun.ts.tests.jaxws.common.Handler_Util; - -public class SOAPHandler - implements jakarta.xml.ws.handler.soap.SOAPHandler { - - private static final String HANDLER_NAME = "ServerSOAPHandler"; - - public Set getHeaders() { - return new HashSet(); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "HandlerChainOnProviderTest")) { - HandlerChainOnProviderTest(context, direction); - } else { - System.out.println( - "didn't find HandlerChainOnProviderTest message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void HandlerChainOnProviderTest(MessageContext context, - String direction) { - System.out.println("in " + HANDLER_NAME + ":HandlerChainOnProviderTest"); - try { - System.out.println("direction=" + direction); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); - SOAPBody body = env.getBody(); - Iterator it = body.getChildElements(); - while (it.hasNext()) { - SOAPElement elem = (SOAPElement) it.next(); - Name elemName = elem.getElementName(); - Iterator it2 = ((SOAPElement) elem).getChildElements(); - while (it2.hasNext()) { - SOAPElement elem2 = (SOAPElement) it2.next(); - String value = elem2.getValue(); - if (value.indexOf("HandlerChainOnProviderTest") >= 0) { - value = value + direction + HANDLER_NAME; - elem2.setValue(value); - } - } - } - msg.saveChanges(); - Handler_Util.dumpMsg(context); - } catch (Exception e) { - TestUtil.printStackTrace(e); - e.printStackTrace(); - } - System.out - .println("exiting " + HANDLER_NAME + ":HandlerChainOnProviderTest"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/WSW2JHandlerChainTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/WSW2JHandlerChainTestService.wsdl deleted file mode 100644 index 4a25c3e2d4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/WSW2JHandlerChainTestService.wsdl +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/build.xml deleted file mode 100644 index 37db590f23..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/build.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/customfile.xml deleted file mode 100644 index 0b9a9d10e3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/customfile.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/handler.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/handler.xml deleted file mode 100644 index f8ac14ccdf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/handler.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - SOAPHandler - com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest.SOAPHandler - - - LogicalHandler - com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest.LogicalHandler - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/jakartaEE.tokens deleted file mode 100644 index d6cafba047..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jhandlerchaintest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest.HandlerChainTestService -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest.HandlerChainTestImpl -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest.HandlerChainTest -NAMESPACEURI=http://handlerchaintestservice.org/wsdl -PORT=HandlerChainTestPort -URLALIAS=/jaxws/HandlerChainTest -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest.HandlerChainTestImpl -WEBSERVICEDESCRIPTION=HandlerChainTest -SERVICEREFNAMEWSSERVLET=service/wsw2jhandlerchaintest -SERVICEREFNAMEWSEJB=service/wsw2jhandlerchaintest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jhandlerchaintest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/server-handler.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/server-handler.xml deleted file mode 100644 index f8ac14ccdf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/server-handler.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - SOAPHandler - com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest.SOAPHandler - - - LogicalHandler - com.sun.ts.tests.jaxws.ee.w2j.document.literal.handlerchaintest.LogicalHandler - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/standalone-sun-jaxws.xml deleted file mode 100644 index f31ea2ae83..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/standalone.web.xml deleted file mode 100644 index dd31b7b96f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/handlerchaintest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSJ2WHandlerServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -HandlerChainTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -HandlerChainTest -/jaxws/HandlerChainTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/Client.java deleted file mode 100644 index 828e8abff1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/Client.java +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.headertest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; - -import java.util.Properties; - -import java.math.BigInteger; -import java.math.BigDecimal; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.headertest."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jdlheadertest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jdlheadertest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - // service and port information - private static final String NAMESPACEURI = "http://headertestservice.org/HeaderTestService.wsdl"; - - private static final String SERVICE_NAME = "HeaderTestService"; - - private static final String PORT_NAME = "HeaderTestPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - HeaderTest port = null; - - static HeaderTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (HeaderTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - HeaderTestService.class, PORT_QNAME, HeaderTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (HeaderTest) service.getPort(HeaderTest.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HeaderTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: GoodOrderTestWithSoapHeaderAndMUFalse - * - * @assertion_ids: JAXWS:SPEC:2048; JAXWS:SPEC:2049; JAXWS:SPEC:10008; - * JAXWS:SPEC:3038; WSI:SPEC:R1013; WSI:SPEC:R1034; WSI:SPEC:R1032; - * WSI:SPEC:R9802' WSI:SPEC:R2209; - * - * @test_Strategy: Call submitOrder() with a valid product code passing a soap - * header (ConfigHeader) with mustUnderstand=false. The soap header is simply - * ignored. The RPC request must succeed. - * - */ - public void GoodOrderTestWithSoapHeaderAndMUFalse() throws Fault { - TestUtil.logMsg("GoodOrderTestWithSoapHeaderAndMUFalse"); - boolean pass = true; - - ProductOrderRequest poRequest; - ConfigHeader ch; - try { - poRequest = new ProductOrderRequest(); - ProductOrderItem poi = new ProductOrderItem(); - poi.setProductName("Product-1"); - poi.setProductCode(new BigInteger("100")); - poi.setQuantity(10); - poi.setPrice(new BigDecimal(119.00)); - CustomerInfo ci = new CustomerInfo(); - ci.setCreditcard("1201-4465-1567-9823"); - ci.setName("John Doe"); - ci.setStreet("1 Network Drive"); - ci.setCity("Burlington"); - ci.setState("Ma"); - ci.setZip("01837"); - ci.setCountry("USA"); - poRequest.getItem().add(poi); - poRequest.setCustomerInfo(ci); - ch = new ConfigHeader(); - ch.setMustUnderstand(false); - ch.setMessage("Config Header"); - ch.setTestName("GoodOrderTestWithSoapHeaderAndMUFalse"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GoodOrderTestWithSoapHeaderAndMUFalse failed", e); - } - - try { - TestUtil - .logMsg("Submit good order with soap header (ConfigHeader:MU=false)"); - TestUtil.logMsg("ConfigHeader must be ignored because MU=false"); - TestUtil.logMsg("The service endpoint simply ignores the soap header"); - TestUtil.logMsg("The RPC request must succeed"); - ProductOrderResponse poResponse = port.submitOrder(poRequest, ch); - if (!ProductOrdersEqual(poRequest, poResponse)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GoodOrderTestWithSoapHeaderAndMUFalse failed", e); - } - - if (!pass) - throw new Fault("GoodOrderTestWithSoapHeaderAndMUFalse failed"); - } - - /* - * @testName: GoodOrderTestWithSoapHeaderAndMUTrue - * - * @assertion_ids: JAXWS:SPEC:2048; JAXWS:SPEC:2049; JAXWS:SPEC:10008; - * JAXWS:SPEC:3038; WSI:SPEC:R1013; WSI:SPEC:R1034; WSI:SPEC:R1032; - * WSI:SPEC:R9802' WSI:SPEC:R2209; - * - * @test_Strategy: Call submitOrder() with a valid product code passing a soap - * header (ConfigHeader) with mustUnderstand=true. The soap header is - * understood by the service endpoint and the soap header is valid. The RPC - * request must succeed. - */ - public void GoodOrderTestWithSoapHeaderAndMUTrue() throws Fault { - TestUtil.logMsg("GoodOrderTestWithSoapHeaderAndMUTrue"); - boolean pass = true; - - ProductOrderRequest poRequest; - ConfigHeader ch; - try { - poRequest = new ProductOrderRequest(); - ProductOrderItem poi = new ProductOrderItem(); - poi.setProductName("Product-1"); - poi.setProductCode(new BigInteger("100")); - poi.setQuantity(10); - poi.setPrice(new BigDecimal(119.00)); - CustomerInfo ci = new CustomerInfo(); - ci.setCreditcard("1201-4465-1567-9823"); - ci.setName("John Doe"); - ci.setStreet("1 Network Drive"); - ci.setCity("Burlington"); - ci.setState("Ma"); - ci.setZip("01837"); - ci.setCountry("USA"); - poRequest.getItem().add(poi); - poRequest.setCustomerInfo(ci); - ch = new ConfigHeader(); - ch.setMustUnderstand(true); - ch.setMessage("Config Header"); - ch.setTestName("GoodOrderTestWithSoapHeaderAndMUTrue"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GoodOrderTestWithSoapHeaderAndMUTrue failed", e); - } - - try { - TestUtil - .logMsg("Submit good order with soap header (ConfigHeader:MU=true)"); - TestUtil - .logMsg("ConfigHeader must be understood and valid bacause MU=true"); - TestUtil.logMsg( - "The service endpoint understands and validates the soap header as ok"); - TestUtil.logMsg("The RPC request must succeed"); - ProductOrderResponse poResponse = port.submitOrder(poRequest, ch); - TestUtil.logMsg("GoodOrderTestWithMUTrueHeader succeeded (expected)"); - if (!ProductOrdersEqual(poRequest, poResponse)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GoodOrderTestWithSoapHeaderAndMUTrue failed", e); - } - - if (!pass) - throw new Fault("GoodOrderTestWithSoapHeaderAndMUTrue failed"); - } - - /* - * @testName: SoapHeaderFaultTest - * - * - * @assertion_ids: JAXWS:SPEC:2048; JAXWS:SPEC:2049; JAXWS:SPEC:10008; - * WSI:SPEC:R1013; WSI:SPEC:R1034; WSI:SPEC:R1032; WSI:SPEC:R9802' - * WSI:SPEC:R2209; - * - * @test_Strategy: Call submitOrder() passing soap header (ConfigHeader) with - * mustUnderstand attribute=true and the soap header (ConfigHeader) is not - * understood. The service endpoint must throw back the SOAP Header Fault - * (ConfigFault). - * - */ - public void SoapHeaderFaultTest() throws Fault { - TestUtil.logMsg("SoapHeaderFaultTest"); - boolean pass = true; - - ProductOrderRequest poRequest; - ConfigHeader ch; - try { - poRequest = new ProductOrderRequest(); - ProductOrderItem poi = new ProductOrderItem(); - poi.setProductName("Product-1"); - poi.setProductCode(new BigInteger("100")); - poi.setQuantity(10); - poi.setPrice(new BigDecimal(119.00)); - CustomerInfo ci = new CustomerInfo(); - ci.setCreditcard("1201-4465-1567-9823"); - ci.setName("John Doe"); - ci.setStreet("1 Network Drive"); - ci.setCity("Burlington"); - ci.setState("Ma"); - ci.setZip("01837"); - ci.setCountry("USA"); - poRequest.getItem().add(poi); - poRequest.setCustomerInfo(ci); - ch = new ConfigHeader(); - ch.setMustUnderstand(true); - ch.setMessage("Config Header"); - ch.setTestName("SoapHeaderFaultTest"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SoapHeaderFaultTest failed", e); - } - - try { - TestUtil - .logMsg("Submit good order with soap header (ConfigHeader:MU=true)"); - TestUtil - .logMsg("ConfigHeader must be understood and valid bacause MU=true"); - TestUtil - .logMsg("The service endpoint does not understand the soap header"); - TestUtil.logMsg("The RPC request must fail with a ConfigFault"); - ProductOrderResponse poResponse = port.submitOrder(poRequest, ch); - TestUtil.logErr("Did not throw expected ConfigFault"); - pass = false; - } catch (ConfigFault e) { - TestUtil.logMsg("Caught expected ConfigFault"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SoapHeaderFaultTest failed", e); - } - - if (!pass) - throw new Fault("SoapHeaderFaultTest failed"); - } - - /* - * @testName: SoapFaultTest - * - * @assertion_ids: JAXWS:SPEC:2048; JAXWS:SPEC:2049; JAXWS:SPEC:10008; - * JAXWS:SPEC:3028; JAXWS:SPEC:2044; WSI:SPEC:R1013; WSI:SPEC:R1034; - * WSI:SPEC:R1032; WSI:SPEC:R9802' WSI:SPEC:R2209; - * - * @test_Strategy: Call submitOrder() passing soap header (ConfigHeader) with - * mustUnderstand attribute=false so the soap header (ConfigHeader) will - * simply be ignored. The submitOrder() contains an invalid product code so - * the service endpoint must throw back the SOAP Fault (BadOrderFault). - * - */ - public void SoapFaultTest() throws Fault { - TestUtil.logMsg("SoapFaultTest"); - boolean pass = true; - - ProductOrderRequest poRequest; - ConfigHeader ch; - try { - poRequest = new ProductOrderRequest(); - ProductOrderItem poi = new ProductOrderItem(); - poi.setProductName("Product-1"); - poi.setProductCode(new BigInteger("1234123412341234")); - poi.setQuantity(10); - poi.setPrice(new BigDecimal(119.00)); - CustomerInfo ci = new CustomerInfo(); - ci.setCreditcard("1201-4465-1567-9823"); - ci.setName("John Doe"); - ci.setStreet("1 Network Drive"); - ci.setCity("Burlington"); - ci.setState("Ma"); - ci.setZip("01837"); - ci.setCountry("USA"); - poRequest.getItem().add(poi); - poRequest.setCustomerInfo(ci); - ch = new ConfigHeader(); - ch.setMustUnderstand(false); - ch.setMessage("Config Header"); - ch.setTestName("SoapFaultTest"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SoapFaultTest failed", e); - } - - try { - TestUtil - .logMsg("Submit bad order with soap header (ConfigHeader:MU=false)"); - TestUtil.logMsg("ConfigHeader must be ignored because MU=false"); - TestUtil.logMsg("The service endpoint simply ignores the soap header"); - TestUtil - .logMsg("Order contains bad product code (must throw BadOrderFault)"); - TestUtil.logMsg("The RPC request must fail with a BadOrderFault"); - ProductOrderResponse poResponse = port.submitOrder(poRequest, ch); - TestUtil.logErr("Did not throw expected BadOrderFault"); - pass = false; - } catch (BadOrderFault e) { - TestUtil.logMsg("Caught expected BadOrderFault"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SoapFaultTest failed", e); - } - - if (!pass) - throw new Fault("SoapFaultTest failed"); - } - - private boolean ProductOrdersEqual(ProductOrderRequest req, - ProductOrderResponse resp) { - boolean equal = true; - TestUtil.logMsg( - "Performing data comparison of request/response (should be equal)"); - Object[] reqArray = req.getItem().toArray(); - Object[] respArray = resp.getItem().toArray(); - ProductOrderItem reqItem = null; - ProductOrderItem respItem = null; - if (reqArray == null || respArray == null) { - TestUtil.logErr("Data comparison error (unexpected)"); - TestUtil.logErr("Got: Item Array = " + respItem); - TestUtil.logErr("Expected: Item Array = " + reqItem); - equal = false; - } else if (reqArray.length != respArray.length) { - TestUtil.logErr("Data comparison error (unexpected)"); - TestUtil.logErr("Got: Item Array length = " + respArray.length); - TestUtil.logErr("Expected: Item Array length = " + reqArray.length); - equal = false; - } else { - reqItem = (ProductOrderItem) reqArray[0]; - respItem = (ProductOrderItem) respArray[0]; - } - if (equal) { - if (!reqItem.getProductName().equals(respItem.getProductName()) - || !reqItem.getProductCode().equals(respItem.getProductCode()) - || reqItem.getQuantity() != respItem.getQuantity() - || !reqItem.getPrice().equals(respItem.getPrice())) { - TestUtil.logErr("Data comparison error (unexpected)"); - TestUtil.logErr("Got: <" + respItem.getProductName() + "," - + respItem.getProductCode() + "," + respItem.getQuantity() + "," - + respItem.getPrice() + ">"); - TestUtil.logErr("Expected: <" + reqItem.getProductName() + "," - + reqItem.getProductCode() + "," + reqItem.getQuantity() + "," - + reqItem.getPrice() + ">"); - equal = false; - } else { - TestUtil.logMsg("Data comparison ok (expected)"); - TestUtil.logMsg("Got: <" + respItem.getProductName() + "," - + respItem.getProductCode() + "," + respItem.getQuantity() + "," - + respItem.getPrice() + ">"); - TestUtil.logMsg("Expected: <" + reqItem.getProductName() + "," - + reqItem.getProductCode() + "," + reqItem.getQuantity() + "," - + reqItem.getPrice() + ">"); - } - } - return equal; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/HeaderTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/HeaderTestImpl.java deleted file mode 100644 index aab85059e1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/HeaderTestImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)HeaderTestImpl.java 1.3 04/10/25 - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.headertest; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "HeaderTestPort", serviceName = "HeaderTestService", targetNamespace = "http://headertestservice.org/HeaderTestService.wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JDLHeaderTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.headertest.HeaderTest") - -public class HeaderTestImpl implements HeaderTest { - - public ProductOrderResponse submitOrder(ProductOrderRequest poRequest, - ConfigHeader configHeader) throws BadOrderFault, ConfigFault { - ProductOrderResponse poResponse = null; - poResponse = new ProductOrderResponse(); - String testName = configHeader.getTestName(); - ConfigFaultType cft = new ConfigFaultType(); - cft.setMessage(testName); - cft.setMustUnderstand(true); - if (testName.equals("GoodOrderTestWithSoapHeaderAndMUFalse")) { - if (!ValidHeader(configHeader, false, "Config Header", testName)) - throw new ConfigFault("Invalid ConfigHeader: mustUnderstand=" - + configHeader.isMustUnderstand() + ", message=" - + configHeader.getMessage() + ", testName=" + testName, cft); - poResponse.getItem().addAll(poRequest.getItem()); - } else if (testName.equals("GoodOrderTestWithSoapHeaderAndMUTrue")) { - if (!ValidHeader(configHeader, true, "Config Header", testName)) - throw new ConfigFault("Invalid ConfigHeader: mustUnderstand=" - + configHeader.isMustUnderstand() + ", message=" - + configHeader.getMessage() + ", testName=" + testName, cft); - poResponse.getItem().addAll(poRequest.getItem()); - } else if (testName.equals("SoapHeaderFaultTest")) { - throw new ConfigFault("This is a soap header fault ConfigFault", cft); - } else if (testName.equals("SoapFaultTest")) { - BadOrderFaultType bft = new BadOrderFaultType(); - bft.setMessage(testName); - throw new BadOrderFault("This is a soap fault BadOrderFault", bft); - } else { - throw new ConfigFault("Invalid ConfigHeader: mustUnderstand=" - + configHeader.isMustUnderstand() + ", message=" - + configHeader.getMessage() + ", testName=" + testName, cft); - } - return poResponse; - } - - private boolean ValidHeader(ConfigHeader ch, boolean mu, String msg, - String test) { - if (ch.isMustUnderstand() == mu && ch.getMessage().equals(msg) - && ch.getTestName().equals(test)) - return true; - else - return false; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/WSW2JDLHeaderTestDefs.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/WSW2JDLHeaderTestDefs.wsdl deleted file mode 100644 index f7bdf53521..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/WSW2JDLHeaderTestDefs.wsdl +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/WSW2JDLHeaderTestDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/WSW2JDLHeaderTestDefs.xsd deleted file mode 100644 index 79f85d5c05..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/WSW2JDLHeaderTestDefs.xsd +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This is the configuration header - - - - - - - - - - - - - - This is the configuration fault - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/WSW2JDLHeaderTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/WSW2JDLHeaderTestService.wsdl deleted file mode 100644 index cec96acd56..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/WSW2JDLHeaderTestService.wsdl +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/build.xml deleted file mode 100644 index 869bd58415..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/build.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/customfile.xml deleted file mode 100644 index b4c2f72c53..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/customfile.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/customfile2.xml deleted file mode 100644 index d81b8d6bc9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/jakartaEE.tokens deleted file mode 100644 index d6756fb8c9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlheadertest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.headertest.HeaderTestService -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.headertest.HeaderTestImpl -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.headertest.HeaderTest -NAMESPACEURI=http://headertestservice.org/HeaderTestService.wsdl -PORT=HeaderTestPort -URLALIAS=/jaxws/HeaderTest -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.document.literal.headertest.HeaderTestImpl -WEBSERVICEDESCRIPTION=HeaderTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlheadertest -SERVICEREFNAMEWSEJB=service/wsw2jdlheadertest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlheadertest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/standalone-sun-jaxws.xml deleted file mode 100644 index 75bd536ecc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/standalone.web.xml deleted file mode 100644 index 8c036593f3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/headertest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLHeaderTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -HeaderTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -HeaderTest -/jaxws/HeaderTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/Client.java deleted file mode 100644 index 06e3160f83..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/Client.java +++ /dev/null @@ -1,859 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.holdertest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.*; - -import java.net.*; -import java.util.Properties; -import java.util.List; - -import java.math.BigInteger; -import java.math.BigDecimal; - -import jakarta.xml.ws.Holder; - -import javax.xml.namespace.QName; -import javax.xml.datatype.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.holdertest."; - - // service and port information - private static final String NAMESPACEURI = "http://holdertest.org/wsdl"; - - private static final String SERVICE_NAME = "HolderTestService"; - - private static final String PORT_NAME = "HolderTestPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - Holder inout1, inout1_tmp; - - Holder inout2, inout2_tmp; - - Holder inout3, inout3_tmp; - - Holder inout4, inout4_tmp; - - Holder inout5, inout5_tmp; - - Holder inout6, inout6_tmp; - - Holder inout7, inout7_tmp; - - Holder inout8, inout8_tmp; - - Holder inout9, inout9_tmp; - - Holder inout10, inout10_tmp; - - Holder inout11, inout11_tmp; - - Holder inout12, inout12_tmp; - - Holder inoutarray1; - - Holder inoutarray2; - - Holder inoutarray3; - - Holder inoutarray4; - - Holder inoutarray5; - - Holder inoutarray6; - - Holder inoutarray7; - - Holder inoutarray8; - - Holder inoutarray9; - - Holder inoutarray10; - - Holder inoutarray11; - - Holder inoutarray12; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jdlholdertest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jdlholdertest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private static DatatypeFactory dtfactory = null; - - HolderTest port = null; - - static HolderTestService service = null; - - static { - try { - dtfactory = DatatypeFactory.newInstance(); - } catch (DatatypeConfigurationException e) { - TestUtil.logMsg("Could not configure DatatypeFactory object"); - TestUtil.printStackTrace(e); - } - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (HolderTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - HolderTestService.class, PORT_QNAME, HolderTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (HolderTest) service.getHolderTestPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HolderTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - private boolean printTestStatus(boolean pass, String test) { - if (pass) - TestUtil.logMsg("" + test + " ... PASSED"); - else - TestUtil.logErr("" + test + " ... FAILED"); - - return pass; - } - - private void initialize_inout_SimpleType_data() { - inout1 = new Holder(); - inout2 = new Holder(); - inout3 = new Holder(); - inout4 = new Holder(); - inout5 = new Holder(); - inout6 = new Holder(); - inout7 = new Holder(); - inout8 = new Holder(); - inout9 = new Holder(); - inout10 = new Holder(); - inout11 = new Holder(); - inout12 = new Holder(); - - inout1.value = new StringElement(); - inout2.value = new IntegerElement(); - inout3.value = new IntElement(); - inout4.value = new LongElement(); - inout5.value = new ShortElement(); - inout6.value = new DecimalElement(); - inout7.value = new FloatElement(); - inout8.value = new DoubleElement(); - inout9.value = new BooleanElement(); - inout10.value = new ByteElement(); - inout11.value = new QNameElement(); - inout12.value = new DateTimeElement(); - - inout1.value.setString("String1"); - inout2.value.setInteger(new BigInteger("3512359")); - inout3.value.setInt(Integer.MIN_VALUE); - inout4.value.setLong(Long.MIN_VALUE); - inout5.value.setShort(Short.MIN_VALUE); - inout6.value.setDecimal(new BigDecimal("3512359.1456")); - inout7.value.setFloat(Float.MIN_VALUE); - inout8.value.setDouble(Double.MIN_VALUE); - inout9.value.setBoolean(false); - inout10.value.setByte(Byte.MIN_VALUE); - inout11.value.setQName(new QName("String2")); - inout12.value.setDateTime( - dtfactory.newXMLGregorianCalendar(96, 5, 1, 0, 30, 0, 0, 0)); - - } - - private void initialize_inout_SimpleTypeArray_data() throws Exception { - inoutarray1 = new Holder(); - inoutarray2 = new Holder(); - inoutarray3 = new Holder(); - inoutarray4 = new Holder(); - inoutarray5 = new Holder(); - inoutarray6 = new Holder(); - inoutarray7 = new Holder(); - inoutarray8 = new Holder(); - inoutarray9 = new Holder(); - inoutarray10 = new Holder(); - inoutarray11 = new Holder(); - inoutarray12 = new Holder(); - - inoutarray1.value = new ArrayOfString(); - inoutarray2.value = new ArrayOfInteger(); - inoutarray3.value = new ArrayOfInt(); - inoutarray4.value = new ArrayOfLong(); - inoutarray5.value = new ArrayOfShort(); - inoutarray6.value = new ArrayOfDecimal(); - inoutarray7.value = new ArrayOfFloat(); - inoutarray8.value = new ArrayOfDouble(); - inoutarray9.value = new ArrayOfBoolean(); - inoutarray10.value = new ArrayOfByte(); - inoutarray11.value = new ArrayOfQName(); - inoutarray12.value = new ArrayOfDateTime(); - - for (int i = 0; i < JAXWS_Data.String_nonull_data.length; i++) - inoutarray1.value.getArrayOfString() - .add(JAXWS_Data.String_nonull_data[i]); - for (int i = 0; i < JAXWS_Data.BigInteger_nonull_data.length; i++) - inoutarray2.value.getArrayOfInteger() - .add(JAXWS_Data.BigInteger_nonull_data[i]); - for (int i = 0; i < JAXWS_Data.int_data.length; i++) - inoutarray3.value.getArrayOfInt().add(JAXWS_Data.Integer_nonull_data[i]); - for (int i = 0; i < JAXWS_Data.long_data.length; i++) - inoutarray4.value.getArrayOfLong().add(JAXWS_Data.Long_nonull_data[i]); - for (int i = 0; i < JAXWS_Data.short_data.length; i++) - inoutarray5.value.getArrayOfShort().add(JAXWS_Data.Short_nonull_data[i]); - for (int i = 0; i < JAXWS_Data.BigDecimal_nonull_data.length; i++) - inoutarray6.value.getArrayOfDecimal() - .add(JAXWS_Data.BigDecimal_nonull_data[i]); - for (int i = 0; i < JAXWS_Data.float_data.length; i++) - inoutarray7.value.getArrayOfFloat().add(JAXWS_Data.Float_nonull_data[i]); - for (int i = 0; i < JAXWS_Data.double_data.length; i++) - inoutarray8.value.getArrayOfDouble() - .add(JAXWS_Data.Double_nonull_data[i]); - for (int i = 0; i < JAXWS_Data.boolean_data.length; i++) - inoutarray9.value.getArrayOfBoolean() - .add(JAXWS_Data.Boolean_nonull_data[i]); - for (int i = 0; i < JAXWS_Data.byte_data.length; i++) - inoutarray10.value.getArrayOfByte().add(JAXWS_Data.Byte_nonull_data[i]); - for (int i = 0; i < JAXWS_Data.QName_nonull_data.length; i++) - inoutarray11.value.getArrayOfQName().add(JAXWS_Data.QName_nonull_data[i]); - for (int i = 0; i < JAXWS_Data.XMLGregorianCalendar_nonull_data.length; i++) - inoutarray12.value.getArrayOfDateTime() - .add(JAXWS_Data.XMLGregorianCalendar_nonull_data[i]); - - TestUtil.logTrace("inoutarray1.value.getArrayOfString().size()=" - + inoutarray1.value.getArrayOfString().size()); - TestUtil.logTrace("inoutarray2.value.getArrayOfInteger().size()=" - + inoutarray2.value.getArrayOfInteger().size()); - TestUtil.logTrace("inoutarray3.value.getArrayOfInt().size()=" - + inoutarray3.value.getArrayOfInt().size()); - TestUtil.logTrace("inoutarray4.value.getArrayOfLong().size()=" - + inoutarray4.value.getArrayOfLong().size()); - TestUtil.logTrace("inoutarray5.value.getArrayOfShort().size()=" - + inoutarray5.value.getArrayOfShort().size()); - TestUtil.logTrace("inoutarray6.value.getArrayOfDecimal().size()=" - + inoutarray6.value.getArrayOfDecimal().size()); - TestUtil.logTrace("inoutarray7.value.getArrayOfFloat().size()=" - + inoutarray7.value.getArrayOfFloat().size()); - TestUtil.logTrace("inoutarray8.value.getArrayOfDouble().size()=" - + inoutarray8.value.getArrayOfDouble().size()); - TestUtil.logTrace("inoutarray9.value.getArrayOfBoolean().size()=" - + inoutarray9.value.getArrayOfBoolean().size()); - TestUtil.logTrace("inoutarray10.value.getArrayOfByte().size()=" - + inoutarray10.value.getArrayOfByte().size()); - TestUtil.logTrace("inoutarray11.value.getArrayOfQName().size()=" - + inoutarray11.value.getArrayOfQName().size()); - TestUtil.logTrace("inoutarray12.value.getArrayOfDateTime().size()=" - + inoutarray12.value.getArrayOfDateTime().size()); - } - - private void initialize_saved_inout_SimpleType_data() { - inout1_tmp = new Holder(); - inout2_tmp = new Holder(); - inout3_tmp = new Holder(); - inout4_tmp = new Holder(); - inout5_tmp = new Holder(); - inout6_tmp = new Holder(); - inout7_tmp = new Holder(); - inout8_tmp = new Holder(); - inout9_tmp = new Holder(); - inout10_tmp = new Holder(); - inout11_tmp = new Holder(); - inout12_tmp = new Holder(); - - inout1_tmp.value = new StringElement(); - inout2_tmp.value = new IntegerElement(); - inout3_tmp.value = new IntElement(); - inout4_tmp.value = new LongElement(); - inout5_tmp.value = new ShortElement(); - inout6_tmp.value = new DecimalElement(); - inout7_tmp.value = new FloatElement(); - inout8_tmp.value = new DoubleElement(); - inout9_tmp.value = new BooleanElement(); - inout10_tmp.value = new ByteElement(); - inout11_tmp.value = new QNameElement(); - inout12_tmp.value = new DateTimeElement(); - - inout1_tmp.value.setString("String4"); - inout2_tmp.value.setInteger(new BigInteger("3512360")); - inout3_tmp.value.setInt(Integer.MAX_VALUE); - inout4_tmp.value.setLong(Long.MAX_VALUE); - inout5_tmp.value.setShort(Short.MAX_VALUE); - inout6_tmp.value.setDecimal(new BigDecimal("3512360.1456")); - inout7_tmp.value.setFloat(Float.MAX_VALUE); - inout8_tmp.value.setDouble(Double.MAX_VALUE); - inout9_tmp.value.setBoolean(true); - inout10_tmp.value.setByte(Byte.MAX_VALUE); - inout11_tmp.value.setQName(new QName("String5")); - inout12_tmp.value.setDateTime( - dtfactory.newXMLGregorianCalendar(96, 5, 2, 0, 30, 0, 0, 0)); - } - - private boolean compare_inout_data() { - TestUtil.logMsg("Comparing IN/INOUT data"); - boolean pass = true; - if (!inout1.value.getString().equals(inout1_tmp.value.getString())) { - TestUtil.logErr("compare_data failed for StringHolder - expected " - + inout1_tmp.value.getString() + ", received: " - + inout1.value.getString()); - pass = false; - } - if (!inout2.value.getInteger().equals(inout2_tmp.value.getInteger())) { - TestUtil.logErr("compare_data failed for BigIntegerHolder - expected " - + inout2_tmp.value.getInteger() + ", received: " - + inout2.value.getInteger()); - pass = false; - } - if (inout3.value.getInt() != inout3_tmp.value.getInt()) { - TestUtil.logErr("compare_data failed for IntHolder - expected " - + inout3_tmp.value.getInt() + ", received: " - + inout3.value.getInt()); - pass = false; - } - if (inout4.value.getLong() != inout4_tmp.value.getLong()) { - TestUtil.logErr("compare_data failed for LongHolder - expected " - + inout4_tmp.value.getLong() + ", received: " - + inout4.value.getLong()); - pass = false; - } - if (inout5.value.getShort() != inout5_tmp.value.getShort()) { - TestUtil.logErr("compare_data failed for ShortHolder - expected " - + inout5_tmp.value.getShort() + ", received: " - + inout5.value.getShort()); - pass = false; - } - if (!inout6.value.getDecimal().equals(inout6_tmp.value.getDecimal())) { - TestUtil.logErr("compare_data failed for BigDecimalHolder - expected " - + inout6_tmp.value.getDecimal() + ", received: " - + inout6.value.getDecimal()); - pass = false; - } - if (inout7.value.getFloat() != inout7_tmp.value.getFloat()) { - TestUtil.logErr("compare_data failed for FloatHolder - expected " - + inout7_tmp.value.getFloat() + ", received: " - + inout7.value.getFloat()); - pass = false; - } - if (inout8.value.getDouble() != inout8_tmp.value.getDouble()) { - TestUtil.logErr("compare_data failed for DoubleHolder - expected " - + inout8_tmp.value.getDouble() + ", received: " - + inout8.value.getDouble()); - pass = false; - } - if (inout9.value.isBoolean() != inout9_tmp.value.isBoolean()) { - TestUtil.logErr("compare_data failed for BooleanHolder - expected " - + inout9_tmp.value.isBoolean() + ", received: " - + inout9.value.isBoolean()); - pass = false; - } - if (inout10.value.getByte() != inout10_tmp.value.getByte()) { - TestUtil.logErr("compare_data failed for ByteHolder - expected " - + inout10_tmp.value.getByte() + ", received: " - + inout10.value.getByte()); - pass = false; - } - if (!inout11.value.getQName().equals(inout11_tmp.value.getQName())) { - TestUtil.logErr("compare_data failed for QNameHolder - expected " - + inout11_tmp.value.getQName() + ", received: " - + inout11.value.getQName()); - pass = false; - } - if (!JAXWS_Data.compareXMLGregorianCalendars(inout12.value.getDateTime(), - inout12_tmp.value.getDateTime())) { - TestUtil.logErr( - "compare_data failed for XMLGregorianCalendarHolder - expected " - + inout12_tmp.value.getDateTime() + ", received: " - + inout12.value.getDateTime()); - pass = false; - } - return pass; - } - - private boolean compare_inoutarray_data() { - TestUtil.logMsg("Comparing IN/INOUT ARRAY data"); - boolean pass = true; - - TestUtil.logTrace("inoutarray1.value.getArrayOfString().size()=" - + inoutarray1.value.getArrayOfString().size()); - TestUtil.logTrace("inoutarray2.value.getArrayOfInteger().size()=" - + inoutarray2.value.getArrayOfInteger().size()); - TestUtil.logTrace("inoutarray3.value.getArrayOfInt().size()=" - + inoutarray3.value.getArrayOfInt().size()); - TestUtil.logTrace("inoutarray4.value.getArrayOfLong().size()=" - + inoutarray4.value.getArrayOfLong().size()); - TestUtil.logTrace("inoutarray5.value.getArrayOfShort().size()=" - + inoutarray5.value.getArrayOfShort().size()); - TestUtil.logTrace("inoutarray6.value.getArrayOfDecimal().size()=" - + inoutarray6.value.getArrayOfDecimal().size()); - TestUtil.logTrace("inoutarray7.value.getArrayOfFloat().size()=" - + inoutarray7.value.getArrayOfFloat().size()); - TestUtil.logTrace("inoutarray8.value.getArrayOfDouble().size()=" - + inoutarray8.value.getArrayOfDouble().size()); - TestUtil.logTrace("inoutarray9.value.getArrayOfBoolean().size()=" - + inoutarray9.value.getArrayOfBoolean().size()); - TestUtil.logTrace("inoutarray10.value.getArrayOfByte().size()=" - + inoutarray10.value.getArrayOfByte().size()); - TestUtil.logTrace("inoutarray11.value.getArrayOfQName().size()=" - + inoutarray11.value.getArrayOfQName().size()); - TestUtil.logTrace("inoutarray12.value.getArrayOfDateTime().size()=" - + inoutarray12.value.getArrayOfDateTime().size()); - - String[] strArray = new String[inoutarray1.value.getArrayOfString().size()]; - for (int i = 0, j = inoutarray1.value.getArrayOfString().size() - - 1; j >= 0; i++, j--) - strArray[i] = inoutarray1.value.getArrayOfString().get(j); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.String_nonull_data, strArray, - "String")) { - TestUtil.logErr("String array data miscompare"); - pass = false; - } - - BigInteger[] bigintArray = new BigInteger[inoutarray2.value - .getArrayOfInteger().size()]; - for (int i = 0, j = inoutarray2.value.getArrayOfInteger().size() - - 1; j >= 0; i++, j--) - bigintArray[i] = inoutarray2.value.getArrayOfInteger().get(j); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.BigInteger_nonull_data, - bigintArray, "BigInteger")) { - TestUtil.logErr("BigInteger array data miscompare"); - pass = false; - } - - int[] intArray = new int[inoutarray3.value.getArrayOfInt().size()]; - for (int i = 0, j = inoutarray3.value.getArrayOfInt().size() - - 1; j >= 0; i++, j--) - intArray[i] = inoutarray3.value.getArrayOfInt().get(j).intValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.int_data, intArray, "int")) { - TestUtil.logErr("int array data miscompare"); - pass = false; - } - - long[] longArray = new long[inoutarray4.value.getArrayOfLong().size()]; - for (int i = 0, j = inoutarray4.value.getArrayOfLong().size() - - 1; j >= 0; i++, j--) - longArray[i] = inoutarray4.value.getArrayOfLong().get(j).longValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.long_data, longArray, - "long")) { - TestUtil.logErr("long array data miscompare"); - pass = false; - } - - short[] shortArray = new short[inoutarray5.value.getArrayOfShort().size()]; - for (int i = 0, j = inoutarray5.value.getArrayOfShort().size() - - 1; j >= 0; i++, j--) - shortArray[i] = inoutarray5.value.getArrayOfShort().get(j).shortValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.short_data, shortArray, - "short")) { - TestUtil.logErr("short array data miscompare"); - pass = false; - } - - BigDecimal[] bigdecArray = new BigDecimal[inoutarray6.value - .getArrayOfDecimal().size()]; - for (int i = 0, j = inoutarray6.value.getArrayOfDecimal().size() - - 1; j >= 0; i++, j--) - bigdecArray[i] = inoutarray6.value.getArrayOfDecimal().get(j); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.BigDecimal_nonull_data, - bigdecArray, "BigDecimal")) { - TestUtil.logErr("BigDecimal array data miscompare"); - pass = false; - } - - float[] floatArray = new float[inoutarray7.value.getArrayOfFloat().size()]; - for (int i = 0, j = inoutarray7.value.getArrayOfFloat().size() - - 1; j >= 0; i++, j--) - floatArray[i] = inoutarray7.value.getArrayOfFloat().get(j).floatValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.float_data, floatArray, - "float")) { - TestUtil.logErr("float array data miscompare"); - pass = false; - } - - double[] doubleArray = new double[inoutarray8.value.getArrayOfDouble() - .size()]; - for (int i = 0, j = inoutarray8.value.getArrayOfDouble().size() - - 1; j >= 0; i++, j--) - doubleArray[i] = inoutarray8.value.getArrayOfDouble().get(j) - .doubleValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.double_data, doubleArray, - "double")) { - TestUtil.logErr("double array data miscompare"); - pass = false; - } - - boolean[] booleanArray = new boolean[inoutarray9.value.getArrayOfBoolean() - .size()]; - for (int i = 0, j = inoutarray9.value.getArrayOfBoolean().size() - - 1; j >= 0; i++, j--) - booleanArray[i] = inoutarray9.value.getArrayOfBoolean().get(j) - .booleanValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.boolean_data, booleanArray, - "boolean")) { - TestUtil.logErr("boolean array data miscompare"); - pass = false; - } - - byte[] byteArray = new byte[inoutarray10.value.getArrayOfByte().size()]; - for (int i = 0, j = inoutarray10.value.getArrayOfByte().size() - - 1; j >= 0; i++, j--) - byteArray[i] = inoutarray10.value.getArrayOfByte().get(j).byteValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.byte_data, byteArray, - "byte")) { - TestUtil.logErr("byte array data miscompare"); - pass = false; - } - - QName[] qnameArray = new QName[inoutarray11.value.getArrayOfQName().size()]; - for (int i = 0, j = inoutarray11.value.getArrayOfQName().size() - - 1; j >= 0; i++, j--) - qnameArray[i] = inoutarray11.value.getArrayOfQName().get(j); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.QName_nonull_data, qnameArray, - "QName")) { - TestUtil.logErr("QNameBigDecimal array data miscompare"); - pass = false; - } - - XMLGregorianCalendar[] dateTimeArray = new XMLGregorianCalendar[inoutarray12.value - .getArrayOfDateTime().size()]; - for (int i = 0, j = inoutarray12.value.getArrayOfDateTime().size() - - 1; j >= 0; i++, j--) - dateTimeArray[i] = inoutarray12.value.getArrayOfDateTime().get(j); - if (!JAXWS_Data.compareArrayValues( - JAXWS_Data.XMLGregorianCalendar_nonull_data, dateTimeArray, - "XMLGregorianCalendar")) { - TestUtil.logErr("XMLGregorianCalendar array data miscompare"); - pass = false; - } - return pass; - } - - /* - * @testName: InOutSimpleTypesTest - * - * @assertion_ids: JAXWS:SPEC:2031; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * type. For each type pass its value as input to the corresponding RPC method - * and receive it back as the return value. Compare results of each value/type - * of what was sent and what was returned. Verify they are equal. - */ - public void InOutSimpleTypesTest() throws Fault { - TestUtil.logTrace("InOutSimpleTypesTest"); - boolean pass = true; - initialize_inout_SimpleType_data(); - initialize_saved_inout_SimpleType_data(); - try { - TestUtil.logMsg("Marshalling input/output data"); - port.echoInOutStringTypes(inout1); - port.echoInOutIntegerTypes(inout2); - port.echoInOutIntTypes(inout3); - port.echoInOutLongTypes(inout4); - port.echoInOutShortTypes(inout5); - port.echoInOutDecimalTypes(inout6); - port.echoInOutFloatTypes(inout7); - port.echoInOutDoubleTypes(inout8); - port.echoInOutBooleanTypes(inout9); - port.echoInOutByteTypes(inout10); - port.echoInOutQNameTypes(inout11); - port.echoInOutDateTimeTypes(inout12); - if (!compare_inout_data()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutSimpleTypesTest failed"); - } - - /* - * @testName: InOutSimpleTypesArrayTest - * - * @assertion_ids: JAXWS:SPEC:2031; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * array type. For each type pass its value as input to the corresponding RPC - * method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InOutSimpleTypesArrayTest() throws Fault { - TestUtil.logTrace("InOutSimpleTypesArrayTest"); - boolean pass = true; - try { - initialize_inout_SimpleTypeArray_data(); - TestUtil.logMsg("Marshalling input/output data"); - port.echoInOutArrayStringTypes(inoutarray1); - port.echoInOutArrayIntegerTypes(inoutarray2); - port.echoInOutArrayIntTypes(inoutarray3); - port.echoInOutArrayLongTypes(inoutarray4); - port.echoInOutArrayShortTypes(inoutarray5); - port.echoInOutArrayDecimalTypes(inoutarray6); - port.echoInOutArrayFloatTypes(inoutarray7); - port.echoInOutArrayDoubleTypes(inoutarray8); - port.echoInOutArrayBooleanTypes(inoutarray9); - port.echoInOutArrayByteTypes(inoutarray10); - port.echoInOutArrayQNameTypes(inoutarray11); - port.echoInOutArrayDateTimeTypes(inoutarray12); - if (!compare_inoutarray_data()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutSimpleTypesArrayTest failed"); - } - - /* - * @testName: InOutUserDefinedTypeTest - * - * @assertion_ids: JAXWS:SPEC:2031; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * user defined type. For each type pass its value as input to the - * corresponding RPC method and receive it back as the return value. Compare - * results of each value/type of what was sent and what was returned. Verify - * they are equal. - */ - public void InOutUserDefinedTypeTest() throws Fault { - TestUtil.logTrace("InOutUserDefinedTypeTest"); - boolean pass = true; - try { - Book b0 = new Book(); - b0.setAuthor("author0"); - b0.setTitle("title0"); - b0.setIsbn(0); - Holder inout_bh = new Holder(); - inout_bh.value = b0; - Book expected = new Book(); - expected.setAuthor("author1"); - expected.setTitle("title1"); - expected.setIsbn(1); - TestUtil.logMsg("Marshalling input/output data"); - TestUtil.logMsg("Data In: [author0|title0|0]"); - port.echoInOutBook(inout_bh); - Book actual = inout_bh.value; - TestUtil.logMsg("Data Out: [" + actual.getAuthor() + "|" - + actual.getTitle() + "|" + actual.getIsbn() + "]"); - if (!actual.getAuthor().equals(expected.getAuthor()) - || !actual.getTitle().equals(expected.getTitle()) - || actual.getIsbn() != expected.getIsbn()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutUserDefinedTypeTest failed"); - } - - /* - * @testName: InOutUserDefinedTypeArrayTest - * - * @assertion_ids: JAXWS:SPEC:2031; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * array of user defined type. For each type pass its value as input to the - * corresponding RPC method and receive it back as the return value. Compare - * results of each value/type of what was sent and what was returned. Verify - * they are equal. - */ - public void InOutUserDefinedTypeArrayTest() throws Fault { - TestUtil.logTrace("InOutUserDefinedTypeArrayTest"); - boolean pass = true; - try { - Book b0 = new Book(); - b0.setAuthor("author0"); - b0.setTitle("title0"); - b0.setIsbn(0); - Book b1 = new Book(); - b1.setAuthor("author1"); - b1.setTitle("title1"); - b1.setIsbn(1); - ArrayOfBook aob = new ArrayOfBook(); - aob.getBook().add(b0); - aob.getBook().add(b1); - Holder inout_bh = new Holder(); - inout_bh.value = aob; - Book s[] = new Book[2]; - s[0] = b1; - s[1] = b0; - TestUtil.logMsg("Marshalling input/output data"); - TestUtil.logMsg("Data sent: [" + b0.getAuthor() + "|" + b0.getTitle() - + "|" + b0.getIsbn() + "," + b1.getAuthor() + "|" + b1.getTitle() - + "|" + b1.getIsbn() + "]"); - port.echoInOutBookArray(inout_bh); - Book r[] = new Book[2]; - List bList = inout_bh.value.getBook(); - if (bList.size() != 2) { - TestUtil.logErr("list size not equal 2"); - pass = false; - } else { - r[0] = bList.get(0); - r[1] = bList.get(1); - TestUtil.logMsg("Data received: [" + r[0].getAuthor() + "|" - + r[0].getTitle() + "|" + r[0].getIsbn() + "," + r[1].getAuthor() - + "|" + r[1].getTitle() + "|" + r[1].getIsbn() + "]"); - for (int i = 0; i < r.length; i++) { - if (!r[i].getAuthor().equals(s[i].getAuthor()) - || !r[i].getTitle().equals(s[i].getTitle()) - || r[i].getIsbn() != s[i].getIsbn()) { - TestUtil - .logMsg("Expected: [" + s[i].getAuthor() + "|" + s[i].getTitle() - + "|" + s[i].getIsbn() + ", result:" + r[i].getAuthor() - + "|" + r[i].getTitle() + "|" + r[i].getIsbn()); - pass = false; - } - } - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutUserDefinedTypeArrayTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/HolderTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/HolderTestImpl.java deleted file mode 100644 index 1237c929d4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/HolderTestImpl.java +++ /dev/null @@ -1,688 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.holdertest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; - -import java.math.BigInteger; -import java.math.BigDecimal; -import javax.xml.namespace.QName; -import javax.xml.datatype.*; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "HolderTestPort", serviceName = "HolderTestService", targetNamespace = "http://holdertest.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JDLHolderTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.holdertest.HolderTest") -public class HolderTestImpl implements HolderTest { - private static DatatypeFactory dtfactory = null; - - private static final boolean debug = true; - static { - try { - dtfactory = DatatypeFactory.newInstance(); - } catch (DatatypeConfigurationException e) { - TestUtil.logMsg("Could not configure DatatypeFactory object"); - TestUtil.printStackTrace(e); - } - } - - public void echoInOutStringTypes( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutStringTypes()"); - String expected = "String1"; - String actual = param.value.getString(); - if (!expected.equals(actual)) { - String result = "compare of data failed - received " + actual - + ", expected: " + expected; - throw new WebServiceException(result); - } - param.value.setString("String4"); - System.out.println("Leaving echoInOutStringTypes()"); - } - - public void echoInOutIntegerTypes( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutIntegerTypes()"); - BigInteger expected = new BigInteger("3512359"); - BigInteger actual = param.value.getInteger(); - if (!expected.equals(actual)) { - String result = "compare of data failed - received " + actual - + ", expected: " + expected; - throw new WebServiceException(result); - } - param.value.setInteger(new BigInteger("3512360")); - System.out.println("Leaving echoInOutIntegerTypes()"); - } - - public void echoInOutIntTypes( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutIntTypes()"); - int expected = (int) Integer.MIN_VALUE; - int actual = param.value.getInt(); - if (expected != actual) { - String result = "compare of data failed - received " + actual - + ", expected: " + expected; - throw new WebServiceException(result); - } - param.value.setInt(Integer.MAX_VALUE); - System.out.println("Leaving echoInOutIntTypes()"); - } - - public void echoInOutLongTypes( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutLongTypes()"); - long expected = (long) Long.MIN_VALUE; - long actual = param.value.getLong(); - if (expected != actual) { - String result = "compare of data failed - received " + actual - + ", expected: " + expected; - throw new WebServiceException(result); - } - param.value.setLong(Long.MAX_VALUE); - System.out.println("Leaving echoInOutLongTypes()"); - } - - public void echoInOutShortTypes( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutShortTypes()"); - short expected = (short) Short.MIN_VALUE; - short actual = param.value.getShort(); - if (expected != actual) { - String result = "compare of data failed - received " + actual - + ", expected: " + expected; - throw new WebServiceException(result); - } - param.value.setShort(Short.MAX_VALUE); - System.out.println("Leaving echoInOutShortTypes()"); - } - - public void echoInOutDecimalTypes( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutDecimalTypes()"); - BigDecimal expected = new BigDecimal("3512359.1456"); - BigDecimal actual = param.value.getDecimal(); - if (!expected.equals(actual)) { - String result = "compare of data failed - received " + actual - + ", expected: " + expected; - throw new WebServiceException(result); - } - param.value.setDecimal(new BigDecimal("3512360.1456")); - System.out.println("Leaving echoInOutDecimalTypes()"); - } - - public void echoInOutFloatTypes( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutFloatTypes()"); - float expected = (float) Float.MIN_VALUE; - float actual = param.value.getFloat(); - if (expected != actual) { - String result = "compare of data failed - received " + actual - + ", expected: " + expected; - throw new WebServiceException(result); - } - param.value.setFloat(Float.MAX_VALUE); - System.out.println("Leaving echoInOutFloatTypes()"); - } - - public void echoInOutDoubleTypes( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutDoubleTypes()"); - double expected = (double) Double.MIN_VALUE; - double actual = param.value.getDouble(); - if (expected != actual) { - String result = "compare of data failed - received " + actual - + ", expected: " + expected; - throw new WebServiceException(result); - } - param.value.setDouble(Double.MAX_VALUE); - System.out.println("Leaving echoInOutDoubleTypes()"); - } - - public void echoInOutBooleanTypes( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutBooleanTypes()"); - boolean expected = false; - boolean actual = param.value.isBoolean(); - if (expected != actual) { - String result = "compare of data failed - received " + actual - + ", expected: " + expected; - throw new WebServiceException(result); - } - param.value.setBoolean(true); - System.out.println("Leaving echoInOutBooleanTypes()"); - } - - public void echoInOutByteTypes( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutByteTypes()"); - byte expected = (byte) Byte.MIN_VALUE; - byte actual = param.value.getByte(); - if (expected != actual) { - String result = "compare of data failed - received " + actual - + ", expected: " + expected; - throw new WebServiceException(result); - } - param.value.setByte(Byte.MAX_VALUE); - System.out.println("Leaving echoInOutByteTypes()"); - } - - public void echoInOutQNameTypes( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutQNameTypes()"); - QName expected = new QName("String2"); - ; - QName actual = param.value.getQName(); - if (!expected.equals(actual)) { - String result = "compare of data failed - received " + actual - + ", expected: " + expected; - throw new WebServiceException(result); - } - param.value.setQName(new QName("String5")); - System.out.println("Leaving echoInOutQNameTypes()"); - } - - public void echoInOutDateTimeTypes( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutDateTimeTypes()"); - XMLGregorianCalendar expected = dtfactory.newXMLGregorianCalendar(96, 5, 1, - 0, 30, 0, 0, 0); - XMLGregorianCalendar actual = param.value.getDateTime(); - if (!expected.equals(actual)) { - String result = "compare of data failed - received " + actual - + ", expected: " + expected; - throw new WebServiceException(result); - } - param.value.setDateTime( - dtfactory.newXMLGregorianCalendar(96, 5, 2, 0, 30, 0, 0, 0)); - System.out.println("Leaving echoInOutDateTimeTypes()"); - } - - public void echoInOutArrayStringTypes( - jakarta.xml.ws.Holder param) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutArrayStringTypes()"); - int size = param.value.getArrayOfString().size(); - if (size != JAXWS_Data.String_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.String_nonull_data.length + " got: " + size); - } else { - for (int i = 0; i < JAXWS_Data.String_nonull_data.length; i++) { - if (!param.value.getArrayOfString().get(i) - .equals(JAXWS_Data.String_nonull_data[i])) { - pass = false; - result.append("\nArrayOfString Value mismatch - expected:" - + JAXWS_Data.String_nonull_data[i]); - result.append("actual:" + param.value.getArrayOfString().get(i)); - } - } - - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - param.value.getArrayOfString().clear(); - for (int i = JAXWS_Data.String_nonull_data.length - - 1, j = 0; i >= 0; i--, j++) { - param.value.getArrayOfString().add(JAXWS_Data.String_nonull_data[i]); - if (debug) - System.out.println( - "array[" + j + "]=" + param.value.getArrayOfString().get(j)); - } - System.out.println("Leaving echoInOutArrayStringTypes()"); - } - - public void echoInOutArrayIntegerTypes( - jakarta.xml.ws.Holder param) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutArrayIntegerTypes()"); - int size = param.value.getArrayOfInteger().size(); - if (size != JAXWS_Data.BigInteger_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.BigInteger_nonull_data.length + " got: " + size); - } else { - for (int i = 0; i < JAXWS_Data.BigInteger_nonull_data.length; i++) { - if (!param.value.getArrayOfInteger().get(i) - .equals(JAXWS_Data.BigInteger_nonull_data[i])) { - pass = false; - result.append("\nArrayOfInteger Value mismatch - expected:" - + JAXWS_Data.BigInteger_nonull_data[i]); - result.append("actual:" + param.value.getArrayOfInteger().get(i)); - } - } - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - param.value.getArrayOfInteger().clear(); - for (int i = JAXWS_Data.BigInteger_nonull_data.length - - 1, j = 0; i >= 0; i--, j++) { - param.value.getArrayOfInteger().add(JAXWS_Data.BigInteger_nonull_data[i]); - if (debug) - System.out.println( - "array[" + j + "]=" + param.value.getArrayOfInteger().get(j)); - } - System.out.println("Leaving echoInOutArrayIntegerTypes()"); - } - - public void echoInOutArrayIntTypes( - jakarta.xml.ws.Holder param) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutArrayIntTypes()"); - int size = param.value.getArrayOfInt().size(); - if (size != JAXWS_Data.int_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.int_data.length + " got: " + size); - } else { - for (int i = 0; i < JAXWS_Data.int_data.length; i++) { - if (param.value.getArrayOfInt().get(i) != JAXWS_Data.int_data[i]) { - pass = false; - result.append("\nArrayOfInt Value mismatch - expected:" - + JAXWS_Data.int_data[i]); - result.append("actual:" + param.value.getArrayOfInt().get(i)); - } - } - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - param.value.getArrayOfInt().clear(); - for (int i = JAXWS_Data.int_data.length - 1, j = 0; i >= 0; i--, j++) { - param.value.getArrayOfInt().add(JAXWS_Data.int_data[i]); - if (debug) - System.out - .println("array[" + j + "]=" + param.value.getArrayOfInt().get(j)); - } - System.out.println("Leaving echoInOutArrayIntTypes()"); - } - - public void echoInOutArrayLongTypes( - jakarta.xml.ws.Holder param) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutArrayLongTypes()"); - int size = param.value.getArrayOfLong().size(); - if (size != JAXWS_Data.long_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.long_data.length + " got: " + size); - } else { - for (int i = 0; i < JAXWS_Data.long_data.length; i++) { - if (param.value.getArrayOfLong().get(i) != JAXWS_Data.long_data[i]) { - pass = false; - result.append("\nArrayOfLong Value mismatch - expected:" - + JAXWS_Data.long_data[i]); - result.append("actual:" + param.value.getArrayOfLong().get(i)); - } - } - - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - param.value.getArrayOfLong().clear(); - for (int i = JAXWS_Data.long_data.length - 1, j = 0; i >= 0; i--, j++) { - param.value.getArrayOfLong().add(JAXWS_Data.long_data[i]); - if (debug) - System.out - .println("array[" + j + "]=" + param.value.getArrayOfLong().get(j)); - } - System.out.println("Leaving echoInOutArrayLongTypes()"); - } - - public void echoInOutArrayShortTypes( - jakarta.xml.ws.Holder param) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutArrayShortTypes()"); - int size = param.value.getArrayOfShort().size(); - if (size != JAXWS_Data.short_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.short_data.length + " got: " + size); - } else { - for (int i = 0; i < JAXWS_Data.short_data.length; i++) { - if (param.value.getArrayOfShort().get(i) != JAXWS_Data.short_data[i]) { - pass = false; - result.append("\nArrayOfShort Value mismatch - expected:" - + JAXWS_Data.short_data[i]); - result.append("actual:" + param.value.getArrayOfShort().get(i)); - } - } - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - param.value.getArrayOfShort().clear(); - for (int i = JAXWS_Data.short_data.length - 1, j = 0; i >= 0; i--, j++) { - param.value.getArrayOfShort().add(JAXWS_Data.short_data[i]); - if (debug) - System.out.println( - "array[" + j + "]=" + param.value.getArrayOfShort().get(j)); - } - System.out.println("Leaving echoInOutArrayShortTypes()"); - } - - public void echoInOutArrayDecimalTypes( - jakarta.xml.ws.Holder param) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutArrayDecimalTypes()"); - int size = param.value.getArrayOfDecimal().size(); - if (size != JAXWS_Data.BigDecimal_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.BigDecimal_nonull_data.length + " got: " + size); - } else { - for (int i = 0; i < JAXWS_Data.BigDecimal_nonull_data.length; i++) { - if (!param.value.getArrayOfDecimal().get(i) - .equals(JAXWS_Data.BigDecimal_nonull_data[i])) { - pass = false; - result.append("\nArrayOfDecimal Value mismatch - expected:" - + JAXWS_Data.BigDecimal_nonull_data[i]); - result.append("actual:" + param.value.getArrayOfDecimal().get(i)); - } - } - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - param.value.getArrayOfDecimal().clear(); - for (int i = JAXWS_Data.BigDecimal_nonull_data.length - - 1, j = 0; i >= 0; i--, j++) { - param.value.getArrayOfDecimal().add(JAXWS_Data.BigDecimal_nonull_data[i]); - if (debug) - System.out.println( - "array[" + j + "]=" + param.value.getArrayOfDecimal().get(j)); - } - System.out.println("Leaving echoInOutArrayDecimalTypes()"); - } - - public void echoInOutArrayFloatTypes( - jakarta.xml.ws.Holder param) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutArrayFloatTypes()"); - int size = param.value.getArrayOfFloat().size(); - if (size != JAXWS_Data.float_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.float_data.length + " got: " + size); - } else { - for (int i = 0; i < JAXWS_Data.float_data.length; i++) { - if (param.value.getArrayOfFloat().get(i) != JAXWS_Data.float_data[i]) { - pass = false; - result.append("\nArrayOfFloat Value mismatch - expected:" - + JAXWS_Data.float_data[i]); - result.append("actual:" + param.value.getArrayOfFloat().get(i)); - } - } - - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - param.value.getArrayOfFloat().clear(); - for (int i = JAXWS_Data.float_data.length - 1, j = 0; i >= 0; i--, j++) { - param.value.getArrayOfFloat().add(JAXWS_Data.float_data[i]); - if (debug) - System.out.println( - "array[" + j + "]=" + param.value.getArrayOfFloat().get(j)); - } - System.out.println("Leaving echoInOutArrayFloatTypes()"); - } - - public void echoInOutArrayDoubleTypes( - jakarta.xml.ws.Holder param) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutArrayDoubleTypes()"); - int size = param.value.getArrayOfDouble().size(); - if (size != JAXWS_Data.double_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.double_data.length + " got: " + size); - } else { - for (int i = 0; i < JAXWS_Data.double_data.length; i++) { - if (param.value.getArrayOfDouble() - .get(i) != JAXWS_Data.double_data[i]) { - pass = false; - result.append("\nArrayOfDouble Value mismatch - expected:" - + JAXWS_Data.double_data[i]); - result.append("actual:" + param.value.getArrayOfDouble().get(i)); - } - } - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - param.value.getArrayOfDouble().clear(); - for (int i = JAXWS_Data.double_data.length - 1, j = 0; i >= 0; i--, j++) { - param.value.getArrayOfDouble().add(JAXWS_Data.double_data[i]); - if (debug) - System.out.println( - "array[" + j + "]=" + param.value.getArrayOfDouble().get(j)); - } - System.out.println("Leaving echoInOutArrayDoubleTypes()"); - } - - public void echoInOutArrayBooleanTypes( - jakarta.xml.ws.Holder param) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutArrayBooleanTypes()"); - int size = param.value.getArrayOfBoolean().size(); - if (size != JAXWS_Data.boolean_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.boolean_data.length + " got: " + size); - } else { - for (int i = 0; i < JAXWS_Data.boolean_data.length; i++) { - if (param.value.getArrayOfBoolean() - .get(i) != JAXWS_Data.boolean_data[i]) { - pass = false; - result.append("\nArrayOfBoolean Value mismatch - expected:" - + JAXWS_Data.boolean_data[i]); - result.append("actual:" + param.value.getArrayOfBoolean().get(i)); - } - } - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - param.value.getArrayOfBoolean().clear(); - for (int i = JAXWS_Data.boolean_data.length - 1, j = 0; i >= 0; i--, j++) { - param.value.getArrayOfBoolean().add(JAXWS_Data.boolean_data[i]); - if (debug) - System.out.println( - "array[" + j + "]=" + param.value.getArrayOfBoolean().get(j)); - } - System.out.println("Leaving echoInOutArrayBooleanTypes()"); - } - - public void echoInOutArrayByteTypes( - jakarta.xml.ws.Holder param) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutArrayByteTypes()"); - int size = param.value.getArrayOfByte().size(); - if (size != JAXWS_Data.byte_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.byte_data.length + " got: " + size); - } else { - for (int i = 0; i < JAXWS_Data.byte_data.length; i++) { - if (param.value.getArrayOfByte().get(i) != JAXWS_Data.byte_data[i]) { - pass = false; - result.append("\nArrayOfByte Value mismatch - expected:" - + JAXWS_Data.byte_data[i]); - result.append("actual:" + param.value.getArrayOfByte().get(i)); - } - } - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - param.value.getArrayOfByte().clear(); - for (int i = JAXWS_Data.byte_data.length - 1, j = 0; i >= 0; i--, j++) { - param.value.getArrayOfByte().add(JAXWS_Data.byte_data[i]); - if (debug) - System.out - .println("array[" + j + "]=" + param.value.getArrayOfByte().get(j)); - } - System.out.println("Leaving echoInOutArrayByteTypes()"); - } - - public void echoInOutArrayQNameTypes( - jakarta.xml.ws.Holder param) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutArrayQNameTypes()"); - int size = param.value.getArrayOfQName().size(); - if (size != JAXWS_Data.QName_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.QName_nonull_data.length + " got: " + size); - } else { - for (int i = 0; i < JAXWS_Data.QName_nonull_data.length; i++) { - if (!param.value.getArrayOfQName().get(i) - .equals(JAXWS_Data.QName_nonull_data[i])) { - pass = false; - result.append("\nArrayOfQName Value mismatch - expected:" - + JAXWS_Data.QName_nonull_data[i]); - result.append("actual:" + param.value.getArrayOfQName().get(i)); - } - } - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - - param.value.getArrayOfQName().clear(); - for (int i = JAXWS_Data.QName_nonull_data.length - - 1, j = 0; i >= 0; i--, j++) { - param.value.getArrayOfQName().add(JAXWS_Data.QName_nonull_data[i]); - if (debug) - System.out.println( - "array[" + j + "]=" + param.value.getArrayOfQName().get(j)); - } - System.out.println("Leaving echoInOutArrayQNameTypes()"); - } - - public void echoInOutArrayDateTimeTypes( - jakarta.xml.ws.Holder param) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutArrayDateTimeTypes()"); - int size = param.value.getArrayOfDateTime().size(); - if (size != JAXWS_Data.XMLGregorianCalendar_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.XMLGregorianCalendar_nonull_data.length + " got: " - + size); - } else { - for (int i = 0; i < JAXWS_Data.XMLGregorianCalendar_nonull_data.length; i++) { - if (!JAXWS_Data.compareXMLGregorianCalendars( - param.value.getArrayOfDateTime().get(i), - JAXWS_Data.XMLGregorianCalendar_nonull_data[i])) { - pass = false; - result.append("\nArrayOfQName Value mismatch - expected:" - + JAXWS_Data.XMLGregorianCalendar_nonull_data[i]); - result.append("actual:" + param.value.getArrayOfDateTime().get(i)); - } - } - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - param.value.getArrayOfDateTime().clear(); - for (int i = JAXWS_Data.XMLGregorianCalendar_nonull_data.length - - 1, j = 0; i >= 0; i--, j++) { - param.value.getArrayOfDateTime() - .add(JAXWS_Data.XMLGregorianCalendar_nonull_data[i]); - if (debug) - System.out.println( - "array[" + j + "]=" + param.value.getArrayOfDateTime().get(j)); - } - System.out.println("Leaving echoInOutArrayDateTimeTypes()"); - } - - public void echoInOutBook( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutBookTypes()"); - Book expected = new Book(); - expected.setAuthor("author0"); - expected.setTitle("title0"); - expected.setIsbn(0); - Book actual = param.value; - if (!actual.getAuthor().equals(expected.getAuthor()) - || !actual.getTitle().equals(expected.getTitle()) - || actual.getIsbn() != expected.getIsbn()) { - StringBuffer result = new StringBuffer(); - result.append("compare of data failed:"); - - result.append("received[" + actual.getAuthor() + "," + actual.getTitle() - + "," + actual.getIsbn() + "] - "); - result.append("expected[" + expected.getAuthor() + "," - + expected.getTitle() + "," + expected.getIsbn() + "]"); - throw new WebServiceException(result.toString()); - } - - actual.setAuthor("author1"); - actual.setTitle("title1"); - actual.setIsbn(1); - param.value = actual; - System.out.println("Leaving echoInOutBookTypes()"); - - } - - public void echoInOutBookArray( - jakarta.xml.ws.Holder param) { - System.out.println("Entering echoInOutArrayBookTypes()"); - int size = param.value.getBook().size(); - if (size != 2) { - System.out.println( - "Unexpected size for Holder, expected: 2, got: " + size); - } - - Book b0 = new Book(); - b0.setAuthor("author1"); - b0.setTitle("title1"); - b0.setIsbn(1); - Book b1 = new Book(); - b1.setAuthor("author0"); - b1.setTitle("title0"); - b1.setIsbn(0); - param.value.getBook().clear(); - param.value.getBook().add(b0); - param.value.getBook().add(b1); - System.out.println("Leaving echoInOutArrayBookTypes()"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/WSW2JDLHolderTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/WSW2JDLHolderTestService.wsdl deleted file mode 100644 index e2f4fb5359..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/WSW2JDLHolderTestService.wsdl +++ /dev/null @@ -1,755 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/build.xml deleted file mode 100644 index fcdc67b3a6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/customfile.xml deleted file mode 100644 index 7c7fed6bc1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/jakartaEE.tokens deleted file mode 100644 index 44e79c1565..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlholdertest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.holdertest.HolderTestService -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.holdertest.HolderTestImpl -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.holdertest.HolderTest -NAMESPACEURI=http://holdertest.org/wsdl -PORT=HolderTestPort -URLALIAS=/jaxws/HolderTest -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.document.literal.holdertest.HolderTestImpl -WEBSERVICEDESCRIPTION=HolderTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlholdertest -SERVICEREFNAMEWSEJB=service/wsw2jdlholdertest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlholdertest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/standalone-sun-jaxws.xml deleted file mode 100644 index 3c6095d980..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/standalone.web.xml deleted file mode 100644 index f83b773502..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/holdertest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLHolderTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -HolderTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -HolderTest -/jaxws/HolderTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/Client.java deleted file mode 100644 index e6d9e0c6c2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/Client.java +++ /dev/null @@ -1,466 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.httptest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.httptest."; - - // service and port information - private static final String NAMESPACEURI = "http://httptestservice.org/wsdl"; - - private static final String SERVICE_NAME = "HttpTestService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jdlhttptest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jdlhttptest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - Hello port = null; - - static HttpTestService service = null; - - /************************************************************************ - * Below are defined good and bad SOAP messages which are sent to a web * - * service endpoint (HttpTestService) over a HttpURLConnection in order * to - * verify whether we get the correct HTTP status codes as required * and - * specified in the WSI Basic Profile Version 1.0 Specification. * - ************************************************************************/ - // expect 2xx http status code - String GoodSoapMessage = "World"; - - // expect 2xx http status code - String GoodSoapMessageNoXMLDeclaration = "World"; - - // expect 2xx http status code - String GoodOneWaySoapMessage = "World"; - - // expect 2xx http status code - String GoodOneWaySoapMessageNoXMLDeclaration = "World"; - - // expect 2xx http status code - String SoapMessageUsingUTF16Encoding = "World"; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (Hello) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - HttpTestService.class, PORT_QNAME, Hello.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - // Initialize QNames used by the test - SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HttpTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: TestGoodSoapMessage - * - * @assertion_ids: WSI:SPEC:R1125; WSI:SPEC:R1111; WSI:SPEC:R4004; - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection. - * Verify that we get a correct HTTP status code of 2xx. - */ - public void TestGoodSoapMessage() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestGoodSoapMessage"); - TestUtil.logMsg("Send good SOAP RPC request (expect 2xx status code)"); - HttpURLConnection conn = openHttpConnection(url); - int httpStatusCode = sendRequest(conn, GoodSoapMessage, "utf-8"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestGoodSoapMessage failed", e); - } - - if (!pass) - throw new Fault("TestGoodSoapMessage failed"); - } - - /* - * @testName: TestGoodSoapMessageNoXMLDeclaration - * - * @assertion_ids: WSI:SPEC:R1125; WSI:SPEC:R1111; - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection. - * Soap message does not contain the XML declaration. Verify that we get a - * correct HTTP status code of 2xx. - */ - public void TestGoodSoapMessageNoXMLDeclaration() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestGoodSoapMessageNoXMLDeclaration"); - TestUtil.logMsg("Send good SOAP RPC request (expect 2xx status code)"); - HttpURLConnection conn = openHttpConnection(url); - int httpStatusCode = sendRequest(conn, GoodSoapMessageNoXMLDeclaration, - "utf-8"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestGoodSoapMessageNoXMLDeclaration failed", e); - } - - if (!pass) - throw new Fault("TestGoodSoapMessageNoXMLDeclaration failed"); - } - - /* - * @testName: TestGoodOneWaySoapMessage - * - * @assertion_ids: WSI:SPEC:R1125; WSI:SPEC:R1111; WSI:SPEC:R1112; - * WSI:SPEC:R4004; JAXWS:SPEC:11005; JAXWS:SPEC:10016; - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection. - * Verify that we get a correct HTTP status code of 2xx. - */ - public void TestGoodOneWaySoapMessage() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestGoodOneWaySoapMessage"); - TestUtil.logMsg("Send good SOAP RPC request (expect 2xx status code)"); - HttpURLConnection conn = openHttpConnection(url); - int httpStatusCode = sendRequest(conn, GoodOneWaySoapMessage, "utf-8"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestGoodOneWaySoapMessage failed", e); - } - - if (!pass) - throw new Fault("TestGoodOneWaySoapMessage failed"); - } - - /* - * @testName: TestGoodOneWaySoapMessageNoXMLDeclaration - * - * @assertion_ids: WSI:SPEC:R1125; WSI:SPEC:R1111; WSI:SPEC:R1112; - * JAXWS:SPEC:11005; JAXWS:SPEC:10016; - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection. - * Soap message does not contain the XML declaration. Verify that we get a - * correct HTTP status code of 2xx. - */ - public void TestGoodOneWaySoapMessageNoXMLDeclaration() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestGoodOneWaySoapMessageNoXMLDeclaration"); - TestUtil.logMsg("Send good SOAP RPC request (expect 2xx status code)"); - HttpURLConnection conn = openHttpConnection(url); - int httpStatusCode = sendRequest(conn, - GoodOneWaySoapMessageNoXMLDeclaration, "utf-8"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestGoodOneWaySoapMessageNoXMLDeclaration failed", e); - } - - if (!pass) - throw new Fault("TestGoodOneWaySoapMessageNoXMLDeclaration failed"); - } - - /* - * @testName: TestSoapMessageUsingUTF16Encoding - * - * @assertion_ids: WSI:SPEC:R1125; WSI:SPEC:R1111; WSI:SPEC:R4003; - * WSI:SPEC:R4004; - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection. - * Send SOAP RPC request using utf-16 encoding. Verify that we get a correct - * HTTP status code of 2xx. - */ - public void TestSoapMessageUsingUTF16Encoding() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestSoapMessageUsingUTF16Encoding"); - TestUtil.logMsg("Send SOAP RPC request using utf-16 encoding " - + "(expect 2xx status code)"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - OutputStreamWriter out = new OutputStreamWriter(baos, "utf-16"); - out.write(SoapMessageUsingUTF16Encoding); - out.flush(); - out.close(); - boolean debug = false; - if (debug) { - FileOutputStream faos = new FileOutputStream("/tmp/foo"); - out = new OutputStreamWriter(faos, "utf-16"); - out.write(SoapMessageUsingUTF16Encoding); - out.flush(); - out.close(); - faos.close(); - } - TestUtil.logMsg("Original SOAP message length=" - + SoapMessageUsingUTF16Encoding.length()); - TestUtil - .logMsg("Encoded SOAP message length=" + baos.toByteArray().length); - HttpURLConnection conn = openHttpConnection(url); - conn.setRequestProperty("Content-Type", "text/xml; charset=utf-16"); - int httpStatusCode = sendRequest(conn, baos.toByteArray(), "utf-16"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestSoapMessageUsingUTF16Encoding failed", e); - } - - if (!pass) - throw new Fault("TestSoapMessageUsingUTF16Encoding failed"); - } - - private HttpURLConnection openHttpConnection(String s) throws IOException { - HttpURLConnection conn = (HttpURLConnection) new URL(s).openConnection(); - conn.setDoOutput(true); - conn.setDoInput(true); - conn.setRequestMethod("POST"); - conn.setRequestProperty("HTTP-Version", "HTTP/1.1"); - conn.setRequestProperty("Content-Type", "text/xml"); - conn.setRequestProperty("SOAPAction", "\"\""); - return conn; - } - - private void closeHttpConnection(HttpURLConnection conn) throws IOException { - conn.disconnect(); - } - - private int sendRequest(HttpURLConnection conn, String request, - String charsetName) throws IOException { - TestUtil.logMsg("Request=" + request); - return _sendRequest(conn, request.getBytes(charsetName)); - } - - private int sendRequest(HttpURLConnection conn, byte[] request, - String encoding) throws IOException { - - TestUtil.logMsg("Request=" + new String(request, encoding)); - return _sendRequest(conn, request); - } - - private int _sendRequest(HttpURLConnection conn, byte[] data) - throws IOException { - - conn.setRequestProperty("Content-Length", - Integer.valueOf(data.length).toString()); - OutputStream outputStream = null; - try { - outputStream = conn.getOutputStream(); - outputStream.write(data); - } finally { - try { - outputStream.close(); - } catch (Throwable t) { - } - } - - boolean isFailure = true; - int responseCode = conn.getResponseCode(); - - String responseMessage = conn.getResponseMessage(); - - TestUtil.logMsg("ResponseCode=" + responseCode); - TestUtil.logMsg("ResponseMessage=" + responseMessage); - if (responseCode == HttpURLConnection.HTTP_OK) { - isFailure = false; - } - InputStream istream = null; - BufferedReader reader = null; - try { - istream = !isFailure ? conn.getInputStream() : conn.getErrorStream(); - if (istream != null) { - StringBuffer response = new StringBuffer(); - String buf = null; - reader = new BufferedReader(new InputStreamReader(istream)); - while ((buf = reader.readLine()) != null) { - response.append(buf); - } - } - } finally { - try { - reader.close(); - istream.close(); - } catch (Throwable t) { - } - } - return responseCode; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/HelloImpl.java deleted file mode 100644 index 3fbf351d57..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/HelloImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.httptest; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "HttpTestService", targetNamespace = "http://httptestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JDLHttpTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.httptest.Hello") -public class HelloImpl implements Hello { - - public HelloResponse hello(HelloRequest req) { - HelloResponse resp = null; - System.out.println("Hello, " + req.getString() + "!"); - 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/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/WSW2JDLHttpTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/WSW2JDLHttpTestService.wsdl deleted file mode 100644 index 937efcb907..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/WSW2JDLHttpTestService.wsdl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/build.xml deleted file mode 100644 index 5bce87efd8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/customfile.xml deleted file mode 100644 index 246290045c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/jakartaEE.tokens deleted file mode 100644 index f9700d3fb9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhttptest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.httptest.HttpTestService -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.httptest.HelloImpl -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.httptest.Hello -NAMESPACEURI=http://httptestservice.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.document.literal.httptest.HelloImpl -WEBSERVICEDESCRIPTION=HttpTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhttptest -SERVICEREFNAMEWSEJB=service/wsw2jdlhttptest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhttptest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/standalone-sun-jaxws.xml deleted file mode 100644 index 92e90a4ca2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/standalone.web.xml deleted file mode 100644 index d5d3b24667..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLHttpTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -/jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/Client.java deleted file mode 100644 index c7a4be36aa..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/Client.java +++ /dev/null @@ -1,3540 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; -import java.util.*; - -import java.util.Properties; - -import java.math.BigInteger; -import java.math.BigDecimal; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import javax.xml.datatype.*; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest."; - - // service and port information - private static final String NAMESPACEURI = "http://marshalltestservice.org/MarshallTestService.wsdl"; - - private static final String SERVICE_NAME = "MarshallTestService"; - - private static final String PORT_NAME1 = "MarshallTestPort1"; - - private static final String PORT_NAME2 = "MarshallTestPort2"; - - private static final String PORT_NAME3 = "MarshallTestPort3"; - - private static final String PORT_NAME4 = "MarshallTestPort4"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private QName PORT_QNAME2 = new QName(NAMESPACEURI, PORT_NAME2); - - private QName PORT_QNAME3 = new QName(NAMESPACEURI, PORT_NAME3); - - private QName PORT_QNAME4 = new QName(NAMESPACEURI, PORT_NAME4); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jdlmarshalltest.endpoint.1"; - - private static final String ENDPOINT2_URL = "w2jdlmarshalltest.endpoint.2"; - - private static final String ENDPOINT3_URL = "w2jdlmarshalltest.endpoint.3"; - - private static final String ENDPOINT4_URL = "w2jdlmarshalltest.endpoint.4"; - - private static final String WSDLLOC_URL = "w2jdlmarshalltest.wsdlloc.1"; - - private String url = null; - - private String url2 = null; - - private String url3 = null; - - private String url4 = null; - - private URL wsdlurl = null; - - MarshallTest port = null; - - NewSchemaTest port2 = null; - - CompoundTest port3 = null; - - OneWayTest port4 = null; - - static MarshallTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT2_URL); - url2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT3_URL); - url3 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT4_URL); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("Service Endpoint URL: " + url2); - TestUtil.logMsg("Service Endpoint URL: " + url3); - TestUtil.logMsg("Service Endpoint URL: " + url4); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (MarshallTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MarshallTestService.class, PORT_QNAME1, MarshallTest.class); - port2 = (NewSchemaTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MarshallTestService.class, PORT_QNAME2, NewSchemaTest.class); - port3 = (CompoundTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MarshallTestService.class, PORT_QNAME3, CompoundTest.class); - port4 = (OneWayTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MarshallTestService.class, PORT_QNAME4, OneWayTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - JAXWS_Util.setTargetEndpointAddress(port2, url2); - JAXWS_Util.setTargetEndpointAddress(port3, url3); - JAXWS_Util.setTargetEndpointAddress(port4, url4); - } - - private void getPortJavaEE() throws Exception { - /* - * TestUtil.logMsg("JNDI lookup for Service1"); InitialContext ctx = new - * InitialContext(); - * TestUtil.logMsg("Lookup java:comp/env/service/wsw2jdlmarshalltest"); - * Service svc = (jakarta.xml.ws.Service) - * ctx.lookup("java:comp/env/service/wsw2jdlmarshalltest"); - * TestUtil.logMsg("Get port1 from Service1"); port = (MarshallTest) - * svc.getPort(com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest. - * MarshallTest.class); TestUtil.logMsg("Get port2 from Service1"); port2 = - * (NewSchemaTest) - * svc.getPort(com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest. - * NewSchemaTest.class); TestUtil.logMsg("Get port3 from Service1"); port3 = - * (CompoundTest) - * svc.getPort(com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest. - * CompoundTest.class); TestUtil.logMsg("Get port4 from Service1"); port4 = - * (OneWayTest) - * svc.getPort(com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest. - * OneWayTest.class); TestUtil.logMsg("Port obtained"); - * JAXWS_Util.setSOAPLogging(port); JAXWS_Util.setSOAPLogging(port2); - * JAXWS_Util.setSOAPLogging(port3); JAXWS_Util.setSOAPLogging(port4); - */ - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = service.getMarshallTestPort1(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - port2 = service.getMarshallTestPort2(); - TestUtil.logMsg("port2=" + port2); - TestUtil.logMsg("Obtained port2"); - port3 = service.getMarshallTestPort3(); - TestUtil.logMsg("port3=" + port3); - TestUtil.logMsg("Obtained port3"); - port4 = service.getMarshallTestPort4(); - TestUtil.logMsg("port4=" + port4); - TestUtil.logMsg("Obtained port4"); - JAXWS_Util.dumpTargetEndpointAddress(port); - JAXWS_Util.dumpTargetEndpointAddress(port2); - JAXWS_Util.dumpTargetEndpointAddress(port3); - JAXWS_Util.dumpTargetEndpointAddress(port4); - // JAXWS_Util.setSOAPLogging(port); - // JAXWS_Util.setSOAPLogging(port2); - // JAXWS_Util.setSOAPLogging(port3); - // JAXWS_Util.setSOAPLogging(port4); - } - - private JavaBean JavaBean_data[] = null; - - private JavaBean2 JavaBean2_data[] = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (MarshallTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - - JavaBean_data = new JavaBean[2]; - JavaBean_data[0] = new JavaBean(); - JavaBean_data[1] = new JavaBean(); - JavaBean2_data = new JavaBean2[2]; - JavaBean2_data[0] = new JavaBean2(); - JavaBean2_data[1] = new JavaBean2(); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - // ==================================================================== - // Java Primitive Types - // ==================================================================== - - /* - * @testName: MarshallPrimitiveTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each primitive type pass its value as input to the - * corresponding RPC method and receive it back as the return value. Compare - * results of each value/type of what was sent and what was returned. Verify - * they are equal. - * - * Description - */ - public void MarshallPrimitiveTest() throws Fault { - TestUtil.logMsg("MarshallPrimitiveTest"); - boolean pass = true; - - if (!booleanTest()) - pass = false; - if (!byteTest()) - pass = false; - if (!shortTest()) - pass = false; - if (!intTest()) - pass = false; - if (!longTest()) - pass = false; - if (!floatTest()) - pass = false; - if (!doubleTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallPrimitiveTest failed"); - } - - // ==================================================================== - // Standard Java Classes - // ==================================================================== - - /* - * @testName: MarshallStandardJavaClassesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * standard java class type. For each standard java class above pass its value - * as input to the corresponding RPC method and receive it back as the return - * value. Compare results of each value/type of what was sent sent and what - * was returned. Verify they are equal. - * - * Description - */ - public void MarshallStandardJavaClassesTest() throws Fault { - TestUtil.logMsg("MarshallStandardJavaClassesTest"); - boolean pass = true; - - if (!StringTest()) - pass = false; - if (!CalendarTest()) - pass = false; - if (!BigIntegerTest()) - pass = false; - if (!BigDecimalTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallStandardJavaClassesTest failed"); - } - - // ==================================================================== - // JavaBeans Class - // ==================================================================== - - /* - * @testName: MarshallJavaBeanTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method - * JavaBeanTest. Pass a JavaBean value to the RPC method and receive it back - * as the return value. Compare results of JavaBean value from what was sent - * and what was returned. Verify they are equal. - * - * Description - */ - public void MarshallJavaBeanTest() throws Fault { - TestUtil.logMsg("MarshallJavaBeanTest"); - boolean pass = true; - - init_JavaBean_Data(); - JavaBean values[] = JavaBean_data; - JavaBeanTestResponse response; - JavaBeanTest request; - TestUtil.logMsg( - "Passing/Returning JavaBean JavaBean class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new JavaBeanTest(); - request.setJavaBean(values[i]); - response = port.javaBeanTest(request); - if (!compareJavaBeans(values[i], response.getJavaBean())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallJavaBeanTest failed", e); - } - - if (!pass) - throw new Fault("MarshallJavaBeanTest failed"); - } - - // ==================================================================== - // Java Array Single-Dimensional for all supported JAX-WS types - // ==================================================================== - - /* - * @testName: MarshallJavaArrayTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, invoke the RPC methods for each - * java type supported. For each java type supported pass an arrary of values - * as input to the corresponding RPC method and receive it back as the return - * value. Compare results of each array type of what was sent and what was - * returned. Verify they are equal. - * - * Description - */ - public void MarshallJavaArrayTest() throws Fault { - TestUtil.logMsg("MarshallJavaArrayTest"); - boolean pass = true; - - if (!booleanArrayTest()) - pass = false; - if (!byteArrayTest()) - pass = false; - if (!shortArrayTest()) - pass = false; - if (!intArrayTest()) - pass = false; - if (!longArrayTest()) - pass = false; - if (!floatArrayTest()) - pass = false; - if (!doubleArrayTest()) - pass = false; - if (!StringArrayTest()) - pass = false; - if (!CalendarArrayTest()) - pass = false; - if (!BigIntegerArrayTest()) - pass = false; - if (!BigDecimalArrayTest()) - pass = false; - if (!JavaBeanArrayTest()) - pass = false; - if (!QNameArrayTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallJavaArrayTest failed"); - } - // ==================================================================== - // The void type - // ==================================================================== - - /* - * @testName: MarshallVoidTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method voidTest. - * Verify normal invocation and return. - * - * Description - */ - public void MarshallVoidTest() throws Fault { - TestUtil.logMsg("MarshallVoidTest"); - boolean pass = true; - VoidTestResponse response; - TestUtil.logMsg("Handling a void type to/from JAXWS Service"); - try { - port.voidTest(new VoidTest()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallVoidTest failed", e); - } - - if (!pass) - throw new Fault("MarshallVoidTest failed"); - } - - // ======================================================================= - // Marshall Other XML Schema Types (Any, List, Anonymous, ...) - // ======================================================================= - - /* - * @testName: MarshallNormalizedStringTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallNormalizedStringTypeTest() throws Fault { - TestUtil.logMsg("MarshallNormalizedStringTypeTest"); - boolean pass = true; - - String request = "123-ABC12"; - - try { - String response = port2.echoNormalizedStringTypeTest(request); - TestUtil.logMsg("response=" + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallNormalizedStringTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallNormalizedStringTypeTest failed"); - } - - /* - * @testName: MarshallIntegerRangeTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallIntegerRangeTypeTest() throws Fault { - TestUtil.logMsg("MarshallIntegerRangeTypeTest"); - boolean pass = true; - - BigInteger request = new BigInteger("101"); - - try { - BigInteger response = port2.echoIntegerRangeTypeTest(request); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallIntegerRangeTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallIntegerRangeTypeTest failed"); - } - - /* - * @testName: MarshallEnumTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallEnumTypesTest() throws Fault { - TestUtil.logMsg("MarshallEnumTypesTest"); - boolean pass = true; - - if (!StringEnumTypeTest()) - pass = false; - if (!ByteEnumTypeTest()) - pass = false; - if (!ShortEnumTypeTest()) - pass = false; - if (!IntegerEnumTypeTest()) - pass = false; - if (!IntEnumTypeTest()) - pass = false; - if (!LongEnumTypeTest()) - pass = false; - if (!DecimalEnumTypeTest()) - pass = false; - if (!FloatEnumTypeTest()) - pass = false; - if (!DoubleEnumTypeTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallEnumTypesTest failed"); - } - - /* - * @testName: MarshallAnonymousTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallAnonymousTypeTest() throws Fault { - TestUtil.logMsg("MarshallAnonymousTypeTest"); - boolean pass = true; - - try { - init_FooAnonymousType_Data(); - FooAnonymousType request = FooAnonymousType_data; - FooAnonymousType response = port2.echoAnonymousTypeTest(request); - if (!compareFooAnonymousTypeData(request, response)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallAnonymousTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallAnonymousTypeTest failed"); - } - - /* - * @testName: MarshallVariousSchemaTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallVariousSchemaTypesTest() throws Fault { - TestUtil.logMsg("MarshallVariousSchemaTypesTest"); - boolean pass = true; - - try { - init_FooVariousSchemaTypes_Data(); - FooVariousSchemaTypes request = FooVariousSchemaTypes_data; - TestUtil.logMsg("Send: " + request.getFooA() + "|" + request.getFooB() - + "|" + request.getFooC() + "|" + request.getFooD() + "|" - + request.getFooE() + "|" + request.getFooF()); - FooVariousSchemaTypes response = port2 - .echoVariousSchemaTypesTest(request); - TestUtil.logMsg("Recv: " + response.getFooA() + "|" + response.getFooB() - + "|" + response.getFooC() + "|" + response.getFooD() + "|" - + response.getFooE() + "|" + response.getFooF()); - if (response.getFooA() == request.getFooA() - && response.getFooB().equals(request.getFooB()) - && response.getFooC().equals(request.getFooC()) - && response.getFooD().equals(request.getFooD()) - && response.getFooE() == request.getFooE() - && response.getFooF() == request.getFooF()) { - TestUtil.logMsg("Result match"); - } else { - TestUtil.logErr("Result mismatch"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallVariousSchemaTypesTest failed", e); - } - - if (!pass) - throw new Fault("MarshallVariousSchemaTypesTest failed"); - } - - /* - * @testName: MarshallVariousSchemaTypesListTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; JAXWS:SPEC:2080; - * JAXWS:SPEC:3054; JAXWS:SPEC:3052; JAXWS:SPEC:2084; JAXWS:SPEC:2085; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallVariousSchemaTypesListTypeTest() throws Fault { - TestUtil.logMsg("MarshallVariousSchemaTypesListTypeTest"); - boolean pass = true; - - try { - init_FooVariousSchemaTypes_Data(); - FooVariousSchemaTypesListType request = FooVariousSchemaTypesListType_data; - - FooVariousSchemaTypes fooSend[] = request.getFooA() - .toArray(new FooVariousSchemaTypes[request.getFooA().size()]); - FooVariousSchemaTypesListType response = port2 - .echoVariousSchemaTypesListTypeTest(request); - FooVariousSchemaTypes fooRecv[] = response.getFooA() - .toArray(new FooVariousSchemaTypes[response.getFooA().size()]); - if (fooRecv.length == fooSend.length) { - for (int i = 0; i < fooSend.length; i++) { - if (fooRecv[i].getFooA() == fooSend[i].getFooA() - && fooRecv[i].getFooB().equals(fooSend[i].getFooB()) - && fooRecv[i].getFooC().equals(fooSend[i].getFooC()) - && fooRecv[i].getFooD().equals(fooSend[i].getFooD())) { - TestUtil.logMsg("Result match"); - } else { - TestUtil.logErr("Result mismatch"); - TestUtil.logMsg( - "Send: " + fooSend[i].getFooA() + "|" + fooSend[i].getFooB() - + "|" + fooSend[i].getFooC() + "|" + fooSend[i].getFooD() - + "|" + fooSend[i].getFooE() + "|" + fooSend[i].getFooF()); - TestUtil.logMsg( - "Recv: " + fooRecv[i].getFooA() + "|" + fooRecv[i].getFooB() - + "|" + fooRecv[i].getFooC() + "|" + fooRecv[i].getFooD() - + "|" + fooRecv[i].getFooE() + "|" + fooRecv[i].getFooF()); - pass = false; - } - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallVariousSchemaTypesListTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallVariousSchemaTypesListTypeTest failed"); - } - - /* - * @testName: MarshallAnnotationTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallAnnotationTypeTest() throws Fault { - TestUtil.logMsg("MarshallAnnotationTypeTest"); - boolean pass = true; - - FooAnnotationType request = FooAnnotationType.UNKNOWN; - try { - FooAnnotationType response = port2.echoAnnotationTypeTest(request); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallAnnotationTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallAnnotationTypeTest failed"); - } - - /* - * @testName: MarshallAnySimpleTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallAnySimpleTypeTest() throws Fault { - TestUtil.logMsg("MarshallAnySimpleTypeTest"); - boolean pass = true; - - String request = "hello,there"; - try { - String response = (String) port2.echoAnySimpleTypeTest(request); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallAnySimpleTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallAnySimpleTypeTest failed"); - } - - /* - * @testName: MarshallAnyURITypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallAnyURITypeTest() throws Fault { - TestUtil.logMsg("MarshallAnyURITypeTest"); - boolean pass = true; - - try { - String uriReq = "http://example.com/myURI"; - FooAnyURIType request = new FooAnyURIType(); - request.setFooAnyURIType(uriReq); - FooAnyURIType response = port2.echoAnyURITypeTest(request); - String uriRes = response.getFooAnyURIType(); - if (!uriRes.equals(uriReq)) { - TestUtil.logErr("Wrong response expected: <" + uriReq + ">, received: <" - + uriRes + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + uriReq - + ">, received: <" + uriRes + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallAnyURITypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallAnyURITypeTest failed"); - } - - /* - * @testName: MarshallLanguageTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallLanguageTypeTest() throws Fault { - TestUtil.logMsg("MarshallLanguageTypeTest"); - boolean pass = true; - - String request = "english"; - - try { - String response = port2.echoLanguageTypeTest(request); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallLanguageTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallLanguageTypeTest failed"); - } - - /* - * @testName: MarshallTokenTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallTokenTypeTest() throws Fault { - TestUtil.logMsg("MarshallTokenTypeTest"); - boolean pass = true; - - String request = "token"; - try { - String response = port2.echoTokenTypeTest(request); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallTokenTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallTokenTypeTest failed"); - } - - /* - * @testName: MarshallNameTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallNameTypeTest() throws Fault { - TestUtil.logMsg("MarshallNameTypeTest"); - boolean pass = true; - - String request = "name"; - try { - String response = port2.echoNameTypeTest(request); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallNameTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallNameTypeTest failed"); - } - - /* - * @testName: MarshallNCNameTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallNCNameTypeTest() throws Fault { - TestUtil.logMsg("MarshallNCNameTypeTest"); - boolean pass = true; - - String request = "ncname"; - try { - String response = port2.echoNCNameTypeTest(request); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallNCNameTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallNCNameTypeTest failed"); - } - - /* - * @testName: MarshallIDTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallIDTypeTest() throws Fault { - TestUtil.logMsg("MarshallIDTypeTest"); - boolean pass = true; - - String request = "id"; - try { - String response = port2.echoIDTypeTest(request); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallIDTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallIDTypeTest failed"); - } - - /* - * @testName: MarshallStructXMLSchemaTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method voidTest. - * Verify normal invocation and return. - * - * Description - */ - public void MarshallStructXMLSchemaTypesTest() throws Fault { - TestUtil.logMsg("MarshallStructXMLSchemaTypesTest"); - boolean pass = true; - - try { - InitExpectedFooTypeData(); - if (!sendFoo1Test()) - pass = false; - if (!sendFoo2Test()) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallStructXMLSchemaTypesTest failed", e); - } - - if (!pass) - throw new Fault("MarshallStructXMLSchemaTypesTest failed"); - } - - // ======================================================================= - // Marshall Literal Faults (Foobad1 ... FooBad5) - // ======================================================================= - /* - * @testName: MarshallLiteralFaultsTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; JAXWS:SPEC:2044; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method voidTest. - * Verify literal faults. - * - * Description - */ - public void MarshallLiteralFaultsTest() throws Fault { - TestUtil.logMsg("MarshallLiteralFaults"); - boolean pass = true; - - if (!fooFaultTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallLiteralFaults failed"); - } - - // ======================================================================= - // Marshall XML Schema Complex Types (Person, Employee, Document) - // ======================================================================= - /* - * @testName: MarshallComplexTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods. Test - * with complex types. For each type pass its value as input to the - * corresponding RPC method and receive it back as the return value. Compare - * results of each value/type of what was sent and what was returned. Verify - * they are equal. - * - */ - public void MarshallComplexTypesTest() throws Fault { - String testname = "MarshallComplexTypesTest"; - TestUtil.logTrace(testname); - boolean pass = true; - try { - boolean b1 = doPersonTest(); - if (b1) - TestUtil.logMsg("Person echo success!"); - boolean b2 = doEmployeeTest(); - if (b2) - TestUtil.logMsg("Employee echo success!"); - boolean b3 = doDocumentTest(); - if (b3) - TestUtil.logMsg("Document echo success!"); - if (!b1 || !b2 || !b3) - pass = false; - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault(testname); - } - - if (!pass) - throw new Fault(testname + " failed"); - } - - // ==================================================================== - // One Way Request - // ==================================================================== - - /* - * @testName: MarshallOneWayTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method voidTest. - * Verify normal invocation and return. - * - * Description - */ - public void MarshallOneWayTest() throws Fault { - TestUtil.logMsg("MarshallOneWayTest"); - boolean pass = true; - TestUtil.logMsg("Testing oneway operation to JAXWS Service"); - try { - OneWayMessage v = new OneWayMessage(); - v.setStringValue("A One Way Test"); - port4.oneWayMethod(v); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallOneWayTest failed", e); - } - - if (!pass) - throw new Fault("MarshallOneWayTest failed"); - } - - // ==================================================================== - // Other Simple Types - // ==================================================================== - - /* - * @testName: MarshallOtherSimpleTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * standard java class type. For each other simple type above (QName, - * Base64Binary, and HexBinary) pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent sent and what was returned. Verify they are - * equal. - */ - public void MarshallOtherSimpleTypesTest() throws Fault { - TestUtil.logMsg("MarshallOtherSimpleTypesTest"); - boolean pass = true; - - if (!QNameTest()) - pass = false; - if (!Base64BinaryTest()) - pass = false; - if (!HexBinaryTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallOtherSimpleTypesTest failed"); - } - - /* - * @testName: MarshallUnsignedTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * standard java class type. For each supported unsigned simple type pass its - * value as input to the corresponding RPC method and receive it back as the - * return value. Compare results of each value/type of what was sent sent and - * what was returned. Verify they are equal. - */ - public void MarshallUnsignedTypesTest() throws Fault { - TestUtil.logMsg("MarshallUnsignedTypesTest"); - boolean pass = true; - - if (!UnsignedShortTest()) - pass = false; - if (!UnsignedIntTest()) - pass = false; - if (!UnsignedByteTest()) - pass = false; - if (!UnsignedLongTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallUnsignedTypesTest failed"); - } - - /* - * @testName: MarshallBigIntegerTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * standard java class type. For each supported unsigned simple type pass its - * value as input to the corresponding RPC method and receive it back as the - * return value. Compare results of each value/type of what was sent sent and - * what was returned. Verify they are equal. - */ - public void MarshallBigIntegerTypesTest() throws Fault { - TestUtil.logMsg("MarshallBigIntegerTypesTest"); - boolean pass = true; - - if (!NonPositiveIntegerTest()) - pass = false; - if (!NonNegativeIntegerTest()) - pass = false; - if (!PositiveIntegerTest()) - pass = false; - if (!NegativeIntegerTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallBigIntegerTypesTest failed"); - } - - /* - * @testName: MarshallDateTimeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallDateTimeTest() throws Fault { - TestUtil.logMsg("MarshallDateTimeTest"); - boolean pass = true; - - if (!TimeTest()) - pass = false; - if (!DateTest()) - pass = false; - if (!GYearMonthTest()) - pass = false; - if (!GYearTest()) - pass = false; - if (!GMonthDayTest()) - pass = false; - if (!GDayTest()) - pass = false; - if (!GMonthTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallDateTimeTest failed"); - } - - /* - * @testName: MarshallListTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; JAXWS:SPEC:2080; - * JAXWS:SPEC:3054; JAXWS:SPEC:3052; JAXWS:SPEC:2084; JAXWS:SPEC:2085; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * standard java class type. For each supported unsigned simple type pass its - * value as input to the corresponding RPC method and receive it back as the - * return value. Compare results of each value/type of what was sent sent and - * what was returned. Verify they are equal. - */ - public void MarshallListTypesTest() throws Fault { - TestUtil.logMsg("MarshallListTypesTest"); - boolean pass = true; - - if (!StringListTest()) - pass = false; - if (!IntListTest()) - pass = false; - if (!FloatListTest()) - pass = false; - if (!DecimalListTest()) - pass = false; - if (!DoubleListTest()) - pass = false; - if (!IntegerListTest()) - pass = false; - if (!LongListTest()) - pass = false; - if (!ShortListTest()) - pass = false; - if (!ByteListTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallListTypesTest failed"); - } - - /* - * @testName: MarshallDurationTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: - */ - public void MarshallDurationTest() throws Fault { - TestUtil.logMsg("MarshallDurationTest"); - boolean pass = true; - Duration values[] = JAXWS_Data.Duration_data; - DurationTestResponse response; - DurationTest request; - try { - TestUtil.logMsg("Passing/Returning Duration class to/from JAXWS Service"); - for (int i = 0; i < values.length; i++) { - request = new DurationTest(); - request.setDurationValue(values[i]); - response = port.durationTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getDurationValue(), - "Duration")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("MarshallDurationTest failed"); - } - - /* - * @testName: MarshallMapSimpleTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: In NewSchemaDefs.xsd create a schema of simpletypes derived - * via restriction for string, integer, int, long, short, decimal, float, - * double, boolean, byte and qname. Verify that what was sent to the service - * endpoint is echoed back. Description - */ - public void MarshallMapSimpleTypesTest() throws Fault { - TestUtil.logMsg("MarshallMapSimpleTypesTest"); - boolean pass = true; - String request = "This is from MarshallMapSimpleTypesTest"; - BigDecimalTestResponse bdResponse; - BigDecimalTest bdRequest; - TestUtil.logMsg("Top of MarshallMapSimpleTypesTest"); - try { - String response = port2.echoFooStringTypeTest(request); - TestUtil.logMsg("Received response: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Simple String passes"); - - // ----------------------------------------------- - BigInteger birequest = new BigInteger("5"); - BigInteger biresponse = port2.echoFooIntegerTypeTest(birequest); - if (!birequest.toString().equals(biresponse.toString())) { - TestUtil.logErr("Result mismatch - expected: " + birequest.toString() - + ", received: " + biresponse.toString()); - TestUtil.logErr("Integer failed"); - pass = false; - - } else - TestUtil.logMsg("Simple Integer passes"); - - // ----------------------------------------------- - int irequest = 10; - int iresponse = port2.echoFooIntTypeTest(irequest); - if (irequest != iresponse) { - TestUtil.logErr("Result mismatch - expected: " + irequest - + ", received: " + iresponse); - TestUtil.logErr("Simple int failed"); - pass = false; - } else - TestUtil.logMsg("Simple int passes"); - - // ----------------------------------------------- - - long lrequest = 1000000000000000000L; - long lresponse = port2.echoFooLongTypeTest(lrequest); - if (lrequest != lresponse) { - TestUtil.logErr("Result mismatch - expected: " + lrequest - + ", received: " + lresponse); - TestUtil.logErr("Simple long failed"); - pass = false; - - } else - TestUtil.logMsg("Simple long passes"); - - // ----------------------------------------------- - - short srequest = 32765; - short sresponse = port2.echoFooShortTypeTest(srequest); - if (srequest != sresponse) { - TestUtil.logErr("Result mismatch - expected: " + srequest - + ", received: " + sresponse); - TestUtil.logErr("Simple short failed"); - pass = false; - - } else - TestUtil.logMsg("Simple short passes"); - - // ----------------------------------------------- - TestUtil.logMsg("Testing BigDecimal"); - BigDecimal bdrequest = new BigDecimal("3512359.1456"); - BigDecimal bdresponse = port2.echoFooDecimalTypeTest(bdrequest); - if (!bdrequest.toString().equals(bdresponse.toString())) { - TestUtil.logErr("Result mismatch - expected: " + bdrequest.toString() - + ", received: " + bdresponse.toString()); - TestUtil.logErr("decimal failed"); - pass = false; - - } else - TestUtil.logMsg("Simple decimal passes"); - - // ----------------------------------------------- - TestUtil.logMsg("Testing float"); - float frequest = 489.57f; - float fresponse = port2.echoFooFloatTypeTest(frequest); - if (frequest != fresponse) { - TestUtil.logErr("Result mismatch - expected: " + frequest - + ", received: " + fresponse); - TestUtil.logErr("float failed"); - pass = false; - - } else - TestUtil.logMsg("Simple float passes"); - - // ----------------------------------------------- - TestUtil.logMsg("Testing double "); - double drequest = 5; - double dresponse = port2.echoFooDoubleTypeTest(drequest); - if (drequest != dresponse) { - TestUtil.logErr("Result mismatch - expected: " + drequest - + ", received: " + dresponse); - TestUtil.logErr("double failed"); - pass = false; - - } else - TestUtil.logMsg("Simple double passes"); - - // ----------------------------------------------- - TestUtil.logMsg("Testing boolean"); - boolean brequest = true; - boolean bresponse = port2.echoFooBooleanTypeTest(brequest); - if (brequest != bresponse) { - TestUtil.logErr("Result mismatch - expected: " + brequest - + ", received: " + bresponse); - TestUtil.logErr("boolean failed"); - pass = false; - - } else - TestUtil.logMsg("Simple boolean passes"); - // ----------------------------------------------- - TestUtil.logMsg("Testing byte"); - byte btrequest = 127; - byte btresponse = port2.echoFooByteTypeTest(btrequest); - if (btrequest != btresponse) { - TestUtil.logErr("Result mismatch - expected: " + btrequest - + ", received: " + btresponse); - TestUtil.logErr("byte failed"); - pass = false; - - } else - TestUtil.logMsg("Simple byte passes"); - - // ----------------------------------------------- - TestUtil.logMsg("Testing QName"); - QName qnrequest = new QName("http://marshalltestservice.org/types2", - "localPart"); - QName qnresponse = port2.echoFooQNameTypeTest(qnrequest); - if (!qnresponse.toString().equals(qnrequest.toString())) { - TestUtil.logErr("Result mismatch - expected: " + qnrequest.toString() - + ", received: " + qnresponse.toString()); - TestUtil.logErr("QName failed"); - pass = false; - - } else - TestUtil.logMsg("Simple QName passes"); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("MarshallMapSimpleTypesTest failed"); - } - - /* - * @testName: MarshallIncludedStringTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: test xsd:include by including a schema with a simpleType in - * NewSchemaDefs.xsd. - * - * - * Description - */ - public void MarshallIncludedStringTypeTest() throws Fault { - TestUtil.logMsg("MarshallIncludedStringTypeTest"); - boolean pass = true; - com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.IncludedStringRequest request = null; - String myString = "Please echo this back to me "; - com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.IncludedStringResponse response = null; - try { - request = new IncludedStringRequest(); - request.setMyString(myString); - response = port2.echoIncludedStringTest(request); - String resp = response.getMyString(); - if (!myString.equals(resp)) { - pass = false; - TestUtil.logMsg("Expected: " + myString + " but returned " + resp); - } else - TestUtil.logMsg("Good String echoed back as expected"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallNOTATIONTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallIncludedStringTypeTest failed"); - } - - private boolean printTestStatus(boolean pass, String test) { - if (pass) - TestUtil.logMsg("" + test + " ... PASSED"); - else - TestUtil.logErr("" + test + " ... FAILED"); - - return pass; - } - - private boolean sendFoo1Test() { - TestUtil.logMsg("MarshallOtherXMLSchemaTypesTest:(sendFoo1Test)"); - boolean pass = true; - TestUtil.logMsg( - "Passing/Returning OtherXMLSchemaDataTypes to/from JAXWS Service"); - try { - FooStatusType response = port2.sendFoo1Test(FooType_data); - if (!response.isFooA()) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallOtherXMLSchemaTypesTest:(sendFoo1Test)"); - return pass; - } - - private boolean sendFoo2Test() { - TestUtil.logMsg("MarshallStructXMLSchemaTypesTest:(sendFoo2Test)"); - boolean pass = true; - TestUtil.logMsg( - "Passing/Returning StructXMLSchemaDataTypes to/from JAXWS Service"); - try { - FooType response = port2.sendFoo2Test(FooType_data); - if (!CompareWithExpectedFooTypeData(response)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStructXMLSchemaTypesTest:(sendFoo2Test)"); - return pass; - } - - private boolean fooFaultTest() { - TestUtil.logMsg("MarshallLiteralFaultsTest:(fooFaultTest)"); - boolean pass = true; - TestUtil.logMsg("Testing Literal Faults"); - try { - TestUtil.logMsg("Throw a FooFault with reason - FooBad1"); - FooStringRequest f = new FooStringRequest(); - f.setVarString("FooBad1"); - FooStringResponse response = port2.fooFaultTest(f); - TestUtil.logErr("Did not throw a FooFault"); - pass = false; - } catch (FooFault e) { - TestUtil.logMsg("Did throw a FooFault"); - FooFaultException ffe = e.getFaultInfo(); - TestUtil.logMsg("Reason=" + ffe.getWhyTheFault()); - if (ffe.getWhyTheFault().equals("FooBad1")) - TestUtil.logMsg("Reason for exception - expected"); - else { - pass = false; - TestUtil.logErr("Reason for exception - unexpected", e); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - try { - TestUtil.logMsg("Throw a FooFault with reason - FooBad5"); - FooStringRequest f = new FooStringRequest(); - f.setVarString("FooBad5"); - FooStringResponse response = port2.fooFaultTest(f); - TestUtil.logErr("Did not throw a FooFault"); - pass = false; - } catch (FooFault e) { - TestUtil.logMsg("Did throw a FooFault"); - FooFaultException ffe = e.getFaultInfo(); - TestUtil.logMsg("Reason=" + ffe.getWhyTheFault()); - if (ffe.getWhyTheFault().equals("FooBad5")) - TestUtil.logMsg("Reason for exception - expected"); - else { - pass = false; - TestUtil.logErr("Reason for exception - unexpected", e); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallLiteralFaultsTest:(fooFaultTest)"); - return pass; - } - - private boolean booleanTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(booleanTest)"); - boolean pass = true; - boolean values[] = JAXWS_Data.boolean_data; - BooleanTestResponse response; - BooleanTest request; - TestUtil.logMsg("Passing/Returning boolean data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new BooleanTest(); - request.setBooleanValue(values[i]); - response = port.booleanTest(request); - if (!JAXWS_Data.compareValues(values[i], response.isBooleanValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(booleanTest)"); - return pass; - } - - private boolean byteTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(byteTest)"); - boolean pass = true; - byte values[] = JAXWS_Data.byte_data; - ByteTestResponse response; - ByteTest request; - TestUtil.logMsg("Passing/Returning byte data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new ByteTest(); - request.setByteValue(values[i]); - response = port.byteTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getByteValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(byteTest)"); - return pass; - } - - private boolean shortTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(shortTest)"); - boolean pass = true; - short values[] = JAXWS_Data.short_data; - ShortTestResponse response; - ShortTest request; - TestUtil.logMsg("Passing/Returning short data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new ShortTest(); - request.setShortValue(values[i]); - response = port.shortTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getShortValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(shortTest)"); - return pass; - } - - private boolean intTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(intTest)"); - boolean pass = true; - int values[] = JAXWS_Data.int_data; - IntTestResponse response; - IntTest request; - TestUtil.logMsg("Passing/Returning int data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new IntTest(); - request.setIntValue(values[i]); - response = port.intTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getIntValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(intTest)"); - return pass; - } - - private boolean longTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(longTest)"); - boolean pass = true; - long values[] = JAXWS_Data.long_data; - LongTestResponse response; - LongTest request; - TestUtil.logMsg("Passing/Returning long data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new LongTest(); - request.setLongValue(values[i]); - response = port.longTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getLongValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(longTest)"); - return pass; - } - - private boolean floatTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(floatTest)"); - boolean pass = true; - float values[] = JAXWS_Data.float_data; - FloatTestResponse response; - FloatTest request; - TestUtil.logMsg("Passing/Returning float data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new FloatTest(); - request.setFloatValue(values[i]); - response = port.floatTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getFloatValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(floatTest)"); - return pass; - } - - private boolean doubleTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(doubleTest)"); - boolean pass = true; - double values[] = JAXWS_Data.double_data; - DoubleTestResponse response; - DoubleTest request; - TestUtil.logMsg("Passing/Returning double data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new DoubleTest(); - request.setDoubleValue(values[i]); - response = port.doubleTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getDoubleValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(doubleTest)"); - return pass; - } - - private boolean StringTest() { - TestUtil.logMsg("MarshallStandardJavaClassesTest:(StringTest)"); - boolean pass = true; - String values[] = JAXWS_Data.String_data; - StringTestResponse response; - StringTest request; - try { - TestUtil.logMsg("Passing/Returning String class to/from JAXWS Service"); - for (int i = 0; i < values.length; i++) { - request = new StringTest(); - request.setStringValue(values[i]); - response = port.stringTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getStringValue(), - "String")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStandardJavaClassesTest:(StringTest)"); - return pass; - } - - private boolean CalendarTest() { - TestUtil.logMsg("MarshallStandardJavaClassesTest:(CalendarTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - CalendarTestResponse response; - CalendarTest request; - TestUtil.logMsg("Passing/Returning Calendar class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new CalendarTest(); - request.setCalendar(values[i]); - response = port.calendarTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getCalendar(), - "XMLGregorianCalendar")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStandardJavaClassesTest:(CalendarTest)"); - return pass; - } - - private boolean BigIntegerTest() { - TestUtil.logMsg("MarshallStandardJavaClassesTest:(BigIntegerTest)"); - boolean pass = true; - BigInteger values[] = JAXWS_Data.BigInteger_data; - BigIntegerTestResponse response; - BigIntegerTest request; - TestUtil.logMsg("Passing/Returning BigInteger class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new BigIntegerTest(); - request.setBigInteger(values[i]); - response = port.bigIntegerTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getBigInteger(), - "BigInteger")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStandardJavaClassesTest:(BigIntegerTest)"); - return pass; - } - - private boolean BigDecimalTest() { - TestUtil.logMsg("MarshallStandardJavaClassesTest:(BigDecimalTest)"); - boolean pass = true; - BigDecimal values[] = JAXWS_Data.BigDecimal_data; - BigDecimalTestResponse response; - BigDecimalTest request; - TestUtil.logMsg("Passing/Returning BigDecimal class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new BigDecimalTest(); - request.setBigDecimal(values[i]); - response = port.bigDecimalTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getBigDecimal(), - "BigDecimal")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStandardJavaClassesTest:(BigDecimalTest)"); - return pass; - } - - private boolean booleanArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(booleanArrayTest)"); - boolean pass = true; - boolean values[] = JAXWS_Data.boolean_data; - BooleanArrayTestResponse response; - BooleanArrayTest request; - TestUtil.logMsg("Passing/Returning boolean array to/from JAXWS Service"); - try { - request = new BooleanArrayTest(); - for (int i = 0; i < values.length; i++) - request.getBooleanArray().add(values[i]); - response = port.booleanArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getBooleanArray(), - "boolean"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(booleanArrayTest)"); - return pass; - } - - private boolean byteArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(byteArrayTest)"); - boolean pass = true; - byte values[] = JAXWS_Data.byte_data; - ByteArrayTestResponse response; - ByteArrayTest request; - try { - request = new ByteArrayTest(); - request.setByteArray(values); - response = port.byteArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getByteArray(), - "byte"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(byteArrayTest)"); - return pass; - } - - private boolean shortArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(shortArrayTest)"); - boolean pass = true; - short values[] = JAXWS_Data.short_data; - ShortArrayTestResponse response; - ShortArrayTest request; - try { - request = new ShortArrayTest(); - for (int i = 0; i < values.length; i++) - request.getShortArray().add(values[i]); - response = port.shortArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getShortArray(), - "short"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(shortArrayTest)"); - return pass; - } - - private boolean intArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(intArrayTest)"); - boolean pass = true; - int values[] = JAXWS_Data.int_data; - IntArrayTestResponse response; - IntArrayTest request; - try { - request = new IntArrayTest(); - for (int i = 0; i < values.length; i++) - request.getIntArray().add(values[i]); - response = port.intArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getIntArray(), - "int"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(intArrayTest)"); - return pass; - } - - private boolean longArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(longArrayTest)"); - boolean pass = true; - long values[] = JAXWS_Data.long_data; - LongArrayTestResponse response; - LongArrayTest request; - try { - request = new LongArrayTest(); - for (int i = 0; i < values.length; i++) - request.getLongArray().add(values[i]); - response = port.longArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getLongArray(), - "long"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(longArrayTest)"); - return pass; - } - - private boolean floatArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(floatArrayTest)"); - boolean pass = true; - float values[] = JAXWS_Data.float_data; - FloatArrayTestResponse response; - FloatArrayTest request; - try { - request = new FloatArrayTest(); - for (int i = 0; i < values.length; i++) - request.getFloatArray().add(values[i]); - response = port.floatArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getFloatArray(), - "float"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(floatArrayTest)"); - return pass; - } - - private boolean doubleArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(doubleArrayTest)"); - boolean pass = true; - double values[] = JAXWS_Data.double_data; - DoubleArrayTestResponse response; - DoubleArrayTest request; - try { - request = new DoubleArrayTest(); - for (int i = 0; i < values.length; i++) - request.getDoubleArray().add(values[i]); - response = port.doubleArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getDoubleArray(), - "double"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(doubleArrayTest)"); - return pass; - } - - private boolean StringArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(StringArrayTest)"); - boolean pass = true; - String values[] = JAXWS_Data.String_nonull_data; - StringArrayTestResponse response; - StringArrayTest request; - try { - request = new StringArrayTest(); - for (int i = 0; i < values.length; i++) - request.getStringArray().add(values[i]); - response = port.stringArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getStringArray(), - "String"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(StringArrayTest)"); - return pass; - } - - private boolean CalendarArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(CalendarArrayTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_nonull_data; - CalendarArrayTestResponse response; - CalendarArrayTest request; - try { - request = new CalendarArrayTest(); - for (int i = 0; i < values.length; i++) - request.getCalendarArray().add(values[i]); - response = port.calendarArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getCalendarArray(), - "XMLGregorianCalendar"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - ; - } - printTestStatus(pass, "MarshallJavaArrayTest:(CalendarArrayTest)"); - return pass; - } - - private boolean BigIntegerArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(BigIntegerArrayTest)"); - boolean pass = true; - BigInteger values[] = JAXWS_Data.BigInteger_nonull_data; - BigIntegerArrayTestResponse response; - BigIntegerArrayTest request; - try { - request = new BigIntegerArrayTest(); - for (int i = 0; i < values.length; i++) - request.getBigIntegerArray().add(values[i]); - response = port.bigIntegerArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, - response.getBigIntegerArray(), "BigInteger"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(BigIntegerArrayTest)"); - return pass; - } - - private boolean BigDecimalArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(BigDecimalArrayTest)"); - boolean pass = true; - BigDecimal values[] = JAXWS_Data.BigDecimal_nonull_data; - BigDecimalArrayTestResponse response; - BigDecimalArrayTest request; - try { - request = new BigDecimalArrayTest(); - for (int i = 0; i < values.length; i++) - request.getBigDecimalArray().add(values[i]); - response = port.bigDecimalArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, - response.getBigDecimalArray(), "BigDecimal"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(BigDecimalArrayTest)"); - return pass; - } - - private boolean JavaBeanArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(JavaBeanArrayTest)"); - boolean pass = true; - - init_JavaBean_Data(); - JavaBean values[] = JavaBean_data; - JavaBeanArrayTestResponse response; - JavaBeanArrayTest request; - JavaBean result[] = new JavaBean[values.length]; - try { - request = new JavaBeanArrayTest(); - for (int i = 0; i < values.length; i++) - request.getJavaBeanArray().add(values[i]); - response = port.javaBeanArrayTest(request); - List l = response.getJavaBeanArray(); - Iterator i = l.iterator(); - int j = 0; - while (i.hasNext()) { - result[j++] = (JavaBean) i.next(); - } - pass = compareArrayValues(values, result, "JavaBean"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(JavaBeanArrayTest)"); - return pass; - } - - private void init_JavaBean_Data() { - JavaBean_data[0].setMyBoolean(false); - JavaBean_data[0].setMyByte(Byte.MIN_VALUE); - JavaBean_data[0].setMyShort(Short.MIN_VALUE); - JavaBean_data[0].setMyInt(Integer.MIN_VALUE); - JavaBean_data[0].setMyLong(Long.MIN_VALUE); - JavaBean_data[0].setMyFloat(Float.MIN_VALUE); - JavaBean_data[0].setMyDouble(Double.MIN_VALUE); - JavaBean_data[0].setMyString(""); - JavaBean_data[0].setMyBigInteger(JAXWS_Data.BigInteger_data[0]); - JavaBean_data[0].setMyBigDecimal(JAXWS_Data.BigDecimal_data[0]); - JavaBean_data[0].setMyCalendar(JAXWS_Data.XMLGregorianCalendar_data[0]); - - JavaBean_data[1].setMyBoolean(true); - JavaBean_data[1].setMyByte(Byte.MAX_VALUE); - JavaBean_data[1].setMyShort(Short.MAX_VALUE); - JavaBean_data[1].setMyInt(Integer.MAX_VALUE); - JavaBean_data[1].setMyLong(Long.MAX_VALUE); - JavaBean_data[1].setMyFloat(Float.MAX_VALUE); - JavaBean_data[1].setMyDouble(Double.MAX_VALUE); - JavaBean_data[1].setMyString(""); - JavaBean_data[1].setMyBigInteger(JAXWS_Data.BigInteger_data[1]); - JavaBean_data[1].setMyBigDecimal(JAXWS_Data.BigDecimal_data[1]); - JavaBean_data[1].setMyCalendar(JAXWS_Data.XMLGregorianCalendar_data[1]); - - JavaBean2_data[0].setMyBoolean(false); - JavaBean2_data[0].setMyByte(Byte.MIN_VALUE); - JavaBean2_data[0].setMyShort(Short.MIN_VALUE); - JavaBean2_data[0].setMyInt(Integer.MIN_VALUE); - JavaBean2_data[0].setMyLong(Long.MIN_VALUE); - JavaBean2_data[0].setMyFloat(Float.MIN_VALUE); - JavaBean2_data[0].setMyDouble(Double.MIN_VALUE); - JavaBean2_data[0].setMyString(""); - JavaBean2_data[0].setMyBigInteger(JAXWS_Data.BigInteger_data[0]); - JavaBean2_data[0].setMyBigDecimal(JAXWS_Data.BigDecimal_data[0]); - JavaBean2_data[0].setMyCalendar(JAXWS_Data.XMLGregorianCalendar_data[0]); - - JavaBean2_data[1].setMyBoolean(true); - JavaBean2_data[1].setMyByte(Byte.MAX_VALUE); - JavaBean2_data[1].setMyShort(Short.MAX_VALUE); - JavaBean2_data[1].setMyInt(Integer.MAX_VALUE); - JavaBean2_data[1].setMyLong(Long.MAX_VALUE); - JavaBean2_data[1].setMyFloat(Float.MAX_VALUE); - JavaBean2_data[1].setMyDouble(Double.MAX_VALUE); - JavaBean2_data[1].setMyString(""); - JavaBean2_data[1].setMyBigInteger(JAXWS_Data.BigInteger_data[1]); - JavaBean2_data[1].setMyBigDecimal(JAXWS_Data.BigDecimal_data[1]); - JavaBean2_data[1].setMyCalendar(JAXWS_Data.XMLGregorianCalendar_data[1]); - - JavaBean_data[0].setMyJavaBean(JavaBean2_data[0]); - JavaBean_data[1].setMyJavaBean(JavaBean2_data[1]); - - } - - public String toStringJavaBean(JavaBean v) { - return "myBoolean: " + v.isMyBoolean() + ", myByte: " + v.getMyByte() - + ", myShort: " + v.getMyShort() + ", myInt: " + v.getMyInt() - + ", myLong: " + v.getMyLong() + ", myFloat: " + v.getMyFloat() - + ", myDouble: " + v.getMyDouble() + ", myString: " + v.getMyString() - + ", myBigInteger: " + v.getMyBigInteger() + ", myBigDecimal: " - + v.getMyBigDecimal() + ", myJavaBean: " - + toStringJavaBean2(v.getMyJavaBean()) + ", myCalendar: " - + v.getMyCalendar(); - } - - public String toStringJavaBean2(JavaBean2 v) { - return "myBoolean: " + v.isMyBoolean() + ", myByte: " + v.getMyByte() - + ", myShort: " + v.getMyShort() + ", myInt: " + v.getMyInt() - + ", myLong: " + v.getMyLong() + ", myFloat: " + v.getMyFloat() - + ", myDouble: " + v.getMyDouble() + ", myString: " + v.getMyString() - + ", myBigInteger: " + v.getMyBigInteger() + ", myBigDecimal: " - + v.getMyBigDecimal() + ", myCalendar: " + v.getMyCalendar(); - } - - public boolean compareJavaBeans(JavaBean e, JavaBean r) { - return e.isMyBoolean() == r.isMyBoolean() && e.getMyByte() == r.getMyByte() - && e.getMyShort() == r.getMyShort() && e.getMyInt() == r.getMyInt() - && e.getMyLong() == r.getMyLong() && e.getMyFloat() == r.getMyFloat() - && e.getMyDouble() == r.getMyDouble() - && e.getMyString().equals(r.getMyString()) - && e.getMyBigInteger().equals(r.getMyBigInteger()) - && e.getMyBigDecimal().equals(r.getMyBigDecimal()) - && compareJavaBean2(e.getMyJavaBean(), r.getMyJavaBean()) && JAXWS_Data - .compareXMLGregorianCalendars(e.getMyCalendar(), r.getMyCalendar()); - } - - public boolean compareJavaBean2(JavaBean2 e, JavaBean2 r) { - return e.isMyBoolean() == r.isMyBoolean() && e.getMyByte() == r.getMyByte() - && e.getMyShort() == r.getMyShort() && e.getMyInt() == r.getMyInt() - && e.getMyLong() == r.getMyLong() && e.getMyFloat() == r.getMyFloat() - && e.getMyDouble() == r.getMyDouble() - && e.getMyString().equals(r.getMyString()) - && e.getMyBigInteger().equals(r.getMyBigInteger()) - && e.getMyBigDecimal().equals(r.getMyBigDecimal()) && JAXWS_Data - .compareXMLGregorianCalendars(e.getMyCalendar(), r.getMyCalendar()); - } - - // ================================================================== - // Various utility classes used for dumping/comparing data - // ================================================================== - - private void dumpArrayValues(Object o, String t) { - System.out.println("JAXWS_Data:dumpArrayValues"); - System.out.println("Dumping " + t + " array, size=" + getArraySize(o, t)); - if (t.equals("JavaBean")) { - JavaBean[] v = (JavaBean[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + toStringJavaBean(v[i])); - } - } - - private int getArraySize(Object o, String t) { - System.out.println("JAXWS_Data:getArraySize"); - if (t.equals("JavaBean")) { - return ((JavaBean[]) o).length; - } - return -1; - } - - private boolean compareValues(Object e, Object r, String t) { - boolean pass = true; - - if (t.equals("JavaBean")) { - JavaBean exp = (JavaBean) e; - JavaBean rec = (JavaBean) r; - if (rec == exp) - return true; - if ((rec == null && exp != null) || (rec != null && exp == null)) { - pass = false; - } else if (!compareJavaBeans(exp, rec)) { - System.out.println("Value Mismatch: expected " + toStringJavaBean(exp) - + ", received " + toStringJavaBean(rec)); - pass = false; - } - } - return pass; - } - - private boolean compareArrayValues(Object e, Object r, String t) { - System.out.println("JAXWS_Data:compareArrayValues"); - boolean pass = true; - - if (t.equals("JavaBean")) { - JavaBean[] exp = (JavaBean[]) e; - JavaBean[] rec = (JavaBean[]) r; - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!compareJavaBeans(exp[i], rec[i])) { - System.out - .println("Array Mismatch: expected " + toStringJavaBean(exp[i]) - + ", received " + toStringJavaBean(rec[i])); - pass = false; - } - } - } - return pass; - } - - private String returnArrayValues(Object o, String t) { - StringBuilder values = new StringBuilder(); - if (t.equals("JavaBean")) { - JavaBean[] v = (JavaBean[]) o; - for (int i = 0; i < v.length; i++) - values.append(", ").append(toStringJavaBean(v[i])); - } - return values.toString(); - } - - private boolean doPersonTest() { - TestUtil.logMsg("doPersonTest"); - boolean pass = true; - // Person arguments - String name = "ChildPerson"; - String sex = "F"; - int age = 10; - float id = (float) Short.MAX_VALUE; - boolean adult = false; - Person person = null; - try { - person = new Person(); - person.setName(name); - person.setAge(age); - person.setSex(sex); - person.setAdult(adult); - person.setId(id); - EchoPersonRequest request = new EchoPersonRequest(); - request.setPerson(person); - EchoPersonResponse response = port3.echoPerson(request); - person = response.getPerson(); - String resultName = person.getName(); - String resultSex = person.getSex(); - int resultAge = person.getAge(); - boolean resultAdult = person.isAdult(); - float resultId = person.getId(); - if (!resultName.equals(name) || !resultSex.equals(sex) - || (resultAge != age) || (resultId != id) || resultAdult) { - TestUtil.logErr("Result mismatch in Person"); - pass = false; - TestUtil.logErr("Expected: <" + name + "," + sex + "," + age + "," + id - + "," + adult + ">, Got: <" + resultName + "," + resultSex + "," - + resultAge + "," + resultId + "," + resultAdult + ">"); - } else { - TestUtil.logMsg( - "Results match!\nExpected: <" + name + "," + sex + "," + age + "," - + id + "," + adult + ">, Got: <" + resultName + "," + resultSex - + "," + resultAge + "," + resultId + "," + resultAdult + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean doEmployeeTest() { - TestUtil.logMsg("doEmployeeTest"); - boolean pass = true; - // Person arguments - String name = "AdultPerson"; - String sex = "M"; - int age = 30; - boolean adult = true; - float id = (float) Short.MAX_VALUE; - // Employee other arguments - double salary = 200000; - int empId = 1; - try { - Person person = new Person(); - person.setName(name); - person.setSex(sex); - person.setAge(age); - person.setAdult(adult); - person.setId(id); - Employee employee = new Employee(); - employee.setPerson(person); - employee.setSalary(salary); - employee.setId(empId); - EchoEmployeeRequest request = new EchoEmployeeRequest(); - request.setEmployee(employee); - EchoEmployeeResponse response = port3.echoEmployee(request); - employee = response.getEmployee(); - // verify results - person = employee.getPerson(); - String resultName = person.getName(); - String resultSex = person.getSex(); - int resultAge = person.getAge(); - float resultId = person.getId(); - boolean resultAdult = person.isAdult(); - if (!resultName.equals(name) || !resultSex.equals(sex) - || (resultAdult != adult) || (resultAge != age) || (resultId != id) - || !resultAdult) { - TestUtil.logErr("Result mismatch in Person"); - pass = false; - TestUtil.logErr("Expected: <" + name + "," + sex + "," + age + "," + id - + "," + adult + ">, Got: <" + resultName + "," + resultSex + "," - + resultAge + "," + resultId + "," + resultAdult + ">"); - - } - float resultSalary = (float) employee.getSalary(); - int resultEmpId = employee.getId(); - if (!pass || (resultSalary != salary) || (resultEmpId != empId)) { - TestUtil.logErr("Result mismatch in Employee"); - pass = false; - TestUtil.logErr("Expected: <" + salary + ", " + empId + ">, Got: <" - + resultSalary + "," + resultEmpId + ">"); - } else { - TestUtil.logMsg("Results match\nExpected: <" + name + "," + sex + "," - + age + "," + id + "," + adult + ">, Got: <" + resultName + "," - + resultSex + "," + resultAge + "," + resultId + "," + resultAdult - + ">\n" + "Expected: <" + salary + ", " + empId + ">, Got: <" - + resultSalary + "," + resultEmpId + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean doDocumentTest() { - String stringID = "myID"; - String stringValue = "myValue"; - TestUtil.logMsg("doDocumentTest"); - boolean pass = true; - try { - Document request = new Document(); - request.setID(stringID); - request.setValue(stringValue); - Document response = port3.echoDocument(request); - if (!response.getID().equals(stringID)) { - TestUtil.logErr("Result mismatch in Document ID"); - TestUtil.logErr( - "Expected: <" + stringID + ">, Got: <" + response.getID() + ">"); - } - if (!response.getValue().equals(stringValue)) { - TestUtil.logErr("Result mismatch in Document Value"); - TestUtil.logErr("Expected: <" + stringValue + ">, Got: <" - + response.getValue() + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean QNameTest() { - TestUtil.logMsg("QNameTest"); - boolean pass = true; - QName arg = new QName("http://foo.bar.com", "localPart"); - TestUtil.logMsg("arg=" + arg); - QNameTestResponse response; - QNameTest request; - TestUtil.logMsg("Passing Returning data to/from JAXWS Service"); - try { - request = new QNameTest(); - request.setQname1(arg); - response = port.qnameTest(request); - TestUtil.logMsg("response=" + response); - TestUtil.logMsg("result=" + response.getResult()); - if (!response.getResult().equals(arg)) { - TestUtil.logErr("QNameTest failed - expected " + arg + ", received: " - + response.getResult()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "QNameTest"); - return pass; - } - - private boolean Base64BinaryTest() { - TestUtil.logMsg("Base64BinaryTest"); - boolean pass = false; - byte values[] = JAXWS_Data.byte_data; - Base64BinaryTest request; - Base64BinaryTestResponse response; - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - request = new Base64BinaryTest(); - request.setBase64Binary1(values); - response = port.base64BinaryTest(request); - byte ret[] = response.getResult(); - - TestUtil.logTrace( - "base64 returned : " + ret[0] + "," + ret[1] + "," + ret[2]); - pass = JAXWS_Data.compareArrayValues(values, response.getResult(), - "byte"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "Base64BinaryTest"); - return pass; - } - - private boolean HexBinaryTest() { - TestUtil.logMsg("HexBinaryTest"); - boolean pass = false; - byte values[] = JAXWS_Data.byte_data; - HexBinaryTest request; - HexBinaryTestResponse response; - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - request = new HexBinaryTest(); - request.setHexBinary1(values); - - response = port.hexBinaryTest(request); - byte ret[] = response.getResult(); - TestUtil.logTrace( - "HexBinary returned : " + ret[0] + "," + ret[1] + "," + ret[2]); - pass = JAXWS_Data.compareArrayValues(values, response.getResult(), - "byte"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "HexBinaryTest"); - return pass; - } - - private FooType FooType_data = null; - - private FooVariousSchemaTypes FooVariousSchemaTypes_data = null; - - private FooVariousSchemaTypes FooVariousSchemaTypes_array_data[] = null; - - private FooVariousSchemaTypesListType FooVariousSchemaTypesListType_data = null; - - private FooAnonymousType FooAnonymousType_data = null; - - private int getIteratorCount(Iterator i) { - int count = 0; - while (i.hasNext() && count < 100) { - ++count; - } - return count; - } - - private void InitExpectedFooTypeData() throws Exception { - init_FooVariousSchemaTypes_Data(); - init_FooAnonymousType_Data(); - init_FooType_Data(); - } - - private boolean CompareWithExpectedFooTypeData(FooType f) { - boolean valid = true; - - if (f.isFooA() != true) { - TestUtil.logErr( - "isFooA() returned " + f.isFooA() + ", expected " + !f.isFooA()); - valid = false; - } - if (f.getFooB() != Byte.MAX_VALUE) { - TestUtil.logErr( - "getFooB() returned " + f.getFooB() + ", expected " + Byte.MAX_VALUE); - valid = false; - } - if (f.getFooC() != Short.MAX_VALUE) { - TestUtil.logErr("getFooC() returned " + f.getFooC() + ", expected " - + Short.MAX_VALUE); - valid = false; - } - if (f.getFooD() != Integer.MAX_VALUE) { - TestUtil.logErr("getFooD() returned " + f.getFooD() + ", expected " - + Integer.MAX_VALUE); - valid = false; - } - if (f.getFooE() != Long.MAX_VALUE) { - TestUtil.logErr( - "getFooE() returned " + f.getFooE() + ", expected " + Long.MAX_VALUE); - valid = false; - } - if (f.getFooF() != Float.MAX_VALUE) { - TestUtil.logErr("getFooF() returned " + f.getFooF() + ", expected " - + Float.MAX_VALUE); - valid = false; - } - if (f.getFooG() != Double.MAX_VALUE) { - TestUtil.logErr("getFooG() returned " + f.getFooG() + ", expected " - + Double.MAX_VALUE); - valid = false; - } - if (!f.getFooH().equals("foostringH")) { - TestUtil.logErr( - "getFooH() returned " + f.getFooH() + ", expected foostringH"); - valid = false; - } - if (!f.getFooI().equals("123-ABC12")) { - TestUtil - .logErr("getFooI() returned " + f.getFooI() + ", expected 123-ABC12"); - valid = false; - } - FooVariousSchemaTypes fnst = f.getFooJ(); - if (fnst == null) { - TestUtil.logErr( - "getFooJ() returned null, " + "expected FooVariousSchemaTypes"); - valid = false; - } - if (fnst != null) { - TestUtil.logMsg("Send: " + FooVariousSchemaTypes_data.getFooA() + "|" - + FooVariousSchemaTypes_data.getFooB() + "|" - + FooVariousSchemaTypes_data.getFooC() + "|" - + FooVariousSchemaTypes_data.getFooD() + "|" - + FooVariousSchemaTypes_data.getFooE() + "|" - + FooVariousSchemaTypes_data.getFooF()); - TestUtil.logMsg("Recv: " + fnst.getFooA() + "|" + fnst.getFooB() + "|" - + fnst.getFooC() + "|" + fnst.getFooD() + "|" + fnst.getFooE() + "|" - + fnst.getFooF()); - if (fnst.getFooA() == FooVariousSchemaTypes_data.getFooA() - && fnst.getFooB().equals(FooVariousSchemaTypes_data.getFooB()) - && fnst.getFooC().equals(FooVariousSchemaTypes_data.getFooC()) - && fnst.getFooD().equals(FooVariousSchemaTypes_data.getFooD()) - && fnst.getFooE() == FooVariousSchemaTypes_data.getFooE() - && fnst.getFooF() == FooVariousSchemaTypes_data.getFooF()) { - TestUtil.logMsg("Result match"); - } else { - TestUtil.logErr("Result mismatch"); - valid = false; - } - } - if (!f.getFooK().equals(new BigInteger("101"))) { - TestUtil.logErr("getFooK() returned " + f.getFooK() + ", expected 101"); - valid = false; - } - if (!(f.getFooM().equals("hello,there"))) { - TestUtil.logErr( - "getFooM() returned " + f.getFooM() + ", expected hello,there"); - valid = false; - } - if (!compareFooAnonymousTypeData(f.getFooN(), FooAnonymousType_data)) - valid = false; - return valid; - } - - private void init_FooVariousSchemaTypes_Data() throws Exception { - FooVariousSchemaTypes_data = new FooVariousSchemaTypes(); - FooVariousSchemaTypes_data.setFooA(1); - FooVariousSchemaTypes_data.setFooB(new BigInteger("1000")); - FooVariousSchemaTypes_data.setFooC("NORMALIZEDSTRING"); - FooVariousSchemaTypes_data.setFooD("NMTOKEN"); - FooVariousSchemaTypes_data.setFooE(1); - FooVariousSchemaTypes_data.setFooF((short) 1); - - FooVariousSchemaTypes_array_data = new FooVariousSchemaTypes[2]; - - FooVariousSchemaTypes_array_data[0] = new FooVariousSchemaTypes(); - FooVariousSchemaTypes_array_data[1] = new FooVariousSchemaTypes(); - FooVariousSchemaTypes_array_data[0].setFooA(256); - FooVariousSchemaTypes_array_data[1].setFooA(0); - FooVariousSchemaTypes_array_data[0].setFooB(JAXWS_Data.BigInteger_data[0]); - FooVariousSchemaTypes_array_data[1].setFooB(JAXWS_Data.BigInteger_data[1]); - FooVariousSchemaTypes_array_data[0].setFooC("NORMALIZEDSTRING1"); - FooVariousSchemaTypes_array_data[1].setFooC("NORMALIZEDSTRING2"); - FooVariousSchemaTypes_array_data[0].setFooD("NMTOKEN1"); - FooVariousSchemaTypes_array_data[1].setFooD("NMTOKEN2"); - FooVariousSchemaTypes_array_data[0].setFooE(0); - FooVariousSchemaTypes_array_data[1].setFooE(1); - FooVariousSchemaTypes_array_data[0].setFooF((short) 0); - FooVariousSchemaTypes_array_data[1].setFooF((short) 1); - - FooVariousSchemaTypesListType_data = new FooVariousSchemaTypesListType(); - - for (int i = 0; i < FooVariousSchemaTypes_array_data.length; i++) { - FooVariousSchemaTypesListType_data.getFooA() - .add(FooVariousSchemaTypes_array_data[i]); - } - } - - private void init_FooAnonymousType_Data() throws Exception { - FooAnonymousType.FooAnonymousElement fe1 = new FooAnonymousType.FooAnonymousElement(); - FooAnonymousType.FooAnonymousElement fe2 = new FooAnonymousType.FooAnonymousElement(); - fe1.setFooA("foo"); - fe1.setFooB(1); - fe1.setFooC(true); - fe2.setFooA("bar"); - fe2.setFooB(0); - fe2.setFooC(false); - - FooAnonymousType_data = new FooAnonymousType(); - FooAnonymousType_data.getFooAnonymousElement().add(fe1); - FooAnonymousType_data.getFooAnonymousElement().add(fe2); - } - - private boolean compareFooAnonymousTypeData(FooAnonymousType request, - FooAnonymousType response) { - boolean valid = true; - - Object[] req = request.getFooAnonymousElement().toArray(); - Object[] res = response.getFooAnonymousElement().toArray(); - if (req.length == res.length) { - TestUtil.logMsg("Array length match - checking array elements"); - for (int i = 0; i < req.length; i++) { - FooAnonymousType.FooAnonymousElement exp = (FooAnonymousType.FooAnonymousElement) req[i]; - FooAnonymousType.FooAnonymousElement rec = (FooAnonymousType.FooAnonymousElement) res[i]; - TestUtil.logMsg("Request: " + exp.getFooA() + "|" + exp.getFooB() + "|" - + exp.isFooC()); - TestUtil.logMsg("Response: " + rec.getFooA() + "|" + rec.getFooB() + "|" - + rec.isFooC()); - if (!exp.getFooA().equals(rec.getFooA()) - || exp.getFooB() != rec.getFooB() || exp.isFooC() != rec.isFooC()) { - valid = false; - TestUtil.logErr("Element results mismatch ..."); - break; - } else - TestUtil.logMsg("Element results match ..."); - } - } else { - TestUtil.logErr("Array length mismatch - expected: " + req.length - + ", received: " + res.length); - } - return valid; - } - - private void init_FooType_Data() throws Exception { - FooType_data = new FooType(); - - FooType_data.setFooA(true); - FooType_data.setFooB(Byte.MAX_VALUE); - FooType_data.setFooC(Short.MAX_VALUE); - FooType_data.setFooD(Integer.MAX_VALUE); - FooType_data.setFooE(Long.MAX_VALUE); - FooType_data.setFooF(Float.MAX_VALUE); - FooType_data.setFooG(Double.MAX_VALUE); - FooType_data.setFooH("foostringH"); - FooType_data.setFooI("123-ABC12"); - FooType_data.setFooJ(FooVariousSchemaTypes_data); - FooType_data.setFooK(new BigInteger("101")); - FooType_data.setFooM("hello,there"); - FooType_data.setFooN(FooAnonymousType_data); - } - - private boolean QNameArrayTest() { - TestUtil.logMsg("QNameArrayTest"); - boolean pass = true; - QName values[] = JAXWS_Data.QName_nonull_data; - QNameArrayTest request; - QNameArrayTestResponse response; - QName result[] = new QName[values.length]; - - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - request = new QNameArrayTest(); - for (int i = 0; i < values.length; i++) - request.getQnameArray1().add(values[i]); - response = port.qnameArrayTest(request); - List l = response.getResult(); - Iterator i = l.iterator(); - int j = 0; - while (i.hasNext()) { - result[j++] = (QName) i.next(); - } - pass = JAXWS_Data.compareArrayValues(values, result, "QName"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "QNameArrayTest"); - return pass; - } - - private boolean StringEnumTypeTest() { - boolean pass = true; - FooStringEnumType request = FooStringEnumType.MA; - try { - FooStringEnumType response = port2.echoStringEnumTypeTest(request); - if (!request.equals(response)) { - TestUtil.logErr("StringEnumTypeTest Result mismatch - expected: " - + request + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("StringEnumTypeTest Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean ByteEnumTypeTest() { - boolean pass = true; - byte request = 1; - try { - byte response = port2.echoByteEnumTypeTest(request); - if (request != response) { - TestUtil.logErr("ByteEnumTypeTest Result mismatch - expected: " - + request + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("ByteEnumTypeTest Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean ShortEnumTypeTest() { - boolean pass = true; - short request = 1; - try { - short response = port2.echoShortEnumTypeTest(request); - if (request != response) { - TestUtil.logErr("ShortEnumTypeTest Result mismatch - expected: " - + request + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("ShortEnumTypeTest Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean IntegerEnumTypeTest() { - boolean pass = true; - BigInteger request = new BigInteger("1"); - try { - BigInteger response = port2.echoIntegerEnumTypeTest(request); - if (!request.equals(response)) { - TestUtil.logErr("IntegerEnumTypeTest Result mismatch - expected: " - + request + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("IntegerEnumTypeTest Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean IntEnumTypeTest() { - boolean pass = true; - int request = 1; - try { - int response = port2.echoIntEnumTypeTest(request); - if (request != response) { - TestUtil.logErr("IntEnumTypeTest Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("IntEnumTypeTest Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean LongEnumTypeTest() { - boolean pass = true; - long request = 1; - try { - long response = port2.echoLongEnumTypeTest(request); - if (request != response) { - TestUtil.logErr("LongEnumTypeTest Result mismatch - expected: " - + request + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("LongEnumTypeTest Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean DecimalEnumTypeTest() { - boolean pass = true; - BigDecimal request = new BigDecimal("1.1"); - try { - BigDecimal response = port2.echoDecimalEnumTypeTest(request); - if (!request.equals(response)) { - TestUtil.logErr("DecimalEnumTypeTest Result mismatch - expected: " - + request + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("DecimalEnumTypeTest Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean FloatEnumTypeTest() { - boolean pass = true; - float request = 1.1f; - try { - float response = port2.echoFloatEnumTypeTest(request); - if (request != response) { - TestUtil.logErr("FloatEnumTypeTest Result mismatch - expected: " - + request + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("FloatEnumTypeTest Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean DoubleEnumTypeTest() { - boolean pass = true; - double request = 1.1; - try { - double response = port2.echoDoubleEnumTypeTest(request); - if (request != response) { - TestUtil.logErr("DoubleEnumTypeTest Result mismatch - expected: " - + request + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("DoubleEnumTypeTest Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean UnsignedShortTest() { - TestUtil.logTrace("UnsignedShortTest ..."); - boolean pass = true; - int request = 100; - try { - int response = port2.echoUnsignedShortTest(request); - if (request != response) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean UnsignedIntTest() { - TestUtil.logTrace("UnsignedIntTest ..."); - boolean pass = true; - long request = 100; - try { - TestUtil.logMsg("Sending request: " + request); - long response = port2.echoUnsignedIntTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (request != response) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean UnsignedByteTest() { - TestUtil.logTrace("UnsignedByteTest ..."); - boolean pass = true; - short request = 100; - try { - TestUtil.logMsg("Sending request: " + request); - short response = port2.echoUnsignedByteTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (request != response) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean UnsignedLongTest() { - TestUtil.logTrace("UnsignedLongTest ..."); - boolean pass = true; - BigInteger request = new BigInteger("100"); - try { - TestUtil.logMsg("Sending request: " + request); - BigInteger response = port2.echoUnsignedLongTest(request); - TestUtil.logMsg("Received response: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean NonPositiveIntegerTest() { - TestUtil.logTrace("NonPositiveIntegerTest ..."); - boolean pass = true; - BigInteger request = new BigInteger("-100"); - try { - TestUtil.logMsg("Sending request: " + request); - BigInteger response = port2.echoNonPositiveIntegerTest(request); - TestUtil.logMsg("Received response: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean NonNegativeIntegerTest() { - TestUtil.logTrace("NonNegativeIntegerTest ..."); - boolean pass = true; - BigInteger request = new BigInteger("100"); - try { - TestUtil.logMsg("Sending request: " + request); - BigInteger response = port2.echoNonNegativeIntegerTest(request); - TestUtil.logMsg("Received response: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean NegativeIntegerTest() { - TestUtil.logTrace("NegativeIntegerTest ..."); - boolean pass = true; - BigInteger request = new BigInteger("-100"); - try { - TestUtil.logMsg("Sending request: " + request); - BigInteger response = port2.echoNegativeIntegerTest(request); - TestUtil.logMsg("Received response: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean PositiveIntegerTest() { - TestUtil.logTrace("PositiveIntegerTest ..."); - boolean pass = true; - BigInteger request = new BigInteger("100"); - try { - TestUtil.logMsg("Sending request: " + request); - BigInteger response = port2.echoPositiveIntegerTest(request); - TestUtil.logMsg("Received response: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean TimeTest() { - TestUtil.logMsg("(TimeTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_nonull_data; - XMLGregorianCalendar request; - XMLGregorianCalendar response; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = values[i]; - response = port2.echoTimeTest(request); - if (!JAXWS_Data.compareValues(values[i], response, - "XMLGregorianCalendar")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(TimeTest)"); - return pass; - } - - private boolean DateTest() { - TestUtil.logMsg("(DateTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_nonull_data; - XMLGregorianCalendar request = null; - XMLGregorianCalendar response = null; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = values[i]; - response = port2.echoDateTest(request); - if (!JAXWS_Data.compareValues(values[i], response, - "XMLGregorianCalendar")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(DateTest)"); - return pass; - } - - private boolean StringListTest() { - TestUtil.logTrace("StringListTest ..."); - boolean pass = true; - String[] request = new String[] { "foo", "bar", "foobar" }; - try { - String[] response = port2.echoStringListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "String")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean DecimalListTest() { - TestUtil.logTrace("DecimalListTest..."); - boolean pass = true; - BigDecimal[] request = new BigDecimal[] { new BigDecimal("3512359.1456"), - new BigDecimal("1"), new BigDecimal("2") }; - try { - BigDecimal[] response = port2.echoDecimalListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "BigDecimal")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean FloatListTest() { - TestUtil.logTrace("FloatListTest..."); - boolean pass = true; - Float[] request = new Float[] { new Float(Float.MIN_VALUE), - new Float(Float.MAX_VALUE), new Float(1) }; - try { - Float[] response = port2.echoFloatListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "Float")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean IntListTest() { - TestUtil.logTrace("IntListTest..."); - boolean pass = true; - Integer[] request = new Integer[] { Integer.valueOf(Integer.MIN_VALUE), - Integer.valueOf(Integer.MAX_VALUE), Integer.valueOf(1) }; - try { - Integer[] response = port2.echoIntListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "Integer")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean IntegerListTest() { - TestUtil.logTrace("IntegerListTest..."); - boolean pass = true; - BigInteger[] request = new BigInteger[] { new BigInteger("0"), - new BigInteger("1"), new BigInteger("2") }; - try { - BigInteger[] response = port2.echoIntegerListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "BigInteger")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean DoubleListTest() { - TestUtil.logTrace("DoubleListTest..."); - boolean pass = true; - Double[] request = new Double[] { Double.valueOf(Double.MIN_VALUE), - Double.valueOf(Double.MAX_VALUE), Double.valueOf(1) }; - try { - Double[] response = port2.echoDoubleListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "Double")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean ByteListTest() { - TestUtil.logTrace("ByteListTest..."); - boolean pass = true; - Byte[] request = new Byte[] { Byte.valueOf(Byte.MIN_VALUE), - Byte.valueOf(Byte.MAX_VALUE) }; - try { - Byte[] response = port2.echoByteListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "Byte")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean LongListTest() { - TestUtil.logTrace("LongListTest..."); - boolean pass = true; - Long[] request = new Long[] { Long.valueOf(Long.MIN_VALUE), - Long.valueOf(Long.MAX_VALUE), Long.valueOf(1) }; - try { - Long[] response = port2.echoLongListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "Long")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean ShortListTest() { - TestUtil.logTrace("ShortListTest..."); - boolean pass = true; - Short[] request = new Short[] { Short.valueOf(Short.MIN_VALUE), - Short.valueOf(Short.MAX_VALUE) }; - try { - Short[] response = port2.echoShortListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "Short")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean GYearMonthTest() { - TestUtil.logMsg("MarshallDateTimeTest(GYearMonthTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - GYearMonthTest request = null; - GYearMonthTestResponse response = null; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new GYearMonthTest(); - request.setValue(values[i]); - response = port.gYearMonthTest(request); - if (!JAXWS_Data.compareDate(values[i], response.getResult(), "YM")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(GYearMonthTest)"); - return pass; - } - - private boolean GYearTest() { - TestUtil.logMsg("MarshallDateTimeTest(GYearTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - GYearTest request = null; - GYearTestResponse response = null; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new GYearTest(); - request.setValue(values[i]); - response = port.gYearTest(request); - if (!JAXWS_Data.compareDate(values[i], response.getResult(), "Y")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(GYearTest)"); - return pass; - } - - private boolean GMonthDayTest() { - TestUtil.logMsg("MarshallDateTimeTest(GMonthDayTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - GMonthDayTest request = null; - GMonthDayTestResponse response = null; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new GMonthDayTest(); - request.setValue(values[i]); - response = port.gMonthDayTest(request); - if (!JAXWS_Data.compareDate(values[i], response.getResult(), "MD")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(GMonthDayTest)"); - return pass; - } - - private boolean GDayTest() { - TestUtil.logMsg("MarshallDateTimeTest(GDayTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - GDayTest request = null; - GDayTestResponse response = null; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new GDayTest(); - request.setValue(values[i]); - response = port.gDayTest(request); - if (!JAXWS_Data.compareDate(values[i], response.getResult(), "D")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(GDayTest)"); - return pass; - } - - private boolean GMonthTest() { - TestUtil.logMsg("MarshallDateTimeTest(GMonthTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - GMonthTest request = null; - GMonthTestResponse response = null; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new GMonthTest(); - request.setValue(values[i]); - response = port.gMonthTest(request); - if (values[i] != null && response.getResult() == null) { // BUG 16793203 - pass = false; - TestUtil.logErr("response.getResult() is null"); - } - if (!JAXWS_Data.compareDate(values[i], response.getResult(), "M")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(GMonthTest)"); - return pass; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/CompoundTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/CompoundTestImpl.java deleted file mode 100644 index b5cfc00625..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/CompoundTestImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.soap.Name; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.soap.SOAPException; - -import jakarta.jws.WebService; - -@WebService(targetNamespace = "http://marshalltestservice.org/MarshallTestService.wsdl", portName = "MarshallTestPort3", serviceName = "MarshallTestService", wsdlLocation = "WEB-INF/wsdl/WSW2JDLMarshallTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.CompoundTest") - -public class CompoundTestImpl implements CompoundTest { - public EchoEmployeeResponse echoEmployee(EchoEmployeeRequest employee) { - EchoEmployeeResponse employeeResp = new EchoEmployeeResponse(); - employeeResp.setEmployee(employee.getEmployee()); - return employeeResp; - } - - public EchoPersonResponse echoPerson(EchoPersonRequest person) { - EchoPersonResponse personResp = new EchoPersonResponse(); - personResp.setPerson(person.getPerson()); - return personResp; - } - - public Document echoDocument(Document document) { - return document; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/MarshallTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/MarshallTestImpl.java deleted file mode 100644 index 3ae395c2a8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/MarshallTestImpl.java +++ /dev/null @@ -1,505 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(targetNamespace = "http://marshalltestservice.org/MarshallTestService.wsdl", portName = "MarshallTestPort1", serviceName = "MarshallTestService", wsdlLocation = "WEB-INF/wsdl/WSW2JDLMarshallTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.MarshallTest") -public class MarshallTestImpl implements MarshallTest { - - private static final ObjectFactory of = new ObjectFactory(); - - // ==================================================================== - // Java Primitive Types - // ==================================================================== - public BooleanTestResponse booleanTest(BooleanTest v) { - TestUtil.logTrace("booleanTest"); - TestUtil.logMsg("boolean=" + v.isBooleanValue()); - BooleanTestResponse r; - try { - r = of.createBooleanTestResponse(); - r.setBooleanValue(v.isBooleanValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public ByteTestResponse byteTest(ByteTest v) { - TestUtil.logTrace("byteTest"); - TestUtil.logMsg("byte=" + v.getByteValue()); - ByteTestResponse r; - try { - r = of.createByteTestResponse(); - r.setByteValue(v.getByteValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public ShortTestResponse shortTest(ShortTest v) { - TestUtil.logTrace("shortTest"); - TestUtil.logMsg("short=" + v.getShortValue()); - ShortTestResponse r; - try { - r = of.createShortTestResponse(); - r.setShortValue(v.getShortValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public IntTestResponse intTest(IntTest v) { - TestUtil.logTrace("intTest"); - TestUtil.logMsg("int=" + v.getIntValue()); - IntTestResponse r; - try { - r = of.createIntTestResponse(); - r.setIntValue(v.getIntValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public LongTestResponse longTest(LongTest v) { - TestUtil.logTrace("longTest"); - TestUtil.logMsg("long=" + v.getLongValue()); - LongTestResponse r; - try { - r = of.createLongTestResponse(); - r.setLongValue(v.getLongValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public FloatTestResponse floatTest(FloatTest v) { - TestUtil.logTrace("floatTest"); - TestUtil.logMsg("float=" + v.getFloatValue()); - FloatTestResponse r; - try { - r = of.createFloatTestResponse(); - r.setFloatValue(v.getFloatValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public DoubleTestResponse doubleTest(DoubleTest v) { - TestUtil.logTrace("doubleTest"); - TestUtil.logMsg("double=" + v.getDoubleValue()); - DoubleTestResponse r; - try { - r = of.createDoubleTestResponse(); - r.setDoubleValue(v.getDoubleValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - // ==================================================================== - // Java Primitive Type Arrays (Single Dimensional) - // ==================================================================== - public BooleanArrayTestResponse booleanArrayTest(BooleanArrayTest v) { - TestUtil.logTrace("booleanArrayTest"); - BooleanArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getBooleanArray()); - r = of.createBooleanArrayTestResponse(); - r.getBooleanArray().addAll(v.getBooleanArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public ByteArrayTestResponse byteArrayTest(ByteArrayTest v) { - TestUtil.logTrace("byteArrayTest"); - ByteArrayTestResponse r; - try { - JAXWS_Data.dumpArrayValues(v.getByteArray(), "byte"); - r = of.createByteArrayTestResponse(); - r.setByteArray(v.getByteArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public ShortArrayTestResponse shortArrayTest(ShortArrayTest v) { - TestUtil.logTrace("shortArrayTest"); - ShortArrayTestResponse r; - try { - // JAXWS_Data.dumpListValues(v.getShortArray()); - r = of.createShortArrayTestResponse(); - r.getShortArray().addAll(v.getShortArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public IntArrayTestResponse intArrayTest(IntArrayTest v) { - TestUtil.logTrace("intArrayTest"); - IntArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getIntArray()); - r = of.createIntArrayTestResponse(); - r.getIntArray().addAll(v.getIntArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public LongArrayTestResponse longArrayTest(LongArrayTest v) { - TestUtil.logTrace("longArrayTest"); - LongArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getLongArray()); - r = of.createLongArrayTestResponse(); - r.getLongArray().addAll(v.getLongArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public FloatArrayTestResponse floatArrayTest(FloatArrayTest v) { - TestUtil.logTrace("FloatArrayTest"); - FloatArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getFloatArray()); - r = of.createFloatArrayTestResponse(); - r.getFloatArray().addAll(v.getFloatArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public DoubleArrayTestResponse doubleArrayTest(DoubleArrayTest v) { - TestUtil.logTrace("doubleArrayTest"); - DoubleArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getDoubleArray()); - r = of.createDoubleArrayTestResponse(); - r.getDoubleArray().addAll(v.getDoubleArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public QNameArrayTestResponse qnameArrayTest(QNameArrayTest v) { - TestUtil.logTrace("qnameArrayTest"); - QNameArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getQnameArray1()); - r = of.createQNameArrayTestResponse(); - r.getResult().addAll(v.getQnameArray1()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public QNameTestResponse qnameTest(QNameTest v) { - TestUtil.logTrace("qnameTest"); - TestUtil.logMsg("QName=" + v.getQname1()); - System.out.println("QName=" + v.getQname1()); - QNameTestResponse res; - try { - res = of.createQNameTestResponse(); - res.setResult(v.getQname1()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return res; - } - - public Base64BinaryTestResponse base64BinaryTest(Base64BinaryTest v) { - TestUtil.logTrace("base64BinaryTest"); - Base64BinaryTestResponse res; - try { - res = of.createBase64BinaryTestResponse(); - res.setResult(v.getBase64Binary1()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return res; - } - - public HexBinaryTestResponse hexBinaryTest(HexBinaryTest v) { - TestUtil.logTrace("hexBinaryTest"); - HexBinaryTestResponse res; - try { - res = of.createHexBinaryTestResponse(); - res.setResult(v.getHexBinary1()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return res; - } - - // ==================================================================== - // Standard Java Classes (Scalar, Single Dimensional Arrays) - // ==================================================================== - public StringTestResponse stringTest(StringTest v) { - TestUtil.logTrace("stringTest"); - StringTestResponse r; - try { - TestUtil.logMsg("String=" + v.getStringValue()); - r = of.createStringTestResponse(); - r.setStringValue(v.getStringValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public StringArrayTestResponse stringArrayTest(StringArrayTest v) { - TestUtil.logTrace("stringArrayTest"); - StringArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getStringArray()); - r = of.createStringArrayTestResponse(); - r.getStringArray().addAll(v.getStringArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public CalendarTestResponse calendarTest(CalendarTest v) { - TestUtil.logTrace("calendarTest"); - TestUtil.logMsg("Calendar=" + v.getCalendar()); - CalendarTestResponse r; - try { - r = of.createCalendarTestResponse(); - r.setCalendar(v.getCalendar()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public CalendarArrayTestResponse calendarArrayTest(CalendarArrayTest v) { - TestUtil.logTrace("calendarArrayTest"); - CalendarArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getCalendarArray()); - r = of.createCalendarArrayTestResponse(); - r.getCalendarArray().addAll(v.getCalendarArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public BigIntegerTestResponse bigIntegerTest(BigIntegerTest v) { - TestUtil.logTrace("bigIntegerTest"); - TestUtil.logMsg("BigInteger=" + v.getBigInteger()); - BigIntegerTestResponse r; - try { - r = of.createBigIntegerTestResponse(); - r.setBigInteger(v.getBigInteger()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public BigIntegerArrayTestResponse bigIntegerArrayTest( - BigIntegerArrayTest v) { - TestUtil.logTrace("bigIntegerArrayTest"); - BigIntegerArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getBigIntegerArray()); - r = of.createBigIntegerArrayTestResponse(); - r.getBigIntegerArray().addAll(v.getBigIntegerArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public BigDecimalTestResponse bigDecimalTest(BigDecimalTest v) { - TestUtil.logTrace("bigDecimalTest"); - TestUtil.logMsg("BigDecimal=" + v.getBigDecimal()); - BigDecimalTestResponse r; - try { - r = of.createBigDecimalTestResponse(); - r.setBigDecimal(v.getBigDecimal()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public BigDecimalArrayTestResponse bigDecimalArrayTest( - BigDecimalArrayTest v) { - TestUtil.logTrace("bigDecimalArrayTest"); - BigDecimalArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getBigDecimalArray()); - r = of.createBigDecimalArrayTestResponse(); - r.getBigDecimalArray().addAll(v.getBigDecimalArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - // ==================================================================== - // JavaBeans Class (Scalar, Single Dimensional Arrays) - // ==================================================================== - public JavaBeanTestResponse javaBeanTest(JavaBeanTest v) { - TestUtil.logTrace("javaBeanTest"); - TestUtil.logMsg("JavaBean=" + v.getJavaBean()); - JavaBeanTestResponse r; - try { - r = of.createJavaBeanTestResponse(); - r.setJavaBean(v.getJavaBean()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public JavaBeanArrayTestResponse javaBeanArrayTest(JavaBeanArrayTest v) { - TestUtil.logTrace("javaBeanArrayTest"); - JavaBeanArrayTestResponse r; - try { - r = of.createJavaBeanArrayTestResponse(); - for (JavaBean e : v.getJavaBeanArray()) - r.getJavaBeanArray().add(e); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - // ==================================================================== - // The void type - // ==================================================================== - public VoidTestResponse voidTest(VoidTest v) { - TestUtil.logTrace("voidTest"); - VoidTestResponse r; - try { - r = of.createVoidTestResponse(); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - // ==================================================================== - // other types - // ==================================================================== - - public GYearMonthTestResponse gYearMonthTest(GYearMonthTest v) { - TestUtil.logTrace("gYearMonthTest"); - GYearMonthTestResponse g; - try { - g = of.createGYearMonthTestResponse(); - g.setResult(v.getValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return g; - } - - public GYearTestResponse gYearTest(GYearTest v) { - TestUtil.logTrace("gYearTest"); - GYearTestResponse g; - try { - g = of.createGYearTestResponse(); - g.setResult(v.getValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return g; - } - - public GMonthDayTestResponse gMonthDayTest(GMonthDayTest v) { - TestUtil.logTrace("gMonthDayTest"); - GMonthDayTestResponse g; - try { - g = of.createGMonthDayTestResponse(); - g.setResult(v.getValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return g; - } - - public GDayTestResponse gDayTest(GDayTest v) { - TestUtil.logTrace("gDayTest"); - GDayTestResponse g; - try { - g = of.createGDayTestResponse(); - g.setResult(v.getValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return g; - } - - public GMonthTestResponse gMonthTest(GMonthTest v) { - TestUtil.logTrace("gMonthTest"); - GMonthTestResponse g; - try { - g = of.createGMonthTestResponse(); - g.setResult(v.getValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return g; - } - - public DurationTestResponse durationTest(DurationTest v) { - TestUtil.logTrace("durationTest"); - DurationTestResponse r; - try { - TestUtil.logMsg("Duration=" + v.getDurationValue()); - r = of.createDurationTestResponse(); - r.setDurationValue(v.getDurationValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/NewSchemaTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/NewSchemaTestImpl.java deleted file mode 100644 index c9dda1f205..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/NewSchemaTestImpl.java +++ /dev/null @@ -1,531 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; - -import java.math.BigInteger; -import java.math.BigDecimal; -import javax.xml.datatype.*; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(targetNamespace = "http://marshalltestservice.org/MarshallTestService.wsdl", portName = "MarshallTestPort2", serviceName = "MarshallTestService", wsdlLocation = "WEB-INF/wsdl/WSW2JDLMarshallTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.NewSchemaTest") - -public class NewSchemaTestImpl implements NewSchemaTest { - - public FooStringResponse fooFaultTest(FooStringRequest fooRequest) - throws FooFault { - FooStringResponse f = null; - FooFaultException ffe = null; - try { - f = new FooStringResponse(); - f.setVarString(fooRequest.getVarString()); - ffe = new FooFaultException(); - ffe.setWhyTheFault(fooRequest.getVarString()); - } catch (Exception e) { - throw new WebServiceException("failed on object creation: " + e); - } - if (fooRequest.getVarString().equals("FooBad1")) { - throw new FooFault("FooBad1", ffe); - } else if (fooRequest.getVarString().equals("FooBad2")) { - throw new FooFault("FooBad2", ffe); - } else if (fooRequest.getVarString().equals("FooBad3")) { - throw new FooFault("FooBad3", ffe); - } else if (fooRequest.getVarString().equals("FooBad4")) { - throw new FooFault("FooBad4", ffe); - } else if (fooRequest.getVarString().equals("FooBad5")) { - throw new FooFault("FooBad5", ffe); - } - return f; - } - - public IncludedStringResponse echoIncludedStringTest( - IncludedStringRequest request) { - IncludedStringResponse ret = null; - try { - String sret = request.getMyString(); - ret = new IncludedStringResponse(); - ret.setMyString(sret); - } catch (Exception e) { - throw new WebServiceException("failed on object creation: " + e); - } - return ret; - } - - public String echoFooStringTypeTest(String request) { - return request; - } - - public java.math.BigInteger echoFooIntegerTypeTest( - java.math.BigInteger request) { - return request; - } - - public int echoFooIntTypeTest(int request) { - return request; - } - - public long echoFooLongTypeTest(long request) { - return request; - } - - public short echoFooShortTypeTest(short request) { - return request; - } - - public BigDecimal echoFooDecimalTypeTest(BigDecimal request) { - return request; - } - - public float echoFooFloatTypeTest(float request) { - return request; - } - - public double echoFooDoubleTypeTest(double request) { - return request; - } - - public boolean echoFooBooleanTypeTest(boolean request) { - return request; - } - - public byte echoFooByteTypeTest(byte request) { - return request; - } - - public javax.xml.namespace.QName echoFooQNameTypeTest( - javax.xml.namespace.QName request) { - return request; - } - - public FooStatusType sendFoo1Test(FooType fooRequest) { - InitExpectedFooTypeData(); - FooStatusType fooStatus; - - try { - fooStatus = new FooStatusType(); - fooStatus.setFooA(CompareWithExpectedFooTypeData(fooRequest)); - } catch (Exception e) { - throw new WebServiceException("failed on object creation: " + e); - } - return fooStatus; - } - - public FooType sendFoo2Test(FooType fooRequest) { - return fooRequest; - } - - public String echoNormalizedStringTypeTest(String v) { - return v; - } - - public FooVariousSchemaTypes echoVariousSchemaTypesTest( - FooVariousSchemaTypes v) { - return v; - } - - public FooVariousSchemaTypesListType echoVariousSchemaTypesListTypeTest( - FooVariousSchemaTypesListType v) { - return v; - } - - public BigInteger echoIntegerRangeTypeTest(BigInteger v) { - return v; - } - - public FooStringEnumType echoStringEnumTypeTest(FooStringEnumType v) { - return v; - } - - public byte echoByteEnumTypeTest(byte v) { - return v; - } - - public short echoShortEnumTypeTest(short v) { - return v; - } - - public BigInteger echoIntegerEnumTypeTest(BigInteger v) { - return v; - } - - public int echoIntEnumTypeTest(int v) { - return v; - } - - public long echoLongEnumTypeTest(long v) { - return v; - } - - public BigDecimal echoDecimalEnumTypeTest(BigDecimal v) { - return v; - } - - public float echoFloatEnumTypeTest(float v) { - return v; - } - - public double echoDoubleEnumTypeTest(double v) { - return v; - } - - public FooAnonymousType echoAnonymousTypeTest(FooAnonymousType v) { - return v; - } - - public FooAnnotationType echoAnnotationTypeTest(FooAnnotationType v) { - return v; - } - - public Object echoAnySimpleTypeTest(Object v) { - return v; - } - - public FooAnyURIType echoAnyURITypeTest(FooAnyURIType v) { - return v; - } - - public String echoLanguageTypeTest(String v) { - return v; - } - - public String echoTokenTypeTest(String v) { - return v; - } - - public String echoNameTypeTest(String v) { - return v; - } - - public String echoNCNameTypeTest(String v) { - return v; - } - - public String echoIDTypeTest(String v) { - return v; - } - - public int echoUnsignedShortTest(int v) { - return v; - } - - public long echoUnsignedIntTest(long v) { - return v; - } - - public short echoUnsignedByteTest(short v) { - return v; - } - - public BigInteger echoUnsignedLongTest(BigInteger v) { - return v; - } - - public BigInteger echoNonPositiveIntegerTest(BigInteger v) { - return v; - } - - public BigInteger echoNonNegativeIntegerTest(BigInteger v) { - return v; - } - - public BigInteger echoPositiveIntegerTest(BigInteger v) { - return v; - } - - public BigInteger echoNegativeIntegerTest(BigInteger v) { - return v; - } - - public XMLGregorianCalendar echoTimeTest(XMLGregorianCalendar v) { - return v; - } - - public XMLGregorianCalendar echoDateTest(XMLGregorianCalendar v) { - return v; - } - - public String[] echoStringListTypeTest(String[] v) { - return v; - } - - public Float[] echoFloatListTypeTest(Float[] v) { - return v; - } - - public Integer[] echoIntListTypeTest(Integer[] v) { - return v; - } - - public java.math.BigDecimal[] echoDecimalListTypeTest( - java.math.BigDecimal[] v) { - return v; - } - - public Double[] echoDoubleListTypeTest(Double[] v) { - return v; - } - - public java.math.BigInteger[] echoIntegerListTypeTest( - java.math.BigInteger[] v) { - return v; - } - - public Long[] echoLongListTypeTest(Long[] v) { - return v; - } - - public Short[] echoShortListTypeTest(Short[] v) { - return v; - } - - public Byte[] echoByteListTypeTest(Byte[] v) { - return v; - } - - /********************************************************************** - * Private data methods to setup and compare expected FooType data - *********************************************************************/ - - private FooType FooType_data = null; - - private FooVariousSchemaTypes FooVariousSchemaTypes_data = null; - - private FooVariousSchemaTypes FooVariousSchemaTypes_array_data[] = null; - - private FooVariousSchemaTypesListType FooVariousSchemaTypesListType_data = null; - - private FooAnonymousType FooAnonymousType_data = null; - - private void InitExpectedFooTypeData() { - init_FooVariousSchemaTypes_Data(); - init_FooAnonymousType_Data(); - init_FooType_Data(); - } - - private boolean CompareWithExpectedFooTypeData(FooType f) { - boolean valid = true; - - if (f.isFooA() != true) { - System.err.println( - "isFooA() returned " + f.isFooA() + ", expected " + !f.isFooA()); - valid = false; - } - if (f.getFooB() != Byte.MAX_VALUE) { - System.err.println( - "getFooB() returned " + f.getFooB() + ", expected " + Byte.MAX_VALUE); - valid = false; - } - if (f.getFooC() != Short.MAX_VALUE) { - System.err.println("getFooC() returned " + f.getFooC() + ", expected " - + Short.MAX_VALUE); - valid = false; - } - if (f.getFooD() != Integer.MAX_VALUE) { - System.err.println("getFooD() returned " + f.getFooD() + ", expected " - + Integer.MAX_VALUE); - valid = false; - } - if (f.getFooE() != Long.MAX_VALUE) { - System.err.println( - "getFooE() returned " + f.getFooE() + ", expected " + Long.MAX_VALUE); - valid = false; - } - if (f.getFooF() != Float.MAX_VALUE) { - System.err.println("getFooF() returned " + f.getFooF() + ", expected " - + Float.MAX_VALUE); - valid = false; - } - if (f.getFooG() != Double.MAX_VALUE) { - System.err.println("getFooG() returned " + f.getFooG() + ", expected " - + Double.MAX_VALUE); - valid = false; - } - if (!f.getFooH().equals("foostringH")) { - System.err.println( - "getFooH() returned " + f.getFooH() + ", expected foostringH"); - valid = false; - } - if (!f.getFooI().equals("123-ABC12")) { - System.err.println( - "getFooI() returned " + f.getFooI() + ", expected 123-ABC12"); - valid = false; - } - FooVariousSchemaTypes fnst = f.getFooJ(); - if (fnst == null) { - System.err.println( - "getFooJ() returned null, " + "expected FooVariousSchemaTypes"); - valid = false; - } - if (fnst != null) { - System.out.println("Send: " + FooVariousSchemaTypes_data.getFooA() + "|" - + FooVariousSchemaTypes_data.getFooB() + "|" - + FooVariousSchemaTypes_data.getFooC() + "|" - + FooVariousSchemaTypes_data.getFooD() + "|" - + FooVariousSchemaTypes_data.getFooE() + "|" - + FooVariousSchemaTypes_data.getFooF()); - System.out.println("Recv: " + fnst.getFooA() + "|" + fnst.getFooB() + "|" - + fnst.getFooC() + "|" + fnst.getFooD() + "|" + fnst.getFooE() + "|" - + fnst.getFooF()); - if (fnst.getFooA() == FooVariousSchemaTypes_data.getFooA() - && fnst.getFooB().equals(FooVariousSchemaTypes_data.getFooB()) - && fnst.getFooC().equals(FooVariousSchemaTypes_data.getFooC()) - && fnst.getFooD().equals(FooVariousSchemaTypes_data.getFooD()) - && fnst.getFooE() == FooVariousSchemaTypes_data.getFooE() - && fnst.getFooF() == FooVariousSchemaTypes_data.getFooF()) { - System.out.println("Result match"); - } else { - System.err.println("Result mismatch"); - valid = false; - } - } - if (!f.getFooK().equals(new BigInteger("101"))) { - System.err - .println("getFooK() returned " + f.getFooK() + ", expected 101"); - valid = false; - } - if (!(f.getFooM().equals("hello,there"))) { - System.err.println( - "getFooM() returned " + f.getFooM() + ", expected hello,there"); - valid = false; - } - if (!compareFooAnonymousTypeData(f.getFooN(), FooAnonymousType_data)) - valid = false; - return valid; - } - - private void init_FooVariousSchemaTypes_Data() { - try { - FooVariousSchemaTypes_data = new FooVariousSchemaTypes(); - FooVariousSchemaTypes_data.setFooA(1); - FooVariousSchemaTypes_data.setFooB(new BigInteger("1000")); - FooVariousSchemaTypes_data.setFooC("NORMALIZEDSTRING"); - FooVariousSchemaTypes_data.setFooD("NMTOKEN"); - FooVariousSchemaTypes_data.setFooE(1); - FooVariousSchemaTypes_data.setFooF((short) 1); - - FooVariousSchemaTypes_array_data = new FooVariousSchemaTypes[2]; - - FooVariousSchemaTypes_array_data[0] = new FooVariousSchemaTypes(); - FooVariousSchemaTypes_array_data[1] = new FooVariousSchemaTypes(); - FooVariousSchemaTypes_array_data[0].setFooA(256); - FooVariousSchemaTypes_array_data[1].setFooA(0); - FooVariousSchemaTypes_array_data[0] - .setFooB(JAXWS_Data.BigInteger_data[0]); - FooVariousSchemaTypes_array_data[1] - .setFooB(JAXWS_Data.BigInteger_data[1]); - FooVariousSchemaTypes_array_data[0].setFooC("NORMALIZEDSTRING1"); - FooVariousSchemaTypes_array_data[1].setFooC("NORMALIZEDSTRING2"); - FooVariousSchemaTypes_array_data[0].setFooD("NMTOKEN1"); - FooVariousSchemaTypes_array_data[1].setFooD("NMTOKEN2"); - FooVariousSchemaTypes_array_data[0].setFooE(0); - FooVariousSchemaTypes_array_data[1].setFooE(1); - FooVariousSchemaTypes_array_data[0].setFooF((short) 0); - FooVariousSchemaTypes_array_data[1].setFooF((short) 1); - - FooVariousSchemaTypesListType_data = new FooVariousSchemaTypesListType(); - - for (int i = 0; i < FooVariousSchemaTypes_array_data.length; i++) { - FooVariousSchemaTypesListType_data.getFooA() - .add(FooVariousSchemaTypes_array_data[i]); - } - } catch (Exception e) { - throw new WebServiceException("failed on object creation: " + e); - } - } - - private void init_FooAnonymousType_Data() { - try { - FooAnonymousType.FooAnonymousElement fe1 = new FooAnonymousType.FooAnonymousElement(); - FooAnonymousType.FooAnonymousElement fe2 = new FooAnonymousType.FooAnonymousElement(); - fe1.setFooA("foo"); - fe1.setFooB(1); - fe1.setFooC(true); - fe2.setFooA("bar"); - fe2.setFooB(0); - fe2.setFooC(false); - - FooAnonymousType_data = new FooAnonymousType(); - FooAnonymousType_data.getFooAnonymousElement().add(fe1); - FooAnonymousType_data.getFooAnonymousElement().add(fe2); - } catch (Exception e) { - throw new WebServiceException("failed on object creation: " + e); - } - } - - private boolean compareFooAnonymousTypeData(FooAnonymousType request, - FooAnonymousType response) { - boolean valid = true; - - Object[] req = request.getFooAnonymousElement().toArray(); - Object[] res = response.getFooAnonymousElement().toArray(); - if (req.length == res.length) { - TestUtil.logMsg("Array length match - checking array elements"); - for (int i = 0; i < req.length; i++) { - FooAnonymousType.FooAnonymousElement exp = (FooAnonymousType.FooAnonymousElement) req[i]; - FooAnonymousType.FooAnonymousElement rec = (FooAnonymousType.FooAnonymousElement) res[i]; - TestUtil.logMsg("Request: " + exp.getFooA() + "|" + exp.getFooB() + "|" - + exp.isFooC()); - TestUtil.logMsg("Response: " + rec.getFooA() + "|" + rec.getFooB() + "|" - + rec.isFooC()); - if (!exp.getFooA().equals(rec.getFooA()) - || exp.getFooB() != rec.getFooB() || exp.isFooC() != rec.isFooC()) { - valid = false; - TestUtil.logErr("Element results mismatch ..."); - break; - } else - TestUtil.logMsg("Element results match ..."); - } - } else { - TestUtil.logErr("Array length mismatch - expected: " + req.length - + ", received: " + res.length); - } - return valid; - } - - private void init_FooType_Data() { - try { - FooType_data = new FooType(); - - FooType_data.setFooA(true); - FooType_data.setFooB(Byte.MAX_VALUE); - FooType_data.setFooC(Short.MAX_VALUE); - FooType_data.setFooD(Integer.MAX_VALUE); - FooType_data.setFooE(Long.MAX_VALUE); - FooType_data.setFooF(Float.MAX_VALUE); - FooType_data.setFooG(Double.MAX_VALUE); - FooType_data.setFooH("foostringH"); - FooType_data.setFooI("123-ABC12"); - FooType_data.setFooJ(FooVariousSchemaTypes_data); - FooType_data.setFooK(new BigInteger("101")); - FooType_data.setFooM("hello,there"); - FooType_data.setFooN(FooAnonymousType_data); - } catch (Exception e) { - throw new WebServiceException("failed on object creation: " + e); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/OneWayTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/OneWayTestImpl.java deleted file mode 100644 index 9fdc25afae..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/OneWayTestImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.xml.soap.*; - -import java.util.*; - -import jakarta.jws.WebService; - -@WebService(targetNamespace = "http://marshalltestservice.org/MarshallTestService.wsdl", portName = "MarshallTestPort4", serviceName = "MarshallTestService", wsdlLocation = "WEB-INF/wsdl/WSW2JDLMarshallTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.OneWayTest") - -public class OneWayTestImpl implements OneWayTest { - - public void oneWayMethod(OneWayMessage v) { - TestUtil.logTrace("oneWayMethod"); - TestUtil.logMsg("OneWayMessage: " + v.getStringValue()); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestCompoundTestDefs.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestCompoundTestDefs.wsdl deleted file mode 100644 index 108b353577..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestCompoundTestDefs.wsdl +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestCompoundTestDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestCompoundTestDefs.xsd deleted file mode 100644 index c89b7f444e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestCompoundTestDefs.xsd +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestIncludedDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestIncludedDefs.xsd deleted file mode 100644 index 9d44992152..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestIncludedDefs.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestNewSchemaDefs.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestNewSchemaDefs.wsdl deleted file mode 100644 index 1cfa5b9859..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestNewSchemaDefs.wsdl +++ /dev/null @@ -1,1103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestNewSchemaDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestNewSchemaDefs.xsd deleted file mode 100644 index e2f8a43f82..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestNewSchemaDefs.xsd +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Test results - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestOneWayTestDefs.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestOneWayTestDefs.wsdl deleted file mode 100644 index 8d79c699f3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestOneWayTestDefs.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestOneWayTestDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestOneWayTestDefs.xsd deleted file mode 100644 index 9ef32a6b07..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestOneWayTestDefs.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestService.wsdl deleted file mode 100644 index a9dbc1651e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestService.wsdl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestServiceDefs.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestServiceDefs.wsdl deleted file mode 100644 index f0971434d0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestServiceDefs.wsdl +++ /dev/null @@ -1,697 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestServiceDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestServiceDefs.xsd deleted file mode 100644 index 41f8723adc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/WSW2JDLMarshallTestServiceDefs.xsd +++ /dev/null @@ -1,477 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/build.xml deleted file mode 100644 index d6571e99eb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/customfile.xml deleted file mode 100644 index 205d263ca4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/customfile.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/customfile2.xml deleted file mode 100644 index c6c009877a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/customfile2.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/jakartaEE.tokens deleted file mode 100644 index 1c403cb116..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/jakartaEE.tokens +++ /dev/null @@ -1,27 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlmarshalltest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.MarshallTestService -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.MarshallTest -SEI2=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.NewSchemaTest -SEI3=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.CompoundTest -SEI4=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.OneWayTest -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.MarshallTestImpl -IMPL2=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.NewSchemaTestImpl -IMPL3=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.CompoundTestImpl -IMPL4=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.OneWayTestImpl -NAMESPACEURI=http://marshalltestservice.org/MarshallTestService.wsdl -PORT=MarshallTestPort1 -PORT2=MarshallTestPort2 -PORT3=MarshallTestPort3 -PORT4=MarshallTestPort4 -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.MarshallTestImpl -SERVLETNAME2=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.NewSchemaTestImpl -SERVLETNAME3=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.CompoundTestImpl -SERVLETNAME4=com.sun.ts.tests.jaxws.ee.w2j.document.literal.marshalltest.OneWayTestImpl -URLALIAS=/jaxws/MarshallTest -URLALIAS2=/jaxws/NewSchemaTest -URLALIAS3=/jaxws/CompoundTest -URLALIAS4=/jaxws/OneWayTest -WEBSERVICEDESCRIPTION=MarshallTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlmarshalltest -SERVICEREFNAMEWSEJB=service/wsw2jdlmarshalltest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlmarshalltest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/jakartaEE.web.xml deleted file mode 100644 index 0350ec9463..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/jakartaEE.web.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME3@ - @IMPL3@ - 0 - - - @SERVLETNAME4@ - @IMPL4@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - @SERVLETNAME3@ - @URLALIAS3@ - - - @SERVLETNAME4@ - @URLALIAS4@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/standalone-sun-jaxws.xml deleted file mode 100644 index c069948263..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/standalone.web.xml deleted file mode 100644 index 5c14abdc57..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/marshalltest/standalone.web.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - WSW2JDLMarshallTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -NewSchemaTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -MarshallTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -OneWayTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -CompoundTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -NewSchemaTest -/jaxws/NewSchemaTest - - -MarshallTest -/jaxws/MarshallTest - - -OneWayTest -/jaxws/OneWayTest - - -CompoundTest -/jaxws/CompoundTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/Client.java deleted file mode 100644 index 3e87a02d35..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/Client.java +++ /dev/null @@ -1,1196 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; - -import java.net.*; - -import java.awt.Image; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.MTOMFeature; -import javax.xml.namespace.QName; - -import jakarta.activation.DataHandler; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; - -import java.util.Properties; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature."; - - // service and port information - private static final String NAMESPACEURI = "http://mtomfeatureservice.org/wsdl"; - - private static final String SERVICE_NAME = "MTOMFeatureTestService"; - - private static final String PORT_NAME1 = "MTOMFeatureTest1Port"; - - private static final String PORT_NAME2 = "MTOMFeatureTest2Port"; - - private static final String PORT_NAME3 = "MTOMFeatureTest3Port"; - - private static final String PORT_NAME4 = "MTOMFeatureTest4Port"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private QName PORT_QNAME2 = new QName(NAMESPACEURI, PORT_NAME2); - - private QName PORT_QNAME3 = new QName(NAMESPACEURI, PORT_NAME3); - - private QName PORT_QNAME4 = new QName(NAMESPACEURI, PORT_NAME4); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private URL docURL1 = null; - - private URL docURL2 = null; - - private URL docURL3 = null; - - private URL docURL4 = null; - - private URL docURL11 = null; - - private URL docURL12 = null; - - private URL docURL13 = null; - - private URL docURL14 = null; - - private URL docURLSmallJpeg = null; - - private URL docURLBigJpeg = null; - - String SDOC1 = "text.xml"; - - String SDOC2 = "application.xml"; - - String SDOC3 = "attach.html"; - - String SDOC4 = "small.jpg"; - - String SDOC11 = "text2.xml"; - - String SDOC12 = "application2.xml"; - - String SDOC13 = "attach2.html"; - - String SDOC14 = "big.jpg"; - - String SDOCSmallJpeg = "small.jpg"; - - String SDOCBigJpeg = "big.jpg"; - - // URL properties used by the test - private static final String ENDPOINT_URL1 = "mtomfeature.endpoint.1"; - - private static final String ENDPOINT_URL2 = "mtomfeature.endpoint.2"; - - private static final String ENDPOINT_URL3 = "mtomfeature.endpoint.3"; - - private static final String ENDPOINT_URL4 = "mtomfeature.endpoint.4"; - - private static final String WSDLLOC_URL = "mtomfeature.wsdlloc.1"; - - private static final String CTXROOT = "mtomfeature.ctxroot.1"; - - private String url1 = null; - - private String url2 = null; - - private String url3 = null; - - private String url4 = null; - - private URL wsdlurl = null; - - private String ctxroot = null; - - private MTOMFeatureTest1 port1 = null; - - private MTOMFeatureTest2 port2 = null; - - private MTOMFeatureTest3 port3_1 = null; - - private MTOMFeatureTest3 port3_2 = null; - - private MTOMFeatureTest4 port4_1 = null; - - private MTOMFeatureTest4 port4_2 = null; - - private WebServiceFeature[] mtomenabled = { new MTOMFeature(true) }; - - private WebServiceFeature[] mtomenabledtheshold2000 = { - new MTOMFeature(true, 2000) }; - - private WebServiceFeature[] mtomdisabledtheshold2000 = { - new MTOMFeature(false, 2000) }; - - static MTOMFeatureTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL1); - url1 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL2); - url2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL3); - url3 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL4); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - ctxroot = JAXWS_Util.getURLFromProp(CTXROOT); - TestUtil.logMsg("Service Endpoint URL1: " + url1); - TestUtil.logMsg("Service Endpoint URL2: " + url2); - TestUtil.logMsg("Service Endpoint URL3: " + url3); - TestUtil.logMsg("Service Endpoint URL4: " + url4); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - TestUtil.logMsg("Context Root: " + ctxroot); - } - - private void getPortStandalone() throws Exception { - port1 = (MTOMFeatureTest1) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MTOMFeatureTestService.class, PORT_QNAME1, MTOMFeatureTest1.class, - mtomenabled); - JAXWS_Util.setTargetEndpointAddress(port1, url1); - port2 = (MTOMFeatureTest2) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MTOMFeatureTestService.class, PORT_QNAME2, MTOMFeatureTest2.class, - mtomenabled); - JAXWS_Util.setTargetEndpointAddress(port2, url2); - port3_1 = (MTOMFeatureTest3) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MTOMFeatureTestService.class, PORT_QNAME3, MTOMFeatureTest3.class, - mtomenabledtheshold2000); - JAXWS_Util.setTargetEndpointAddress(port3_1, url3); - port3_2 = (MTOMFeatureTest3) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MTOMFeatureTestService.class, PORT_QNAME3, MTOMFeatureTest3.class, - mtomdisabledtheshold2000); - JAXWS_Util.setTargetEndpointAddress(port3_2, url3); - port4_1 = (MTOMFeatureTest4) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MTOMFeatureTestService.class, PORT_QNAME4, MTOMFeatureTest4.class, - mtomenabledtheshold2000); - JAXWS_Util.setTargetEndpointAddress(port4_1, url4); - port4_2 = (MTOMFeatureTest4) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MTOMFeatureTestService.class, PORT_QNAME4, MTOMFeatureTest4.class, - mtomdisabledtheshold2000); - JAXWS_Util.setTargetEndpointAddress(port4_2, url4); - - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port1 = (MTOMFeatureTest1) service.getPort(MTOMFeatureTest1.class, - mtomenabled); - port2 = (MTOMFeatureTest2) service.getPort(MTOMFeatureTest2.class, - mtomenabled); - port3_1 = (MTOMFeatureTest3) service.getPort(MTOMFeatureTest3.class, - mtomenabledtheshold2000); - port3_2 = (MTOMFeatureTest3) service.getPort(MTOMFeatureTest3.class, - mtomdisabledtheshold2000); - port4_1 = (MTOMFeatureTest4) service.getPort(MTOMFeatureTest4.class, - mtomenabledtheshold2000); - port4_2 = (MTOMFeatureTest4) service.getPort(MTOMFeatureTest4.class, - mtomdisabledtheshold2000); - // SOAPBinding binding = (SOAPBinding)((BindingProvider)port).getBinding(); - // JAXWS_Util.setSOAPLogging(port); - TestUtil.logMsg("port=" + port1); - TestUtil.logMsg("Obtained port1"); - JAXWS_Util.dumpTargetEndpointAddress(port1); - TestUtil.logMsg("port=" + port2); - TestUtil.logMsg("Obtained port2"); - JAXWS_Util.dumpTargetEndpointAddress(port2); - TestUtil.logMsg("port=" + port3_1); - TestUtil.logMsg("Obtained port3_1"); - JAXWS_Util.dumpTargetEndpointAddress(port3_1); - TestUtil.logMsg("port=" + port3_2); - TestUtil.logMsg("Obtained port3_2"); - JAXWS_Util.dumpTargetEndpointAddress(port3_2); - TestUtil.logMsg("port=" + port4_1); - TestUtil.logMsg("Obtained port4_1"); - JAXWS_Util.dumpTargetEndpointAddress(port4_1); - TestUtil.logMsg("port=" + port4_2); - TestUtil.logMsg("Obtained port4_2"); - JAXWS_Util.dumpTargetEndpointAddress(port4_2); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (MTOMFeatureTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - docURL1 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC1); - docURL2 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC2); - docURL3 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC3); - docURL4 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC4); - docURL11 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC11); - docURL12 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC12); - docURL13 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC13); - docURL14 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC14); - docURLSmallJpeg = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOCSmallJpeg); - docURLBigJpeg = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOCBigJpeg); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: ClientEnabledServerEnabledMTOMInTest - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * WS4EE:SPEC:5006; JAXWS:JAVADOC:192; JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; - * - * @test_Strategy: Test MTOM attachments on input. - */ - public void ClientEnabledServerEnabledMTOMInTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledMTOMInTest"); - boolean pass = true; - - try { - DataType data = new DataType(); - - data.setDocName1(SDOC1); - data.setDocName2(SDOC2); - data.setDocName3(SDOC3); - data.setDocName4(SDOC4); - - data.setDocUrl1(docURL1.toString()); - data.setDocUrl2(docURL2.toString()); - data.setDocUrl3(docURL3.toString()); - data.setDocUrl4(docURL4.toString()); - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - data.setDoc1(doc1); - data.setDoc2(doc2); - data.setDoc3(doc3); - data.setDoc4(doc4); - - TestUtil - .logMsg("Send 4 documents using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Documents to send: [" + SDOC1 + "," + SDOC2 + "," + SDOC3 - + "," + SDOC4 + "]"); - String result = port1.mtomIn(data); - if (!result.equals("")) { - TestUtil - .logErr("An error occurred with one or more of the attachments"); - TestUtil.logErr("result=" + result); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerEnabledMTOMInTest failed"); - } - - /* - * @testName: ClientEnabledServerEnabledMTOMInOutTest - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * WS4EE:SPEC:5006; JAXWS:JAVADOC:192; JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; - * - * @test_Strategy: Test MTOM attachments on input and output. - */ - public void ClientEnabledServerEnabledMTOMInOutTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledMTOMInOutTest"); - boolean pass = true; - - try { - Holder hDocName1 = new Holder(SDOC1); - Holder hDocName2 = new Holder(SDOC2); - Holder hDocName3 = new Holder(SDOC3); - Holder hDocName4 = new Holder(SDOC4); - - Holder hDocUrl1 = new Holder(docURL1.toString()); - Holder hDocUrl2 = new Holder(docURL2.toString()); - Holder hDocUrl3 = new Holder(docURL3.toString()); - Holder hDocUrl4 = new Holder(docURL4.toString()); - Holder hDocUrl11 = new Holder(docURL11.toString()); - Holder hDocUrl12 = new Holder(docURL12.toString()); - Holder hDocUrl13 = new Holder(docURL13.toString()); - Holder hDocUrl14 = new Holder(docURL14.toString()); - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - Holder hDoc1 = new Holder(doc1); - Holder hDoc2 = new Holder(doc2); - Holder hDoc3 = new Holder(doc3); - Holder hDoc4 = new Holder(doc4); - Holder hResult = new Holder(""); - TestUtil.logMsg( - "Send and receieve 4 documents using MTOM via webservice method mtomInOut()"); - TestUtil.logMsg("Documents to send: [" + SDOC1 + "," + SDOC2 + "," + SDOC3 - + "," + SDOC4 + "]"); - TestUtil.logMsg("Documents to receive: [" + SDOC11 + "," + SDOC12 + "," - + SDOC13 + "," + SDOC14 + "]"); - port1.mtomInOut(hDocName1, hDocName2, hDocName3, hDocName4, hDocUrl1, - hDocUrl2, hDocUrl3, hDocUrl4, hDocUrl11, hDocUrl12, hDocUrl13, - hDocUrl14, hDoc1, hDoc2, hDoc3, hDoc4, hResult); - if (!(hResult.value).equals("")) { - TestUtil.logErr("Server-side errors occurred:\n" + hResult.value); - pass = false; - } - TestUtil.logMsg("Verify the contents of the received documents"); - - doc1 = AttachmentHelper.getSourceDoc(docURL11); - doc2 = AttachmentHelper.getSourceDoc(docURL12); - doc3 = AttachmentHelper.getDataHandlerDoc(docURL13); - doc4 = AttachmentHelper.getImageDoc(docURL14); - - // Now test the documents that were sent back by Server - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, hDoc1.value, - SDOC11); - if (tmpRes != null) { - TestUtil.logErr("Client-side error for doc11:|" + tmpRes + "|"); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, hDoc2.value, - SDOC12); - if (tmpRes != null) { - TestUtil.logErr("Client-side error for doc12:|" + tmpRes + "|"); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, hDoc3.value, - SDOC13); - if (tmpRes != null) { - TestUtil.logErr("Client-side error for doc13:|" + tmpRes + "|"); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, hDoc4.value, - SDOC14); - if (tmpRes != null) { - TestUtil.logErr("Client-side error for doc14:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("All received documents are as expected (ok)"); - - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerEnabledMTOMInOutTest failed"); - } - - /* - * @testName: ClientEnabledServerEnabledMTOMOutTest - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * WS4EE:SPEC:5006; JAXWS:JAVADOC:192; JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; - * - * @test_Strategy: Test MTOM attachments on output. - */ - public void ClientEnabledServerEnabledMTOMOutTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledMTOMOutTest"); - boolean pass = true; - - try { - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - String urls = docURL1.toString() + "," + docURL2.toString() + "," - + docURL3.toString() + "," + docURL4.toString(); - TestUtil.logTrace("urls=" + urls); - TestUtil.logMsg( - "Receive 4 documents using MTOM via webservice method mtomOut()"); - TestUtil.logMsg("Documents to receive: [" + SDOC1 + "," + SDOC2 + "," - + SDOC3 + "," + SDOC4 + "]"); - DataType data = port1.mtomOut(urls); - TestUtil.logMsg("Verify the contents of the received documents"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, - data.getDoc1(), SDOC1); - if (tmpRes != null) { - TestUtil.logErr("Client-side error doc1:|" + tmpRes + "|"); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, data.getDoc2(), - SDOC2); - if (tmpRes != null) { - TestUtil.logErr("Client-side error doc2:|" + tmpRes + "|"); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, data.getDoc3(), - SDOC3); - if (tmpRes != null) { - TestUtil.logErr("Client-side error doc3:|" + tmpRes + "|"); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, data.getDoc4(), - SDOC4); - if (tmpRes != null) { - TestUtil.logErr("Client-side error doc4:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("All received documents are as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerEnabledMTOMOutTest failed"); - } - - /* - * @testName: ClientEnabledServerEnabledMTOMOut2Test - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * WS4EE:SPEC:5006; JAXWS:JAVADOC:192; JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; - * - * @test_Strategy: Test MTOM attachments on output. - */ - public void ClientEnabledServerEnabledMTOMOut2Test() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledMTOMOut2Test"); - boolean pass = true; - - try { - - Image doc = AttachmentHelper.getImageDoc(docURLSmallJpeg); - String urls = docURLSmallJpeg.toString(); - TestUtil.logMsg("urls=" + urls); - TestUtil.logMsg( - "Receive 1 document using MTOM via webservice method mtomOut2()"); - TestUtil.logMsg("Document to receive: [" + SDOCSmallJpeg + "]"); - DataType3 data = port1.mtomOut2(urls); - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc(), SDOCSmallJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerEnabledMTOMOut2Test failed"); - } - - /* - * @testName: ClientEnabledServerDisabledMTOMInTest - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * WS4EE:SPEC:5006; JAXWS:JAVADOC:192; JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; - * - * @test_Strategy: Test MTOM attachments on input. - */ - public void ClientEnabledServerDisabledMTOMInTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerDisabledMTOMInTest"); - boolean pass = true; - - try { - DataType data = new DataType(); - - data.setDocName1(SDOC1); - data.setDocName2(SDOC2); - data.setDocName3(SDOC3); - data.setDocName4(SDOC4); - - data.setDocUrl1(docURL1.toString()); - data.setDocUrl2(docURL2.toString()); - data.setDocUrl3(docURL3.toString()); - data.setDocUrl4(docURL4.toString()); - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - data.setDoc1(doc1); - data.setDoc2(doc2); - data.setDoc3(doc3); - data.setDoc4(doc4); - - TestUtil - .logMsg("Send 4 documents using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Documents to send: [" + SDOC1 + "," + SDOC2 + "," + SDOC3 - + "," + SDOC4 + "]"); - String result = port2.mtomIn(data); - if (!result.equals("")) { - TestUtil - .logErr("An error occurred with one or more of the attachments"); - TestUtil.logErr("result=" + result); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerDisabledMTOMInTest failed"); - } - - /* - * @testName: ClientEnabledServerDisabledMTOMInOutTest - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * WS4EE:SPEC:5006; JAXWS:JAVADOC:192; JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; - * - * @test_Strategy: Test MTOM attachments on input and output. - */ - public void ClientEnabledServerDisabledMTOMInOutTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerDisabledMTOMInOutTest"); - boolean pass = true; - - try { - Holder hDocName1 = new Holder(SDOC1); - Holder hDocName2 = new Holder(SDOC2); - Holder hDocName3 = new Holder(SDOC3); - Holder hDocName4 = new Holder(SDOC4); - - Holder hDocUrl1 = new Holder(docURL1.toString()); - Holder hDocUrl2 = new Holder(docURL2.toString()); - Holder hDocUrl3 = new Holder(docURL3.toString()); - Holder hDocUrl4 = new Holder(docURL4.toString()); - Holder hDocUrl11 = new Holder(docURL11.toString()); - Holder hDocUrl12 = new Holder(docURL12.toString()); - Holder hDocUrl13 = new Holder(docURL13.toString()); - Holder hDocUrl14 = new Holder(docURL14.toString()); - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - Holder hDoc1 = new Holder(doc1); - Holder hDoc2 = new Holder(doc2); - Holder hDoc3 = new Holder(doc3); - Holder hDoc4 = new Holder(doc4); - Holder hResult = new Holder(""); - TestUtil.logMsg( - "Send and receieve 4 documents using MTOM via webservice method mtomInOut()"); - TestUtil.logMsg("Documents to send: [" + SDOC1 + "," + SDOC2 + "," + SDOC3 - + "," + SDOC4 + "]"); - TestUtil.logMsg("Documents to receive: [" + SDOC11 + "," + SDOC12 + "," - + SDOC13 + "," + SDOC14 + "]"); - port2.mtomInOut(hDocName1, hDocName2, hDocName3, hDocName4, hDocUrl1, - hDocUrl2, hDocUrl3, hDocUrl4, hDocUrl11, hDocUrl12, hDocUrl13, - hDocUrl14, hDoc1, hDoc2, hDoc3, hDoc4, hResult); - if (!(hResult.value).equals("")) { - TestUtil.logErr("Server-side errors occurred:\n" + hResult.value); - pass = false; - } - TestUtil.logMsg("Verify the contents of the received documents"); - - doc1 = AttachmentHelper.getSourceDoc(docURL11); - doc2 = AttachmentHelper.getSourceDoc(docURL12); - doc3 = AttachmentHelper.getDataHandlerDoc(docURL13); - doc4 = AttachmentHelper.getImageDoc(docURL14); - - // Now test the documents that were sent back by Server - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, hDoc1.value, - SDOC11); - if (tmpRes != null) { - TestUtil.logErr("Client-side error doc11:|" + tmpRes + "|"); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, hDoc2.value, - SDOC12); - if (tmpRes != null) { - TestUtil.logErr("Client-side error doc12:|" + tmpRes + "|"); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, hDoc3.value, - SDOC13); - if (tmpRes != null) { - TestUtil.logErr("Client-side error doc13:|" + tmpRes + "|"); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, hDoc4.value, - SDOC14); - if (tmpRes != null) { - TestUtil.logErr("Client-side error doc14:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("All received documents are as expected (ok)"); - - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerDisabledMTOMInOutTest failed"); - } - - /* - * @testName: ClientEnabledServerDisabledMTOMOutTest - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * WS4EE:SPEC:5006; JAXWS:JAVADOC:192; JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; - * - * @test_Strategy: Test MTOM attachments on output. - */ - public void ClientEnabledServerDisabledMTOMOutTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerDisabledMTOMOutTest"); - boolean pass = true; - - try { - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - String urls = docURL1.toString() + "," + docURL2.toString() + "," - + docURL3.toString() + "," + docURL4.toString(); - TestUtil.logTrace("urls=" + urls); - TestUtil.logMsg( - "Receive 4 documents using MTOM via webservice method mtomOut()"); - TestUtil.logMsg("Documents to receive: [" + SDOC1 + "," + SDOC2 + "," - + SDOC3 + "," + SDOC4 + "]"); - DataType data = port2.mtomOut(urls); - TestUtil.logMsg("Verify the contents of the received documents"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, - data.getDoc1(), SDOC1); - if (tmpRes != null) { - TestUtil.logErr("Client-side error doc1:|" + tmpRes + "|"); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, data.getDoc2(), - SDOC2); - if (tmpRes != null) { - TestUtil.logErr("Client-side error doc2:|" + tmpRes + "|"); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, data.getDoc3(), - SDOC3); - if (tmpRes != null) { - TestUtil.logErr("Client-side error doc3:|" + tmpRes + "|"); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, data.getDoc4(), - SDOC4); - if (tmpRes != null) { - TestUtil.logErr("Client-side error doc4:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("All received documents are as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerDisabledMTOMOutTest failed"); - } - - /* - * @testName: ClientEnabledServerDisabledMTOMOut2Test - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * WS4EE:SPEC:5006; JAXWS:JAVADOC:192; JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; - * - * @test_Strategy: Test MTOM attachments on output. - */ - public void ClientEnabledServerDisabledMTOMOut2Test() throws Fault { - TestUtil.logMsg("ClientEnabledServerDisabledMTOMOut2Test"); - boolean pass = true; - - try { - - Image doc = AttachmentHelper.getImageDoc(docURLSmallJpeg); - String urls = docURLSmallJpeg.toString(); - TestUtil.logMsg("urls=" + urls); - TestUtil.logMsg( - "Receive 1 document using MTOM via webservice method mtomOut2()"); - TestUtil.logMsg("Document to receive: [" + SDOCSmallJpeg + "]"); - DataType3 data = port2.mtomOut2(urls); - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc(), SDOCSmallJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerDisabledMTOMOut2Test failed"); - } - - /* - * @testName: ClientEnabledServerEnabledLT2000Test - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * JAXWS:SPEC:6015.4; JAXWS:SPEC:6015.5; JAXWS:JAVADOC:192; JAXWS:JAVADOC:193; - * JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; JAXWS:SPEC:7021.2; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * less than 2000 bytes. The endpoint has mtom enabled with the threshold set - * to 2000 - */ - public void ClientEnabledServerEnabledLT2000Test() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledLT2000Test"); - boolean pass = true; - - try { - DataType3 d = new DataType3(); - d.setTestName("ClientEnabledServerEnabledLT2000Test"); - Image doc = AttachmentHelper.getImageDoc(docURLSmallJpeg); - d.setDoc(doc); - - TestUtil.logMsg("Sending a jpg document that is below the threshold [" - + SDOCSmallJpeg + "]"); - port3_1.threshold2000(d); - - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, d.getDoc(), - SDOCSmallJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerEnabledGT2000Test failed"); - } - - /* - * @testName: ClientEnabledServerEnabledGT2000Test - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * JAXWS:SPEC:6015.4; JAXWS:SPEC:6015.5; JAXWS:JAVADOC:192; JAXWS:JAVADOC:193; - * JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; JAXWS:SPEC:7021.2; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * greater than 2000 bytes. The endpoint has mtom enabled with the threshold - * set to 2000 - */ - public void ClientEnabledServerEnabledGT2000Test() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledGT2000Test"); - boolean pass = true; - - try { - DataType3 d = new DataType3(); - d.setTestName("ClientEnabledServerEnabledGT2000Test"); - Image doc = AttachmentHelper.getImageDoc(docURLBigJpeg); - d.setDoc(doc); - - TestUtil.logMsg("Sending a jpg document that is above the threshold [" - + SDOCBigJpeg + "]"); - port3_1.threshold2000(d); - - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, d.getDoc(), - SDOCBigJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerEnabledGT2000Test failed"); - } - - /* - * @testName: ClientDisabledServerEnabledLT2000Test - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * JAXWS:SPEC:6015.4; JAXWS:SPEC:6015.5; JAXWS:JAVADOC:192; JAXWS:JAVADOC:193; - * JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; JAXWS:SPEC:7021.2; - * - * @test_Strategy: Test that XOP is disabled when sending an attachment that - * is less than 2000 bytes. The endpoint has mtom enabled with the threshold - * set to 2000 - */ - public void ClientDisabledServerEnabledLT2000Test() throws Fault { - TestUtil.logMsg("ClientDisabledServerEnabledLT2000Test"); - boolean pass = true; - - try { - DataType3 d = new DataType3(); - d.setTestName("ClientDisabledServerEnabledLT2000Test"); - Image doc = AttachmentHelper.getImageDoc(docURLSmallJpeg); - d.setDoc(doc); - - TestUtil.logMsg("Sending a jpg document that is below the threshold [" - + SDOCSmallJpeg + "]"); - port3_2.threshold2000(d); - - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, d.getDoc(), - SDOCSmallJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientDisabledServerEnabledLT2000Test failed"); - } - - /* - * @testName: ClientDisabledServerEnabledGT2000Test - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * JAXWS:SPEC:6015.4; JAXWS:SPEC:6015.5; JAXWS:JAVADOC:192; JAXWS:JAVADOC:193; - * JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; JAXWS:SPEC:7021.2; - * - * @test_Strategy: Test that XOP is disabled when sending an attachment that - * is greater than 2000 bytes. The endpoint has mtom enabled with the - * threshold set to 2000 - */ - public void ClientDisabledServerEnabledGT2000Test() throws Fault { - TestUtil.logMsg("ClientDisabledServerEnabledGT2000Test"); - boolean pass = true; - - try { - DataType3 d = new DataType3(); - d.setTestName("ClientDisabledServerEnabledGT2000Test"); - Image doc = AttachmentHelper.getImageDoc(docURLBigJpeg); - d.setDoc(doc); - - TestUtil.logMsg("Sending a jpg document that is above the threshold [" - + SDOCBigJpeg + "]"); - port3_2.threshold2000(d); - - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, d.getDoc(), - SDOCBigJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientDisabledServerEnabledGT2000Test failed"); - } - - /* - * @testName: ClientEnabledServerDisabledLT2000Test - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * JAXWS:SPEC:6015.4; JAXWS:SPEC:6015.5; JAXWS:JAVADOC:192; JAXWS:JAVADOC:193; - * JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; JAXWS:SPEC:7021.2; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * less than 2000 bytes. The endpoint has mtom disabled with the threshold set - * to 2000 - */ - public void ClientEnabledServerDisabledLT2000Test() throws Fault { - TestUtil.logMsg("ClientEnabledServerDisabledLT2000Test"); - boolean pass = true; - - try { - DataType3 d = new DataType3(); - d.setTestName("ClientEnabledServerDisabledLT2000Test"); - Image doc = AttachmentHelper.getImageDoc(docURLSmallJpeg); - d.setDoc(doc); - - TestUtil.logMsg("Sending a jpg document that is below the threshold [" - + SDOCSmallJpeg + "]"); - port4_1.threshold2000(d); - - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, d.getDoc(), - SDOCSmallJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerDisabledLT2000Test failed"); - } - - /* - * @testName: ClientEnabledServerDisabledGT2000Test - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * JAXWS:SPEC:6015.4; JAXWS:SPEC:6015.5; JAXWS:JAVADOC:192; JAXWS:JAVADOC:193; - * JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; JAXWS:SPEC:7021.2; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * greater than 2000 bytes. The endpoint has mtom disabled with the threshold - * set to 2000 - */ - public void ClientEnabledServerDisabledGT2000Test() throws Fault { - TestUtil.logMsg("ClientEnabledServerDisabledGT2000Test"); - boolean pass = true; - - try { - DataType3 d = new DataType3(); - d.setTestName("ClientEnabledServerDisabledGT2000Test"); - Image doc = AttachmentHelper.getImageDoc(docURLBigJpeg); - d.setDoc(doc); - - TestUtil.logMsg("Sending a jpg document that is above the threshold [" - + SDOCBigJpeg + "]"); - port4_1.threshold2000(d); - - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, d.getDoc(), - SDOCBigJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerDisabledGT2000Test failed"); - } - - /* - * @testName: ClientDisabledServerDisabledLT2000Test - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * JAXWS:SPEC:6015.4; JAXWS:SPEC:6015.5; JAXWS:JAVADOC:192; JAXWS:JAVADOC:193; - * JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; JAXWS:SPEC:7021.2; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * less than 2000 bytes. The endpoint has mtom disabled with the threshold set - * to 2000 - */ - public void ClientDisabledServerDisabledLT2000Test() throws Fault { - TestUtil.logMsg("ClientDisabledServerDisabledLT2000Test"); - boolean pass = true; - - try { - DataType3 d = new DataType3(); - d.setTestName("ClientDisabledServerDisabledLT2000Test"); - Image doc = AttachmentHelper.getImageDoc(docURLSmallJpeg); - d.setDoc(doc); - - TestUtil.logMsg("Sending a jpg document that is below the threshold [" - + SDOCSmallJpeg + "]"); - port4_2.threshold2000(d); - - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, d.getDoc(), - SDOCSmallJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientDisabledServerDisabledLT2000Test failed"); - } - - /* - * @testName: ClientDisabledServerDisabledGT2000Test - * - * @assertion_ids: JAXWS:SPEC:6015; JAXWS:SPEC:6015.2; JAXWS:SPEC:6015.3; - * JAXWS:SPEC:6015.4; JAXWS:SPEC:6015.5; JAXWS:JAVADOC:192; JAXWS:JAVADOC:193; - * JAXWS:SPEC:7021; JAXWS:SPEC:7021.1; JAXWS:SPEC:7021.2; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * less than 2000 bytes. The endpoint has mtom disabled with the threshold set - * to 2000 - */ - public void ClientDisabledServerDisabledGT2000Test() throws Fault { - TestUtil.logMsg("ClientDisabledServerDisabledGT2000Test"); - boolean pass = true; - - try { - DataType3 d = new DataType3(); - d.setTestName("ClientDisabledServerDisabledGT2000Test"); - Image doc = AttachmentHelper.getImageDoc(docURLBigJpeg); - d.setDoc(doc); - - TestUtil.logMsg("Sending a jpg document that is above the threshold [" - + SDOCBigJpeg + "]"); - port4_2.threshold2000(d); - - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, d.getDoc(), - SDOCBigJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error:|" + tmpRes + "|"); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("ClientDisabledServerDisabledGT2000Test failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/ClientSOAPHandler.java deleted file mode 100644 index 4452e55ab9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/ClientSOAPHandler.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; - -import java.util.Map; -import java.util.List; - -public class ClientSOAPHandler extends HTTPSOAPHandler { - - private static final String PASSED = "PASSED"; - - private static final String FAILED = "FAILED"; - - protected void processInboundMessage(SOAPMessageContext context) { - System.out.println("in ClientSOAPHandler:processInboundMessage"); - JAXWS_Util.dumpHTTPHeaders(context, false); - // JAXWS_Util.dumpSOAPMessage(context.getMessage(),false); - - String result = FAILED; - Map> map = (Map>) context - .get(MessageContext.HTTP_RESPONSE_HEADERS); - if (Handler_Util.checkForMsg(context, - "ClientDisabledServerEnabledLT2000Test") - || Handler_Util.checkForMsg(context, - "ClientDisabledServerEnabledGT2000Test")) { - result = PASSED; - } else if (Handler_Util.checkForMsg(context, "ServerEnabled")) { - result = verifyMTOMEnabledThresholdContentTypeHttpHeader(map); - } else { - result = verifyMTOMDisabledContentTypeHttpHeader(map); - } - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ClientSOAPHandler:processInboundMessage: " + result); - } - } - - protected String verifyMTOMDisabledContentTypeHttpHeader( - Map> m) { - System.out.println( - "in ClientSOAPHandler:verifyMTOMDisabledContentTypeHttpHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("DEBUG: HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if (sValues.indexOf("text/xml") >= 0) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected = text/xml"; - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - System.out.println("result=" + result); - return result; - } - - protected String verifyMTOMEnabledThresholdContentTypeHttpHeader( - Map> m) { - System.out.println( - "in ClientSOAPHandler:verifyMTOMEnabledThresholdContentTypeHttpHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("DEBUG: HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if ((sValues.indexOf("multipart/related") >= 0) - && (sValues.indexOf("application/xop+xml") >= 0)) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected=multipart/related,application/xop+xml"; - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - System.out.println("result=" + result); - return result; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestImpl1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestImpl1.java deleted file mode 100644 index 54ecb84bb5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestImpl1.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOM; - -import java.awt.Image; -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; -import jakarta.activation.DataHandler; -import javax.xml.transform.Source; - -@WebService(portName = "MTOMFeatureTest1Port", serviceName = "MTOMFeatureTestService", targetNamespace = "http://mtomfeatureservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMFeatureTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTest1") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@MTOM(enabled = true) - -public class MTOMFeatureTestImpl1 implements MTOMFeatureTest1 { - - public String mtomIn( - com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.DataType data) { - System.out.println("--------------------------"); - System.out.println("In MTOMFeatureTestImpl1:mtomIn"); - - String result = ""; - - try { - - String docName1 = data.getDocName1(); - String docName2 = data.getDocName2(); - String docName3 = data.getDocName3(); - String docName4 = data.getDocName4(); - System.out.println("docName1=" + docName1); - System.out.println("docName2=" + docName2); - System.out.println("docName3=" + docName3); - System.out.println("docName4=" + docName4); - - URL docURL1 = new URL(data.getDocUrl1()); - URL docURL2 = new URL(data.getDocUrl2()); - URL docURL3 = new URL(data.getDocUrl3()); - URL docURL4 = new URL(data.getDocUrl4()); - System.out.println("docURL1=" + docURL1.toString()); - System.out.println("docURL2=" + docURL2.toString()); - System.out.println("docURL3=" + docURL3.toString()); - System.out.println("docURL4=" + docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, - data.getDoc1(), docName1); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, data.getDoc2(), - docName2); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, data.getDoc3(), - docName3); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, data.getDoc4(), - docName4); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } - - public void mtomInOut(Holder hDocName1, Holder hDocName2, - Holder hDocName3, Holder hDocName4, - Holder hDocUrl1, Holder hDocUrl2, Holder hDocUrl3, - Holder hDocUrl4, Holder hDocUrl11, - Holder hDocUrl12, Holder hDocUrl13, - Holder hDocUrl14, Holder hDoc1, Holder hDoc2, - Holder hDoc3, Holder hDoc4, Holder hResult) { - - System.out.println("--------------------------"); - System.out.println("In MTOMFeatureTestImpl1:mtomInOut"); - String result = ""; - try { - - String docName1 = hDocName1.value; - String docName2 = hDocName2.value; - String docName3 = hDocName3.value; - String docName4 = hDocName4.value; - System.out.println("docName1=" + docName1); - System.out.println("docName2=" + docName2); - System.out.println("docName3=" + docName3); - System.out.println("docName4=" + docName4); - - URL docURL1 = new URL(hDocUrl1.value); - URL docURL2 = new URL(hDocUrl2.value); - URL docURL3 = new URL(hDocUrl3.value); - URL docURL4 = new URL(hDocUrl4.value); - - System.out.println("docURL1=" + docURL1.toString()); - System.out.println("docURL2=" + docURL2.toString()); - System.out.println("docURL3=" + docURL3.toString()); - System.out.println("docURL4=" + docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, hDoc1.value, - docName1); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, hDoc2.value, - docName2); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, hDoc3.value, - docName3); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, hDoc4.value, - docName4); - if (tmpRes != null) { - result = result + tmpRes; - } - - URL docURL11 = new URL(hDocUrl11.value); - URL docURL12 = new URL(hDocUrl12.value); - URL docURL13 = new URL(hDocUrl13.value); - URL docURL14 = new URL(hDocUrl14.value); - - System.out.println("docURL11=" + docURL11.toString()); - System.out.println("docURL12=" + docURL12.toString()); - System.out.println("docURL13=" + docURL13.toString()); - System.out.println("docURL14=" + docURL14.toString()); - - hDoc1.value = AttachmentHelper.getSourceDoc(docURL11); - hDoc2.value = AttachmentHelper.getSourceDoc(docURL12); - hDoc3.value = AttachmentHelper.getDataHandlerDoc(docURL13); - hDoc4.value = AttachmentHelper.getImageDoc(docURL14); - - hResult.value = result; - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - } - - public com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.DataType mtomOut( - String urls) { - System.out.println("--------------------------"); - System.out.println("In MTOMFeatureTestImpl1:mtomOut"); - - System.out.println("urls=" + urls); - String[] tmpUrls = urls.split(","); - - for (int i = 0; i < tmpUrls.length; i++) { - System.out.println("url[" + i + "]=" + tmpUrls[i]); - } - - DataType d = new DataType(); - try { - URL docURL1 = new URL(tmpUrls[0]); - URL docURL2 = new URL(tmpUrls[1]); - URL docURL3 = new URL(tmpUrls[2]); - URL docURL4 = new URL(tmpUrls[3]); - - d.setDocUrl1(docURL1.toString()); - d.setDocUrl2(docURL2.toString()); - d.setDocUrl3(docURL3.toString()); - d.setDocUrl4(docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - d.setDoc1(doc1); - d.setDoc2(doc2); - d.setDoc3(doc3); - d.setDoc4(doc4); - - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return d; - } - - public com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.DataType3 mtomOut2( - String urls) { - System.out.println("--------------------------"); - System.out.println("In MTOMFeatureTestImpl1:mtomOut2"); - - System.out.println("urls=" + urls); - String[] tmpUrls = urls.split(","); - - for (int i = 0; i < tmpUrls.length; i++) { - System.out.println("url[" + i + "]=" + tmpUrls[i]); - } - - DataType3 d = new DataType3(); - try { - URL docURL = new URL(tmpUrls[0]); - Image doc = AttachmentHelper.getImageDoc(docURL); - d.setDoc(doc); - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return d; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestImpl2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestImpl2.java deleted file mode 100644 index 6d8d01ad3b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestImpl2.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOM; - -import java.awt.Image; -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; -import jakarta.activation.DataHandler; -import javax.xml.transform.Source; - -@WebService(portName = "MTOMFeatureTest2Port", serviceName = "MTOMFeatureTestService", targetNamespace = "http://mtomfeatureservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMFeatureTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTest2") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@MTOM(enabled = false) - -public class MTOMFeatureTestImpl2 implements MTOMFeatureTest2 { - - public String mtomIn( - com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.DataType data) { - System.out.println("--------------------------"); - System.out.println("In MTOMFeatureTestImpl2:mtomIn"); - - String result = ""; - - try { - - String docName1 = data.getDocName1(); - String docName2 = data.getDocName2(); - String docName3 = data.getDocName3(); - String docName4 = data.getDocName4(); - System.out.println("docName1=" + docName1); - System.out.println("docName2=" + docName2); - System.out.println("docName3=" + docName3); - System.out.println("docName4=" + docName4); - - URL docURL1 = new URL(data.getDocUrl1()); - URL docURL2 = new URL(data.getDocUrl2()); - URL docURL3 = new URL(data.getDocUrl3()); - URL docURL4 = new URL(data.getDocUrl4()); - System.out.println("docURL1=" + docURL1.toString()); - System.out.println("docURL2=" + docURL2.toString()); - System.out.println("docURL3=" + docURL3.toString()); - System.out.println("docURL4=" + docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, - data.getDoc1(), docName1); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, data.getDoc2(), - docName2); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, data.getDoc3(), - docName3); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, data.getDoc4(), - docName4); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } - - public void mtomInOut(Holder hDocName1, Holder hDocName2, - Holder hDocName3, Holder hDocName4, - Holder hDocUrl1, Holder hDocUrl2, Holder hDocUrl3, - Holder hDocUrl4, Holder hDocUrl11, - Holder hDocUrl12, Holder hDocUrl13, - Holder hDocUrl14, Holder hDoc1, Holder hDoc2, - Holder hDoc3, Holder hDoc4, Holder hResult) { - - System.out.println("--------------------------"); - System.out.println("In MTOMFeatureTestImpl2:mtomInOut"); - String result = ""; - try { - - String docName1 = hDocName1.value; - String docName2 = hDocName2.value; - String docName3 = hDocName3.value; - String docName4 = hDocName4.value; - System.out.println("docName1=" + docName1); - System.out.println("docName2=" + docName2); - System.out.println("docName3=" + docName3); - System.out.println("docName4=" + docName4); - - URL docURL1 = new URL(hDocUrl1.value); - URL docURL2 = new URL(hDocUrl2.value); - URL docURL3 = new URL(hDocUrl3.value); - URL docURL4 = new URL(hDocUrl4.value); - - System.out.println("docURL1=" + docURL1.toString()); - System.out.println("docURL2=" + docURL2.toString()); - System.out.println("docURL3=" + docURL3.toString()); - System.out.println("docURL4=" + docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, hDoc1.value, - docName1); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, hDoc2.value, - docName2); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, hDoc3.value, - docName3); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, hDoc4.value, - docName4); - if (tmpRes != null) { - result = result + tmpRes; - } - - URL docURL11 = new URL(hDocUrl11.value); - URL docURL12 = new URL(hDocUrl12.value); - URL docURL13 = new URL(hDocUrl13.value); - URL docURL14 = new URL(hDocUrl14.value); - - System.out.println("docURL11=" + docURL11.toString()); - System.out.println("docURL12=" + docURL12.toString()); - System.out.println("docURL13=" + docURL13.toString()); - System.out.println("docURL14=" + docURL14.toString()); - - hDoc1.value = AttachmentHelper.getSourceDoc(docURL11); - hDoc2.value = AttachmentHelper.getSourceDoc(docURL12); - hDoc3.value = AttachmentHelper.getDataHandlerDoc(docURL13); - hDoc4.value = AttachmentHelper.getImageDoc(docURL14); - - hResult.value = result; - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - } - - public com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.DataType mtomOut( - String urls) { - System.out.println("--------------------------"); - System.out.println("In MTOMFeatureTestImpl2:mtomOut"); - - System.out.println("urls=" + urls); - String[] tmpUrls = urls.split(","); - - for (int i = 0; i < tmpUrls.length; i++) { - System.out.println("url[" + i + "]=" + tmpUrls[i]); - } - - DataType d = new DataType(); - try { - URL docURL1 = new URL(tmpUrls[0]); - URL docURL2 = new URL(tmpUrls[1]); - URL docURL3 = new URL(tmpUrls[2]); - URL docURL4 = new URL(tmpUrls[3]); - - d.setDocUrl1(docURL1.toString()); - d.setDocUrl2(docURL2.toString()); - d.setDocUrl3(docURL3.toString()); - d.setDocUrl4(docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - d.setDoc1(doc1); - d.setDoc2(doc2); - d.setDoc3(doc3); - d.setDoc4(doc4); - - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return d; - } - - public com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.DataType3 mtomOut2( - String urls) { - System.out.println("--------------------------"); - System.out.println("In MTOMFeatureTestImpl2:mtomOut2"); - - System.out.println("urls=" + urls); - String[] tmpUrls = urls.split(","); - - for (int i = 0; i < tmpUrls.length; i++) { - System.out.println("url[" + i + "]=" + tmpUrls[i]); - } - - DataType3 d = new DataType3(); - try { - URL docURL = new URL(tmpUrls[0]); - Image doc = AttachmentHelper.getImageDoc(docURL); - d.setDoc(doc); - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return d; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestImpl3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestImpl3.java deleted file mode 100644 index a594d4639e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestImpl3.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOM; - -@WebService(portName = "MTOMFeatureTest3Port", serviceName = "MTOMFeatureTestService", targetNamespace = "http://mtomfeatureservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMFeatureTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTest3") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@MTOM(enabled = true, threshold = 2000) - -public class MTOMFeatureTestImpl3 implements MTOMFeatureTest3 { - - public com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.DataType33 threshold2000( - com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.DataType3 data) { - - System.out.println("--------------------------"); - System.out.println("In MTOMFeatureTestImpl3:threshold2000"); - - DataType33 data33 = new DataType33(); - data33.setTestName(data.getTestName()); - data33.setDoc(data.getDoc()); - - return data33; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestImpl4.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestImpl4.java deleted file mode 100644 index 918303e086..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestImpl4.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOM; - -@WebService(portName = "MTOMFeatureTest4Port", serviceName = "MTOMFeatureTestService", targetNamespace = "http://mtomfeatureservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMFeatureTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTest4") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@MTOM(enabled = false, threshold = 2000) - -public class MTOMFeatureTestImpl4 implements MTOMFeatureTest4 { - - public com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.DataType33 threshold2000( - com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.DataType3 data) { - - System.out.println("--------------------------"); - System.out.println("In MTOMFeatureTestImpl4:threshold2000"); - - DataType33 data33 = new DataType33(); - data33.setTestName(data.getTestName()); - data33.setDoc(data.getDoc()); - - return data33; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestService.wsdl deleted file mode 100644 index 160ef02138..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/MTOMFeatureTestService.wsdl +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/ServerSOAPHandler.java deleted file mode 100644 index 83d9217901..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/ServerSOAPHandler.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; - -import java.util.Map; -import java.util.List; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - final String PASSED = "PASSED"; - - final String FAILED = "FAILED"; - - protected void processInboundMessage(SOAPMessageContext context) { - System.out.println("in ServerSOAPHandler:processInboundMessage"); - JAXWS_Util.dumpHTTPHeaders(context, false); - // JAXWS_Util.dumpSOAPMessage(context.getMessage(),false); - - String result = FAILED; - Map> map = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - if (Handler_Util.checkForMsg(context, "ClientEnabled")) { - // boolean isAboveThreshold = Handler_Util.checkForMsg(context,"GT2000"); - // result = - // verifyMTOMEnabledThresholdContentTypeHttpHeader(map,isAboveThreshold); - result = verifyMTOMEnabledContentTypeHttpHeader(map); - } else { - result = verifyMTOMDisabledContentTypeHttpHeader(map); - } - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: " + result); - } - } - - protected String verifyMTOMDisabledContentTypeHttpHeader( - Map> m) { - System.out.println( - "in ServerSOAPHandler:verifyMTOMDisabledContentTypeHttpHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("DEBUG: HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if (sValues.indexOf("text/xml") >= 0) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected = text/xml"; - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - System.out.println("result=" + result); - return result; - } - - protected String verifyMTOMEnabledContentTypeHttpHeader( - Map> m) { - System.out - .println("in ServerSOAPHandler:verifyMTOMEnabledContentTypeHttpHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("DEBUG: HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if ((sValues.indexOf("multipart/related") >= 0) - && (sValues.indexOf("application/xop+xml") >= 0)) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected=multipart/related,application/xop+xml"; - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - System.out.println("result=" + result); - return result; - } - - protected String verifyMTOMEnabledThresholdContentTypeHttpHeader( - Map> m, boolean isAboveThreshold) { - System.out.println("in ServerSOAPHandler:verifyXOPContentTypeHttpHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("DEBUG: HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if (isAboveThreshold) { - if ((sValues.indexOf("multipart/related") >= 0) - && (sValues.indexOf("application/xop+xml") >= 0)) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected=multipart/related,application/xop+xml"; - } - } else { - if (sValues.indexOf("text/xml") >= 0) { - if ((sValues.indexOf("application/xop+xml") < 0) - && (sValues.indexOf("multipart/related") < 0)) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], did not expect: multipart/related,application/xop+xml"; - } - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected=text/xml"; - } - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - System.out.println("result=" + result); - return result; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/build.xml deleted file mode 100644 index 6bf9582922..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/build.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/application.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/application.xml deleted file mode 100644 index 5a6b4524af..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/application.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Simple example of application - Simple example - - ejb1.jar - - - ejb2.jar - - - - web.war - web - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/application2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/application2.xml deleted file mode 100644 index e298f72a57..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/application2.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Second Simple example of application - Second Simple example - - ejb3.jar - - - ejb4.jar - - - - web.war - secondWeb - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/attach.html b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/attach.html deleted file mode 100644 index 0404eb3cc0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/attach.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -This is a title - - -

This is a starting point


-

This is a header

-

This is a paragraph

-
    -
  • This is a bullet

  • -
- - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/attach2.html b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/attach2.html deleted file mode 100644 index 9a2133dc20..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/attach2.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -This is the second title - - -

This is the second starting point

-

This is the second header

-

This is the second paragraph

-
    -
  • This is the second bullet

  • -
- - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/big.jpg b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/big.jpg deleted file mode 100644 index c6988d3efa..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/big.jpg and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/small.jpg b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/small.jpg deleted file mode 100644 index 02d864db47..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/small.jpg and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/text.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/text.xml deleted file mode 100644 index a9fcc9a1e1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/text.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - http - - - - - http://www.wombats.com/remote/sender - - - http://127.0.0.1:8081/jaxm-provider/receiver/ebxml - - - - - - - 5 - - - 2000 - - - - - - - ebxml/ - - - 10 - - - - - - - https - - - - - jaxm.dummy.uri - - - https://127.0.0.1:8443/jaxm/dummy/ - - - - - - ebxml-https/ - - - 10 - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/text2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/text2.xml deleted file mode 100644 index 332bc47bab..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/contentRoot/text2.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - W2JDLMTOMTestApp2 - - com.sun.ts.tests.jaxws.common.JAXWSContextListener - - - MTOMTest2 - com.sun.ts.tests.jaxws.common.JAXWSServlet - 1 - - - MTOMTest2 - /jaxws/MTOMTest2 - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/custom-client.xml deleted file mode 100644 index 2b3350282a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/custom-client.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.ClientSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/custom-server.xml deleted file mode 100644 index 5aed5fc27f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/custom-server.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.ServerSOAPHandler - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/jakartaEE.tokens deleted file mode 100644 index 4d9b12b7c1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/jakartaEE.tokens +++ /dev/null @@ -1,27 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/MTOMFeatureTestService") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTestService -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTestImpl1 -SERVLETNAME2=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTestImpl2 -SERVLETNAME3=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTestImpl3 -SERVLETNAME4=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTestImpl4 -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTestImpl1 -IMPL2=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTestImpl2 -IMPL3=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTestImpl3 -IMPL4=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTestImpl4 -URLALIAS=/jaxws/MTOMFeatureTest1 -URLALIAS2=/jaxws/MTOMFeatureTest2 -URLALIAS3=/jaxws/MTOMFeatureTest3 -URLALIAS4=/jaxws/MTOMFeatureTest4 -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTest1 -SEI2=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTest2 -SEI3=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTest3 -SEI4=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomfeature.MTOMFeatureTest4 -NAMESPACEURI=http://mtomfeatureservice.org/wsdl -PORT=MTOMFeatureTest1Port -PORT2=MTOMFeatureTest2Port -PORT3=MTOMFeatureTest3Port -PORT4=MTOMFeatureTest4Port -WEBSERVICEDESCRIPTION=MTOMFeatureTestService -SERVICEREFNAMEWSSERVLET=service/MTOMFeatureTestService -SERVICEREFNAMEWSEJB=service/MTOMFeatureTestService -SERVICEREFNAMEWSAPPCLIENT=service/MTOMFeatureTestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/jakartaEE.web.xml deleted file mode 100644 index 0350ec9463..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/jakartaEE.web.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME3@ - @IMPL3@ - 0 - - - @SERVLETNAME4@ - @IMPL4@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - @SERVLETNAME3@ - @URLALIAS3@ - - - @SERVLETNAME4@ - @URLALIAS4@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/standalone-sun-jaxws.xml deleted file mode 100644 index 90948ca306..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/standalone-sun-jaxws.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/standalone.web.xml deleted file mode 100644 index c2cb3fbd8a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomfeature/standalone.web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - WSW2JDLMTOMFeatureTestApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - MTOMFeatureTest1 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - MTOMFeatureTest2 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - MTOMFeatureTest3 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - MTOMFeatureTest4 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - MTOMFeatureTest1 - /jaxws/MTOMFeatureTest1 - - - MTOMFeatureTest2 - /jaxws/MTOMFeatureTest2 - - - MTOMFeatureTest3 - /jaxws/MTOMFeatureTest3 - - - MTOMFeatureTest4 - /jaxws/MTOMFeatureTest4 - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/Client.java deleted file mode 100644 index 44f0e821db..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/Client.java +++ /dev/null @@ -1,566 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; - -import java.net.*; - -import java.awt.Image; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.SOAPBinding; -import javax.xml.namespace.QName; - -import jakarta.activation.DataHandler; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; - -import java.util.Properties; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest."; - - // service and port information - private static final String NAMESPACEURI = "http://mtomtestservice.org/wsdl"; - - private static final String SERVICE_NAME = "MTOMTestService"; - - private static final String PORT_NAME1 = "MTOMTestPort"; - - private static final String PORT_NAME2 = "MTOMTestTwoPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private URL docURL1 = null; - - private URL docURL2 = null; - - private URL docURL3 = null; - - private URL docURL4 = null; - - private URL docURL11 = null; - - private URL docURL12 = null; - - private URL docURL13 = null; - - private URL docURL14 = null; - - private URL docURLBigJpeg = null; - - String SDOC1 = "WSW2JDLMTOMTesttext.xml"; - - String SDOC2 = "WSW2JDLMTOMTestapplication.xml"; - - String SDOC3 = "WSW2JDLMTOMTestattach.html"; - - String SDOC4 = "WSW2JDLMTOMTestattach.jpg"; - - String SDOC11 = "WSW2JDLMTOMTesttext2.xml"; - - String SDOC12 = "WSW2JDLMTOMTestapplication2.xml"; - - String SDOC13 = "WSW2JDLMTOMTestattach2.html"; - - String SDOC14 = "WSW2JDLMTOMTestattach2.jpg"; - - String SDOCBigJpeg = "WSW2JDLMTOMTestbig.jpg"; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jdlmtomtest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jdlmtomtest.wsdlloc.1"; - - private static final String CTXROOT = "w2jdlmtomtest.ctxroot.1"; - - private String url = null; - - private URL wsdlurl = null; - - private String ctxroot = null; - - private MTOMTest port = null; - - private MTOMClientTwo client2; - - static MTOMTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - ctxroot = JAXWS_Util.getURLFromProp(CTXROOT); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - TestUtil.logMsg("Context Root: " + ctxroot); - } - - private void getPortStandalone() throws Exception { - port = (MTOMTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MTOMTestService.class, PORT_QNAME1, MTOMTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - SOAPBinding binding = (SOAPBinding) ((BindingProvider) port).getBinding(); - binding.setMTOMEnabled(true); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (MTOMTest) service.getPort(MTOMTest.class); - SOAPBinding binding = (SOAPBinding) ((BindingProvider) port).getBinding(); - binding.setMTOMEnabled(true); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - client2 = (MTOMClientTwo) ClientFactory.getClient(MTOMClientTwo.class, p, - this, service); - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (MTOMTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - docURL1 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC1); - docURL2 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC2); - docURL3 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC3); - docURL4 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC4); - docURL11 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC11); - docURL12 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC12); - docURL13 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC13); - docURL14 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC14); - docURLBigJpeg = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOCBigJpeg); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: MTOMInTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:4013; JAXWS:SPEC:10022; JAXWS:SPEC:2080; JAXWS:SPEC:3054; - * - * @test_Strategy: Test MTOM attachments on input. - */ - public void MTOMInTest() throws Fault { - TestUtil.logMsg("MTOMInTest"); - boolean pass = true; - - try { - DataType data = new DataType(); - - data.setDocName1(SDOC1); - data.setDocName2(SDOC2); - data.setDocName3(SDOC3); - data.setDocName4(SDOC4); - - data.setDocUrl1(docURL1.toString()); - data.setDocUrl2(docURL2.toString()); - data.setDocUrl3(docURL3.toString()); - data.setDocUrl4(docURL4.toString()); - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - data.setDoc1(doc1); - data.setDoc2(doc2); - data.setDoc3(doc3); - data.setDoc4(doc4); - - TestUtil - .logMsg("Send 4 documents using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Documents to send: [" + SDOC1 + "," + SDOC2 + "," + SDOC3 - + "," + SDOC4 + "]"); - String result = port.mtomIn(data); - if (!result.equals("")) { - TestUtil - .logErr("An error occurred with one or more of the attachments"); - TestUtil.logErr("result=" + result); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("MTOMInTest failed"); - } - - /* - * @testName: MTOMInOutTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:4013; JAXWS:SPEC:10022; JAXWS:SPEC:2080; JAXWS:SPEC:3054; - * - * @test_Strategy: Test MTOM attachments on input and output. - */ - public void MTOMInOutTest() throws Fault { - TestUtil.logMsg("MTOMInOutTest"); - boolean pass = true; - - try { - Holder hDocName1 = new Holder(SDOC1); - Holder hDocName2 = new Holder(SDOC2); - Holder hDocName3 = new Holder(SDOC3); - Holder hDocName4 = new Holder(SDOC4); - - Holder hDocUrl1 = new Holder(docURL1.toString()); - Holder hDocUrl2 = new Holder(docURL2.toString()); - Holder hDocUrl3 = new Holder(docURL3.toString()); - Holder hDocUrl4 = new Holder(docURL4.toString()); - Holder hDocUrl11 = new Holder(docURL11.toString()); - Holder hDocUrl12 = new Holder(docURL12.toString()); - Holder hDocUrl13 = new Holder(docURL13.toString()); - Holder hDocUrl14 = new Holder(docURL14.toString()); - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - Holder hDoc1 = new Holder(doc1); - Holder hDoc2 = new Holder(doc2); - Holder hDoc3 = new Holder(doc3); - Holder hDoc4 = new Holder(doc4); - Holder hResult = new Holder(""); - TestUtil.logMsg( - "Send and receive 4 documents using MTOM via webservice method mtomInOut()"); - TestUtil.logMsg("Documents to send: [" + SDOC1 + "," + SDOC2 + "," + SDOC3 - + "," + SDOC4 + "]"); - TestUtil.logMsg("Documents to receive: [" + SDOC11 + "," + SDOC12 + "," - + SDOC13 + "," + SDOC14 + "]"); - port.mtomInOut(hDocName1, hDocName2, hDocName3, hDocName4, hDocUrl1, - hDocUrl2, hDocUrl3, hDocUrl4, hDocUrl11, hDocUrl12, hDocUrl13, - hDocUrl14, hDoc1, hDoc2, hDoc3, hDoc4, hResult); - if (!(hResult.value).equals("")) { - TestUtil.logErr("Server-side errors occurred:\n" + hResult.value); - pass = false; - } - TestUtil.logMsg("Verify the contents of the received documents"); - - doc1 = AttachmentHelper.getSourceDoc(docURL11); - doc2 = AttachmentHelper.getSourceDoc(docURL12); - doc3 = AttachmentHelper.getDataHandlerDoc(docURL13); - doc4 = AttachmentHelper.getImageDoc(docURL14); - - // Now test the documents that were sent back by Server - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, hDoc1.value, - SDOC11); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, hDoc2.value, - SDOC12); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, hDoc3.value, - SDOC13); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, hDoc4.value, - SDOC14); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - if (pass) - TestUtil.logMsg("All received documents are as expected (ok)"); - - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("MTOMInOutTest failed"); - } - - /* - * @testName: MTOMOutTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:4013; JAXWS:SPEC:10022; JAXWS:SPEC:2080; JAXWS:SPEC:3054; - * - * @test_Strategy: Test MTOM attachments on output. - */ - public void MTOMOutTest() throws Fault { - TestUtil.logMsg("MTOMOutTest"); - boolean pass = true; - - try { - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - String urls = docURL1.toString() + "," + docURL2.toString() + "," - + docURL3.toString() + "," + docURL4.toString(); - TestUtil.logTrace("urls=" + urls); - TestUtil.logMsg( - "Receive 4 documents using MTOM via webservice method mtomOut()"); - TestUtil.logMsg("Documents to receive: [" + SDOC1 + "," + SDOC2 + "," - + SDOC3 + "," + SDOC4 + "]"); - DataType data = port.mtomOut(urls); - TestUtil.logMsg("Verify the contents of the received documents"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, - data.getDoc1(), SDOC1); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, data.getDoc2(), - SDOC2); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, data.getDoc3(), - SDOC3); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, data.getDoc4(), - SDOC4); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - if (pass) - TestUtil.logMsg("All received documents are as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("MTOMOutTest failed"); - } - - /* - * @testName: MTOMInOut2RequestCheckHttpHeadersTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:4013; JAXWS:SPEC:10022; JAXWS:SPEC:10024; JAXWS:SPEC:2080; - * JAXWS:SPEC:3054; - * - * @test_Strategy: Test MTOM HTTP Content-Type Header for correctness. - */ - public void MTOMInOut2RequestCheckHttpHeadersTest() throws Fault { - TestUtil.logMsg("MTOMInOut2RequestCheckHttpHeadersTest"); - boolean pass = true; - - try { - Image doc = AttachmentHelper.getImageDoc(docURLBigJpeg); - Holder hDoc = new Holder(doc); - Holder hString = new Holder( - "MTOMInOut2RequestCheckHttpHeadersTest"); - TestUtil.logMsg("Check Content-Type HTTP Request header for correctness"); - client2.mtomInOut2(hString, hDoc); - TestUtil.logMsg("Content-Type HTTP Request header was correct (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("MTOMInOut2RequestCheckHttpHeadersTest failed"); - } - - /* - * @testName: MTOMInOut2ResponseCheckHttpHeadersTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:4013; JAXWS:SPEC:10022; JAXWS:SPEC:10024; - * - * @test_Strategy: Test MTOM HTTP Content-Type Header for correctness. - */ - public void MTOMInOut2ResponseCheckHttpHeadersTest() throws Fault { - TestUtil.logMsg("MTOMInOut2ResponseCheckHttpHeadersTest"); - boolean pass = true; - - try { - Image doc = AttachmentHelper.getImageDoc(docURLBigJpeg); - Holder hDoc = new Holder(doc); - Holder hString = new Holder( - "MTOMInOut2ResponseCheckHttpHeadersTest"); - TestUtil - .logMsg("Check Content-Type HTTP Response header for correctness"); - client2.mtomInOut2(hString, hDoc); - TestUtil.logMsg("Content-Type HTTP Response header was correct (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("MTOMInOut2ResponseCheckHttpHeadersTest failed"); - } - - /* - * @testName: MTOMOut2Test - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:4013; JAXWS:SPEC:2080; JAXWS:SPEC:3054; - * - * @test_Strategy: Test MTOM attachments on output. - */ - public void MTOMOut2Test() throws Fault { - TestUtil.logMsg("MTOMOut2Test"); - boolean pass = true; - - try { - - Image doc = AttachmentHelper.getImageDoc(docURLBigJpeg); - String urls = docURLBigJpeg.toString(); - TestUtil.logMsg("urls=" + urls); - TestUtil.logMsg( - "Receive 1 document using MTOM via webservice method mtomOut2()"); - TestUtil.logMsg("Document to receive: [" + SDOCBigJpeg + "]"); - DataType3 data = port.mtomOut2(urls); - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc(), SDOCBigJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("MTOMOut2Test failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/ClientSOAPHandler.java deleted file mode 100644 index 1e39ee75a2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/ClientSOAPHandler.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; - -import java.util.Map; -import java.util.List; - -public class ClientSOAPHandler extends HTTPSOAPHandler { - - private static final String PASSED = "PASSED"; - - private static final String FAILED = "FAILED"; - - protected void processInboundMessage(SOAPMessageContext context) { - System.out.println("in processInboundMessage"); - if (Handler_Util.checkForMsg(context, - "MTOMInOut2ResponseCheckHttpHeadersTest")) { - JAXWS_Util.dumpHTTPHeaders(context); - Map> map = (Map>) context - .get(MessageContext.HTTP_RESPONSE_HEADERS); - String result = verifyContentTypeHttpHeader(map); - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ClientSOAPHandler:processInboundMessage: " + result); - } - } - } - - /** - * Verifies the contents of the Content-Type HTTP header - * - * @param request - * the HTTP servlet request. - */ - protected String verifyContentTypeHttpHeader(Map> map) { - System.out.println("in verifyContentTypeHttpHeader"); - String result = FAILED; - Map> map2 = JAXWS_Util.convertKeysToLowerCase(map); - List values = map2.get("content-type"); - System.out.println("DEBUG: HTTP Content-Type header=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if ((sValues.indexOf("multipart/related") >= 0) - && (sValues.indexOf("text/xml") >= 0) - && (sValues.indexOf("application/xop+xml") >= 0)) { - result = PASSED; - } else { - result = FAILED - + ": HTTP Content-Type header does not contain expected [multipart/related, text/xml, application/xop+xml]"; - } - } else { - result = FAILED + ": HTTP Content-Type header not found"; - } - System.out.println("result=" + result); - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/MTOMClientTwo.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/MTOMClientTwo.java deleted file mode 100644 index 126f0a99e3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/MTOMClientTwo.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.SOAPBinding; -import java.awt.Image; - -public class MTOMClientTwo extends SOAPClient { - - public MTOMClientTwo(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public MTOMClientTwo(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace("http://mtomtestservice.org/wsdl"); - stubContext.setService("MTOMTestService"); - stubContext.setPort("MTOMTestTwoPort"); - stubContext.setEndpointInterface(MTOMTestTwo.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "w2jdlmtomtest.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "w2jdlmtomtest.wsdlloc.2"; - } - - public void mtomInOut2(Holder s, Holder h) throws Exception { - MTOMTestTwo port = (MTOMTestTwo) stubContext.getStub(); - SOAPBinding binding = (SOAPBinding) ((BindingProvider) port).getBinding(); - binding.setMTOMEnabled(true); - port.mtomInOut2(s, h); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/MTOMTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/MTOMTestImpl.java deleted file mode 100644 index 20709f18ca..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/MTOMTestImpl.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import java.awt.Image; -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; -import jakarta.activation.DataHandler; -import javax.xml.transform.Source; - -@WebService(portName = "MTOMTestPort", serviceName = "MTOMTestService", targetNamespace = "http://mtomtestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JDLMTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.MTOMTest") -@BindingType(SOAPBinding.SOAP11HTTP_MTOM_BINDING) - -public class MTOMTestImpl implements MTOMTest { - - public String mtomIn( - com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.DataType data) { - System.out.println("--------------------------"); - System.out.println("In mtomIn"); - - String result = ""; - - try { - - String docName1 = data.getDocName1(); - String docName2 = data.getDocName2(); - String docName3 = data.getDocName3(); - String docName4 = data.getDocName4(); - System.out.println("docName1=" + docName1); - System.out.println("docName2=" + docName2); - System.out.println("docName3=" + docName3); - System.out.println("docName4=" + docName4); - - URL docURL1 = new URL(data.getDocUrl1()); - URL docURL2 = new URL(data.getDocUrl2()); - URL docURL3 = new URL(data.getDocUrl3()); - URL docURL4 = new URL(data.getDocUrl4()); - System.out.println("docURL1=" + docURL1.toString()); - System.out.println("docURL2=" + docURL2.toString()); - System.out.println("docURL3=" + docURL3.toString()); - System.out.println("docURL4=" + docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, - data.getDoc1(), docName1); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, data.getDoc2(), - docName2); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, data.getDoc3(), - docName3); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, data.getDoc4(), - docName4); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } - - public void mtomInOut(Holder hDocName1, Holder hDocName2, - Holder hDocName3, Holder hDocName4, - Holder hDocUrl1, Holder hDocUrl2, Holder hDocUrl3, - Holder hDocUrl4, Holder hDocUrl11, - Holder hDocUrl12, Holder hDocUrl13, - Holder hDocUrl14, Holder hDoc1, Holder hDoc2, - Holder hDoc3, Holder hDoc4, Holder hResult) { - - System.out.println("--------------------------"); - System.out.println("In mtomInOut"); - String result = ""; - try { - - String docName1 = hDocName1.value; - String docName2 = hDocName2.value; - String docName3 = hDocName3.value; - String docName4 = hDocName4.value; - System.out.println("docName1=" + docName1); - System.out.println("docName2=" + docName2); - System.out.println("docName3=" + docName3); - System.out.println("docName4=" + docName4); - - URL docURL1 = new URL(hDocUrl1.value); - URL docURL2 = new URL(hDocUrl2.value); - URL docURL3 = new URL(hDocUrl3.value); - URL docURL4 = new URL(hDocUrl4.value); - - System.out.println("docURL1=" + docURL1.toString()); - System.out.println("docURL2=" + docURL2.toString()); - System.out.println("docURL3=" + docURL3.toString()); - System.out.println("docURL4=" + docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, hDoc1.value, - docName1); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, hDoc2.value, - docName2); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, hDoc3.value, - docName3); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, hDoc4.value, - docName4); - if (tmpRes != null) { - result = result + tmpRes; - } - - URL docURL11 = new URL(hDocUrl11.value); - URL docURL12 = new URL(hDocUrl12.value); - URL docURL13 = new URL(hDocUrl13.value); - URL docURL14 = new URL(hDocUrl14.value); - - System.out.println("docURL11=" + docURL11.toString()); - System.out.println("docURL12=" + docURL12.toString()); - System.out.println("docURL13=" + docURL13.toString()); - System.out.println("docURL14=" + docURL14.toString()); - - hDoc1.value = AttachmentHelper.getSourceDoc(docURL11); - hDoc2.value = AttachmentHelper.getSourceDoc(docURL12); - hDoc3.value = AttachmentHelper.getDataHandlerDoc(docURL13); - hDoc4.value = AttachmentHelper.getImageDoc(docURL14); - - hResult.value = result; - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - } - - public com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.DataType mtomOut( - String urls) { - System.out.println("--------------------------"); - System.out.println("In mtomOut"); - - System.out.println("urls=" + urls); - String[] tmpUrls = urls.split(","); - - for (int i = 0; i < tmpUrls.length; i++) { - System.out.println("url[" + i + "]=" + tmpUrls[i]); - } - - DataType d = new DataType(); - try { - URL docURL1 = new URL(tmpUrls[0]); - URL docURL2 = new URL(tmpUrls[1]); - URL docURL3 = new URL(tmpUrls[2]); - URL docURL4 = new URL(tmpUrls[3]); - - d.setDocUrl1(docURL1.toString()); - d.setDocUrl2(docURL2.toString()); - d.setDocUrl3(docURL3.toString()); - d.setDocUrl4(docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - d.setDoc1(doc1); - d.setDoc2(doc2); - d.setDoc3(doc3); - d.setDoc4(doc4); - - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return d; - } - - public com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.DataType3 mtomOut2( - String urls) { - System.out.println("--------------------------"); - System.out.println("In mtomOut2"); - - System.out.println("urls=" + urls); - String[] tmpUrls = urls.split(","); - - for (int i = 0; i < tmpUrls.length; i++) { - System.out.println("url[" + i + "]=" + tmpUrls[i]); - } - - DataType3 d = new DataType3(); - try { - URL docURL = new URL(tmpUrls[0]); - Image doc = AttachmentHelper.getImageDoc(docURL); - d.setDoc(doc); - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return d; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/MTOMTestTwoImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/MTOMTestTwoImpl.java deleted file mode 100644 index 92a917c5e3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/MTOMTestTwoImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; - -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import java.awt.Image; - -@WebService(portName = "MTOMTestTwoPort", serviceName = "MTOMTestService", targetNamespace = "http://mtomtestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JDLMTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.MTOMTestTwo") -@BindingType(SOAPBinding.SOAP11HTTP_MTOM_BINDING) - -public class MTOMTestTwoImpl implements MTOMTestTwo { - - public void mtomInOut2(jakarta.xml.ws.Holder testname, - jakarta.xml.ws.Holder image) { - System.out.println("--------------------------"); - System.out.println("In mtomInOut2"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/ServerSOAPHandler.java deleted file mode 100644 index 94af09f5c3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/ServerSOAPHandler.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; - -import java.util.Map; -import java.util.List; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - private static final String PASSED = "PASSED"; - - private static final String FAILED = "FAILED"; - - protected void processInboundMessage(SOAPMessageContext context) { - System.out.println("in processInboundMessage"); - if (Handler_Util.checkForMsg(context, - "MTOMInOut2RequestCheckHttpHeadersTest")) { - JAXWS_Util.dumpHTTPHeaders(context); - Map> map = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - String result = verifyContentTypeHttpHeader(map); - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: " + result); - } - } - } - - /** - * Verifies the contents of the Content-Type HTTP header - * - * @param request - * the HTTP servlet request. - */ - protected String verifyContentTypeHttpHeader(Map> m) { - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("DEBUG: HTTP Content-Type header=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if ((sValues.indexOf("multipart/related") >= 0) - && (sValues.indexOf("text/xml") >= 0) - && (sValues.indexOf("application/xop+xml") >= 0)) { - result = PASSED; - } else { - result = FAILED - + ": HTTP Content-Type header does not contain expected [multipart/related, text/xml, application/xop+xml]"; - } - } else { - result = FAILED + ": HTTP Content-Type header not found"; - } - System.out.println("result=" + result); - return result; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/WSW2JDLMTOMTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/WSW2JDLMTOMTestService.wsdl deleted file mode 100644 index 7ccea9680b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/WSW2JDLMTOMTestService.wsdl +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/build.xml deleted file mode 100644 index 1ecb43d7cb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/build.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestapplication.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestapplication.xml deleted file mode 100644 index 5a6b4524af..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestapplication.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Simple example of application - Simple example - - ejb1.jar - - - ejb2.jar - - - - web.war - web - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestapplication2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestapplication2.xml deleted file mode 100644 index e298f72a57..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestapplication2.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Second Simple example of application - Second Simple example - - ejb3.jar - - - ejb4.jar - - - - web.war - secondWeb - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestattach.html b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestattach.html deleted file mode 100644 index 0404eb3cc0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestattach.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -This is a title - - -

This is a starting point


-

This is a header

-

This is a paragraph

-
    -
  • This is a bullet

  • -
- - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestattach.jpg b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestattach.jpg deleted file mode 100644 index 02d864db47..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestattach.jpg and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestattach2.html b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestattach2.html deleted file mode 100644 index 9a2133dc20..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestattach2.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -This is the second title - - -

This is the second starting point

-

This is the second header

-

This is the second paragraph

-
    -
  • This is the second bullet

  • -
- - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestattach2.jpg b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestattach2.jpg deleted file mode 100644 index 02d864db47..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestattach2.jpg and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestbig.jpg b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestbig.jpg deleted file mode 100644 index c6988d3efa..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTestbig.jpg and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTesttext.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTesttext.xml deleted file mode 100644 index a9fcc9a1e1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTesttext.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - http - - - - - http://www.wombats.com/remote/sender - - - http://127.0.0.1:8081/jaxm-provider/receiver/ebxml - - - - - - - 5 - - - 2000 - - - - - - - ebxml/ - - - 10 - - - - - - - https - - - - - jaxm.dummy.uri - - - https://127.0.0.1:8443/jaxm/dummy/ - - - - - - ebxml-https/ - - - 10 - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTesttext2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTesttext2.xml deleted file mode 100644 index 332bc47bab..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/contentRoot/WSW2JDLMTOMTesttext2.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - W2JDLMTOMTestApp2 - - com.sun.ts.tests.jaxws.common.JAXWSContextListener - - - MTOMTest2 - com.sun.ts.tests.jaxws.common.JAXWSServlet - 1 - - - MTOMTest2 - /jaxws/MTOMTest2 - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/custom-client.xml deleted file mode 100644 index 53dfe27094..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/custom-client.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - ns1:MTOMTestTwoPort - - ClientSOAPHandler - com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.ClientSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/custom-server.xml deleted file mode 100644 index 3d57cf353a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/custom-server.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - ns1:MTOMTestTwoPort - - ServerSOAPHandler - com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.ServerSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/jakartaEE.tokens deleted file mode 100644 index 057dfad947..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JDLMTOMTestService") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.MTOMTestService -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.MTOMTestImpl -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.MTOMTestImpl -URLALIAS=/jaxws/MTOMTest -IMPL2=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.MTOMTestTwoImpl -SERVLETNAME2=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.MTOMTestTwoImpl -URLALIAS2=/jaxws/MTOMTestTwo -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.MTOMTest -SEI2=com.sun.ts.tests.jaxws.ee.w2j.document.literal.mtomtest.MTOMTestTwo -NAMESPACEURI=http://mtomtestservice.org/wsdl -PORT=MTOMTestPort -PORT2=MTOMTestTwoPort -WEBSERVICEDESCRIPTION=MTOMTestService -SERVICEREFNAMEWSSERVLET=service/WSW2JDLMTOMTestService -SERVICEREFNAMEWSEJB=service/WSW2JDLMTOMTestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JDLMTOMTestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/standalone-sun-jaxws.xml deleted file mode 100644 index ed29b2d710..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/standalone.web.xml deleted file mode 100644 index 722b59cf1c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/mtomtest/standalone.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - WSW2JDLMTOMTestApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - MTOMTest - com.sun.xml.ws.transport.http.servlet.WSServlet - - - MTOMTestTwo - com.sun.xml.ws.transport.http.servlet.WSServlet - - - MTOMTest - /jaxws/MTOMTest - - - MTOMTestTwo - /jaxws/MTOMTestTwo - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/build.xml deleted file mode 100644 index 9f6d5a0f9a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/Client.java deleted file mode 100644 index 780f65939f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/Client.java +++ /dev/null @@ -1,1351 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)Client.java 1.16 06/02/11 - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.handler.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private static final String CLIENTDELAY = "client.delay"; - - private String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private int clientDelay = 1; - - private static final String HARNESSHOST = "harness.host"; - - private String harnessHost = null; - - private static final String HARNESSLOGPORT = "harness.log.port"; - - private String harnessLogPort = null; - - private static final String TRACEFLAG = "harness.log.traceflag"; - - private String harnessLogTraceFlag = "false"; // false or true - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String WSDLLOC_URL = "dlowhandlertest.wsdlloc.1"; - - private static final String ENDPOINT1_URL = "dlowhandlertest.endpoint.1"; - - private static final String ENDPOINT4_URL = "dlowhandlertest.endpoint.2"; - - private String url1 = null; - - private String url4 = null; - - private URL wsdlurl = null; - - // service and port information - private static final String NAMESPACEURI = "http://dlowhandlertestservice.org/wsdl"; - - private static final String SERVICE_NAME = "DLOWHandlerTestService"; - - private static final String PORT_NAME1 = "HelloPort"; - - private static final String PORT_NAME4 = "GetTrackerDataPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.DLOWHandlerTestService.class; - - private static final String THEBINDINGPROTOCOL = jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING; - - private static final String LOGICAL = "Logical"; - - private static final String SOAP = "SOAP"; - - private static final String TEST_TYPE = LOGICAL + "Test"; - - private Handler handler = null; - - Hello port1 = null; - - GetTrackerData port4 = null; - - static DLOWHandlerTestService service = null; - - BindingProvider bp1 = null; - - BindingProvider bp4 = null; - - Binding binding1 = null; - - Binding binding4 = null; - - List listOfBindings = new ArrayList(); - - List port1HandlerChain = null; - - List port4HandlerChain = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT1_URL); - url1 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT4_URL); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint1 URL: " + url1); - TestUtil.logMsg("Service Endpoint4 URL: " + url4); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private boolean setupPorts() { - boolean result = true; - TestUtil.logTrace("entering setupPorts"); - try { - if (modeProperty.equals("standalone")) { - getPortsStandalone(); - } else { - getPortsJavaEE(); - } - } catch (Exception e) { - TestUtil.logErr("Could not setup stubs properly"); - TestUtil.printStackTrace(e); - result = false; - } - TestUtil.logTrace("leaving setupPorts"); - return result; - - } - - private void getPortsStandalone() throws Exception { - getPorts(); - JAXWS_Util.setTargetEndpointAddress(port1, url1); - JAXWS_Util.setTargetEndpointAddress(port4, url4); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - getTargetEndpointAddress(port1, port4); - } - - private void getTargetEndpointAddress(Object port1, Object port4) - throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port1=" + port1); - String url1 = JAXWS_Util.getTargetEndpointAddress(port1); - TestUtil.logMsg("Target Endpoint Address=" + url1); - TestUtil.logMsg("Get Target Endpoint Address for port4=" + port4); - String url4 = JAXWS_Util.getTargetEndpointAddress(port4); - TestUtil.logMsg("Target Endpoint Address=" + url4); - } - - private void getPorts() throws Exception { - TestUtil.logTrace("entering getPorts"); - - TestUtil.logMsg("Get port 1 = " + PORT_NAME1); - port1 = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port1=" + port1); - - TestUtil.logMsg("Get port 4 = " + PORT_NAME4); - port4 = (GetTrackerData) service.getPort(GetTrackerData.class); - TestUtil.logMsg("port4=" + port4); - - TestUtil.logMsg("Get binding for port 1 = " + PORT_NAME1); - bp1 = (BindingProvider) port1; - binding1 = bp1.getBinding(); - port1HandlerChain = binding1.getHandlerChain(); - TestUtil.logMsg("Port1 HandlerChain =" + port1HandlerChain); - TestUtil.logMsg("Port1 HandlerChain size = " + port1HandlerChain.size()); - - TestUtil.logMsg("------------------------------------------------------"); - - TestUtil.logMsg("Get binding for port 4 = " + PORT_NAME4); - bp4 = (BindingProvider) port4; - binding4 = bp4.getBinding(); - port4HandlerChain = binding4.getHandlerChain(); - TestUtil.logMsg("Port4 HandlerChain=" + port4HandlerChain); - TestUtil.logMsg("Port4 HandlerChain size = " + port4HandlerChain.size()); - - listOfBindings.add(binding1); - listOfBindings.add(binding4); - - TestUtil.logTrace("leaving getPorts"); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * client.delay; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - try { - harnessHost = p.getProperty(HARNESSHOST); - } catch (Exception e) { - harnessHost = null; - } - try { - harnessLogPort = p.getProperty(HARNESSLOGPORT); - } catch (Exception e) { - harnessLogPort = null; - } - try { - harnessLogTraceFlag = p.getProperty(TRACEFLAG); - } catch (Exception e) { - harnessLogTraceFlag = "false"; - } - try { - clientDelay = Integer.parseInt(p.getProperty(CLIENTDELAY)); - } catch (Exception e) { - TestUtil.logMsg("An ERROR occurred for the property " + CLIENTDELAY - + ", using default value of " + clientDelay + " second"); - TestUtil.printStackTrace(e); - } - - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (DLOWHandlerTestService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (DLOWHandlerTestService) getSharedObject(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: ClientOneWayHandlerTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9012; - * JAXWS:SPEC:9014; JAXWS:SPEC:9015.1; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the client-side - * logical message handler callbacks are called. - */ - public void ClientOneWayHandlerTest() throws Fault { - TestUtil.logTrace("ClientOneWayHandlerTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler1, ClientLogicalHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler1(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientSOAPHandler2, ClientLogicalHandler2"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler2(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler3(); - handlerList.add(handler); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyAction ma = new MyAction(); - ma.setAction("ClientLogicalTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - if (!Handler_Util.VerifyOneWayCallbacks("Client", Constants.OUTBOUND, - clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientOneWayHandlerTest failed"); - } - - /* - * @testName: ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.3.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest() - throws Fault { - TestUtil.logTrace("ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler1, ClientLogicalHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler1(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientSOAPHandler2, ClientLogicalHandler2"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler2(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler3(); - handlerList.add(handler); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyAction ma = new MyAction(); - ma.setAction("ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - if (!Handler_Util.VerifyOneWaySOAPFaultCallbacks("Client", - Constants.OUTBOUND, LOGICAL, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest failed"); - } - - /* - * @testName: ClientSOAPOutboundHandleMessageThrowsSOAPFaultTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.3.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ClientSOAPOutboundHandleMessageThrowsSOAPFaultTest() - throws Fault { - TestUtil.logTrace("ClientSOAPOutboundHandleMessageThrowsSOAPFaultTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientLogicalHandler1, ClientSOAPHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler1(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientLogicalHandler2, ClientSOAPHandler2"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler2(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler3(); - handlerList.add(handler); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyAction ma = new MyAction(); - ma.setAction("ClientSOAPOutboundHandleMessageThrowsSOAPFaultTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - if (!Handler_Util.VerifyOneWaySOAPFaultCallbacks("Client", - Constants.OUTBOUND, SOAP, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientSOAPOutboundHandleMessageThrowsSOAPFaultTest failed"); - } - - /* - * @testName: ClientLogicalOutboundHandleMessageReturnsFalseTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.2.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ClientLogicalOutboundHandleMessageReturnsFalseTest() - throws Fault { - TestUtil.logTrace("ClientLogicalOutboundHandleMessageReturnsFalseTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler1, ClientLogicalHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler1(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientSOAPHandler2, ClientLogicalHandler2"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler2(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler3(); - handlerList.add(handler); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyAction ma = new MyAction(); - ma.setAction("ClientLogicalOutboundHandleMessageReturnsFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - if (!Handler_Util.VerifyOneWayHandleMessageFalseCallbacks("Client", - Constants.OUTBOUND, LOGICAL, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalOutboundHandleMessageReturnsFalseTest failed"); - } - - /* - * @testName: ClientSOAPOutboundHandleMessageReturnsFalseTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.2.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ClientSOAPOutboundHandleMessageReturnsFalseTest() throws Fault { - TestUtil.logTrace("ClientSOAPOutboundHandleMessageReturnsFalseTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientLogicalHandler1, ClientSOAPHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler1(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientLogicalHandler2, ClientSOAPHandler2"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler2(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientLogicalHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.ClientSOAPHandler3(); - handlerList.add(handler); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyAction ma = new MyAction(); - ma.setAction("ClientSOAPOutboundHandleMessageReturnsFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - if (!Handler_Util.VerifyOneWayHandleMessageFalseCallbacks("Client", - Constants.OUTBOUND, SOAP, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientSOAPOutboundHandleMessageReturnsFalseTest failed"); - } - - /* - * @testName: ServerLogicalHandlerTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.1; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerLogicalHandlerTest() throws Fault { - TestUtil.logTrace("ServerLogicalHandlerTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyAction ma = new MyAction(); - ma.setAction("ServerLogicalTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - // MyResultType mr = null; - try { - // mr = port1.doHandlerTest1(ma); - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - StringBuffer sb = new StringBuffer(); - sb.append( - "\n-------------------------------------------------------------------\n"); - sb.append("Sleeping: " + clientDelay - + " second(s) before getting results from server\n"); - sb.append( - "-------------------------------------------------------------------\n"); - TestUtil.logMsg(sb.toString()); - TestUtil.sleepSec(clientDelay); - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyOneWayCallbacks("Server", Constants.INBOUND, - serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault("ServerLogicalHandlerTest failed"); - } - - /* - * @testName: ServerLogicalInboundHandleMessageThrowsSOAPFaultTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.3.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerLogicalInboundHandleMessageThrowsSOAPFaultTest() - throws Fault { - TestUtil.logTrace("ServerLogicalInboundHandleMessageThrowsSOAPFaultTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyAction ma = new MyAction(); - ma.setAction("ServerLogicalInboundHandleMessageThrowsSOAPFaultTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - // MyResultType mr = null; - try { - // mr = port1.doHandlerTest1(ma); - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - StringBuffer sb = new StringBuffer(); - sb.append( - "\n-------------------------------------------------------------------\n"); - sb.append("Sleeping: " + clientDelay - + " second(s) before getting results from server\n"); - sb.append( - "-------------------------------------------------------------------\n"); - TestUtil.logMsg(sb.toString()); - TestUtil.sleepSec(clientDelay); - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyOneWaySOAPFaultCallbacks("Server", - Constants.INBOUND, LOGICAL, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault( - "ServerLogicalInboundHandleMessageThrowsSOAPFaultTest failed"); - } - - /* - * @testName: ServerSOAPInboundHandleMessageThrowsSOAPFaultTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.3.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerSOAPInboundHandleMessageThrowsSOAPFaultTest() throws Fault { - TestUtil.logTrace("ServerSOAPInboundHandleMessageThrowsSOAPFaultTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyAction ma = new MyAction(); - ma.setAction("ServerSOAPInboundHandleMessageThrowsSOAPFaultTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - // MyResultType mr = null; - try { - // mr = port1.doHandlerTest1(ma); - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - StringBuffer sb = new StringBuffer(); - sb.append( - "\n-------------------------------------------------------------------\n"); - sb.append("Sleeping: " + clientDelay - + " second(s) before getting results from server\n"); - sb.append( - "-------------------------------------------------------------------\n"); - TestUtil.logMsg(sb.toString()); - TestUtil.sleepSec(clientDelay); - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyOneWaySOAPFaultCallbacks("Server", - Constants.INBOUND, SOAP, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault( - "ServerSOAPInboundHandleMessageThrowsSOAPFaultTest failed"); - } - - /* - * @testName: ServerLogicalInboundHandleMessageReturnsFalseTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.2.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerLogicalInboundHandleMessageReturnsFalseTest() throws Fault { - TestUtil.logTrace("ServerLogicalInboundHandleMessageReturnsFalseTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyAction ma = new MyAction(); - ma.setAction("ServerLogicalInboundHandleMessageReturnsFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - // MyResultType mr = null; - try { - // mr = port1.doHandlerTest1(ma); - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - StringBuffer sb = new StringBuffer(); - sb.append( - "\n-------------------------------------------------------------------\n"); - sb.append("Sleeping: " + clientDelay - + " second(s) before getting results from server\n"); - sb.append( - "-------------------------------------------------------------------\n"); - TestUtil.logMsg(sb.toString()); - TestUtil.sleepSec(clientDelay); - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyOneWayHandleMessageFalseCallbacks("Server", - Constants.INBOUND, LOGICAL, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault( - "ServerLogicalInboundHandleMessageReturnsFalseTest failed"); - } - - /* - * @testName: ServerSOAPInboundHandleMessageReturnsFalseTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.2.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerSOAPInboundHandleMessageReturnsFalseTest() throws Fault { - TestUtil.logTrace("ServerSOAPInboundHandleMessageReturnsFalseTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyAction ma = new MyAction(); - ma.setAction("ServerSOAPInboundHandleMessageReturnsFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - // MyResultType mr = null; - try { - // mr = port1.doHandlerTest1(ma); - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - StringBuffer sb = new StringBuffer(); - sb.append( - "\n-------------------------------------------------------------------\n"); - sb.append("Sleeping: " + clientDelay - + " second(s) before getting results from server\n"); - sb.append( - "-------------------------------------------------------------------\n"); - TestUtil.logMsg(sb.toString()); - TestUtil.sleepSec(clientDelay); - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyOneWayHandleMessageFalseCallbacks("Server", - Constants.INBOUND, SOAP, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault("ServerSOAPInboundHandleMessageReturnsFalseTest failed"); - } - - private void purgeServerSideTrackerData() { - try { - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("purge"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - port4.getTrackerData(gtda); - } catch (Exception e) { - TestUtil.logErr("Call to purge server-side tracker data failed:" + e); - } - } - - static class MyStatus { - private boolean status = true; - - public void setStatus(boolean b) { - status = b; - } - - public boolean getStatus() { - return status; - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientLogicalHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientLogicalHandler1.java deleted file mode 100644 index 0c93bb3f35..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientLogicalHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ClientLogicalHandler1 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler1"; - - public ClientLogicalHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientLogicalHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientLogicalHandler2.java deleted file mode 100644 index 5f21c2d410..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientLogicalHandler2.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Constants; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.soap.SOAPFault; -import jakarta.xml.soap.Name; -import jakarta.xml.ws.handler.LogicalMessageContext; - -public class ClientLogicalHandler2 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler2"; - - private static final String NAMESPACEURI = "http://dlowhandlertestservice.org/wsdl"; - - private static final QName FAULTCODE = new QName(NAMESPACEURI, - "ItsASoapFault", "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private SOAPFault sf; - - public ClientLogicalHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - try { - preinvoke(); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - String direction = Handler_Util.getDirection(context); - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.OUTBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ClientLogicalHandler2.handleMessage throwing an outbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleMessageReturnsFalseTest")) { - HandlerTracker.reportComment(this, "HandleMessage returns false"); - return false; - } - } - } else { - TestUtil.logTrace("found GetTrackerData message, handler will ignore"); - } - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientLogicalHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientLogicalHandler3.java deleted file mode 100644 index cde919a1f2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientLogicalHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ClientLogicalHandler3 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler3"; - - public ClientLogicalHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientSOAPHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientSOAPHandler1.java deleted file mode 100644 index 2cec7740fb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientSOAPHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ClientSOAPHandler1 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler1"; - - public ClientSOAPHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientSOAPHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientSOAPHandler2.java deleted file mode 100644 index b405492f37..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientSOAPHandler2.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Constants; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.soap.SOAPFault; -import jakarta.xml.soap.Name; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ClientSOAPHandler2 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler2"; - - private static final String NAMESPACEURI = "http://dlowhandlertestservice.org/wsdl"; - - private static final QName FAULTCODE = new QName(NAMESPACEURI, - "ItsASoapFault", "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private SOAPFault sf; - - public ClientSOAPHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - try { - preinvoke(); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - String direction = Handler_Util.getDirection(context); - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.OUTBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleMessageThrowsSOAPFaultTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ClientSOAPHandler2.handleMessage throwing an outbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, - new Exception( - "Unexpected errorin handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleMessageReturnsFalseTest")) { - HandlerTracker.reportComment(this, "HandleMessage returns false"); - return false; - } - } - } else { - TestUtil.logTrace("found GetTrackerData message, handler will ignore"); - } - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientSOAPHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientSOAPHandler3.java deleted file mode 100644 index f9ce019c0c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/ClientSOAPHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ClientSOAPHandler3 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler3"; - - public ClientSOAPHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/build.xml deleted file mode 100644 index 4bb7f3f63f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/customfile.xml deleted file mode 100644 index 29d4f89cf6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/customfile.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/handler_process_flow2.pdf b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/handler_process_flow2.pdf deleted file mode 100644 index 4e3af23087..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/handler_process_flow2.pdf and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/jakartaEE.tokens deleted file mode 100644 index 5e7d5c5bb1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/client/jakartaEE.tokens +++ /dev/null @@ -1,8 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsdlowhandlertestservice") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.client.DLOWHandlerTestService -URLALIAS=/jaxws/Hello -URLALIAS4=/jaxws/GetTrackerData -WEBSERVICEDESCRIPTION=DLOWHandlerTestService -SERVICEREFNAMEWSSERVLET=service/wsdlowhandlertestservice -SERVICEREFNAMEWSEJB=service/wsdlowhandlertestservice -SERVICEREFNAMEWSAPPCLIENT=service/wsdlowhandlertestservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/GetTrackerDataImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/GetTrackerDataImpl.java deleted file mode 100644 index c521cd994e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/GetTrackerDataImpl.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "GetTrackerDataPort", targetNamespace = "http://dlowhandlertestservice.org/wsdl", serviceName = "DLOWHandlerTestService", wsdlLocation = "WEB-INF/wsdl/WSDLOWHandlerTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.GetTrackerData") - -public class GetTrackerDataImpl implements GetTrackerData { - public GetTrackerDataResult getTrackerData(GetTrackerDataAction action) { - - Handler_Util.setTraceFlag(action.getHarnesslogtraceflag()); - - Handler_Util.initTestUtil("GetTrackerDataImpl", action.getHarnessloghost(), - action.getHarnesslogport(), action.getHarnesslogtraceflag()); - - TestUtil.logTrace("*** in GetTrackerDataImpl ***"); - String[] messages = null; - - String theAction = action.getAction(); - TestUtil.logTrace("*** action = " + theAction + " ***"); - - if (theAction.equals("getArrayMessages1")) { - messages = HandlerTracker.getArrayMessages1(); - } else if (theAction.equals("getArrayMessages2")) { - messages = HandlerTracker.getArrayMessages2(); - } else if (theAction.equals("getArrayMessages3")) { - messages = HandlerTracker.getArrayMessages3(); - } else if (theAction.equals("getArrayMessages4")) { - messages = HandlerTracker.getArrayMessages4(); - } else if (theAction.equals("getArrayThrowables")) { - messages = HandlerTracker.getArrayThrowables(); - } else if (theAction.equals("purge")) { - HandlerTracker.purge(); - String m[] = { "purge complete" }; - messages = m; - } else { - String[] m = { - "Did not get one of the excepted GetTrackerData action messages, the action message received was:" - + theAction }; - messages = m; - } - - GetTrackerDataResult r = null; - try { - TestUtil.logTrace("The endpoint is sending back the following data:"); - TestUtil.logTrace("action=" + action.getAction()); - TestUtil.logTrace("harnessloghost=" + action.getHarnessloghost()); - TestUtil.logTrace("harnesslogport=" + action.getHarnesslogport()); - TestUtil - .logTrace("harnesslogtraceflag=" + action.getHarnesslogtraceflag()); - - r = new GetTrackerDataResult(); - for (int i = 0; i < messages.length; i++) { - r.getResult().add(messages[i]); - TestUtil.logTrace("message[" + i + "]=" + messages[i]); - } - - r.setHarnessloghost(action.getHarnessloghost()); - r.setHarnesslogport(action.getHarnesslogport()); - r.setHarnesslogtraceflag(action.getHarnesslogtraceflag()); - } catch (Exception e) { - throw new WebServiceException(e.getMessage(), e); - } - return r; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/HelloImpl.java deleted file mode 100644 index fb2fe858ee..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/HelloImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.*; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", targetNamespace = "http://dlowhandlertestservice.org/wsdl", serviceName = "DLOWHandlerTestService", wsdlLocation = "WEB-INF/wsdl/WSDLOWHandlerTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.Hello") - -public class HelloImpl implements Hello { - - public void doHandlerTest1( - com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.MyAction action) { - - Handler_Util.setTraceFlag(action.getHarnesslogtraceflag()); - - Handler_Util.initTestUtil("HelloImpl", action.getHarnessloghost(), - action.getHarnesslogport(), action.getHarnesslogtraceflag()); - - TestUtil.logTrace("*** in HelloImpl:doHandlerTest1 ***"); - String theAction = action.getAction(); - TestUtil.logTrace("*** action = " + theAction + " ***"); - String testType = action.getTestType(); - TestUtil.logTrace("*** testType = " + testType + " ***"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerLogicalHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerLogicalHandler1.java deleted file mode 100644 index 18994898a3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerLogicalHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ServerLogicalHandler1 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler1"; - - public ServerLogicalHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerLogicalHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerLogicalHandler2.java deleted file mode 100644 index 0b7f79b180..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerLogicalHandler2.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Constants; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.soap.SOAPFault; -import jakarta.xml.soap.Name; -import jakarta.xml.ws.handler.LogicalMessageContext; - -public class ServerLogicalHandler2 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler2"; - - private static final String NAMESPACEURI = "http://dlowhandlertestservice.org/wsdl"; - - private static final QName FAULTCODE = new QName(NAMESPACEURI, - "ItsASoapFault", "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private SOAPFault sf; - - public ServerLogicalHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - try { - preinvoke(); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - String direction = Handler_Util.getDirection(context); - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerLogicalInboundHandleMessageThrowsSOAPFaultTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerLogicalHandler2.handleMessage throwing an inbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, - new Exception( - "Unexpected errorin handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ServerLogicalInboundHandleMessageReturnsFalseTest")) { - HandlerTracker.reportComment(this, "HandleMessage returns false"); - return false; - } - } - } else { - TestUtil.logTrace("found GetTrackerData message, handler will ignore"); - } - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerLogicalHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerLogicalHandler3.java deleted file mode 100644 index 081fdd7a6b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerLogicalHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ServerLogicalHandler3 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler3"; - - public ServerLogicalHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerSOAPHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerSOAPHandler1.java deleted file mode 100644 index d2b5fd84e3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerSOAPHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ServerSOAPHandler1 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler1"; - - public ServerSOAPHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerSOAPHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerSOAPHandler2.java deleted file mode 100644 index 6f10556a58..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerSOAPHandler2.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Constants; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.soap.SOAPFault; -import jakarta.xml.soap.Name; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ServerSOAPHandler2 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler2"; - - private static final String NAMESPACEURI = "http://dlowhandlertestservice.org/wsdl"; - - private static final QName FAULTCODE = new QName(NAMESPACEURI, - "ItsASoapFault", "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private SOAPFault sf; - - public ServerSOAPHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - try { - preinvoke(); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - String direction = Handler_Util.getDirection(context); - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerSOAPInboundHandleMessageThrowsSOAPFaultTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerSOAPHandler2.handleMessage throwing an inbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, - new Exception( - "Unexpected errorin handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ServerSOAPInboundHandleMessageReturnsFalseTest")) { - HandlerTracker.reportComment(this, "HandleMessage returns false"); - return false; - } - } - } else { - TestUtil.logTrace("found GetTrackerData message, handler will ignore"); - } - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerSOAPHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerSOAPHandler3.java deleted file mode 100644 index 0ea8c4c5e7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/ServerSOAPHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ServerSOAPHandler3 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler3"; - - public ServerSOAPHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/WSDLOWHandlerTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/WSDLOWHandlerTestService.wsdl deleted file mode 100644 index f07fefbe5c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/WSDLOWHandlerTestService.wsdl +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/build.xml deleted file mode 100644 index e049e90241..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/customfile.xml deleted file mode 100644 index 04a79cc843..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/customfile.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - -ervice"/> - - - - - - - - - - - ServerLogicalHandler1 - com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.ServerLogicalHandler1 - - - ServerSOAPHandler1 - com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.ServerSOAPHandler1 - - - - - - - - ns1:HelloPort - - ServerLogicalHandler2 - com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.ServerLogicalHandler2 - - - ServerSOAPHandler2 - com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.ServerSOAPHandler2 - - - - - - - - ##SOAP11_HTTP - - ServerLogicalHandler3 - com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.ServerLogicalHandler3 - - - ServerSOAPHandler3 - com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.ServerSOAPHandler3 - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/jakartaEE.tokens deleted file mode 100644 index 5d706e0915..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsdlowhandlertestservice") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.DLOWHandlerTestService -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.Hello -SEI4=com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.GetTrackerData -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.HelloImpl -IMPL4=com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.GetTrackerDataImpl -NAMESPACEURI=http://dlowhandlertestservice.org/wsdl -PORT=HelloPort -PORT4=GetTrackerDataPort -SERVLET=com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.HelloImpl -SERVLET4=com.sun.ts.tests.jaxws.ee.w2j.document.literal.onewayhandlertest.server.GetTrackerDataImpl -URLALIAS=/jaxws/Hello -URLALIAS4=/jaxws/GetTrackerData -WEBSERVICEDESCRIPTION=DLOWHandlerTestService -SERVICEREFNAMEWSSERVLET=service/wsdlowhandlertestservice -SERVICEREFNAMEWSEJB=service/wsdlowhandlertestservice -SERVICEREFNAMEWSAPPCLIENT=service/wsdlowhandlertestservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/jakartaEE.web.xml deleted file mode 100644 index 0c316e0c0b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @WEBSERVICEDESCRIPTION@App - - @SERVLET@ - @IMPL@ - 0 - - - @SERVLET4@ - @IMPL4@ - 0 - - - @SERVLET@ - @URLALIAS@ - - - @SERVLET4@ - @URLALIAS4@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/standalone-sun-jaxws.xml deleted file mode 100644 index eb00ecb1f8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/standalone.web.xml deleted file mode 100644 index 60a909c133..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/onewayhandlertest/server/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSHandlerServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -GetTrackerData -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -GetTrackerData -/jaxws/GetTrackerData - - -Hello -/jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/build.xml deleted file mode 100644 index ce0903ce11..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/Client.java deleted file mode 100644 index 4914312267..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/Client.java +++ /dev/null @@ -1,926 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.wrapperstyle.marshalltest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; - -import java.util.Properties; -import java.util.List; - -import java.math.BigInteger; -import java.math.BigDecimal; - -import javax.xml.namespace.QName; -import javax.xml.datatype.XMLGregorianCalendar; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.wrapperstyle.marshalltest."; - - // service and port information - private static final String NAMESPACEURI = "http://MarshallTest.org/"; - - private static final String SERVICE_NAME = "MarshallTestService"; - - private static final String PORT_NAME = "MarshallTestPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jdlwmarshalltest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jdlwmarshalltest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - MarshallTest port = null; - - static MarshallTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (MarshallTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MarshallTestService.class, PORT_QNAME, MarshallTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (MarshallTest) service.getMarshallTestPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (MarshallTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: MarshallSimpleTypesTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * JAXWS:SPEC:10011; JAXWS:SPEC:2024; JAXWS:SPEC:2027; - * - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void MarshallSimpleTypesTest() throws Fault { - TestUtil.logMsg("MarshallSimpleTypesTest"); - boolean pass = true; - - if (!StringTest()) - pass = false; - printSeperationLine(); - if (!IntegerTest()) - pass = false; - printSeperationLine(); - if (!IntTest()) - pass = false; - printSeperationLine(); - if (!LongTest()) - pass = false; - printSeperationLine(); - if (!ShortTest()) - pass = false; - printSeperationLine(); - if (!DecimalTest()) - pass = false; - printSeperationLine(); - if (!FloatTest()) - pass = false; - printSeperationLine(); - if (!DoubleTest()) - pass = false; - printSeperationLine(); - if (!BooleanTest()) - pass = false; - printSeperationLine(); - if (!ByteTest()) - pass = false; - printSeperationLine(); - if (!QNameTest()) - pass = false; - printSeperationLine(); - if (!DateTimeTest()) - pass = false; - printSeperationLine(); - if (!Base64BinaryTest()) - pass = false; - printSeperationLine(); - if (!HexBinaryTest()) - pass = false; - printSeperationLine(); - - if (!pass) - throw new Fault("MarshallSimpleTypesTest failed"); - } - - /* - * @testName: MarshallArraysOfSimpleTypesTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * JAXWS:SPEC:10011; JAXWS:SPEC:2024; JAXWS:SPEC:2027; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each primitive type pass its value as input to the - * corresponding RPC method and receive it back as the return value. Compare - * results of each value/type of what was sent and what was returned. Verify - * they are equal. - */ - public void MarshallArraysOfSimpleTypesTest() throws Fault { - TestUtil.logMsg("MarshallArraysOfSimpleTypesTest"); - boolean pass = true; - - if (!StringArrayTest()) - pass = false; - printSeperationLine(); - if (!IntegerArrayTest()) - pass = false; - printSeperationLine(); - if (!IntArrayTest()) - pass = false; - printSeperationLine(); - if (!LongArrayTest()) - pass = false; - printSeperationLine(); - if (!ShortArrayTest()) - pass = false; - printSeperationLine(); - if (!DecimalArrayTest()) - pass = false; - printSeperationLine(); - if (!FloatArrayTest()) - pass = false; - printSeperationLine(); - if (!DoubleArrayTest()) - pass = false; - printSeperationLine(); - if (!BooleanArrayTest()) - pass = false; - printSeperationLine(); - if (!ByteArrayTest()) - pass = false; - printSeperationLine(); - if (!QNameArrayTest()) - pass = false; - printSeperationLine(); - if (!DateTimeArrayTest()) - pass = false; - printSeperationLine(); - - if (!pass) - throw new Fault("MarshallArraysOfSimpleTypesTest failed"); - } - - private boolean printTestStatus(boolean pass, String test) { - if (pass) - TestUtil.logMsg("" + test + " ... PASSED"); - else - TestUtil.logErr("" + test + " ... FAILED"); - - return pass; - } - - private boolean StringTest() { - TestUtil.logMsg("StringTest"); - boolean pass = true; - String values[] = JAXWS_Data.String_data; - String response; - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.echoString(values[i]); - - if (values[i] == null && response == null) { - continue; - } else if (!response.equals(values[i])) { - TestUtil.logErr("StringTest failed - expected " + values[i] - + ", received: " + response); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "StringTest"); - return pass; - } - - private boolean IntegerTest() { - TestUtil.logMsg("IntegerTest"); - boolean pass = true; - BigInteger values[] = JAXWS_Data.BigInteger_data; - BigInteger response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.echoInteger(values[i]); - - if (values[i] == null && response == null) { - continue; - } - - if (!response.equals(values[i])) { - TestUtil.logErr("IntegerTest failed - expected " + values[i] - + ", received: " + response); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "IntegerTest"); - return pass; - } - - private boolean IntTest() { - TestUtil.logMsg("IntTest"); - boolean pass = true; - int values[] = JAXWS_Data.int_data; - int response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.echoInt(values[i]); - - if (response != values[i]) { - TestUtil.logErr("IntTest failed - expected " + values[i] - + ", received: " + response); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "IntTest"); - return pass; - } - - private boolean LongTest() { - TestUtil.logMsg("LongTest"); - boolean pass = true; - long values[] = JAXWS_Data.long_data; - long response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.echoLong(values[i]); - - if (response != values[i]) { - TestUtil.logErr("LongTest failed - expected " + values[i] - + ", received: " + response); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "LongTest"); - return pass; - } - - private boolean ShortTest() { - TestUtil.logMsg("ShortTest"); - boolean pass = true; - short values[] = JAXWS_Data.short_data; - short response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.echoShort(values[i]); - - if (response != values[i]) { - TestUtil.logErr("ShortTest failed - expected " + values[i] - + ", received: " + response); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "ShortTest"); - return pass; - } - - private boolean DecimalTest() { - TestUtil.logMsg("DecimalTest"); - boolean pass = true; - BigDecimal values[] = JAXWS_Data.BigDecimal_data; - BigDecimal response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.echoDecimal(values[i]); - - if (values[i] == null && response == null) { - continue; - } else if (!response.equals(values[i])) { - TestUtil.logErr("DecimalTest failed - expected " + values[i] - + ", received: " + response); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "DecimalTest"); - return pass; - } - - private boolean FloatTest() { - TestUtil.logMsg("FloatTest"); - boolean pass = true; - float values[] = JAXWS_Data.float_data; - float response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.echoFloat(values[i]); - - if (response != values[i]) { - TestUtil.logErr("FloatTest failed - expected " + values[i] - + ", received: " + response); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "FloatTest"); - return pass; - } - - private boolean DoubleTest() { - TestUtil.logMsg("DoubleTest"); - boolean pass = true; - double values[] = JAXWS_Data.double_data; - double response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.echoDouble(values[i]); - - if (response != values[i]) { - TestUtil.logErr("DoubleTest failed - expected " + values[i] - + ", received: " + response); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "DoubleTest"); - return pass; - } - - private boolean BooleanTest() { - TestUtil.logMsg("BooleanTest"); - boolean pass = true; - boolean values[] = JAXWS_Data.boolean_data; - boolean response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.echoBoolean(values[i]); - - if (!response == values[i]) { - TestUtil.logErr("BooleanTest failed - expected " + values[i] - + ", received: " + response); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "BooleanTest"); - return pass; - } - - private boolean ByteTest() { - TestUtil.logMsg("ByteTest"); - boolean pass = true; - byte values[] = JAXWS_Data.byte_data; - byte response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.echoByte(values[i]); - - if (response != values[i]) { - TestUtil.logErr("ByteTest failed - expected " + values[i] - + ", received: " + response); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "ByteTest"); - return pass; - } - - private boolean QNameTest() { - TestUtil.logMsg("QNameTest"); - boolean pass = true; - QName values[] = JAXWS_Data.QName_data; - QName response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.echoQName(values[i]); - if (values[i] == null && response == null) { - continue; - } else if (!response.equals(values[i])) { - TestUtil.logErr("QNameTest failed - expected " + values[i] - + ", received: " + response); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "QNameTest"); - return pass; - } - - private boolean DateTimeTest() { - TestUtil.logMsg("DateTimeTest"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - XMLGregorianCalendar response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - response = port.echoDateTime(values[i]); - if (!JAXWS_Data.compareValues(values[i], response, - "XMLGregorianCalendar")) - pass = false; - - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "DateTimeTest"); - return pass; - } - - private boolean Base64BinaryTest() { - TestUtil.logMsg("Base64BinaryTest"); - boolean pass = false; - byte values[] = JAXWS_Data.byte_data; - byte[] response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - response = port.echoBase64Binary(values); - pass = JAXWS_Data.compareArrayValues(values, response, "byte"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "Base64BinaryTest"); - return pass; - } - - private boolean HexBinaryTest() { - TestUtil.logMsg("HexBinaryTest"); - boolean pass = false; - byte values[] = JAXWS_Data.byte_data; - byte[] response; - - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - response = port.echoHexBinary(values); - pass = JAXWS_Data.compareArrayValues(values, response, "byte"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "HexBinaryTest"); - return pass; - } - - private boolean StringArrayTest() { - TestUtil.logMsg("StringArrayTest"); - boolean pass = false; - List values = JAXWS_Data.list_String_nonull_data; - List response; - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - response = port.echoStringArray(values); - TestUtil.logMsg("Compare response with input ...."); - pass = JAXWS_Data.compareArrayValues(values, response, "String"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "StringArrayTest"); - return pass; - } - - private boolean IntegerArrayTest() { - TestUtil.logMsg("IntegerArrayTest"); - boolean pass = false; - List values = JAXWS_Data.list_BigInteger_nonull_data; - List response; - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - response = port.echoIntegerArray(values); - pass = JAXWS_Data.compareArrayValues(values, response, "BigInteger"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "IntegerArrayTest"); - return pass; - } - - private boolean IntArrayTest() { - TestUtil.logMsg("IntArrayTest"); - boolean pass = false; - List values = JAXWS_Data.list_Integer_nonull_data; - List response; - - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - response = port.echoIntArray(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Integer"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "IntArrayTest"); - return pass; - } - - private boolean LongArrayTest() { - TestUtil.logMsg("LongArrayTest"); - boolean pass = false; - List values = JAXWS_Data.list_Long_nonull_data; - List response; - - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - response = port.echoLongArray(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Long"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "LongArrayTest"); - return pass; - } - - private boolean ShortArrayTest() { - TestUtil.logMsg("ShortArrayTest"); - boolean pass = false; - List values = JAXWS_Data.list_Short_nonull_data; - List response; - - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - response = port.echoShortArray(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Short"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "ShortArrayTest"); - return pass; - } - - private boolean FloatArrayTest() { - TestUtil.logMsg("FloatArrayTest"); - boolean pass = false; - List values = JAXWS_Data.list_Float_nonull_data; - List response; - - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - response = port.echoFloatArray(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Float"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "FloatArrayTest"); - return pass; - } - - private boolean DoubleArrayTest() { - TestUtil.logMsg("DoubleArrayTest"); - boolean pass = false; - List values = JAXWS_Data.list_Double_nonull_data; - List response; - - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - response = port.echoDoubleArray(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Double"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "DoubleArrayTest"); - return pass; - } - - private boolean DecimalArrayTest() { - TestUtil.logMsg("DecimalArrayTest"); - boolean pass = false; - List values = JAXWS_Data.list_BigDecimal_nonull_data; - List response; - - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - response = port.echoDecimalArray(values); - pass = JAXWS_Data.compareArrayValues(values, response, "BigDecimal"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "DecimalArrayTest"); - return pass; - } - - private boolean BooleanArrayTest() { - TestUtil.logMsg("BooleanArrayTest"); - boolean pass = false; - List values = JAXWS_Data.list_Boolean_nonull_data; - List response; - - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - response = port.echoBooleanArray(values); - pass = JAXWS_Data.compareArrayValues(values, response, "Boolean"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "BooleanArrayTest"); - return pass; - } - - private boolean ByteArrayTest() { - TestUtil.logMsg("ByteArrayTest"); - boolean pass = false; - List values = JAXWS_Data.list_Byte_nonull_data; - List response; - - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - response = port.echoByteArray(values); - pass = JAXWS_Data.compareArrayValues(values, response, "byte"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "ByteArrayTest"); - return pass; - } - - private boolean QNameArrayTest() { - TestUtil.logMsg("QNameArrayTest"); - boolean pass = false; - List values = JAXWS_Data.list_QName_nonull_data; - List response; - - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - response = port.echoQNameArray(values); - pass = JAXWS_Data.compareArrayValues(values, response, "QName"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "QNameArrayTest"); - return pass; - } - - private boolean DateTimeArrayTest() { - TestUtil.logMsg("DateTimeArrayTest"); - boolean pass = false; - List values = JAXWS_Data.list_XMLGregorianCalendar_nonull_data; - List response; - - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - response = port.echoDateTimeArray(values); - pass = JAXWS_Data.compareArrayValues(values, response, - "XMLGregorianCalendar"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "DateTimeArrayTest"); - return pass; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/MarshallTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/MarshallTestImpl.java deleted file mode 100644 index 3d82ba8211..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/MarshallTestImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.document.literal.wrapperstyle.marshalltest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; -import java.rmi.ServerException; - -import java.util.GregorianCalendar; -import java.util.Calendar; -import java.math.BigDecimal; -import java.math.BigInteger; - -import javax.xml.namespace.QName; -import javax.xml.datatype.XMLGregorianCalendar; - -import java.util.*; - -import jakarta.jws.WebService; - -@WebService(portName = "MarshallTestPort", serviceName = "MarshallTestService", targetNamespace = "http://MarshallTest.org/", wsdlLocation = "WEB-INF/wsdl/WSW2JDLWMarshallTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.document.literal.wrapperstyle.marshalltest.MarshallTest") - -public class MarshallTestImpl implements MarshallTest { - - public String echoString(String v) { - return v; - } - - public BigInteger echoInteger(BigInteger v) { - return v; - } - - public int echoInt(int v) { - return v; - } - - public long echoLong(long v) { - return v; - } - - public short echoShort(short v) { - return v; - } - - public BigDecimal echoDecimal(BigDecimal v) { - return v; - } - - public float echoFloat(float v) { - return v; - } - - public double echoDouble(double v) { - return v; - } - - public boolean echoBoolean(boolean v) { - return v; - } - - public byte echoByte(byte v) { - return v; - } - - public QName echoQName(QName v) { - return v; - } - - public XMLGregorianCalendar echoDateTime(XMLGregorianCalendar v) { - return v; - } - - public byte[] echoBase64Binary(byte[] v) { - return v; - } - - public byte[] echoHexBinary(byte[] v) { - return v; - } - - // - // array methods - // - public List echoStringArray(List v) { - return v; - } - - public List echoIntegerArray(List v) { - return v; - } - - public List echoIntArray(List v) { - return v; - } - - public List echoLongArray(List v) { - return v; - } - - public List echoShortArray(List v) { - return v; - } - - public List echoDecimalArray(List v) { - return v; - } - - public List echoFloatArray(List v) { - return v; - } - - public List echoDoubleArray(List v) { - return v; - } - - public List echoBooleanArray(List v) { - return v; - } - - public List echoByteArray(List v) { - return v; - } - - public List echoQNameArray(List v) { - return v; - } - - public List echoDateTimeArray( - List v) { - return v; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/WSW2JDLWMarshallTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/WSW2JDLWMarshallTestService.wsdl deleted file mode 100644 index d18b3e787a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/WSW2JDLWMarshallTestService.wsdl +++ /dev/null @@ -1,911 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/build.xml deleted file mode 100644 index 083f14d9d3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/build.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/customfile.xml deleted file mode 100644 index 72921927d5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - true - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/jakartaEE.tokens deleted file mode 100644 index 2a6f76e42d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlwmarshalltest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.document.literal.wrapperstyle.marshalltest.MarshallTestService -IMPL=com.sun.ts.tests.jaxws.ee.w2j.document.literal.wrapperstyle.marshalltest.MarshallTestImpl -SEI=com.sun.ts.tests.jaxws.ee.w2j.document.literal.wrapperstyle.marshalltest.MarshallTest -NAMESPACEURI=http://MarshallTest.org/ -PORT=MarshallTestPort -URLALIAS=/jaxws/MarshallTest -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.document.literal.wrapperstyle.marshalltest.MarshallTestImpl -WEBSERVICEDESCRIPTION=MarshallTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlwmarshalltest -SERVICEREFNAMEWSEJB=service/wsw2jdlwmarshalltest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlwmarshalltest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/standalone-sun-jaxws.xml deleted file mode 100644 index 614e204f63..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/standalone.web.xml deleted file mode 100644 index b8a8fd4d9e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/document/literal/wrapperstyle/marshalltest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLWMarshallTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -MarshallTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -MarshallTest -/jaxws/MarshallTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/build.xml deleted file mode 100644 index 7bf0fd0d63..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/build.xml deleted file mode 100644 index e11c912904..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/Client.java deleted file mode 100644 index 516882cf77..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/Client.java +++ /dev/null @@ -1,842 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.handlertest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.handler.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String HARNESSHOST = "harness.host"; - - private String harnessHost = null; - - private static final String HARNESSLOGPORT = "harness.log.port"; - - private String harnessLogPort = null; - - private static final String TRACEFLAG = "harness.log.traceflag"; - - private String harnessLogTraceFlag = "false"; // false or true - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String WSDLLOC_URL = "rlhandlerservice.wsdlloc.1"; - - private static final String ENDPOINT1_URL = "rlhandlerservice.endpoint.1"; - - private static final String ENDPOINT2_URL = "rlhandlerservice.endpoint.2"; - - private String url1 = null; - - private String url2 = null; - - private URL wsdlurl = null; - - // service and port information - private static final String NAMESPACEURI = "http://rlhandlerservice.org/wsdl"; - - private static final String SERVICE_NAME = "RLHandlerService"; - - private static final String PORT_NAME1 = "HelloPort"; - - private static final String PORT_NAME2 = "GetTrackerDataPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.RLHandlerService.class; - - private static final String LOGICAL = "Logical"; - - private static final String TEST_TYPE = LOGICAL + "Test"; - - private HandlerResolver originalResolver = null; - - private Handler handler = null; - - Hello port1 = null; - - GetTrackerData port2 = null; - - static RLHandlerService service = null; - - BindingProvider bp1 = null; - - BindingProvider bp2 = null; - - Binding binding1 = null; - - Binding binding2 = null; - - List listOfBindings = new ArrayList(); - - List port1HandlerChain = null; - - List port2HandlerChain = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT1_URL); - url1 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT2_URL); - url2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint1 URL: " + url1); - TestUtil.logMsg("Service Endpoint2 URL: " + url2); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private boolean setupPorts() { - boolean result = true; - TestUtil.logTrace("entering setupPorts"); - try { - if (modeProperty.equals("standalone")) { - getPortsStandalone(); - } else { - getPortsJavaEE(); - } - } catch (Exception e) { - TestUtil.logErr("Could not setup stubs properly"); - TestUtil.printStackTrace(e); - result = false; - } - TestUtil.logTrace("leaving setupPorts"); - return result; - - } - - private void getPortsStandalone() throws Exception { - getPorts(); - JAXWS_Util.setTargetEndpointAddress(port1, url1); - JAXWS_Util.setTargetEndpointAddress(port2, url2); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - getTargetEndpointAddress(port1, port2); - } - - private void getTargetEndpointAddress(Object port1, Object port2) - throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port1=" + port1); - String url1 = JAXWS_Util.getTargetEndpointAddress(port1); - TestUtil.logMsg("Target Endpoint Address=" + url1); - TestUtil.logMsg("Get Target Endpoint Address for port2=" + port2); - String url2 = JAXWS_Util.getTargetEndpointAddress(port2); - TestUtil.logMsg("Target Endpoint Address=" + url2); - } - - private void getPorts() throws Exception { - TestUtil.logTrace("entering getPorts"); - - TestUtil.logMsg("Get port 1 = " + PORT_NAME1); - port1 = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port1=" + port1); - - TestUtil.logMsg("Get port 2 = " + PORT_NAME2); - port2 = (GetTrackerData) service.getPort(GetTrackerData.class); - TestUtil.logMsg("port2=" + port2); - - TestUtil.logMsg("Get binding for port 1 = " + PORT_NAME1); - bp1 = (BindingProvider) port1; - binding1 = bp1.getBinding(); - port1HandlerChain = binding1.getHandlerChain(); - TestUtil.logMsg("Port1 HandlerChain =" + port1HandlerChain); - TestUtil.logMsg("Port1 HandlerChain size = " + port1HandlerChain.size()); - - TestUtil.logMsg("------------------------------------------------------"); - - TestUtil.logMsg("Get binding for port 2 = " + PORT_NAME2); - bp2 = (BindingProvider) port2; - binding2 = bp2.getBinding(); - port2HandlerChain = binding2.getHandlerChain(); - TestUtil.logMsg("Port2 HandlerChain=" + port2HandlerChain); - TestUtil.logMsg("Port2 HandlerChain size = " + port2HandlerChain.size()); - - listOfBindings.add(binding1); - listOfBindings.add(binding2); - - TestUtil.logTrace("leaving getPorts"); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (RLHandlerService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (RLHandlerService) getSharedObject(); - } - - try { - harnessHost = p.getProperty(HARNESSHOST); - } catch (Exception e) { - harnessHost = null; - } - try { - harnessLogPort = p.getProperty(HARNESSLOGPORT); - } catch (Exception e) { - harnessLogPort = null; - } - try { - harnessLogTraceFlag = p.getProperty(TRACEFLAG); - } catch (Exception e) { - harnessLogTraceFlag = "false"; - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: ClientLogicalHandlerTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9012; - * JAXWS:SPEC:9014; JAXWS:SPEC:9015.1; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * WS4EE:SPEC:6010; WS4EE:SPEC:6015.1; WS4EE:SPEC:6015.2; WS4EE:SPEC:6015.3; - * WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; WS4EE:SPEC:6051; - * WS4EE:SPEC:6027; - * - * @test_Strategy: Invoke an RPC method and ensure that the client-side - * logical message handler callbacks are called. - */ - public void ClientLogicalHandlerTest() throws Fault { - TestUtil.logTrace("ClientLogicalHandlerTest"); - boolean pass = true; - final MyStatus myStatus = new MyStatus(); - try { - TestUtil.logMsg("Programmatically registering the following handlers: \n" - + "ClientLogicalHandler2, ClientLogicalHandler3, ClientLogicalHandler6\n" - + "ClientSOAPHandler2, ClientSOAPHandler3, ClientSOAPHandler6"); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Resolver"); - TestUtil.logMsg("----------------------------------------------"); - originalResolver = service.getHandlerResolver(); - - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg("Getting existing Handlers"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = originalResolver.getHandlerChain(info); - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientLogicalHandler2(); - handlerList.add(handler); - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSOAPHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientLogicalHandler3(); - handlerList.add(handler); - } - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - if (!setupPorts()) { - pass = false; - } else if (!myStatus.getStatus()) { - pass = false; - } else { - try { - TestUtil.logMsg("Getting existing Handlers for Port1"); - TestUtil.logMsg("----------------------------------------------"); - List handlerList = binding1.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding1.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - } - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ClientLogicalTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - TestUtil.logMsg("Verify handleMessage()/init callbacks"); - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerCallBacks3("Client", LOGICAL, - clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - TestUtil.logMsg( - "Verifying callbacks where LogicalHandlers were called before SOAPHandlers on Client-Side"); - if (!Handler_Util.VerifyLogicalVerseSOAPHandlerOrder(clientSideMsgs)) { - TestUtil.logErr( - "Client-Side Logical verses SOAP Handler Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg( - "Client-Side Logical verses SOAP Handler Callbacks are (correct)"); - } - - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientLogicalHandlerTest failed"); - } - - /* - * @testName: ClientHandlerDoesNotGetCalledTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9011; - * - * @test_Strategy: Invoke an RPC method and ensure that a client-side handler - * added to the binding does not get called. The service-name-pattern and - * port-name-pattern tags are used in the handler xml file to denote what what - * handlers will and won't be instanciated - */ - public void ClientHandlerDoesNotGetCalledTest() throws Fault { - TestUtil.logTrace("ClientHandlerDoesNotGetCalledTest"); - boolean pass = true; - try { - if (!setupPorts()) { - pass = false; - } else { - TestUtil.logMsg( - "Programmatically registering the following handlers which should never be called: \n" - + "ClientSNBCLogicalHandler, ClientSNBCSOAPHandler"); - List handlerList = new ArrayList(); - TestUtil.logMsg( - "Construct HandleInfo for ClientSNBCLogicalHandler and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSNBCLogicalHandler(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSNBCSOAPHandler and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSNBCSOAPHandler(); - handlerList.add(handler); - binding1.setHandlerChain(handlerList); - port1HandlerChain = binding1.getHandlerChain(); - TestUtil.logMsg("Port1 HandlerChain =" + port1HandlerChain); - TestUtil - .logMsg("Port1 HandlerChain size = " + port1HandlerChain.size()); - TestUtil - .logMsg("------------------------------------------------------"); - TestUtil.logMsg("Get port 1 again = " + PORT_NAME1); - port1 = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("Get binding for port 1 again = " + PORT_NAME1); - bp1 = (BindingProvider) port1; - binding1 = bp1.getBinding(); - port1HandlerChain = binding1.getHandlerChain(); - TestUtil.logMsg("Port1 HandlerChain =" + port1HandlerChain); - TestUtil - .logMsg("Port1 HandlerChain size = " + port1HandlerChain.size()); - TestUtil - .logMsg("------------------------------------------------------"); - - try { - TestUtil.logMsg("Getting existing Handlers for Port1"); - TestUtil.logMsg("----------------------------------------------"); - handlerList = binding1.getHandlerChain(); - - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following handlers through the binding: \n" - + "ClientSOAPHandler6, ClientLogicalHandler6"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSOAPHandler6(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler6 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientLogicalHandler6(); - handlerList.add(handler); - TestUtil.logMsg("HandlerChain=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - binding1.setHandlerChain(handlerList); - } catch (Exception e) { - TestUtil.logErr( - "Adding handlers to the binding failed with the following exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ClientHandlerDoesNotGetCalledTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - TestUtil.logMsg("Verifying Client-Side JAXWS-RUNTIME Callbacks"); - if (!Handler_Util.VerifyHandlerDoesNotGetCalled("Client", - clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Get client side throwables back from Tracker"); - String[] clientSideThrowables = HandlerTracker.getArrayThrowables(); - int len = clientSideThrowables.length; - if (len > 0) { - TestUtil - .logErr("There were exceptions thrown in the Client Handlers"); - for (int i = 0; i <= len - 1; i++) { - TestUtil.logErr(clientSideThrowables[i]); - pass = false; - } - } else { - TestUtil.logMsg("There were no Client Handler exceptions"); - } - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientHandlerDoesNotGetCalledTest failed"); - } - - /* - * @testName: ServerLogicalHandlerTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.1; JAXWS:SPEC:9017; JAXWS:SPEC:9018; WS4EE:SPEC:6010; - * WS4EE:SPEC:6008; WS4EE:SPEC:6028; WS4EE:SPEC:6005; WS4EE:SPEC:6051; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerLogicalHandlerTest() throws Fault { - TestUtil.logTrace("ServerLogicalHandlerTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ServerLogicalTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - MyResultType mr = null; - try { - mr = port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - String result = null; - if (mr != null) - result = mr.getErrors(); - else - result = "null return"; - if (!result.equals("")) { - pass = false; - TestUtil.logErr( - "The serverside tests for MessageContext.Scope failed:" + result); - } - - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port2.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyHandlerCallBacks("Server", LOGICAL, - serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg( - "Verifying callbacks where LogicalHandlers are called before SOAPHandlers on Server-Side"); - if (!Handler_Util.VerifyLogicalVerseSOAPHandlerOrder(serverSideMsgs)) { - TestUtil.logErr( - "Server-Side Logical verses SOAP Handler Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg( - "Server-Side Logical verses SOAP Handler Callbacks are (correct)"); - } - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port2.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Server Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault("ServerLogicalHandlerTest failed"); - } - - /* - * @testName: ServerHandlerDoesNotGetCalledTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.1; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. The service-name-pattern and - * port-name-pattern tags are used in the handler xml file to denote what what - * handlers will and won't be instanciated - */ - public void ServerHandlerDoesNotGetCalledTest() throws Fault { - TestUtil.logTrace("ServerHandlerDoesNotGetCalledTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ServerHandlerDoesNotGetCalledTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - MyResultType mr = null; - try { - mr = port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - String result = null; - if (mr != null) - result = mr.getErrors(); - else - result = "null return"; - if (!result.equals("")) { - pass = false; - TestUtil.logErr( - "The serverside tests for MessageContext.Scope failed:" + result); - } - - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port2.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyHandlerDoesNotGetCalled("Server", - serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - gtda = new GetTrackerDataAction(); - TestUtil.logMsg("Get server side throwables back from endpoint"); - gtda.setAction("getArrayThrowables"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - List serverSideThrowables = port2.getTrackerData(gtda) - .getResult(); - if (serverSideThrowables.size() >= 1) { - TestUtil - .logErr("There were exceptions thrown in the Server Handlers"); - Iterator iterator = serverSideThrowables.iterator(); - while (iterator.hasNext()) { - TestUtil.logErr((String) iterator.next()); - } - pass = false; - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault("ServerHandlerDoesNotGetCalledTest failed"); - } - - private void purgeServerSideTrackerData() { - try { - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("purge"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - port2.getTrackerData(gtda); - } catch (Exception e) { - TestUtil.logErr("Call to purge server-side tracker data failed:" + e); - } - } - - static class MyStatus { - private boolean status = true; - - public void setStatus(boolean b) { - status = b; - } - - public boolean getStatus() { - return status; - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/build.xml deleted file mode 100644 index 049225e64f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/handler.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/handler.xml deleted file mode 100644 index 7b608df13e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/handler.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - ns1:RLHandlerService - - ClientLogicalHandler5 - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientLogicalHandler5 - - - - - ClientSOAPHandler5 - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSOAPHandler5 - - - - - - - foo:RLHandlerService - - ClientSNPSNBCLogicalHandler - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSNPSNBCLogicalHandler - - - - ns1:ServiceDoesNotExist - - ClientSNPSNBCSOAPHandler - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSNPSNBCSOAPHandler - - - - - - - - - - foo:HelloPort - - ClientPNPSNBCLogicalHandler - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientPNPSNBCLogicalHandler - - - - ns1:PortDoesNotExist - - ClientPNPSNBCSOAPHandler - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientPNPSNBCSOAPHandler - - - - - - - - ##SOAP11_HTTP - - ClientSOAPHandler1 - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSOAPHandler1 - - - ClientLogicalHandler1 - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientLogicalHandler1 - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/handler_process_flow.pdf b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/handler_process_flow.pdf deleted file mode 100644 index 781c2693ca..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/handler_process_flow.pdf and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/jakartaEE.tokens deleted file mode 100644 index ba2d6eac88..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/handlertest/jakartaEE.tokens +++ /dev/null @@ -1,9 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsrlhandlerservice") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.RLHandlerService -URLALIAS=/jaxws/Hello -URLALIAS2=/jaxws/GetTrackerData -WEBSERVICEDESCRIPTION=RLHandlerService -SERVICEREFNAMEWSSERVLET=service/wsrlhandlerservice -SERVICEREFNAMEWSEJB=service/wsrlhandlerservice -SERVICEREFNAMEWSAPPCLIENT=service/wsrlhandlerservice -HANDLERCHAIN=@HandlerChain(name = " ", file = "handler.xml") diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/Client.java deleted file mode 100644 index 612255208e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/Client.java +++ /dev/null @@ -1,494 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.headertest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; - -import java.util.Properties; - -import java.math.BigInteger; -import java.math.BigDecimal; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.headertest."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jrlheadertest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jrlheadertest.wsdlloc.1"; - - private String url = null; - - // service and port information - private static final String NAMESPACEURI = "http://headertestservice.org/HeaderTestService.wsdl"; - - private static final String SERVICE_NAME = "HeaderTestService"; - - private static final String PORT_NAME = "HeaderTestPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private URL wsdlurl = null; - - HeaderTest port = null; - - static HeaderTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (HeaderTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - HeaderTestService.class, PORT_QNAME, HeaderTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (HeaderTest) service.getHeaderTestPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HeaderTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: GoodOrderTestWithSoapHeaderAndMUFalse - * - * @assertion_ids: JAXWS:SPEC:2048; JAXWS:SPEC:2049; JAXWS:SPEC:10008; - * JAXWS:SPEC:3038; WSI:SPEC:R1013; WSI:SPEC:R1034; WSI:SPEC:R1032; - * WSI:SPEC:R9802; WSI:SPEC:R2209; - * - * @test_Strategy: Call submitOrder() with a valid product code passing a soap - * header (ConfigHeader) with mustUnderstand=false. The soap header is simply - * ignored. The RPC request must succeed. - * - */ - public void GoodOrderTestWithSoapHeaderAndMUFalse() throws Fault { - TestUtil.logMsg("GoodOrderTestWithSoapHeaderAndMUFalse"); - boolean pass = true; - - ProductOrderRequest poRequest; - ConfigHeader ch; - try { - poRequest = new ProductOrderRequest(); - ProductOrderItem poi = new ProductOrderItem(); - poi.setProductName("Product-1"); - poi.setProductCode(new BigInteger("100")); - poi.setQuantity(10); - poi.setPrice(new BigDecimal(119.00)); - CustomerInfo ci = new CustomerInfo(); - ci.setCreditcard("1201-4465-1567-9823"); - ci.setName("John Doe"); - ci.setStreet("1 Network Drive"); - ci.setCity("Burlington"); - ci.setState("Ma"); - ci.setZip("01837"); - ci.setCountry("USA"); - poRequest.getItem().add(poi); - poRequest.setCustomerInfo(ci); - ch = new ConfigHeader(); - ch.setMustUnderstand(false); - ch.setMessage("Config Header"); - ch.setTestName("GoodOrderTestWithSoapHeaderAndMUFalse"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GoodOrderTestWithSoapHeaderAndMUFalse failed", e); - } - - try { - TestUtil - .logMsg("Submit good order with soap header (ConfigHeader:MU=false)"); - TestUtil.logMsg("ConfigHeader must be ignored because MU=false"); - TestUtil.logMsg("The service endpoint simply ignores the soap header"); - TestUtil.logMsg("The RPC request must succeed"); - ProductOrderResponse poResponse = port.submitOrder(poRequest, ch); - if (!ProductOrdersEqual(poRequest, poResponse)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GoodOrderTestWithSoapHeaderAndMUFalse failed", e); - } - - if (!pass) - throw new Fault("GoodOrderTestWithSoapHeaderAndMUFalse failed"); - } - - /* - * @testName: GoodOrderTestWithSoapHeaderAndMUTrue - * - * @assertion_ids: JAXWS:SPEC:2048; JAXWS:SPEC:2049; JAXWS:SPEC:10008; - * JAXWS:SPEC:3038; WSI:SPEC:R1013; WSI:SPEC:R1034; WSI:SPEC:R1032; - * WSI:SPEC:R9802; WSI:SPEC:R2209; - * - * @test_Strategy: Call submitOrder() with a valid product code passing a soap - * header (ConfigHeader) with mustUnderstand=true. The soap header is - * understood by the service endpoint and the soap header is valid. The RPC - * request must succeed. - */ - public void GoodOrderTestWithSoapHeaderAndMUTrue() throws Fault { - TestUtil.logMsg("GoodOrderTestWithSoapHeaderAndMUTrue"); - boolean pass = true; - - ProductOrderRequest poRequest; - ConfigHeader ch; - try { - poRequest = new ProductOrderRequest(); - ProductOrderItem poi = new ProductOrderItem(); - poi.setProductName("Product-1"); - poi.setProductCode(new BigInteger("100")); - poi.setQuantity(10); - poi.setPrice(new BigDecimal(119.00)); - CustomerInfo ci = new CustomerInfo(); - ci.setCreditcard("1201-4465-1567-9823"); - ci.setName("John Doe"); - ci.setStreet("1 Network Drive"); - ci.setCity("Burlington"); - ci.setState("Ma"); - ci.setZip("01837"); - ci.setCountry("USA"); - poRequest.getItem().add(poi); - poRequest.setCustomerInfo(ci); - ch = new ConfigHeader(); - ch.setMustUnderstand(true); - ch.setMessage("Config Header"); - ch.setTestName("GoodOrderTestWithSoapHeaderAndMUTrue"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GoodOrderTestWithSoapHeaderAndMUTrue failed", e); - } - - try { - TestUtil - .logMsg("Submit good order with soap header (ConfigHeader:MU=true)"); - TestUtil - .logMsg("ConfigHeader must be understood and valid bacause MU=true"); - TestUtil.logMsg( - "The service endpoint understands and validates the soap header as ok"); - TestUtil.logMsg("The RPC request must succeed"); - ProductOrderResponse poResponse = port.submitOrder(poRequest, ch); - TestUtil.logMsg("GoodOrderTestWithMUTrueHeader succeeded (expected)"); - if (!ProductOrdersEqual(poRequest, poResponse)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GoodOrderTestWithSoapHeaderAndMUTrue failed", e); - } - - if (!pass) - throw new Fault("GoodOrderTestWithSoapHeaderAndMUTrue failed"); - } - - /* - * @testName: SoapHeaderFaultTest - * - * @assertion_ids: JAXWS:SPEC:2048; JAXWS:SPEC:2049; JAXWS:SPEC:10008; - * WSI:SPEC:R1013; WSI:SPEC:R1034; WSI:SPEC:R1032; WSI:SPEC:R9802; - * WSI:SPEC:R2209; - * - * @test_Strategy: Call submitOrder() passing soap header (ConfigHeader) with - * mustUnderstand attribute=true and the soap header (ConfigHeader) is not - * understood. The service endpoint must throw back the SOAP Header Fault - * (ConfigFault). - * - */ - public void SoapHeaderFaultTest() throws Fault { - TestUtil.logMsg("SoapHeaderFaultTest"); - boolean pass = true; - - ProductOrderRequest poRequest; - ConfigHeader ch; - try { - poRequest = new ProductOrderRequest(); - ProductOrderItem poi = new ProductOrderItem(); - poi.setProductName("Product-1"); - poi.setProductCode(new BigInteger("100")); - poi.setQuantity(10); - poi.setPrice(new BigDecimal(119.00)); - CustomerInfo ci = new CustomerInfo(); - ci.setCreditcard("1201-4465-1567-9823"); - ci.setName("John Doe"); - ci.setStreet("1 Network Drive"); - ci.setCity("Burlington"); - ci.setState("Ma"); - ci.setZip("01837"); - ci.setCountry("USA"); - poRequest.getItem().add(poi); - poRequest.setCustomerInfo(ci); - ch = new ConfigHeader(); - ch.setMustUnderstand(true); - ch.setMessage("Config Header"); - ch.setTestName("SoapHeaderFaultTest"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SoapHeaderFaultTest failed", e); - } - - try { - TestUtil - .logMsg("Submit good order with soap header (ConfigHeader:MU=true)"); - TestUtil - .logMsg("ConfigHeader must be understood and valid bacause MU=true"); - TestUtil - .logMsg("The service endpoint does not understand the soap header"); - TestUtil.logMsg("The RPC request must fail with a ConfigFault"); - ProductOrderResponse poResponse = port.submitOrder(poRequest, ch); - TestUtil.logErr("Did not throw expected ConfigFault"); - pass = false; - } catch (ConfigFault e) { - TestUtil.logMsg("Caught expected ConfigFault"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SoapHeaderFaultTest failed", e); - } - - if (!pass) - throw new Fault("SoapHeaderFaultTest failed"); - } - - /* - * @testName: SoapFaultTest - * - * @assertion_ids: JAXWS:SPEC:2048; JAXWS:SPEC:2049; JAXWS:SPEC:10008; - * JAXWS:SPEC:3028; JAXWS:SPEC:2044; WSI:SPEC:R1013; WSI:SPEC:R1034; - * WSI:SPEC:R1032; WSI:SPEC:R9802; WSI:SPEC:R2209; - * - * @test_Strategy: Call submitOrder() passing soap header (ConfigHeader) with - * mustUnderstand attribute=false so the soap header (ConfigHeader) will - * simply be ignored. The submitOrder() contains an invalid product code so - * the service endpoint must throw back the SOAP Fault (BadOrderFault). - * - */ - public void SoapFaultTest() throws Fault { - TestUtil.logMsg("SoapFaultTest"); - boolean pass = true; - - ProductOrderRequest poRequest; - ConfigHeader ch; - try { - poRequest = new ProductOrderRequest(); - ProductOrderItem poi = new ProductOrderItem(); - poi.setProductName("Product-1"); - poi.setProductCode(new BigInteger("1234123412341234")); - poi.setQuantity(10); - poi.setPrice(new BigDecimal(119.00)); - CustomerInfo ci = new CustomerInfo(); - ci.setCreditcard("1201-4465-1567-9823"); - ci.setName("John Doe"); - ci.setStreet("1 Network Drive"); - ci.setCity("Burlington"); - ci.setState("Ma"); - ci.setZip("01837"); - ci.setCountry("USA"); - poRequest.getItem().add(poi); - poRequest.setCustomerInfo(ci); - ch = new ConfigHeader(); - ch.setMustUnderstand(false); - ch.setMessage("Config Header"); - ch.setTestName("SoapFaultTest"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SoapFaultTest failed", e); - } - - try { - TestUtil - .logMsg("Submit bad order with soap header (ConfigHeader:MU=false)"); - TestUtil.logMsg("ConfigHeader must be ignored because MU=false"); - TestUtil.logMsg("The service endpoint simply ignores the soap header"); - TestUtil - .logMsg("Order contains bad product code (must throw BadOrderFault)"); - TestUtil.logMsg("The RPC request must fail with a BadOrderFault"); - ProductOrderResponse poResponse = port.submitOrder(poRequest, ch); - TestUtil.logErr("Did not throw expected BadOrderFault"); - pass = false; - } catch (BadOrderFault e) { - TestUtil.logMsg("Caught expected BadOrderFault"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SoapFaultTest failed", e); - } - - if (!pass) - throw new Fault("SoapFaultTest failed"); - } - - private boolean ProductOrdersEqual(ProductOrderRequest req, - ProductOrderResponse resp) { - boolean equal = true; - TestUtil.logMsg( - "Performing data comparison of request/response (should be equal)"); - Object[] reqArray = req.getItem().toArray(); - Object[] respArray = resp.getItem().toArray(); - ProductOrderItem reqItem = null; - ProductOrderItem respItem = null; - if (reqArray == null || respArray == null) { - TestUtil.logErr("Data comparison error (unexpected)"); - TestUtil.logErr("Got: Item Array = " + respItem); - TestUtil.logErr("Expected: Item Array = " + reqItem); - equal = false; - } else if (reqArray.length != respArray.length) { - TestUtil.logErr("Data comparison error (unexpected)"); - TestUtil.logErr("Got: Item Array length = " + respArray.length); - TestUtil.logErr("Expected: Item Array length = " + reqArray.length); - equal = false; - } else { - reqItem = (ProductOrderItem) reqArray[0]; - respItem = (ProductOrderItem) respArray[0]; - } - if (equal) { - if (!reqItem.getProductName().equals(respItem.getProductName()) - || !reqItem.getProductCode().equals(respItem.getProductCode()) - || reqItem.getQuantity() != respItem.getQuantity() - || !reqItem.getPrice().equals(respItem.getPrice())) { - TestUtil.logErr("Data comparison error (unexpected)"); - TestUtil.logErr("Got: <" + respItem.getProductName() + "," - + respItem.getProductCode() + "," + respItem.getQuantity() + "," - + respItem.getPrice() + ">"); - TestUtil.logErr("Expected: <" + reqItem.getProductName() + "," - + reqItem.getProductCode() + "," + reqItem.getQuantity() + "," - + reqItem.getPrice() + ">"); - equal = false; - } else { - TestUtil.logMsg("Data comparison ok (expected)"); - TestUtil.logMsg("Got: <" + respItem.getProductName() + "," - + respItem.getProductCode() + "," + respItem.getQuantity() + "," - + respItem.getPrice() + ">"); - TestUtil.logMsg("Expected: <" + reqItem.getProductName() + "," - + reqItem.getProductCode() + "," + reqItem.getQuantity() + "," - + reqItem.getPrice() + ">"); - } - } - return equal; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/HeaderTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/HeaderTestImpl.java deleted file mode 100644 index 8ae9f1eddd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/HeaderTestImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.headertest; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "HeaderTestPort", serviceName = "HeaderTestService", targetNamespace = "http://headertestservice.org/HeaderTestService.wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JRLHeaderTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.headertest.HeaderTest") -public class HeaderTestImpl implements HeaderTest { - - public ProductOrderResponse submitOrder(ProductOrderRequest poRequest, - ConfigHeader configHeader) throws BadOrderFault, ConfigFault { - ProductOrderResponse poResponse = null; - poResponse = new ProductOrderResponse(); - String testName = configHeader.getTestName(); - ConfigFaultType cft = new ConfigFaultType(); - cft.setMessage(testName); - cft.setMustUnderstand(true); - if (testName.equals("GoodOrderTestWithSoapHeaderAndMUFalse")) { - if (!ValidHeader(configHeader, false, "Config Header", testName)) - throw new ConfigFault("Invalid ConfigHeader: mustUnderstand=" - + configHeader.isMustUnderstand() + ", message=" - + configHeader.getMessage() + ", testName=" + testName, cft); - poResponse.getItem().addAll(poRequest.getItem()); - } else if (testName.equals("GoodOrderTestWithSoapHeaderAndMUTrue")) { - if (!ValidHeader(configHeader, true, "Config Header", testName)) - throw new ConfigFault("Invalid ConfigHeader: mustUnderstand=" - + configHeader.isMustUnderstand() + ", message=" - + configHeader.getMessage() + ", testName=" + testName, cft); - poResponse.getItem().addAll(poRequest.getItem()); - } else if (testName.equals("SoapHeaderFaultTest")) { - throw new ConfigFault("This is a soap header fault ConfigFault", cft); - } else if (testName.equals("SoapFaultTest")) { - BadOrderFaultType bft = new BadOrderFaultType(); - bft.setMessage(testName); - throw new BadOrderFault("This is a soap fault BadOrderFault", bft); - } else { - throw new ConfigFault("Invalid ConfigHeader: mustUnderstand=" - + configHeader.isMustUnderstand() + ", message=" - + configHeader.getMessage() + ", testName=" + testName, cft); - } - return poResponse; - } - - private boolean ValidHeader(ConfigHeader ch, boolean mu, String msg, - String test) { - if (ch.isMustUnderstand() == mu && ch.getMessage().equals(msg) - && ch.getTestName().equals(test)) - return true; - else - return false; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/WSW2JRLHeaderTestDefs.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/WSW2JRLHeaderTestDefs.wsdl deleted file mode 100644 index a2587af782..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/WSW2JRLHeaderTestDefs.wsdl +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/WSW2JRLHeaderTestDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/WSW2JRLHeaderTestDefs.xsd deleted file mode 100644 index 730d45e2a8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/WSW2JRLHeaderTestDefs.xsd +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This is the configuration header - - - - - - - - - - - - - - This is the configuration fault - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/WSW2JRLHeaderTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/WSW2JRLHeaderTestService.wsdl deleted file mode 100644 index 4ea2eec9bd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/WSW2JRLHeaderTestService.wsdl +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/build.xml deleted file mode 100644 index a5f69bd69a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/build.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/customfile.xml deleted file mode 100644 index d3a5d87f61..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/customfile.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/customfile2.xml deleted file mode 100644 index 775058ef37..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/jakartaEE.tokens deleted file mode 100644 index 8a13d279b2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jrlheadertest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.headertest.HeaderTestService -SEI=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.headertest.HeaderTest -IMPL=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.headertest.HeaderTestImpl -NAMESPACEURI=http://headertestservice.org/HeaderTestService.wsdl -PORT=HeaderTestPort -URLALIAS=/jaxws/HeaderTest -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.headertest.HeaderTestImpl -WEBSERVICEDESCRIPTION=HeaderTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jrlheadertest -SERVICEREFNAMEWSEJB=service/wsw2jrlheadertest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jrlheadertest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/standalone-sun-jaxws.xml deleted file mode 100644 index 08ef63efa6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/standalone.web.xml deleted file mode 100644 index 13474353d0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/headertest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLHeaderTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -HeaderTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -HeaderTest -/jaxws/HeaderTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/Client.java deleted file mode 100644 index b10b9c7c57..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/Client.java +++ /dev/null @@ -1,758 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.holdertest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; - -import java.util.Properties; - -import java.math.BigInteger; -import java.math.BigDecimal; -import jakarta.xml.ws.Holder; - -import javax.xml.namespace.QName; -import javax.xml.datatype.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.holdertest."; - - // service and port information - private static final String NAMESPACEURI = "http://holdertest.org/wsdl"; - - private static final String SERVICE_NAME = "HolderTestService"; - - private static final String PORT_NAME = "HolderTestPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - Holder inout1, inout1_tmp; - - Holder inout2, inout2_tmp; - - Holder inout3, inout3_tmp; - - Holder inout4, inout4_tmp; - - Holder inout5, inout5_tmp; - - Holder inout6, inout6_tmp; - - Holder inout7, inout7_tmp; - - Holder inout8, inout8_tmp; - - Holder inout9, inout9_tmp; - - Holder inout10, inout10_tmp; - - Holder inout11, inout11_tmp; - - Holder inout12, inout12_tmp; - - Holder inoutarray1, inoutarray1_tmp; - - Holder inoutarray2, inoutarray2_tmp; - - Holder inoutarray3, inoutarray3_tmp; - - Holder inoutarray4, inoutarray4_tmp; - - Holder inoutarray5, inoutarray5_tmp; - - Holder inoutarray6, inoutarray6_tmp; - - Holder inoutarray7, inoutarray7_tmp; - - Holder inoutarray8, inoutarray8_tmp; - - Holder inoutarray9, inoutarray9_tmp; - - Holder inoutarray10, inoutarray10_tmp; - - Holder inoutarray11, inoutarray11_tmp; - - Holder inoutarray12, inoutarray12_tmp; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jrlholdertest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jrlholdertest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private static DatatypeFactory dtfactory = null; - - HolderTest port = null; - - static HolderTestService service = null; - - static { - try { - dtfactory = DatatypeFactory.newInstance(); - } catch (DatatypeConfigurationException e) { - TestUtil.logMsg("Could not configure DatatypeFactory object"); - TestUtil.printStackTrace(e); - } - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (HolderTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - HolderTestService.class, PORT_QNAME, HolderTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - port = (HolderTest) service.getHolderTestPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HolderTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - private boolean printTestStatus(boolean pass, String test) { - if (pass) - TestUtil.logMsg("" + test + " ... PASSED"); - else - TestUtil.logErr("" + test + " ... FAILED"); - - return pass; - } - - private void initialize_inout_SimpleType_data() { - inout1 = new Holder(); - inout1_tmp = new Holder(); - inout2 = new Holder(); - inout2_tmp = new Holder(); - inout3 = new Holder(); - inout3_tmp = new Holder(); - inout4 = new Holder(); - inout4_tmp = new Holder(); - inout5 = new Holder(); - inout5_tmp = new Holder(); - inout6 = new Holder(); - inout6_tmp = new Holder(); - inout7 = new Holder(); - inout7_tmp = new Holder(); - inout8 = new Holder(); - inout8_tmp = new Holder(); - inout9 = new Holder(); - inout9_tmp = new Holder(); - inout10 = new Holder(); - inout10_tmp = new Holder(); - inout11 = new Holder(); - inout11_tmp = new Holder(); - inout12 = new Holder(); - inout12_tmp = new Holder(); - - inout1.value = "String1"; - inout2.value = new BigInteger("3512359"); - inout3.value = new Integer(Integer.MIN_VALUE); - inout4.value = new Long(Long.MIN_VALUE); - inout5.value = new Short(Short.MIN_VALUE); - inout6.value = new BigDecimal("3512359.1456"); - inout7.value = new Float(Float.MIN_VALUE); - inout8.value = new Double(Double.MIN_VALUE); - inout9.value = Boolean.FALSE; - inout10.value = Byte.valueOf(Byte.MIN_VALUE); - inout11.value = new QName("String2"); - inout12.value = dtfactory.newXMLGregorianCalendar(96, 5, 1, 0, 30, 0, 0, 0); - } - - private void initialize_inout_SimpleTypeArray_data() throws Exception { - inoutarray1 = new Holder(); - inoutarray2 = new Holder(); - inoutarray3 = new Holder(); - inoutarray4 = new Holder(); - inoutarray5 = new Holder(); - inoutarray6 = new Holder(); - inoutarray7 = new Holder(); - inoutarray8 = new Holder(); - inoutarray9 = new Holder(); - inoutarray10 = new Holder(); - inoutarray11 = new Holder(); - inoutarray12 = new Holder(); - - inoutarray1.value = new ArrayOfstring(); - inoutarray2.value = new ArrayOfinteger(); - inoutarray3.value = new ArrayOfint(); - inoutarray4.value = new ArrayOflong(); - inoutarray5.value = new ArrayOfshort(); - inoutarray6.value = new ArrayOfdecimal(); - inoutarray7.value = new ArrayOffloat(); - inoutarray8.value = new ArrayOfdouble(); - inoutarray9.value = new ArrayOfboolean(); - inoutarray10.value = new ArrayOfbyte(); - inoutarray11.value = new ArrayOfQName(); - inoutarray12.value = new ArrayOfdateTime(); - - for (int i = 0; i < JAXWS_Data.String_nonull_data.length; i++) - inoutarray1.value.getArrayOfstring() - .add(JAXWS_Data.String_nonull_data[i]); - - for (int i = 0; i < JAXWS_Data.BigInteger_nonull_data.length; i++) - inoutarray2.value.getArrayOfinteger() - .add(JAXWS_Data.BigInteger_nonull_data[i]); - - for (int i = 0; i < JAXWS_Data.Integer_nonull_data.length; i++) - inoutarray3.value.getArrayOfint().add(JAXWS_Data.Integer_nonull_data[i]); - - for (int i = 0; i < JAXWS_Data.Long_nonull_data.length; i++) - inoutarray4.value.getArrayOflong().add(JAXWS_Data.Long_nonull_data[i]); - - for (int i = 0; i < JAXWS_Data.Short_nonull_data.length; i++) - inoutarray5.value.getArrayOfshort().add(JAXWS_Data.Short_nonull_data[i]); - - for (int i = 0; i < JAXWS_Data.BigDecimal_nonull_data.length; i++) - inoutarray6.value.getArrayOfdecimal() - .add(JAXWS_Data.BigDecimal_nonull_data[i]); - - for (int i = 0; i < JAXWS_Data.Float_nonull_data.length; i++) - inoutarray7.value.getArrayOffloat().add(JAXWS_Data.Float_nonull_data[i]); - - for (int i = 0; i < JAXWS_Data.Double_nonull_data.length; i++) - inoutarray8.value.getArrayOfdouble() - .add(JAXWS_Data.Double_nonull_data[i]); - - for (int i = 0; i < JAXWS_Data.Boolean_nonull_data.length; i++) - inoutarray9.value.getArrayOfboolean() - .add(JAXWS_Data.Boolean_nonull_data[i]); - - for (int i = 0; i < JAXWS_Data.Byte_nonull_data.length; i++) - inoutarray10.value.getArrayOfbyte().add(JAXWS_Data.Byte_nonull_data[i]); - - for (int i = 0; i < JAXWS_Data.QName_nonull_data.length; i++) - inoutarray11.value.getArrayOfQName().add(JAXWS_Data.QName_nonull_data[i]); - - for (int i = 0; i < JAXWS_Data.XMLGregorianCalendar_nonull_data.length; i++) - inoutarray12.value.getArrayOfdateTime() - .add(JAXWS_Data.XMLGregorianCalendar_nonull_data[i]); - - } - - private void initialize_saved_inout_SimpleType_data() { - inout1_tmp.value = "String4"; - inout2_tmp.value = new BigInteger("3512360"); - inout3_tmp.value = new Integer(Integer.MAX_VALUE); - inout4_tmp.value = new Long(Long.MAX_VALUE); - inout5_tmp.value = new Short(Short.MAX_VALUE); - inout6_tmp.value = new BigDecimal("3512360.1456"); - inout7_tmp.value = new Float(Float.MAX_VALUE); - inout8_tmp.value = new Double(Double.MAX_VALUE); - inout9_tmp.value = Boolean.TRUE; - inout10_tmp.value = Byte.valueOf(Byte.MAX_VALUE); - inout11_tmp.value = new QName("String5"); - inout12_tmp.value = dtfactory.newXMLGregorianCalendar(96, 5, 2, 0, 30, 0, 0, - 0); - - } - - private void save_inout_SimpleType_data() { - inout1_tmp = inout1; - inout2_tmp = inout2; - inout3_tmp = inout3; - inout4_tmp = inout4; - inout5_tmp = inout5; - inout6_tmp = inout6; - inout7_tmp = inout7; - inout8_tmp = inout8; - inout9_tmp = inout9; - inout10_tmp = inout10; - inout11_tmp = inout11; - inout12_tmp = inout12; - } - - private boolean compare_inout_data() { - TestUtil.logMsg("Comparing IN/INOUT data"); - boolean pass = true; - if (!inout1.value.equals(inout1_tmp.value)) { - TestUtil.logErr("compare_data failed for StringHolder - expected " - + inout1_tmp.value + ", received: " + inout1.value); - pass = false; - } - if (!inout2.value.equals(inout2_tmp.value)) { - TestUtil.logErr("compare_data failed for BigIntegerHolder - expected " - + inout2_tmp.value + ", received: " + inout2.value); - pass = false; - } - if (!inout3.value.equals(inout3_tmp.value)) { - TestUtil.logErr("compare_data failed for IntHolder - expected " - + inout3_tmp.value + ", received: " + inout3.value); - pass = false; - } - if (!inout4.value.equals(inout4_tmp.value)) { - TestUtil.logErr("compare_data failed for LongHolder - expected " - + inout4_tmp.value + ", received: " + inout4.value); - pass = false; - } - if (!inout5.value.equals(inout5_tmp.value)) { - TestUtil.logErr("compare_data failed for ShortHolder - expected " - + inout5_tmp.value + ", received: " + inout5.value); - pass = false; - } - if (!inout6.value.equals(inout6_tmp.value)) { - TestUtil.logErr("compare_data failed for BigDecimalHolder - expected " - + inout6_tmp.value + ", received: " + inout6.value); - pass = false; - } - if (!inout7.value.equals(inout7_tmp.value)) { - TestUtil.logErr("compare_data failed for FloatHolder - expected " - + inout7_tmp.value + ", received: " + inout7.value); - pass = false; - } - if (!inout8.value.equals(inout8_tmp.value)) { - TestUtil.logErr("compare_data failed for DoubleHolder - expected " - + inout8_tmp.value + ", received: " + inout8.value); - pass = false; - } - if (!inout9.value.equals(inout9_tmp.value)) { - TestUtil.logErr("compare_data failed for BooleanHolder - expected " - + inout9_tmp.value + ", received: " + inout9.value); - pass = false; - } - if (!inout10.value.equals(inout10_tmp.value)) { - TestUtil.logErr("compare_data failed for ByteHolder - expected " - + inout10_tmp.value + ", received: " + inout10.value); - pass = false; - } - if (!inout11.value.equals(inout11_tmp.value)) { - TestUtil.logErr("compare_data failed for QNameHolder - expected " - + inout11_tmp.value + ", received: " + inout11.value); - pass = false; - } - if (!JAXWS_Data.compareXMLGregorianCalendars(inout12.value, - inout12_tmp.value)) { - TestUtil.logErr( - "compare_data failed for XMLGregorianCalendarHolder - expected " - + inout12_tmp.value + ", received: " + inout12.value); - pass = false; - } - return pass; - } - - private boolean compare_inoutarray_data() { - TestUtil.logMsg("Comparing IN/INOUT ARRAY data"); - boolean pass = true; - - String[] strArray = new String[inoutarray1.value.getArrayOfstring().size()]; - for (int i = 0; i < inoutarray1.value.getArrayOfstring().size(); i++) - strArray[i] = inoutarray1.value.getArrayOfstring().get(i); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.String_nonull_data, strArray, - "String")) { - TestUtil.logErr("String array data miscompare"); - pass = false; - } - - BigInteger[] bigintArray = new BigInteger[inoutarray2.value - .getArrayOfinteger().size()]; - for (int i = 0; i < inoutarray2.value.getArrayOfinteger().size(); i++) - bigintArray[i] = inoutarray2.value.getArrayOfinteger().get(i); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.BigInteger_nonull_data, - bigintArray, "BigInteger")) { - TestUtil.logErr("BigInteger array data miscompare"); - pass = false; - } - - int[] intArray = new int[inoutarray3.value.getArrayOfint().size()]; - for (int i = 0; i < inoutarray3.value.getArrayOfint().size(); i++) - intArray[i] = inoutarray3.value.getArrayOfint().get(i).intValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.int_data, intArray, "int")) { - TestUtil.logErr("int array data miscompare"); - pass = false; - } - - long[] longArray = new long[inoutarray4.value.getArrayOflong().size()]; - for (int i = 0; i < inoutarray4.value.getArrayOflong().size(); i++) - longArray[i] = inoutarray4.value.getArrayOflong().get(i).longValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.long_data, longArray, - "long")) { - TestUtil.logErr("long array data miscompare"); - pass = false; - } - - short[] shortArray = new short[inoutarray5.value.getArrayOfshort().size()]; - for (int i = 0; i < inoutarray5.value.getArrayOfshort().size(); i++) - shortArray[i] = inoutarray5.value.getArrayOfshort().get(i).shortValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.short_data, shortArray, - "short")) { - TestUtil.logErr("short array data miscompare"); - pass = false; - } - - BigDecimal[] bigdecArray = new BigDecimal[inoutarray6.value - .getArrayOfdecimal().size()]; - for (int i = 0; i < inoutarray6.value.getArrayOfdecimal().size(); i++) - bigdecArray[i] = inoutarray6.value.getArrayOfdecimal().get(i); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.BigDecimal_nonull_data, - bigdecArray, "BigDecimal")) { - TestUtil.logErr("BigDecimal array data miscompare"); - pass = false; - } - - float[] floatArray = new float[inoutarray7.value.getArrayOffloat().size()]; - for (int i = 0; i < inoutarray7.value.getArrayOffloat().size(); i++) - floatArray[i] = inoutarray7.value.getArrayOffloat().get(i).floatValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.float_data, floatArray, - "float")) { - TestUtil.logErr("float array data miscompare"); - pass = false; - } - - double[] doubleArray = new double[inoutarray8.value.getArrayOfdouble() - .size()]; - for (int i = 0; i < inoutarray8.value.getArrayOfdouble().size(); i++) - doubleArray[i] = inoutarray8.value.getArrayOfdouble().get(i) - .doubleValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.double_data, doubleArray, - "double")) { - TestUtil.logErr("double array data miscompare"); - pass = false; - } - - boolean[] booleanArray = new boolean[inoutarray9.value.getArrayOfboolean() - .size()]; - for (int i = 0; i < inoutarray9.value.getArrayOfboolean().size(); i++) - booleanArray[i] = inoutarray9.value.getArrayOfboolean().get(i) - .booleanValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.boolean_data, booleanArray, - "boolean")) { - TestUtil.logErr("boolean array data miscompare"); - pass = false; - } - - byte[] byteArray = new byte[inoutarray10.value.getArrayOfbyte().size()]; - for (int i = 0; i < inoutarray10.value.getArrayOfbyte().size(); i++) - byteArray[i] = inoutarray10.value.getArrayOfbyte().get(i).byteValue(); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.byte_data, byteArray, - "byte")) { - TestUtil.logErr("byte array data miscompare"); - pass = false; - } - - QName[] qnameArray = new QName[inoutarray11.value.getArrayOfQName().size()]; - for (int i = 0; i < inoutarray11.value.getArrayOfQName().size(); i++) - qnameArray[i] = inoutarray11.value.getArrayOfQName().get(i); - if (!JAXWS_Data.compareArrayValues(JAXWS_Data.QName_nonull_data, qnameArray, - "QName")) { - TestUtil.logErr("QNameBigDecimal array data miscompare"); - pass = false; - } - - XMLGregorianCalendar[] dateTimeArray = new XMLGregorianCalendar[inoutarray12.value - .getArrayOfdateTime().size()]; - for (int i = 0; i < inoutarray12.value.getArrayOfdateTime().size(); i++) - dateTimeArray[i] = inoutarray12.value.getArrayOfdateTime().get(i); - if (!JAXWS_Data.compareArrayValues( - JAXWS_Data.XMLGregorianCalendar_nonull_data, dateTimeArray, - "XMLGregorianCalendar")) { - TestUtil.logErr("XMLGregorianCalendar array data miscompare"); - pass = false; - } - return pass; - } - - /* - * @testName: InOutSimpleTypesTest - * - * @assertion_ids: JAXWS:SPEC:2031; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InOutSimpleTypesTest() throws Fault { - TestUtil.logTrace("InOutSimpleTypesTest"); - boolean pass = true; - initialize_inout_SimpleType_data(); - initialize_saved_inout_SimpleType_data(); - try { - TestUtil.logMsg("Marshalling input/output data"); - port.echoInOutSimpleTypes(inout1, inout2, inout3, inout4, inout5, inout6, - inout7, inout8, inout9, inout10, inout11, inout12); - if (!compare_inout_data()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutSimpleTypesTest failed"); - } - - /* - * @testName: InOutSimpleTypesArrayTest - * - * @assertion_ids: JAXWS:SPEC:2031; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InOutSimpleTypesArrayTest() throws Fault { - TestUtil.logTrace("InOutSimpleTypesArrayTest"); - boolean pass = true; - try { - initialize_inout_SimpleTypeArray_data(); - TestUtil.logMsg("Marshalling input/output data"); - port.echoInOutSimpleTypesArray(inoutarray1, inoutarray2, inoutarray3, - inoutarray4, inoutarray5, inoutarray6, inoutarray7, inoutarray8, - inoutarray9, inoutarray10, inoutarray11, inoutarray12); - if (!compare_inoutarray_data()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutSimpleTypesArrayTest failed"); - } - - /* - * @testName: InOutUserDefinedTypeTest - * - * @assertion_ids: JAXWS:SPEC:2031; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InOutUserDefinedTypeTest() throws Fault { - TestUtil.logTrace("InOutUserDefinedTypeTest"); - boolean pass = true; - try { - Book b0 = new Book(); - b0.setAuthor("author0"); - b0.setTitle("title0"); - b0.setIsbn(0); - Holder inout_bh = new Holder(); - inout_bh.value = b0; - Book b1 = new Book(); - b1.setAuthor("author1"); - b1.setTitle("title1"); - b1.setIsbn(1); - TestUtil.logMsg("Marshalling input/output data"); - TestUtil.logMsg("Data In: [author0|title0|0]"); - port.echoInOutBook(inout_bh); - Book v = inout_bh.value; - TestUtil.logMsg("Data Out: [" + v.getAuthor() + "|" + v.getTitle() + "|" - + v.getIsbn() + "]"); - if (!v.getAuthor().equals(b1.getAuthor()) - || !v.getTitle().equals(b1.getTitle()) - || v.getIsbn() != b1.getIsbn()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutUserDefinedTypeTest failed"); - } - - /* - * @testName: InOutUserDefinedTypeArrayTest - * - * @assertion_ids: JAXWS:SPEC:2031; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InOutUserDefinedTypeArrayTest() throws Fault { - TestUtil.logTrace("InOutUserDefinedTypeArrayTest"); - boolean pass = true; - try { - Book b0 = new Book(); - b0.setAuthor("author0"); - b0.setTitle("title0"); - b0.setIsbn(0); - Book b1 = new Book(); - b1.setAuthor("author1"); - b1.setTitle("title1"); - b1.setIsbn(1); - ArrayOfBook aob = new ArrayOfBook(); - aob.getArrayOfBook().add(b0); - aob.getArrayOfBook().add(b1); - Holder inout_bh = new Holder(); - inout_bh.value = aob; - Book s[] = new Book[2]; - s[0] = b1; - s[1] = b0; - TestUtil.logMsg("Marshalling input/output data"); - TestUtil.logMsg("Data sent: [" + b0.getAuthor() + "|" + b0.getTitle() - + "|" + b0.getIsbn() + "," + b1.getAuthor() + "|" + b1.getTitle() - + "|" + b1.getIsbn() + "]"); - - port.echoInOutBookArray(inout_bh); - Book r[] = new Book[2]; - java.util.List blist = inout_bh.value.getArrayOfBook(); - if (blist.size() != 2) { - TestUtil.logErr("list size not equal 2"); - pass = false; - } else { - r[0] = blist.get(0); - r[1] = blist.get(1); - TestUtil.logMsg("Data received: [" + r[0].getAuthor() + "|" - + r[0].getTitle() + "|" + r[0].getIsbn() + "," + r[1].getAuthor() - + "|" + r[1].getTitle() + "|" + r[1].getIsbn() + "]"); - for (int i = 0; i < r.length; i++) { - if (!r[i].getAuthor().equals(s[i].getAuthor()) - || !r[i].getTitle().equals(s[i].getTitle()) - || r[i].getIsbn() != s[i].getIsbn()) { - TestUtil - .logMsg("Expected: [" + s[i].getAuthor() + "|" + s[i].getTitle() - + "|" + s[i].getIsbn() + ", result:" + r[i].getAuthor() - + "|" + r[i].getTitle() + "|" + r[i].getIsbn()); - pass = false; - } - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutUserDefinedTypeArrayTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/HolderTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/HolderTestImpl.java deleted file mode 100644 index 72cabb3819..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/HolderTestImpl.java +++ /dev/null @@ -1,474 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.holdertest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; - -import java.math.BigInteger; -import java.math.BigDecimal; -import javax.xml.namespace.QName; -import javax.xml.datatype.*; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "HolderTestPort", serviceName = "HolderTestService", targetNamespace = "http://holdertest.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JRLHolderTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.holdertest.HolderTest") -public class HolderTestImpl implements HolderTest { - private static DatatypeFactory dtfactory = null; - - static { - try { - dtfactory = DatatypeFactory.newInstance(); - } catch (DatatypeConfigurationException e) { - TestUtil.logMsg("Could not configure DatatypeFactory object"); - TestUtil.printStackTrace(e); - } - } - - public void echoInOutSimpleTypes( - jakarta.xml.ws.Holder varString, - jakarta.xml.ws.Holder varInteger, - jakarta.xml.ws.Holder varInt, - jakarta.xml.ws.Holder varLong, - jakarta.xml.ws.Holder varShort, - jakarta.xml.ws.Holder varDecimal, - jakarta.xml.ws.Holder varFloat, - jakarta.xml.ws.Holder varDouble, - jakarta.xml.ws.Holder varBoolean, - jakarta.xml.ws.Holder varByte, - jakarta.xml.ws.Holder varQName, - jakarta.xml.ws.Holder varDateTime) { - System.out.println("Entering echoInOutSimpleTypes()"); - String v1 = "String1"; - BigInteger v2 = new BigInteger("3512359"); - int v3 = (int) Integer.MIN_VALUE; - long v4 = (long) Long.MIN_VALUE; - short v5 = (short) Short.MIN_VALUE; - BigDecimal v6 = new BigDecimal("3512359.1456"); - float v7 = (float) Float.MIN_VALUE; - double v8 = (double) Double.MIN_VALUE; - boolean v9 = false; - byte v10 = (byte) Byte.MIN_VALUE; - QName v11 = new QName("String2"); - XMLGregorianCalendar v12 = dtfactory.newXMLGregorianCalendar(96, 5, 1, 0, - 30, 0, 0, 0); - boolean pass = true; - String result = ""; - if (!v1.equals(varString.value)) { - result = "compare of data failed - received " + varString.value - + ", expected: " + v1; - pass = false; - } - if (!v2.equals(varInteger.value)) { - result = result + "\ncompare of data failed - received " - + varInteger.value + ", expected: " + v2; - pass = false; - } - if (v3 != varInt.value) { - result = result + "\ncompare of data failed - received " + varInt.value - + ", expected: " + v3; - pass = false; - } - if (v4 != varLong.value) { - result = result + "\ncompare of data failed - received " + varLong.value - + ", expected: " + v4; - pass = false; - } - if (v5 != varShort.value) { - result = result + "\ncompare of data failed - received " + varShort.value - + ", expected: " + v5; - pass = false; - } - if (!v6.equals(varDecimal.value)) { - result = result + "\ncompare of data failed - received " - + varDecimal.value + ", expected: " + v6; - pass = false; - } - if (v7 != varFloat.value) { - result = result + "\ncompare of data failed - received " + varFloat.value - + ", expected: " + v7; - pass = false; - } - if (v8 != varDouble.value) { - result = result + "\ncompare of data failed - received " + varDouble.value - + ", expected: " + v8; - pass = false; - } - if (v9 != varBoolean.value) { - result = result + "\ncompare of data failed - received " - + varBoolean.value + ", expected: " + v9; - pass = false; - } - if (v10 != varByte.value) { - result = result + "\ncompare of data failed - received " + varByte.value - + ", expected: " + v10; - pass = false; - } - if (!v11.equals(varQName.value)) { - result = result + "\ncompare of data failed - received " + varQName.value - + ", expected: " + v11; - pass = false; - } - if (!JAXWS_Data.compareXMLGregorianCalendars(v12, varDateTime.value)) { - result = result + "\ncompare of data failed - received " - + varDateTime.value + ", expected: " + v12; - pass = false; - } - if (!pass) { - throw new WebServiceException(result); - } - - varString.value = "String4"; - varInteger.value = new BigInteger("3512360"); - varInt.value = Integer.MAX_VALUE; - varLong.value = Long.MAX_VALUE; - varShort.value = Short.MAX_VALUE; - varDecimal.value = new BigDecimal("3512360.1456"); - varFloat.value = Float.MAX_VALUE; - varDouble.value = Double.MAX_VALUE; - varBoolean.value = true; - varByte.value = Byte.MAX_VALUE; - varQName.value = new QName("String5"); - varDateTime.value = dtfactory.newXMLGregorianCalendar(96, 5, 2, 0, 30, 0, 0, - 0); - System.out.println("Leaving echoInOutSimpleTypes()"); - } - - public void echoInOutSimpleTypesArray( - jakarta.xml.ws.Holder varString, - jakarta.xml.ws.Holder varInteger, - jakarta.xml.ws.Holder varInt, - jakarta.xml.ws.Holder varLong, - jakarta.xml.ws.Holder varShort, - jakarta.xml.ws.Holder varDecimal, - jakarta.xml.ws.Holder varFloat, - jakarta.xml.ws.Holder varDouble, - jakarta.xml.ws.Holder varBoolean, - jakarta.xml.ws.Holder varByte, - jakarta.xml.ws.Holder varQName, - jakarta.xml.ws.Holder varDateTime) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutSimpleTypesArray()"); - if (varString.value.getArrayOfstring() - .size() != JAXWS_Data.String_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.String_nonull_data.length + " got: " - + varString.value.getArrayOfstring().size()); - } else { - for (int i = 0; i < JAXWS_Data.String_nonull_data.length; i++) { - if (!varString.value.getArrayOfstring().get(i) - .equals(JAXWS_Data.String_nonull_data[i])) { - pass = false; - result.append("\nArrayOfstring Value mismatch - expected:" - + JAXWS_Data.String_nonull_data[i]); - result.append("actual:" + varString.value.getArrayOfstring().get(i)); - } - } - } - if (varInteger.value.getArrayOfinteger() - .size() != JAXWS_Data.BigInteger_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.BigInteger_nonull_data.length + " got: " - + varInteger.value.getArrayOfinteger().size()); - } else { - for (int i = 0; i < JAXWS_Data.BigInteger_nonull_data.length; i++) { - if (!varInteger.value.getArrayOfinteger().get(i) - .equals(JAXWS_Data.BigInteger_nonull_data[i])) { - pass = false; - result.append("\nArrayOfinteger Value mismatch - expected:" - + JAXWS_Data.BigInteger_nonull_data[i]); - result - .append("actual:" + varInteger.value.getArrayOfinteger().get(i)); - } - } - } - if (varInt.value.getArrayOfint() - .size() != JAXWS_Data.Integer_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.Integer_nonull_data.length + " got: " - + varInt.value.getArrayOfint().size()); - } else { - for (int i = 0; i < JAXWS_Data.Integer_nonull_data.length; i++) { - if (!varInt.value.getArrayOfint().get(i) - .equals(JAXWS_Data.Integer_nonull_data[i])) { - pass = false; - result.append("\nArrayOfint Value mismatch - expected:" - + JAXWS_Data.Integer_nonull_data[i]); - result.append("actual:" + varInt.value.getArrayOfint().get(i)); - } - } - } - if (varLong.value.getArrayOflong() - .size() != JAXWS_Data.Long_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.Long_nonull_data.length + " got: " - + varLong.value.getArrayOflong().size()); - } else { - for (int i = 0; i < JAXWS_Data.Long_nonull_data.length; i++) { - if (!varLong.value.getArrayOflong().get(i) - .equals(JAXWS_Data.Long_nonull_data[i])) { - pass = false; - result.append("\nArrayOflong Value mismatch - expected:" - + JAXWS_Data.Long_nonull_data[i]); - result.append("actual:" + varLong.value.getArrayOflong().get(i)); - } - } - } - if (varShort.value.getArrayOfshort() - .size() != JAXWS_Data.Short_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.Short_nonull_data.length + " got: " - + varShort.value.getArrayOfshort().size()); - } else { - for (int i = 0; i < JAXWS_Data.Short_nonull_data.length; i++) { - if (!varShort.value.getArrayOfshort().get(i) - .equals(JAXWS_Data.Short_nonull_data[i])) { - pass = false; - result.append("\nArrayOfshort Value mismatch - expected:" - + JAXWS_Data.Short_nonull_data[i]); - result.append("actual:" + varShort.value.getArrayOfshort().get(i)); - } - } - } - if (varDecimal.value.getArrayOfdecimal() - .size() != JAXWS_Data.BigDecimal_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.BigDecimal_nonull_data.length + " got: " - + varDecimal.value.getArrayOfdecimal().size()); - } else { - for (int i = 0; i < JAXWS_Data.BigDecimal_nonull_data.length; i++) { - if (!varDecimal.value.getArrayOfdecimal().get(i) - .equals(JAXWS_Data.BigDecimal_nonull_data[i])) { - pass = false; - result.append("\nArrayOfdecimal Value mismatch - expected:" - + JAXWS_Data.BigDecimal_nonull_data[i]); - result - .append("actual:" + varDecimal.value.getArrayOfdecimal().get(i)); - } - } - } - if (varFloat.value.getArrayOffloat() - .size() != JAXWS_Data.Float_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.Float_nonull_data.length + " got: " - + varFloat.value.getArrayOffloat().size()); - } else { - for (int i = 0; i < JAXWS_Data.Float_nonull_data.length; i++) { - if (!varFloat.value.getArrayOffloat().get(i) - .equals(JAXWS_Data.Float_nonull_data[i])) { - pass = false; - result.append("\nArrayOffloat Value mismatch - expected:" - + JAXWS_Data.Float_nonull_data[i]); - result.append("actual:" + varFloat.value.getArrayOffloat().get(i)); - } - } - } - if (varDouble.value.getArrayOfdouble() - .size() != JAXWS_Data.Double_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.Double_nonull_data.length + " got: " - + varDouble.value.getArrayOfdouble().size()); - } else { - for (int i = 0; i < JAXWS_Data.Double_nonull_data.length; i++) { - if (!varDouble.value.getArrayOfdouble().get(i) - .equals(JAXWS_Data.Double_nonull_data[i])) { - pass = false; - result.append("\nArrayOfdouble Value mismatch - expected:" - + JAXWS_Data.Double_nonull_data[i]); - result.append("actual:" + varDouble.value.getArrayOfdouble().get(i)); - } - } - } - if (varBoolean.value.getArrayOfboolean() - .size() != JAXWS_Data.Boolean_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.Boolean_nonull_data.length + " got: " - + varBoolean.value.getArrayOfboolean().size()); - } else { - for (int i = 0; i < JAXWS_Data.Boolean_nonull_data.length; i++) { - if (!varBoolean.value.getArrayOfboolean().get(i) - .equals(JAXWS_Data.Boolean_nonull_data[i])) { - pass = false; - result.append("\nArrayOfboolean Value mismatch - expected:" - + JAXWS_Data.Boolean_nonull_data[i]); - result - .append("actual:" + varBoolean.value.getArrayOfboolean().get(i)); - } - } - } - if (varByte.value.getArrayOfbyte() - .size() != JAXWS_Data.Byte_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.Byte_nonull_data.length + " got: " - + varByte.value.getArrayOfbyte().size()); - } else { - for (int i = 0; i < JAXWS_Data.Byte_nonull_data.length; i++) { - if (!varByte.value.getArrayOfbyte().get(i) - .equals(JAXWS_Data.Byte_nonull_data[i])) { - pass = false; - result.append("\nArrayOfbyte Value mismatch - expected:" - + JAXWS_Data.Byte_nonull_data[i]); - result.append("actual:" + varByte.value.getArrayOfbyte().get(i)); - } - } - } - if (varQName.value.getArrayOfQName() - .size() != JAXWS_Data.QName_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.QName_nonull_data.length + " got: " - + varQName.value.getArrayOfQName().size()); - } else { - for (int i = 0; i < JAXWS_Data.QName_nonull_data.length; i++) { - if (!varQName.value.getArrayOfQName().get(i) - .equals(JAXWS_Data.QName_nonull_data[i])) { - pass = false; - result.append("\nArrayOfQName Value mismatch - expected:" - + JAXWS_Data.QName_nonull_data[i]); - result.append("actual:" + varQName.value.getArrayOfQName().get(i)); - } - } - } - if (varDateTime.value.getArrayOfdateTime() - .size() != JAXWS_Data.XMLGregorianCalendar_nonull_data.length) { - pass = false; - result.append("\nUnexpected size for Holder, expected: " - + JAXWS_Data.XMLGregorianCalendar_nonull_data.length + " got: " - + varDateTime.value.getArrayOfdateTime().size()); - } else { - for (int i = 0; i < JAXWS_Data.XMLGregorianCalendar_nonull_data.length; i++) { - if (!JAXWS_Data.compareXMLGregorianCalendars( - varDateTime.value.getArrayOfdateTime().get(i), - JAXWS_Data.XMLGregorianCalendar_nonull_data[i])) { - pass = false; - result.append("\nArrayOfdateTime Value mismatch - expected:" - + JAXWS_Data.XMLGregorianCalendar_nonull_data[i]); - result.append( - "actual:" + varDateTime.value.getArrayOfdateTime().get(i)); - } - } - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - System.out.println("Leaving echoInOutSimpleTypesArray()"); - } - - public void echoInOutBook( - jakarta.xml.ws.Holder varBook) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutBook()"); - Book b = varBook.value; - if (!b.getAuthor().equals("author0")) { - pass = false; - result.append("\nUnexpected author was received:"); - result.append("\nExpected=author0" + ", actual=" + b.getAuthor()); - } - if (!b.getTitle().equals("title0")) { - pass = false; - result.append("\nUnexpected title was received:"); - result.append("\nExpected=title0" + ", actual=" + b.getTitle()); - } - if (b.getIsbn() != 0) { - pass = false; - result.append("\nUnexpected isbn was received:"); - result.append("\nExpected=0" + ", actual=" + b.getIsbn()); - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - b.setAuthor("author1"); - b.setTitle("title1"); - b.setIsbn(1); - varBook.value = b; - System.out.println("Leaving echoInOutBook()"); - } - - public void echoInOutBookArray( - jakarta.xml.ws.Holder varBook) { - boolean pass = true; - StringBuffer result = new StringBuffer(); - System.out.println("Entering echoInOutBookArray()"); - java.util.List blist = varBook.value.getArrayOfBook(); - if (blist.size() != 2) - throw new WebServiceException("list size not 2, it was" + blist.size()); - Book bentry0 = blist.get(0); - Book bentry1 = blist.get(1); - if (!bentry0.getAuthor().equals("author0")) { - pass = false; - result.append("\nUnexpected author was received:"); - result.append("\nExpected=author0" + ", actual=" + bentry0.getAuthor()); - } - if (!bentry0.getTitle().equals("title0")) { - pass = false; - result.append("\nUnexpected title was received:"); - result.append("\nExpected=title0" + ", actual=" + bentry0.getTitle()); - } - if (bentry0.getIsbn() != 0) { - pass = false; - result.append("\nUnexpected isbn was received:"); - result.append("\nExpected=0" + ", actual=" + bentry0.getIsbn()); - } - if (!bentry1.getAuthor().equals("author1")) { - pass = false; - result.append("\nUnexpected author was received:"); - result.append("\nExpected=author1" + ", actual=" + bentry1.getAuthor()); - } - if (!bentry1.getTitle().equals("title1")) { - pass = false; - result.append("\nUnexpected title was received:"); - result.append("\nExpected=title1" + ", actual=" + bentry1.getTitle()); - } - if (bentry1.getIsbn() != 1) { - pass = false; - result.append("\nUnexpected isbn was received:"); - result.append("\nExpected=1" + ", actual=" + bentry1.getIsbn()); - } - if (!pass) { - throw new WebServiceException(result.toString()); - } - varBook.value.getArrayOfBook().clear(); - String author = bentry0.getAuthor(); - String title = bentry0.getTitle(); - int isbn = bentry0.getIsbn(); - bentry0.setAuthor(bentry1.getAuthor()); - bentry0.setTitle(bentry1.getTitle()); - bentry0.setIsbn(bentry1.getIsbn()); - bentry1.setAuthor(author); - bentry1.setTitle(title); - bentry1.setIsbn(isbn); - varBook.value.getArrayOfBook().add(bentry0); - varBook.value.getArrayOfBook().add(bentry1); - System.out.println("Leaving echoInOutBookArray()"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/WSW2JRLHolderTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/WSW2JRLHolderTestService.wsdl deleted file mode 100644 index 2ee571337b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/WSW2JRLHolderTestService.wsdl +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/build.xml deleted file mode 100644 index 609cd4e9cd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/customfile.xml deleted file mode 100644 index 125c1dee72..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/jakartaEE.tokens deleted file mode 100644 index 379623827d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jrlholdertest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.holdertest.HolderTestService -SEI=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.holdertest.HolderTest -IMPL=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.holdertest.HolderTestImpl -NAMESPACEURI=http://holdertest.org/wsdl -PORT=HolderTestPort -URLALIAS=/jaxws/HolderTest -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.holdertest.HolderTestImpl -WEBSERVICEDESCRIPTION=HolderTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jrlholdertest -SERVICEREFNAMEWSEJB=service/wsw2jrlholdertest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jrlholdertest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/standalone-sun-jaxws.xml deleted file mode 100644 index f6a0b448df..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/standalone.web.xml deleted file mode 100644 index f232629894..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/holdertest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLHolderTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -HolderTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -HolderTest -/jaxws/HolderTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/Client.java deleted file mode 100644 index 518e8d37d6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/Client.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httpservletmsgctxpropstest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; -import java.util.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httpservletmsgctxpropstest."; - - // service and port information - private static final String NAMESPACEURI = "http://httptestservice.org/wsdl"; - - private static final String SERVICE_NAME = "HttpTestService"; - - private static final String PORT_NAME = "HttpTestPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private static final Class PORT_CLASS = HttpTest.class; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jrlhttpservletmsgctxpropstest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jrlhttpservletmsgctxpropstest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - HttpTest port = null; - - static HttpTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (HttpTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - HttpTestService.class, PORT_QNAME, HttpTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - try { - if (service == null) { - TestUtil.logMsg("WebServiceRef is not set in client"); - TestUtil.logMsg( - "Obtating service via JNDI lookup -> service/wsw2jrlhttpservletmsgctxpropstest"); - InitialContext ic = new InitialContext(); - TestUtil.logMsg( - "Lookup java:comp/env/service/wsw2jrlhttpservletmsgctxpropstest"); - service = (HttpTestService) ic - .lookup("java:comp/env/service/wsw2jrlhttpservletmsgctxpropstest"); - } else { - TestUtil.logMsg("WebServiceRef is set in client"); - } - TestUtil.logMsg("service=" + service); - port = (HttpTest) service.getPort(HttpTest.class); - TestUtil.logMsg("port=" + port); - JAXWS_Util.dumpTargetEndpointAddress(port); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault(t.toString()); - } - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - TestUtil.logMsg("Creating stub instance ..."); - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: TestServletMessageContextProperties - * - * @assertion_ids: WS4EE:SPEC:5004; JAXWS:JAVADOC:69; JAXWS:JAVADOC:129; - * - * @test_Strategy: Test the servlet message context properties. - * - */ - public void TestServletMessageContextProperties() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestServletMessageContextProperties"); - port.testServletProperties(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestServletMessageContextProperties failed", e); - } - - if (!pass) - throw new Fault("TestServletMessageContextProperties failed"); - } - - /* - * @testName: TestHttpMessageContextProperties - * - * @assertion_ids: WS4EE:SPEC:5004; JAXWS:JAVADOC:69; JAXWS:JAVADOC:129; - * - * @test_Strategy: Test the http message context properties. - * - */ - public void TestHttpMessageContextProperties() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestHttpMessageContextProperties"); - port.testHttpProperties(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestHttpMessageContextProperties failed", e); - } - - if (!pass) - throw new Fault("TestHttpMessageContextProperties failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/HttpTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/HttpTestImpl.java deleted file mode 100644 index 3dd3d07a6b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/HttpTestImpl.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httpservletmsgctxpropstest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.HashSet; -import java.util.Set; - -import jakarta.annotation.Resource; - -import jakarta.jws.WebMethod; -import jakarta.jws.WebService; - -import java.lang.reflect.*; - -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.WebServiceContext; - -@WebService(portName = "HttpTestPort", serviceName = "HttpTestService", targetNamespace = "http://httptestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JRLHttpServletMsgCtxPropsTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httpservletmsgctxpropstest.HttpTest") -public class HttpTestImpl implements HttpTest { - - @Resource - private WebServiceContext wsc; - - public HttpTestImpl() { - System.out.println("WebServiceContext wsc=" + wsc); - } - - public void testServletProperties() { - System.out.println("Enter testServletProperties()"); - MessageContext ctxt = wsc.getMessageContext(); - System.out.println("MessageContext.SERVLET_REQUEST=" - + ctxt.get(MessageContext.SERVLET_REQUEST)); - System.out.println("MessageContext.SERVLET_RESPONSE=" - + ctxt.get(MessageContext.SERVLET_RESPONSE)); - System.out.println("MessageContext.SERVLET_CONTEXT=" - + ctxt.get(MessageContext.SERVLET_CONTEXT)); - if (ctxt.get(MessageContext.SERVLET_REQUEST) == null - || ctxt.get(MessageContext.SERVLET_RESPONSE) == null - || ctxt.get(MessageContext.SERVLET_CONTEXT) == null) { - throw new WebServiceException( - "testServletProperties(): MessageContext is not populated."); - } - System.out.println("Leave testServletProperties()"); - } - - public void testHttpProperties() { - System.out.println("Enter testHttpProperties()"); - MessageContext ctxt = wsc.getMessageContext(); - System.out.println("MessageContext.HTTP_REQUEST_HEADERS=" - + ctxt.get(MessageContext.HTTP_REQUEST_HEADERS)); - System.out.println("MessageContext.HTTP_REQUEST_METHOD=" - + ctxt.get(MessageContext.HTTP_REQUEST_METHOD)); - if (ctxt.get(MessageContext.HTTP_REQUEST_HEADERS) == null - || ctxt.get(MessageContext.HTTP_REQUEST_METHOD) == null - || !ctxt.get(MessageContext.HTTP_REQUEST_METHOD).equals("POST")) { - throw new WebServiceException( - "testHttpProperties(): MessageContext is not populated."); - } - System.out.println("Leave testHttpProperties()"); - } - - private String getClientId() { - String id = null; - - Object o1 = wsc.getMessageContext().get(MessageContext.SERVLET_REQUEST); - - try { - if (o1 != null) { - Class c1 = o1.getClass(); - Method getSession = c1.getMethod("getSession"); - Object o2 = getSession.invoke(o1); - Class c2 = o2.getClass(); - Method getId = c2.getMethod("getId"); - id = (String) getId.invoke(o2); - } - } catch (Exception e) { - e.printStackTrace(); - } - return id; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/WSW2JRLHttpServletMsgCtxPropsTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/WSW2JRLHttpServletMsgCtxPropsTestService.wsdl deleted file mode 100644 index a94e0378a4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/WSW2JRLHttpServletMsgCtxPropsTestService.wsdl +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/build.xml deleted file mode 100644 index ece4b70b21..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/customfile.xml deleted file mode 100644 index 799bfe005e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/customfile.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/jakartaEE.tokens deleted file mode 100644 index 05f1b7af0d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jrlhttpservletmsgctxpropstest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httpservletmsgctxpropstest.HttpTestService -SEI=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httpservletmsgctxpropstest.HttpTest -IMPL=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httpservletmsgctxpropstest.HttpTestImpl -NAMESPACEURI=http://httptestservice.org/wsdl -PORT=HttpTestPort -URLALIAS=/jaxws/HttpTest -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httpservletmsgctxpropstest.HttpTestImpl -WEBSERVICEDESCRIPTION=HttpTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jrlhttpservletmsgctxpropstest -SERVICEREFNAMEWSEJB=service/wsw2jrlhttpservletmsgctxpropstest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jrlhttpservletmsgctxpropstest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/standalone-sun-jaxws.xml deleted file mode 100644 index bb00884880..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/standalone.web.xml deleted file mode 100644 index 30f718ccf9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httpservletmsgctxpropstest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLHttpServletMsgCtxPropsTest - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -HttpTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -HttpTest -/jaxws/HttpTest - - -54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/Client.java deleted file mode 100644 index 7d092a3aa5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/Client.java +++ /dev/null @@ -1,494 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest."; - - // service and port information - private static final String NAMESPACEURI = "http://httptestservice.org/wsdl"; - - private static final String SERVICE_NAME = "HttpTestService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private static final Class PORT_CLASS = Hello.class; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jrlhttptest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jrlhttptest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - Hello port = null; - - static HttpTestService service = null; - - /************************************************************************ - * Below are defined good and bad SOAP messages which are sent to a web * - * service endpoint (HttpTestService) over a HttpURLConnection in order * to - * verify whether we get the correct HTTP status codes as required * and - * specified in the WSI Basic Profile Version 1.0 Specification. * - ************************************************************************/ - // expect 2xx http status code - String GoodSoapMessage = "World"; - - // expect 2xx http status code - String GoodSoapMessageNoXMLDeclaration = "World"; - - // expect 2xx http status code - String GoodOneWaySoapMessage = "World"; - - // expect 2xx http status code - String GoodOneWaySoapMessageNoXMLDeclaration = "World"; - - // expect 2xx http status code - String SoapMessageUsingUTF16Encoding = "World"; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (Hello) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - HttpTestService.class, PORT_QNAME, Hello.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - TestUtil.logMsg("Creating stub instance ..."); - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HttpTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: TestGoodSoapMessage - * - * @assertion_ids: WSI:SPEC:R1125; WSI:SPEC:R1111; WSI:SPEC:R4004; - * WS4EE:SPEC:113; WS4EE:SPEC:114; WS4EE:SPEC:115; WS4EE:SPEC:117; - * WS4EE:SPEC:213; WS4EE:SPEC:219; WS4EE:SPEC:221; WS4EE:SPEC:223; - * WS4EE:SPEC:224; WS4EE:SPEC:228; WS4EE:SPEC:248; WS4EE:SPEC:249; - * WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; WS4EE:SPEC:186; - * WS4EE:SPEC:187; WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; - * WS4EE:SPEC:5002; - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection. - * Verify that we get a correct HTTP status code of 2xx. - */ - public void TestGoodSoapMessage() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestGoodSoapMessage"); - TestUtil.logMsg("Send good SOAP RPC request (expect 2xx status code)"); - HttpURLConnection conn = openHttpConnection(url); - int httpStatusCode = sendRequest(conn, GoodSoapMessage, "utf-8"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestGoodSoapMessage failed", e); - } - - if (!pass) - throw new Fault("TestGoodSoapMessage failed"); - } - - /* - * @testName: TestGoodSoapMessageNoXMLDeclaration - * - * @assertion_ids: WSI:SPEC:R1125; WSI:SPEC:R1111; WS4EE:SPEC:113; - * WS4EE:SPEC:114; WS4EE:SPEC:115; WS4EE:SPEC:117; WS4EE:SPEC:213; - * WS4EE:SPEC:219; WS4EE:SPEC:221; WS4EE:SPEC:223; WS4EE:SPEC:224; - * WS4EE:SPEC:228; WS4EE:SPEC:248; WS4EE:SPEC:249; WS4EE:SPEC:183; - * WS4EE:SPEC:184; WS4EE:SPEC:185; WS4EE:SPEC:186; WS4EE:SPEC:187; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection. - * Soap message does not contain the XML declaration. Verify that we get a - * correct HTTP status code of 2xx. - */ - public void TestGoodSoapMessageNoXMLDeclaration() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestGoodSoapMessageNoXMLDeclaration"); - TestUtil.logMsg("Send good SOAP RPC request (expect 2xx status code)"); - HttpURLConnection conn = openHttpConnection(url); - int httpStatusCode = sendRequest(conn, GoodSoapMessageNoXMLDeclaration, - "utf-8"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestGoodSoapMessageNoXMLDeclaration failed", e); - } - - if (!pass) - throw new Fault("TestGoodSoapMessageNoXMLDeclaration failed"); - } - - /* - * @testName: TestGoodOneWaySoapMessage - * - * @assertion_ids: WSI:SPEC:R1125; WSI:SPEC:R1111; WSI:SPEC:R1112; - * WSI:SPEC:R4004; JAXWS:SPEC:11005; JAXWS:SPEC:10016; WS4EE:SPEC:113; - * WS4EE:SPEC:114; WS4EE:SPEC:115; WS4EE:SPEC:117; WS4EE:SPEC:213; - * WS4EE:SPEC:219; WS4EE:SPEC:221; WS4EE:SPEC:223; WS4EE:SPEC:224; - * WS4EE:SPEC:228; WS4EE:SPEC:248; WS4EE:SPEC:249; WS4EE:SPEC:183; - * WS4EE:SPEC:184; WS4EE:SPEC:185; WS4EE:SPEC:186; WS4EE:SPEC:187; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection. - * Verify that we get a correct HTTP status code of 2xx. - */ - public void TestGoodOneWaySoapMessage() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestGoodOneWaySoapMessage"); - TestUtil.logMsg("Send good SOAP RPC request (expect 2xx status code)"); - HttpURLConnection conn = openHttpConnection(url); - int httpStatusCode = sendRequest(conn, GoodOneWaySoapMessage, "utf-8"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestGoodOneWaySoapMessage failed", e); - } - - if (!pass) - throw new Fault("TestGoodOneWaySoapMessage failed"); - } - - /* - * @testName: TestGoodOneWaySoapMessageNoXMLDeclaration - * - * @assertion_ids: WSI:SPEC:R1125; WSI:SPEC:R1111; WSI:SPEC:R1112; - * JAXWS:SPEC:11005; JAXWS:SPEC:10016; WS4EE:SPEC:113; WS4EE:SPEC:114; - * WS4EE:SPEC:115; WS4EE:SPEC:117; WS4EE:SPEC:213; WS4EE:SPEC:219; - * WS4EE:SPEC:221; WS4EE:SPEC:223; WS4EE:SPEC:224; WS4EE:SPEC:228; - * WS4EE:SPEC:248; WS4EE:SPEC:249; WS4EE:SPEC:183; WS4EE:SPEC:184; - * WS4EE:SPEC:185; WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:4000; - * WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection. - * Soap message does not contain the XML declaration. Verify that we get a - * correct HTTP status code of 2xx. - */ - public void TestGoodOneWaySoapMessageNoXMLDeclaration() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestGoodOneWaySoapMessageNoXMLDeclaration"); - TestUtil.logMsg("Send good SOAP RPC request (expect 2xx status code)"); - HttpURLConnection conn = openHttpConnection(url); - int httpStatusCode = sendRequest(conn, - GoodOneWaySoapMessageNoXMLDeclaration, "utf-8"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestGoodOneWaySoapMessageNoXMLDeclaration failed", e); - } - - if (!pass) - throw new Fault("TestGoodOneWaySoapMessageNoXMLDeclaration failed"); - } - - /* - * @testName: TestSoapMessageUsingUTF16Encoding - * - * @assertion_ids: WSI:SPEC:R1125; WSI:SPEC:R1111; WSI:SPEC:R4003; - * WSI:SPEC:R4004; WS4EE:SPEC:113; WS4EE:SPEC:114; WS4EE:SPEC:115; - * WS4EE:SPEC:117; WS4EE:SPEC:213; WS4EE:SPEC:219; WS4EE:SPEC:221; - * WS4EE:SPEC:223; WS4EE:SPEC:224; WS4EE:SPEC:228; WS4EE:SPEC:248; - * WS4EE:SPEC:249; WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; - * WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection. - * Send SOAP RPC request using utf-16 encoding. Verify that we get a correct - * HTTP status code of 2xx. - */ - public void TestSoapMessageUsingUTF16Encoding() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestSoapMessageUsingUTF16Encoding"); - TestUtil.logMsg("Send SOAP RPC request using utf-16 encoding " - + "(expect 2xx status code)"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - OutputStreamWriter out = new OutputStreamWriter(baos, "utf-16"); - out.write(SoapMessageUsingUTF16Encoding); - out.flush(); - out.close(); - boolean debug = false; - if (debug) { - FileOutputStream faos = new FileOutputStream("/tmp/foo"); - out = new OutputStreamWriter(faos, "utf-16"); - out.write(SoapMessageUsingUTF16Encoding); - out.flush(); - out.close(); - faos.close(); - } - TestUtil.logMsg("Original SOAP message length=" - + SoapMessageUsingUTF16Encoding.length()); - TestUtil - .logMsg("Encoded SOAP message length=" + baos.toByteArray().length); - HttpURLConnection conn = openHttpConnection(url); - conn.setRequestProperty("Content-Type", "text/xml; charset=utf-16"); - int httpStatusCode = sendRequest(conn, baos.toByteArray(), "utf-16"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestSoapMessageUsingUTF16Encoding failed", e); - } - - if (!pass) - throw new Fault("TestSoapMessageUsingUTF16Encoding failed"); - } - - private HttpURLConnection openHttpConnection(String s) throws IOException { - HttpURLConnection conn = (HttpURLConnection) new URL(s).openConnection(); - conn.setDoOutput(true); - conn.setDoInput(true); - conn.setRequestMethod("POST"); - conn.setRequestProperty("HTTP-Version", "HTTP/1.1"); - conn.setRequestProperty("Content-Type", "text/xml"); - conn.setRequestProperty("SOAPAction", "\"\""); - return conn; - } - - private void closeHttpConnection(HttpURLConnection conn) throws IOException { - conn.disconnect(); - } - - private int sendRequest(HttpURLConnection conn, String request, - String charsetName) throws IOException { - - TestUtil.logMsg("Request=" + request); - return _sendRequest(conn, request.getBytes(charsetName)); - } - - private int sendRequest(HttpURLConnection conn, byte[] request, - String encoding) throws IOException { - - TestUtil.logMsg("Request=" + new String(request, encoding)); - return _sendRequest(conn, request); - } - - private int _sendRequest(HttpURLConnection conn, byte[] data) - throws IOException { - - conn.setRequestProperty("Content-Length", - Integer.valueOf(data.length).toString()); - OutputStream outputStream = conn.getOutputStream(); - try { - outputStream = conn.getOutputStream(); - outputStream.write(data); - } finally { - try { - outputStream.close(); - } catch (Throwable t) { - } - } - - boolean isFailure = true; - int responseCode = conn.getResponseCode(); - - String responseMessage = conn.getResponseMessage(); - - TestUtil.logMsg("ResponseCode=" + responseCode); - TestUtil.logMsg("ResponseMessage=" + responseMessage); - if (responseCode == HttpURLConnection.HTTP_OK) { - isFailure = false; - } - InputStream istream = null; - BufferedReader reader = null; - try { - istream = !isFailure ? conn.getInputStream() : conn.getErrorStream(); - if (istream != null) { - StringBuilder response = new StringBuilder(); - String buf = null; - reader = new BufferedReader(new InputStreamReader(istream)); - while ((buf = reader.readLine()) != null) { - response.append(buf); - } - if (response.length() != 0) - TestUtil.logMsg("Response=" + response.toString()); - } - } finally { - try { - reader.close(); - istream.close(); - } catch (Throwable t) { - } - } - return responseCode; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/HelloImpl.java deleted file mode 100644 index 4521cb9232..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/HelloImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "HttpTestService", targetNamespace = "http://httptestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JRLHttpTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest.Hello") -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/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTestService.wsdl deleted file mode 100644 index dbb54ce268..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTestService.wsdl +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_web.war.sun-web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_web.war.sun-web.xml deleted file mode 100644 index c9cef3a284..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - HttpTestService - http://webServerHost.1:webServerPort.1/WSW2JRLHttpTest_web/jaxws/Hello?WSDL - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_wsappclient_vehicle_client.jar.sun-application-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index c0eaef2a00..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - service/wsw2jrlhttptest - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest.Hello - - http://httptestservice.org/wsdl - HelloPort - - - http://webServerHost.1:webServerPort.1/WSW2JRLHttpTest_web/jaxws/Hello?WSDL - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_wsejb_vehicle_client.jar.sun-application-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 45f8da2a25..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - WSW2JRLHttpTest_wsejb_vehicle - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 33bea7b61e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - WSW2JRLHttpTest_wsejb_vehicle - - service/wsw2jrlhttptest - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest.Hello - - http://httptestservice.org/wsdl - HelloPort - - - http://webServerHost.1:webServerPort.1/WSW2JRLHttpTest_web/jaxws/Hello?WSDL - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_wsservlet_vehicle_web.war.sun-web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index 1859423c66..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/WSW2JRLHttpTest_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - service/wsw2jrlhttptest - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest.Hello - - http://httptestservice.org/wsdl - HelloPort - - - http://webServerHost.1:webServerPort.1/WSW2JRLHttpTest_web/jaxws/Hello?WSDL - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/build.xml deleted file mode 100644 index 0c8a291a48..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/customfile.xml deleted file mode 100644 index f17d2630a4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/jakartaEE.tokens deleted file mode 100644 index 338bc251f8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jrlhttptest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest.HttpTestService -SEI=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest.Hello -IMPL=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest.HelloImpl -NAMESPACEURI=http://httptestservice.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -SERVLETNAME=HelloImpl -WEBSERVICEDESCRIPTION=HttpTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jrlhttptest -SERVICEREFNAMEWSEJB=service/wsw2jrlhttptest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jrlhttptest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/jakartaEE.webservices.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/jakartaEE.webservices.xml deleted file mode 100644 index 4aecfeac8a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/jakartaEE.webservices.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - HttpTestService - WEB-INF/wsdl/WSW2JRLHttpTestService.wsdl - - HelloImpl - wsdl:HelloPort - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest.Hello - - HelloImpl - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/standalone-sun-jaxws.xml deleted file mode 100644 index 4af3c256fb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/standalone.web.xml deleted file mode 100644 index 4635b723db..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLHttpTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -/jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/wsappclient_vehicle_client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/wsappclient_vehicle_client.xml deleted file mode 100644 index 5337749a9b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/wsappclient_vehicle_client.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - TS app client vehicle - wsappclient_vehicle_client - - service/wsw2jrlhttptest - jakarta.xml.ws.Service - META-INF/wsdl/WSW2JRLHttpTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest.Hello - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/wsejb_vehicle_ejb.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/wsejb_vehicle_ejb.xml deleted file mode 100644 index b880c1af4c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/wsejb_vehicle_ejb.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Ejb1 - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicleRemote - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicle - Stateful - Container - - service/wsw2jrlhttptest - jakarta.xml.ws.Service - META-INF/wsdl/WSW2JRLHttpTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest.Hello - - - - - - - - - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - Remote - runTest - - Required - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/wsservlet_vehicle_web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/wsservlet_vehicle_web.xml deleted file mode 100644 index d02c52912b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/httptest/wsservlet_vehicle_web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - wsservlet_vehicle - - WSServlet_VehicleLogicalName - com.sun.ts.tests.common.vehicle.wsservlet.WSServletVehicle - - - WSServlet_VehicleLogicalName - /wsservlet_vehicle - - - 54 - - - service/wsw2jrlhttptest - jakarta.xml.ws.Service - WEB-INF/wsdl/WSW2JRLHttpTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.httptest.Hello - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/Client.java deleted file mode 100644 index 67c7556b82..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/Client.java +++ /dev/null @@ -1,3621 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; - -import java.util.Properties; - -import java.math.BigInteger; -import java.math.BigDecimal; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import javax.xml.datatype.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest."; - - // service and port information - private static final String NAMESPACEURI = "http://marshalltestservice.org/MarshallTestService.wsdl"; - - private static final String SERVICE_NAME = "MarshallTestService"; - - private static final String PORT_NAME1 = "MarshallTestPort1"; - - private static final String PORT_NAME2 = "MarshallTestPort2"; - - private static final String PORT_NAME3 = "MarshallTestPort3"; - - private static final String PORT_NAME4 = "MarshallTestPort4"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private QName PORT_QNAME2 = new QName(NAMESPACEURI, PORT_NAME2); - - private QName PORT_QNAME3 = new QName(NAMESPACEURI, PORT_NAME3); - - private QName PORT_QNAME4 = new QName(NAMESPACEURI, PORT_NAME4); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jrlmarshalltest.endpoint.1"; - - private static final String ENDPOINT2_URL = "w2jrlmarshalltest.endpoint.2"; - - private static final String ENDPOINT3_URL = "w2jrlmarshalltest.endpoint.3"; - - private static final String ENDPOINT4_URL = "w2jrlmarshalltest.endpoint.4"; - - private static final String WSDLLOC_URL = "w2jrlmarshalltest.wsdlloc.1"; - - private String url = null; - - private String url2 = null; - - private String url3 = null; - - private String url4 = null; - - private URL wsdlurl = null; - - MarshallTest port = null; - - NewSchemaTest port2 = null; - - CompoundTest port3 = null; - - OneWayTest port4 = null; - - static MarshallTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT2_URL); - url2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT3_URL); - url3 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT4_URL); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("Service Endpoint URL: " + url2); - TestUtil.logMsg("Service Endpoint URL: " + url3); - TestUtil.logMsg("Service Endpoint URL: " + url4); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (MarshallTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MarshallTestService.class, PORT_QNAME1, MarshallTest.class); - port2 = (NewSchemaTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MarshallTestService.class, PORT_QNAME2, NewSchemaTest.class); - port3 = (CompoundTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MarshallTestService.class, PORT_QNAME3, CompoundTest.class); - port4 = (OneWayTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - MarshallTestService.class, PORT_QNAME4, OneWayTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - JAXWS_Util.setTargetEndpointAddress(port2, url2); - JAXWS_Util.setTargetEndpointAddress(port3, url3); - JAXWS_Util.setTargetEndpointAddress(port4, url4); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = service.getMarshallTestPort1(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - port2 = service.getMarshallTestPort2(); - TestUtil.logMsg("port2=" + port2); - TestUtil.logMsg("Obtained port2"); - port3 = service.getMarshallTestPort3(); - TestUtil.logMsg("port3=" + port3); - TestUtil.logMsg("Obtained port3"); - port4 = service.getMarshallTestPort4(); - TestUtil.logMsg("port4=" + port4); - TestUtil.logMsg("Obtained port4"); - JAXWS_Util.dumpTargetEndpointAddress(port); - JAXWS_Util.dumpTargetEndpointAddress(port2); - JAXWS_Util.dumpTargetEndpointAddress(port3); - JAXWS_Util.dumpTargetEndpointAddress(port4); - // JAXWS_Util.setTargetEndpointAddress(port, url); - // JAXWS_Util.setTargetEndpointAddress(port2, url2); - // JAXWS_Util.setTargetEndpointAddress(port3, url3); - // JAXWS_Util.setTargetEndpointAddress(port4, url4); - } - - private JavaBean JavaBean_data[] = null; - - private JavaBean2 JavaBean2_data[] = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (MarshallTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - JavaBean_data = new JavaBean[2]; - JavaBean_data[0] = new JavaBean(); - JavaBean_data[1] = new JavaBean(); - JavaBean2_data = new JavaBean2[2]; - JavaBean2_data[0] = new JavaBean2(); - JavaBean2_data[1] = new JavaBean2(); - logMsg("setup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - // ==================================================================== - // Java Primitive Types - // ==================================================================== - - /* - * @testName: MarshallPrimitiveTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each primitive type pass its value as input to the - * corresponding RPC method and receive it back as the return value. Compare - * results of each value/type of what was sent and what was returned. Verify - * they are equal. - * - * Description - */ - public void MarshallPrimitiveTest() throws Fault { - TestUtil.logMsg("MarshallPrimitiveTest"); - boolean pass = true; - - if (!booleanTest()) - pass = false; - if (!byteTest()) - pass = false; - if (!shortTest()) - pass = false; - if (!intTest()) - pass = false; - if (!longTest()) - pass = false; - if (!floatTest()) - pass = false; - if (!doubleTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallPrimitiveTest failed"); - } - - // ==================================================================== - // Standard Java Classes - // ==================================================================== - - /* - * @testName: MarshallStandardJavaClassesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * standard java class type. For each standard java class above pass its value - * as input to the corresponding RPC method and receive it back as the return - * value. Compare results of each value/type of what was sent sent and what - * was returned. Verify they are equal. - * - * Description - */ - public void MarshallStandardJavaClassesTest() throws Fault { - TestUtil.logMsg("MarshallStandardJavaClassesTest"); - boolean pass = true; - - if (!StringTest()) - pass = false; - if (!CalendarTest()) - pass = false; - if (!BigIntegerTest()) - pass = false; - if (!BigDecimalTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallStandardJavaClassesTest failed"); - } - - // ==================================================================== - // JavaBeans Class - // ==================================================================== - - /* - * @testName: MarshallJavaBeanTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method - * JavaBeanTest. Pass a JavaBean value to the RPC method and receive it back - * as the return value. Compare results of JavaBean value from what was sent - * and what was returned. Verify they are equal. - * - * Description - */ - public void MarshallJavaBeanTest() throws Fault { - TestUtil.logMsg("MarshallJavaBeanTest"); - boolean pass = true; - - init_JavaBean_Data(); - JavaBean values[] = JavaBean_data; - JavaBeanTestResponse response; - JavaBeanTest request; - TestUtil.logMsg( - "Passing/Returning JavaBean JavaBean class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new JavaBeanTest(); - request.setJavaBean(values[i]); - response = port.javaBeanTest(request); - if (!compareJavaBeans(values[i], response.getJavaBean())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallJavaBeanTest failed", e); - } - - if (!pass) - throw new Fault("MarshallJavaBeanTest failed"); - } - - // ==================================================================== - // Java Array Single-Dimensional for all supported JAX-WS types - // ==================================================================== - - /* - * @testName: MarshallJavaArrayTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, invoke the RPC methods for each - * java type supported. For each java type supported pass an arrary of values - * as input to the corresponding RPC method and receive it back as the return - * value. Compare results of each array type of what was sent and what was - * returned. Verify they are equal. - * - * Description - */ - public void MarshallJavaArrayTest() throws Fault { - TestUtil.logMsg("MarshallJavaArrayTest"); - boolean pass = true; - - if (!booleanArrayTest()) - pass = false; - if (!byteArrayTest()) - pass = false; - if (!shortArrayTest()) - pass = false; - if (!intArrayTest()) - pass = false; - if (!longArrayTest()) - pass = false; - if (!floatArrayTest()) - pass = false; - if (!doubleArrayTest()) - pass = false; - if (!StringArrayTest()) - pass = false; - if (!CalendarArrayTest()) - pass = false; - if (!BigIntegerArrayTest()) - pass = false; - if (!BigDecimalArrayTest()) - pass = false; - if (!JavaBeanArrayTest()) - pass = false; - if (!QNameArrayTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallJavaArrayTest failed"); - } - // ==================================================================== - // The void type - // ==================================================================== - - /* - * @testName: MarshallVoidTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method voidTest. - * Verify normal invocation and return. - * - * Description - */ - public void MarshallVoidTest() throws Fault { - TestUtil.logMsg("MarshallVoidTest"); - boolean pass = true; - VoidTestResponse response; - TestUtil.logMsg("Handling a void type to/from JAXWS Service"); - try { - port.voidTest(new VoidTest()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallVoidTest failed", e); - } - - if (!pass) - throw new Fault("MarshallVoidTest failed"); - } - - // ======================================================================= - // Marshall Other XML Schema Types (Any, List, Anonymous, ...) - // ======================================================================= - - /* - * @testName: MarshallNormalizedStringTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallNormalizedStringTypeTest() throws Fault { - TestUtil.logMsg("MarshallNormalizedStringTypeTest"); - boolean pass = true; - - String request = "123-ABC12"; - - try { - String response = port2.echoNormalizedStringTypeTest(request); - TestUtil.logMsg("response=" + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallNormalizedStringTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallNormalizedStringTypeTest failed"); - } - - /* - * @testName: MarshallIntegerRangeTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallIntegerRangeTypeTest() throws Fault { - TestUtil.logMsg("MarshallIntegerRangeTypeTest"); - boolean pass = true; - - BigInteger request = new BigInteger("101"); - - try { - TestUtil.logMsg("Sending request: " + request); - BigInteger response = port2.echoIntegerRangeTypeTest(request); - TestUtil.logMsg("response=" + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallIntegerRangeTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallIntegerRangeTypeTest failed"); - } - - /* - * @testName: MarshallEnumTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallEnumTypesTest() throws Fault { - TestUtil.logMsg("MarshallEnumTypesTest"); - boolean pass = true; - - if (!StringEnumTypeTest()) - pass = false; - if (!ByteEnumTypeTest()) - pass = false; - if (!ShortEnumTypeTest()) - pass = false; - if (!IntegerEnumTypeTest()) - pass = false; - if (!IntEnumTypeTest()) - pass = false; - if (!LongEnumTypeTest()) - pass = false; - if (!DecimalEnumTypeTest()) - pass = false; - if (!FloatEnumTypeTest()) - pass = false; - if (!DoubleEnumTypeTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallEnumTypesTest failed"); - } - - /* - * @testName: MarshallAnonymousTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallAnonymousTypeTest() throws Fault { - TestUtil.logMsg("MarshallAnonymousTypeTest"); - boolean pass = true; - - try { - init_FooAnonymousType_Data(); - FooAnonymousType request = FooAnonymousType_data; - FooAnonymousType response = port2.echoAnonymousTypeTest(request); - if (!compareFooAnonymousTypeData(request, response)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallAnonymousTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallAnonymousTypeTest failed"); - } - - /* - * @testName: MarshallVariousSchemaTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallVariousSchemaTypesTest() throws Fault { - TestUtil.logMsg("MarshallVariousSchemaTypesTest"); - boolean pass = true; - - try { - init_FooVariousSchemaTypes_Data(); - FooVariousSchemaTypes request = FooVariousSchemaTypes_data; - TestUtil.logMsg("Send: " + request.getFooA() + "|" + request.getFooB() - + "|" + request.getFooC() + "|" + request.getFooD() + "|" - + request.getFooE() + "|" + request.getFooF()); - FooVariousSchemaTypes response = port2 - .echoVariousSchemaTypesTest(request); - TestUtil.logMsg("Recv: " + response.getFooA() + "|" + response.getFooB() - + "|" + response.getFooC() + "|" + response.getFooD() + "|" - + response.getFooE() + "|" + response.getFooF()); - if (response.getFooA() == request.getFooA() - && response.getFooB().equals(request.getFooB()) - && response.getFooC().equals(request.getFooC()) - && response.getFooD().equals(request.getFooD()) - && response.getFooE() == request.getFooE() - && response.getFooF() == request.getFooF()) { - TestUtil.logMsg("Result match"); - } else { - TestUtil.logErr("Result mismatch"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallVariousSchemaTypesTest failed", e); - } - - if (!pass) - throw new Fault("MarshallVariousSchemaTypesTest failed"); - } - - /* - * @testName: MarshallVariousSchemaTypesListTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; JAXWS:SPEC:2080; - * JAXWS:SPEC:3054; JAXWS:SPEC:3052; JAXWS:SPEC:2084; JAXWS:SPEC:2085; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallVariousSchemaTypesListTypeTest() throws Fault { - TestUtil.logMsg("MarshallVariousSchemaTypesListTypeTest"); - boolean pass = true; - - try { - init_FooVariousSchemaTypes_Data(); - FooVariousSchemaTypesListType request = FooVariousSchemaTypesListType_data; - - FooVariousSchemaTypes fooSend[] = request.getFooA() - .toArray(new FooVariousSchemaTypes[request.getFooA().size()]); - FooVariousSchemaTypesListType response = port2 - .echoVariousSchemaTypesListTypeTest(request); - FooVariousSchemaTypes fooRecv[] = response.getFooA() - .toArray(new FooVariousSchemaTypes[response.getFooA().size()]); - if (fooRecv.length == fooSend.length) { - for (int i = 0; i < fooSend.length; i++) { - if (fooRecv[i].getFooA() == fooSend[i].getFooA() - && fooRecv[i].getFooB().equals(fooSend[i].getFooB()) - && fooRecv[i].getFooC().equals(fooSend[i].getFooC()) - && fooRecv[i].getFooD().equals(fooSend[i].getFooD())) { - TestUtil.logMsg("Result match"); - } else { - TestUtil.logErr("Result mismatch"); - TestUtil.logMsg( - "Send: " + fooSend[i].getFooA() + "|" + fooSend[i].getFooB() - + "|" + fooSend[i].getFooC() + "|" + fooSend[i].getFooD() - + "|" + fooSend[i].getFooE() + "|" + fooSend[i].getFooF()); - TestUtil.logMsg( - "Recv: " + fooRecv[i].getFooA() + "|" + fooRecv[i].getFooB() - + "|" + fooRecv[i].getFooC() + "|" + fooRecv[i].getFooD() - + "|" + fooRecv[i].getFooE() + "|" + fooRecv[i].getFooF()); - pass = false; - } - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallVariousSchemaTypesListTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallVariousSchemaTypesListTypeTest failed"); - } - - /* - * @testName: MarshallAnnotationTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallAnnotationTypeTest() throws Fault { - TestUtil.logMsg("MarshallAnnotationTypeTest"); - boolean pass = true; - - FooAnnotationType request = FooAnnotationType.UNKNOWN; - try { - FooAnnotationType response = port2.echoAnnotationTypeTest(request); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallAnnotationTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallAnnotationTypeTest failed"); - } - - /* - * @testName: MarshallAnySimpleTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallAnySimpleTypeTest() throws Fault { - TestUtil.logMsg("MarshallAnySimpleTypeTest"); - boolean pass = true; - - String request = "hello,there"; - FooAnySimpleType req = null; - try { - req = new FooAnySimpleType(); - req.setFooAnySimpleType(request); - FooAnySimpleType response = port2.echoAnySimpleTypeTest(req); - String res = (String) response.getFooAnySimpleType(); - if (!res.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + res + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + res + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallAnySimpleTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallAnySimpleTypeTest failed"); - } - - /* - * @testName: MarshallAnyURITypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallAnyURITypeTest() throws Fault { - TestUtil.logMsg("MarshallAnyURITypeTest"); - boolean pass = true; - - try { - String uriReq = "http://example.com/myURI"; - FooAnyURIType request = new FooAnyURIType(); - request.setFooAnyURIType(uriReq); - FooAnyURIType response = port2.echoAnyURITypeTest(request); - String uriRes = response.getFooAnyURIType(); - if (!uriRes.equals(uriReq)) { - TestUtil.logErr("Wrong response expected: <" + uriReq + ">, received: <" - + uriRes + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + uriReq - + ">, received: <" + uriRes + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallAnyURITypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallAnyURITypeTest failed"); - } - - /* - * @testName: MarshallLanguageTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallLanguageTypeTest() throws Fault { - TestUtil.logMsg("MarshallLanguageTypeTest"); - boolean pass = true; - - String request = "english"; - LanguageElem req = null; - - try { - req = new LanguageElem(); - req.setLanguageElem(request); - LanguageElem ret = port2.echoLanguageTypeTest(req); - String response = ret.getLanguageElem(); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallLanguageTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallLanguageTypeTest failed"); - } - - /* - * @testName: MarshallTokenTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallTokenTypeTest() throws Fault { - TestUtil.logMsg("MarshallTokenTypeTest"); - boolean pass = true; - - String request = "token"; - TokenElem req = null; - try { - req = new TokenElem(); - req.setTokenElem(request); - TokenElem ret = port2.echoTokenTypeTest(req); - String response = ret.getTokenElem(); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallTokenTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallTokenTypeTest failed"); - } - - /* - * @testName: MarshallNameTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallNameTypeTest() throws Fault { - TestUtil.logMsg("MarshallNameTypeTest"); - boolean pass = true; - - String request = "name"; - NameElem req = null; - try { - req = new NameElem(); - req.setNameElem(request); - NameElem ret = port2.echoNameTypeTest(req); - String response = ret.getNameElem(); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallNameTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallNameTypeTest failed"); - } - - /* - * @testName: MarshallNCNameTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallNCNameTypeTest() throws Fault { - TestUtil.logMsg("MarshallNCNameTypeTest"); - boolean pass = true; - - String request = "ncname"; - NCNameElem req = null; - try { - req = new NCNameElem(); - req.setNCNameElem(request); - NCNameElem ret = port2.echoNCNameTypeTest(req); - String response = ret.getNCNameElem(); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallNCNameTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallNCNameTypeTest failed"); - } - - /* - * @testName: MarshallIDTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallIDTypeTest() throws Fault { - TestUtil.logMsg("MarshallIDTypeTest"); - boolean pass = true; - - String request = "id"; - IDElem req = null; - try { - req = new IDElem(); - req.setIDElem(request); - IDElem ret = port2.echoIDTypeTest(req); - String response = ret.getIDElem(); - if (!response.equals(request)) { - TestUtil.logErr("Wrong response expected: <" + request - + ">, received: <" + response + ">"); - pass = false; - } else { - TestUtil.logMsg("Correct response expected: <" + request - + ">, received: <" + response + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallIDTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallIDTypeTest failed"); - } - - /* - * @testName: MarshallStructXMLSchemaTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method voidTest. - * Verify normal invocation and return. - * - * Description - */ - public void MarshallStructXMLSchemaTypesTest() throws Fault { - TestUtil.logMsg("MarshallStructXMLSchemaTypesTest"); - boolean pass = true; - - try { - InitExpectedFooTypeData(); - if (!sendFoo1Test()) - pass = false; - if (!sendFoo2Test()) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallStructXMLSchemaTypesTest failed", e); - } - - if (!pass) - throw new Fault("MarshallStructXMLSchemaTypesTest failed"); - } - - // ======================================================================= - // Marshall Literal Faults (Foobad1 ... FooBad5) - // ======================================================================= - /* - * @testName: MarshallLiteralFaultsTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; JAXWS:SPEC:2044; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method voidTest. - * Verify literal faults. - * - * Description - */ - public void MarshallLiteralFaultsTest() throws Fault { - TestUtil.logMsg("MarshallLiteralFaults"); - boolean pass = true; - - if (!fooFaultTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallLiteralFaults failed"); - } - - // ======================================================================= - // Marshall XML Schema Complex Types (Person, Employee, Document) - // ======================================================================= - /* - * @testName: MarshallComplexTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods. Test - * with complex types. For each type pass its value as input to the - * corresponding RPC method and receive it back as the return value. Compare - * results of each value/type of what was sent and what was returned. Verify - * they are equal. - * - */ - public void MarshallComplexTypesTest() throws Fault { - String testname = "MarshallComplexTypesTest"; - TestUtil.logTrace(testname); - boolean pass = true; - try { - boolean b1 = doPersonTest(); - if (b1) - TestUtil.logMsg("Person echo success!"); - boolean b2 = doEmployeeTest(); - if (b2) - TestUtil.logMsg("Employee echo success!"); - boolean b3 = doDocumentTest(); - if (b3) - TestUtil.logMsg("Document echo success!"); - if (!b1 || !b2 || !b3) - pass = false; - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault(testname); - } - - if (!pass) - throw new Fault(testname + " failed"); - } - - // ==================================================================== - // One Way Request - // ==================================================================== - - /* - * @testName: MarshallOneWayTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method voidTest. - * Verify normal invocation and return. - * - * Description - */ - public void MarshallOneWayTest() throws Fault { - TestUtil.logMsg("MarshallOneWayTest"); - boolean pass = true; - TestUtil.logMsg("Testing oneway operation to JAXWS Service"); - try { - OneWayMessage v = new OneWayMessage(); - v.setStringValue("A One Way Test"); - port4.oneWayMethod(v); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallOneWayTest failed", e); - } - - if (!pass) - throw new Fault("MarshallOneWayTest failed"); - } - - // ==================================================================== - // Other Simple Types - // ==================================================================== - - /* - * @testName: MarshallOtherSimpleTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * standard java class type. For each other simple type above (QName, - * Base64Binary, and HexBinary) pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent sent and what was returned. Verify they are - * equal. - */ - public void MarshallOtherSimpleTypesTest() throws Fault { - TestUtil.logMsg("MarshallOtherSimpleTypesTest"); - boolean pass = true; - - if (!QNameTest()) - pass = false; - if (!Base64BinaryTest()) - pass = false; - if (!HexBinaryTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallOtherSimpleTypesTest failed"); - } - - /* - * @testName: MarshallUnsignedTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * standard java class type. For each supported unsigned simple type pass its - * value as input to the corresponding RPC method and receive it back as the - * return value. Compare results of each value/type of what was sent sent and - * what was returned. Verify they are equal. - */ - public void MarshallUnsignedTypesTest() throws Fault { - TestUtil.logMsg("MarshallUnsignedTypesTest"); - boolean pass = true; - - if (!UnsignedShortTest()) - pass = false; - if (!UnsignedIntTest()) - pass = false; - if (!UnsignedByteTest()) - pass = false; - if (!UnsignedLongTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallUnsignedTypesTest failed"); - } - - /* - * @testName: MarshallBigIntegerTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * standard java class type. For each supported unsigned simple type pass its - * value as input to the corresponding RPC method and receive it back as the - * return value. Compare results of each value/type of what was sent sent and - * what was returned. Verify they are equal. - */ - public void MarshallBigIntegerTypesTest() throws Fault { - TestUtil.logMsg("MarshallBigIntegerTypesTest"); - boolean pass = true; - - if (!NonPositiveIntegerTest()) - pass = false; - if (!NonNegativeIntegerTest()) - pass = false; - if (!PositiveIntegerTest()) - pass = false; - if (!NegativeIntegerTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallBigIntegerTypesTest failed"); - } - - /* - * @testName: MarshallDateTimeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method. Verify - * normal invocation and return. - * - * Description - */ - public void MarshallDateTimeTest() throws Fault { - TestUtil.logMsg("MarshallDateTimeTest"); - boolean pass = true; - - if (!TimeTest()) - pass = false; - if (!DateTest()) - pass = false; - if (!GYearMonthTest()) - pass = false; - if (!GYearTest()) - pass = false; - if (!GMonthDayTest()) - pass = false; - if (!GDayTest()) - pass = false; - if (!GMonthTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallDateTimeTest failed"); - } - - /* - * @testName: MarshallListTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; JAXWS:SPEC:2080; - * JAXWS:SPEC:3054; JAXWS:SPEC:3052; JAXWS:SPEC:2084; JAXWS:SPEC:2085; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * standard java class type. For each supported unsigned simple type pass its - * value as input to the corresponding RPC method and receive it back as the - * return value. Compare results of each value/type of what was sent sent and - * what was returned. Verify they are equal. - */ - public void MarshallListTypesTest() throws Fault { - TestUtil.logMsg("MarshallListTypesTest"); - boolean pass = true; - - if (!StringListTest()) - pass = false; - if (!IntListTest()) - pass = false; - if (!FloatListTest()) - pass = false; - if (!DecimalListTest()) - pass = false; - if (!DoubleListTest()) - pass = false; - if (!IntegerListTest()) - pass = false; - if (!LongListTest()) - pass = false; - if (!ShortListTest()) - pass = false; - if (!ByteListTest()) - pass = false; - - if (!pass) - throw new Fault("MarshallListTypesTest failed"); - } - - /* - * @testName: MarshallDurationTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: - */ - public void MarshallDurationTest() throws Fault { - TestUtil.logMsg("MarshallDurationTest"); - boolean pass = true; - Duration values[] = JAXWS_Data.Duration_data; - DurationTestResponse response; - DurationTest request; - try { - TestUtil.logMsg("Passing/Returning Duration class to/from JAXWS Service"); - for (int i = 0; i < values.length; i++) { - request = new DurationTest(); - request.setDurationValue(values[i]); - response = port.durationTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getDurationValue(), - "Duration")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("MarshallDurationTest failed"); - } - - /* - * @testName: MarshallMapSimpleTypesTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: In NewSchemaDefs.xsd create a schema of simpletypes derived - * via restriction for string, integer, int, long, short, decimal, float, - * double, boolean, byte and qname. Verify that what was sent to the service - * endpoint is echoed back. Description - */ - public void MarshallMapSimpleTypesTest() throws Fault { - TestUtil.logMsg("MarshallMapSimpleTypesTest"); - boolean pass = true; - String request = "This is from MarshallMapSimpleTypesTest"; - BigDecimalTestResponse bdResponse; - BigDecimalTest bdRequest; - TestUtil.logMsg("Top of MarshallMapSimpleTypesTest"); - try { - String response = port2.echoFooStringTypeTest(request); - TestUtil.logMsg("Received response: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Simple String passes"); - - // ----------------------------------------------- - BigInteger birequest = new BigInteger("5"); - BigInteger biresponse = port2.echoFooIntegerTypeTest(birequest); - if (!birequest.toString().equals(biresponse.toString())) { - TestUtil.logErr("Result mismatch - expected: " + birequest.toString() - + ", received: " + biresponse.toString()); - TestUtil.logErr("Integer failed"); - pass = false; - - } else - TestUtil.logMsg("Simple Integer passes"); - - // ----------------------------------------------- - int irequest = 10; - int iresponse = port2.echoFooIntTypeTest(irequest); - if (irequest != iresponse) { - TestUtil.logErr("Result mismatch - expected: " + irequest - + ", received: " + iresponse); - TestUtil.logErr("Simple int failed"); - pass = false; - } else - TestUtil.logMsg("Simple int passes"); - - // ----------------------------------------------- - - long lrequest = 1000000000000000000L; - long lresponse = port2.echoFooLongTypeTest(lrequest); - if (lrequest != lresponse) { - TestUtil.logErr("Result mismatch - expected: " + lrequest - + ", received: " + lresponse); - TestUtil.logErr("Simple long failed"); - pass = false; - - } else - TestUtil.logMsg("Simple long passes"); - - // ----------------------------------------------- - - short srequest = 32765; - short sresponse = port2.echoFooShortTypeTest(srequest); - if (srequest != sresponse) { - TestUtil.logErr("Result mismatch - expected: " + srequest - + ", received: " + sresponse); - TestUtil.logErr("Simple short failed"); - pass = false; - - } else - TestUtil.logMsg("Simple short passes"); - - // ----------------------------------------------- - TestUtil.logMsg("Testing BigDecimal"); - BigDecimal bdrequest = new BigDecimal("3512359.1456"); - BigDecimal bdresponse = port2.echoFooDecimalTypeTest(bdrequest); - if (!bdrequest.toString().equals(bdresponse.toString())) { - TestUtil.logErr("Result mismatch - expected: " + bdrequest.toString() - + ", received: " + bdresponse.toString()); - TestUtil.logErr("decimal failed"); - pass = false; - - } else - TestUtil.logMsg("Simple decimal passes"); - - // ----------------------------------------------- - TestUtil.logMsg("Testing float"); - float frequest = 489.57f; - float fresponse = port2.echoFooFloatTypeTest(frequest); - if (frequest != fresponse) { - TestUtil.logErr("Result mismatch - expected: " + frequest - + ", received: " + fresponse); - TestUtil.logErr("float failed"); - pass = false; - - } else - TestUtil.logMsg("Simple float passes"); - - // ----------------------------------------------- - TestUtil.logMsg("Testing double "); - double drequest = 5; - double dresponse = port2.echoFooDoubleTypeTest(drequest); - if (drequest != dresponse) { - TestUtil.logErr("Result mismatch - expected: " + drequest - + ", received: " + dresponse); - TestUtil.logErr("double failed"); - pass = false; - - } else - TestUtil.logMsg("Simple double passes"); - - // ----------------------------------------------- - TestUtil.logMsg("Testing boolean"); - boolean brequest = true; - boolean bresponse = port2.echoFooBooleanTypeTest(brequest); - if (brequest != bresponse) { - TestUtil.logErr("Result mismatch - expected: " + brequest - + ", received: " + bresponse); - TestUtil.logErr("boolean failed"); - pass = false; - - } else - TestUtil.logMsg("Simple boolean passes"); - // ----------------------------------------------- - TestUtil.logMsg("Testing byte"); - byte btrequest = 127; - byte btresponse = port2.echoFooByteTypeTest(btrequest); - if (btrequest != btresponse) { - TestUtil.logErr("Result mismatch - expected: " + btrequest - + ", received: " + btresponse); - TestUtil.logErr("byte failed"); - pass = false; - - } else - TestUtil.logMsg("Simple byte passes"); - - // ----------------------------------------------- - TestUtil.logMsg("Testing QName"); - QName qnrequest = new QName("http://marshalltestservice.org/types2", - "localPart"); - QName qnresponse = port2.echoFooQNameTypeTest(qnrequest); - if (!qnresponse.toString().equals(qnrequest.toString())) { - TestUtil.logErr("Result mismatch - expected: " + qnrequest.toString() - + ", received: " + qnresponse.toString()); - TestUtil.logErr("QName failed"); - pass = false; - - } else - TestUtil.logMsg("Simple QName passes"); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("MarshallMapSimpleTypesTest failed"); - } - - /* - * @testName: MarshallIncludedStringTypeTest - * - * @assertion_ids: JAXWS:SPEC:2017; JAXWS:SPEC:2040; - * - * @test_Strategy: test xsd:include by including a schema with a simpleType in - * NewSchemaDefs.xsd. - * - * - * Description - */ - public void MarshallIncludedStringTypeTest() throws Fault { - TestUtil.logMsg("MarshallIncludedStringTypeTest"); - boolean pass = true; - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.IncludedStringRequest request = null; - String myString = "Please echo this back to me "; - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.IncludedStringResponse response = null; - try { - request = new IncludedStringRequest(); - request.setMyString(myString); - response = port2.echoIncludedStringTest(request); - String resp = response.getMyString(); - if (!myString.equals(resp)) { - pass = false; - TestUtil.logMsg("Expected: " + myString + " but returned " + resp); - } else - TestUtil.logMsg("Good String echoed back as expected"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("MarshallNOTATIONTypeTest failed", e); - } - - if (!pass) - throw new Fault("MarshallIncludedStringTypeTest failed"); - } - - /* - * @testName: ClientPassNullTest - * - * @assertion_ids: JAXWS:SPEC:3040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method voidTest. - * - */ - public void ClientPassNullTest() throws Fault { - TestUtil.logMsg("ClientPassNullTest"); - boolean pass = true; - String2TestResponse response; - String2Test request; - try { - TestUtil.logMsg("Try passing null to endpoint method"); - port.nullTest(null); - TestUtil.logErr( - "WebServiceException was not thrown when client tries passing a null"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg( - "WebServiceException was thrown when client tries passing a null"); - } - if (!pass) - throw new Fault("ClientPassNullTest failed"); - } - - /* - * @testName: EndpointPassNullTest - * - * @assertion_ids: JAXWS:SPEC:3040; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC method voidTest. - * - */ - public void EndpointPassNullTest() throws Fault { - TestUtil.logMsg("EndpointPassNullTest"); - boolean pass = true; - String2TestResponse response; - String2Test request; - try { - TestUtil.logMsg("Endpoint tries returning a null to client"); - request = new String2Test(); - request.setStringValue("foobar"); - port.nullTest(request); - TestUtil.logErr( - "WebServiceException was not thrown when endpoint tries passing a null"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg( - "WebServiceException was thrown when endpoint tries passing a null"); - } - if (!pass) - throw new Fault("EndpointPassNullTest failed"); - } - - private boolean printTestStatus(boolean pass, String test) { - if (pass) - TestUtil.logMsg("" + test + " ... PASSED"); - else - TestUtil.logErr("" + test + " ... FAILED"); - - return pass; - } - - private boolean sendFoo1Test() { - TestUtil.logMsg("MarshallOtherXMLSchemaTypesTest:(sendFoo1Test)"); - boolean pass = true; - TestUtil.logMsg( - "Passing/Returning OtherXMLSchemaDataTypes to/from JAXWS Service"); - try { - FooStatusType response = port2.sendFoo1Test(FooType_data); - if (!response.isFooA()) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallOtherXMLSchemaTypesTest:(sendFoo1Test)"); - return pass; - } - - private boolean sendFoo2Test() { - TestUtil.logMsg("MarshallStructXMLSchemaTypesTest:(sendFoo2Test)"); - boolean pass = true; - TestUtil.logMsg( - "Passing/Returning StructXMLSchemaDataTypes to/from JAXWS Service"); - try { - FooType response = port2.sendFoo2Test(FooType_data); - if (!CompareWithExpectedFooTypeData(response)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStructXMLSchemaTypesTest:(sendFoo2Test)"); - return pass; - } - - private boolean fooFaultTest() { - TestUtil.logMsg("MarshallLiteralFaultsTest:(fooFaultTest)"); - boolean pass = true; - TestUtil.logMsg("Testing Literal Faults"); - try { - TestUtil.logMsg("Throw a FooFault with reason - FooBad1"); - FooStringRequest f = new FooStringRequest(); - f.setVarString("FooBad1"); - FooStringResponse response = port2.fooFaultTest(f); - TestUtil.logErr("Did not throw a FooFault"); - pass = false; - } catch (FooFault e) { - TestUtil.logMsg("Did throw a FooFault"); - FooFaultException ffe = e.getFaultInfo(); - TestUtil.logMsg("Reason=" + ffe.getWhyTheFault()); - if (ffe.getWhyTheFault().equals("FooBad1")) - TestUtil.logMsg("Reason for exception - expected"); - else { - pass = false; - TestUtil.logErr("Reason for exception - unexpected", e); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - try { - TestUtil.logMsg("Throw a FooFault with reason - FooBad5"); - FooStringRequest f = new FooStringRequest(); - f.setVarString("FooBad5"); - FooStringResponse response = port2.fooFaultTest(f); - TestUtil.logErr("Did not throw a FooFault"); - pass = false; - } catch (FooFault e) { - TestUtil.logMsg("Did throw a FooFault"); - FooFaultException ffe = e.getFaultInfo(); - TestUtil.logMsg("Reason=" + ffe.getWhyTheFault()); - if (ffe.getWhyTheFault().equals("FooBad5")) - TestUtil.logMsg("Reason for exception - expected"); - else { - pass = false; - TestUtil.logErr("Reason for exception - unexpected", e); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallLiteralFaultsTest:(fooFaultTest)"); - return pass; - } - - private boolean booleanTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(booleanTest)"); - boolean pass = true; - boolean values[] = JAXWS_Data.boolean_data; - BooleanTestResponse response; - BooleanTest request; - TestUtil.logMsg("Passing/Returning boolean data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new BooleanTest(); - request.setBooleanValue(values[i]); - response = port.booleanTest(request); - if (!JAXWS_Data.compareValues(values[i], response.isBooleanValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(booleanTest)"); - return pass; - } - - private boolean byteTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(byteTest)"); - boolean pass = true; - byte values[] = JAXWS_Data.byte_data; - ByteTestResponse response; - ByteTest request; - TestUtil.logMsg("Passing/Returning byte data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new ByteTest(); - request.setByteValue(values[i]); - response = port.byteTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getByteValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(byteTest)"); - return pass; - } - - private boolean shortTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(shortTest)"); - boolean pass = true; - short values[] = JAXWS_Data.short_data; - ShortTestResponse response; - ShortTest request; - TestUtil.logMsg("Passing/Returning short data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new ShortTest(); - request.setShortValue(values[i]); - response = port.shortTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getShortValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(shortTest)"); - return pass; - } - - private boolean intTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(intTest)"); - boolean pass = true; - int values[] = JAXWS_Data.int_data; - IntTestResponse response; - IntTest request; - TestUtil.logMsg("Passing/Returning int data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new IntTest(); - request.setIntValue(values[i]); - response = port.intTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getIntValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(intTest)"); - return pass; - } - - private boolean longTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(longTest)"); - boolean pass = true; - long values[] = JAXWS_Data.long_data; - LongTestResponse response; - LongTest request; - TestUtil.logMsg("Passing/Returning long data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new LongTest(); - request.setLongValue(values[i]); - response = port.longTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getLongValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(longTest)"); - return pass; - } - - private boolean floatTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(floatTest)"); - boolean pass = true; - float values[] = JAXWS_Data.float_data; - FloatTestResponse response; - FloatTest request; - TestUtil.logMsg("Passing/Returning float data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new FloatTest(); - request.setFloatValue(values[i]); - response = port.floatTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getFloatValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(floatTest)"); - return pass; - } - - private boolean doubleTest() { - TestUtil.logMsg("MarshallPrimitiveTest:(doubleTest)"); - boolean pass = true; - double values[] = JAXWS_Data.double_data; - DoubleTestResponse response; - DoubleTest request; - TestUtil.logMsg("Passing/Returning double data to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new DoubleTest(); - request.setDoubleValue(values[i]); - response = port.doubleTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getDoubleValue())) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallPrimitiveTest:(doubleTest)"); - return pass; - } - - private boolean StringTest() { - TestUtil.logMsg("MarshallStandardJavaClassesTest:(StringTest)"); - boolean pass = true; - String values[] = JAXWS_Data.String_data; - StringTestResponse response; - StringTest request; - try { - TestUtil.logMsg("Passing/Returning String class to/from JAXWS Service"); - for (int i = 0; i < values.length; i++) { - request = new StringTest(); - request.setStringValue(values[i]); - response = port.stringTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getStringValue(), - "String")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStandardJavaClassesTest:(StringTest)"); - return pass; - } - - private boolean CalendarTest() { - TestUtil.logMsg("MarshallStandardJavaClassesTest:(CalendarTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - CalendarTestResponse response; - CalendarTest request; - TestUtil.logMsg("Passing/Returning Calendar class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new CalendarTest(); - request.setCalendar(values[i]); - response = port.calendarTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getCalendar(), - "XMLGregorianCalendar")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStandardJavaClassesTest:(CalendarTest)"); - return pass; - } - - private boolean BigIntegerTest() { - TestUtil.logMsg("MarshallStandardJavaClassesTest:(BigIntegerTest)"); - boolean pass = true; - BigInteger values[] = JAXWS_Data.BigInteger_data; - BigIntegerTestResponse response; - BigIntegerTest request; - TestUtil.logMsg("Passing/Returning BigInteger class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new BigIntegerTest(); - request.setBigInteger(values[i]); - response = port.bigIntegerTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getBigInteger(), - "BigInteger")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStandardJavaClassesTest:(BigIntegerTest)"); - return pass; - } - - private boolean BigDecimalTest() { - TestUtil.logMsg("MarshallStandardJavaClassesTest:(BigDecimalTest)"); - boolean pass = true; - BigDecimal values[] = JAXWS_Data.BigDecimal_data; - BigDecimalTestResponse response; - BigDecimalTest request; - TestUtil.logMsg("Passing/Returning BigDecimal class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new BigDecimalTest(); - request.setBigDecimal(values[i]); - response = port.bigDecimalTest(request); - if (!JAXWS_Data.compareValues(values[i], response.getBigDecimal(), - "BigDecimal")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallStandardJavaClassesTest:(BigDecimalTest)"); - return pass; - } - - private boolean booleanArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(booleanArrayTest)"); - boolean pass = true; - boolean values[] = JAXWS_Data.boolean_data; - BooleanArrayTestResponse response; - BooleanArrayTest request; - TestUtil.logMsg("Passing/Returning boolean array to/from JAXWS Service"); - try { - request = new BooleanArrayTest(); - for (int i = 0; i < values.length; i++) - request.getBooleanArray().add(values[i]); - response = port.booleanArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getBooleanArray(), - "boolean"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(booleanArrayTest)"); - return pass; - } - - private boolean byteArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(byteArrayTest)"); - boolean pass = true; - byte values[] = JAXWS_Data.byte_data; - ByteArrayTestResponse response; - ByteArrayTest request; - try { - request = new ByteArrayTest(); - request.setByteArray(values); - response = port.byteArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getByteArray(), - "byte"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(byteArrayTest)"); - return pass; - } - - private boolean shortArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(shortArrayTest)"); - boolean pass = true; - short values[] = JAXWS_Data.short_data; - ShortArrayTestResponse response; - ShortArrayTest request; - try { - request = new ShortArrayTest(); - for (int i = 0; i < values.length; i++) - request.getShortArray().add(values[i]); - response = port.shortArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getShortArray(), - "short"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(shortArrayTest)"); - return pass; - } - - private boolean intArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(intArrayTest)"); - boolean pass = true; - int values[] = JAXWS_Data.int_data; - IntArrayTestResponse response; - IntArrayTest request; - try { - request = new IntArrayTest(); - for (int i = 0; i < values.length; i++) - request.getIntArray().add(values[i]); - response = port.intArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getIntArray(), - "int"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(intArrayTest)"); - return pass; - } - - private boolean longArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(longArrayTest)"); - boolean pass = true; - long values[] = JAXWS_Data.long_data; - LongArrayTestResponse response; - LongArrayTest request; - try { - request = new LongArrayTest(); - for (int i = 0; i < values.length; i++) - request.getLongArray().add(values[i]); - response = port.longArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getLongArray(), - "long"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(longArrayTest)"); - return pass; - } - - private boolean floatArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(floatArrayTest)"); - boolean pass = true; - float values[] = JAXWS_Data.float_data; - FloatArrayTestResponse response; - FloatArrayTest request; - try { - request = new FloatArrayTest(); - for (int i = 0; i < values.length; i++) - request.getFloatArray().add(values[i]); - response = port.floatArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getFloatArray(), - "float"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(floatArrayTest)"); - return pass; - } - - private boolean doubleArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(doubleArrayTest)"); - boolean pass = true; - double values[] = JAXWS_Data.double_data; - DoubleArrayTestResponse response; - DoubleArrayTest request; - try { - request = new DoubleArrayTest(); - for (int i = 0; i < values.length; i++) - request.getDoubleArray().add(values[i]); - response = port.doubleArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getDoubleArray(), - "double"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(doubleArrayTest)"); - return pass; - } - - private boolean StringArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(StringArrayTest)"); - boolean pass = true; - String values[] = JAXWS_Data.String_nonull_data; - StringArrayTestResponse response; - StringArrayTest request; - try { - request = new StringArrayTest(); - for (int i = 0; i < values.length; i++) - request.getStringArray().add(values[i]); - response = port.stringArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getStringArray(), - "String"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(StringArrayTest)"); - return pass; - } - - private boolean CalendarArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(CalendarArrayTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_nonull_data; - CalendarArrayTestResponse response; - CalendarArrayTest request; - try { - request = new CalendarArrayTest(); - for (int i = 0; i < values.length; i++) - request.getCalendarArray().add(values[i]); - response = port.calendarArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, response.getCalendarArray(), - "XMLGregorianCalendar"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - ; - } - printTestStatus(pass, "MarshallJavaArrayTest:(CalendarArrayTest)"); - return pass; - } - - private boolean BigIntegerArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(BigIntegerArrayTest)"); - boolean pass = true; - BigInteger values[] = JAXWS_Data.BigInteger_nonull_data; - BigIntegerArrayTestResponse response; - BigIntegerArrayTest request; - try { - request = new BigIntegerArrayTest(); - for (int i = 0; i < values.length; i++) - request.getBigIntegerArray().add(values[i]); - response = port.bigIntegerArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, - response.getBigIntegerArray(), "BigInteger"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(BigIntegerArrayTest)"); - return pass; - } - - private boolean BigDecimalArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(BigDecimalArrayTest)"); - boolean pass = true; - BigDecimal values[] = JAXWS_Data.BigDecimal_nonull_data; - BigDecimalArrayTestResponse response; - BigDecimalArrayTest request; - try { - request = new BigDecimalArrayTest(); - for (int i = 0; i < values.length; i++) - request.getBigDecimalArray().add(values[i]); - response = port.bigDecimalArrayTest(request); - pass = JAXWS_Data.compareArrayValues(values, - response.getBigDecimalArray(), "BigDecimal"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(BigDecimalArrayTest)"); - return pass; - } - - private boolean JavaBeanArrayTest() { - TestUtil.logMsg("MarshallJavaArrayTest:(JavaBeanArrayTest)"); - boolean pass = true; - - init_JavaBean_Data(); - JavaBean values[] = JavaBean_data; - JavaBeanArrayTestResponse response; - JavaBeanArrayTest request; - JavaBean result[] = new JavaBean[values.length]; - try { - request = new JavaBeanArrayTest(); - for (int i = 0; i < values.length; i++) - request.getJavaBeanArray().add(values[i]); - response = port.javaBeanArrayTest(request); - List l = response.getJavaBeanArray(); - Iterator i = l.iterator(); - int j = 0; - while (i.hasNext()) { - result[j++] = (JavaBean) i.next(); - } - pass = compareArrayValues(values, result, "JavaBean"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "MarshallJavaArrayTest:(JavaBeanArrayTest)"); - return pass; - } - - private void init_JavaBean_Data() { - JavaBean_data[0].setMyBoolean(false); - JavaBean_data[0].setMyByte(Byte.MIN_VALUE); - JavaBean_data[0].setMyShort(Short.MIN_VALUE); - JavaBean_data[0].setMyInt(Integer.MIN_VALUE); - JavaBean_data[0].setMyLong(Long.MIN_VALUE); - JavaBean_data[0].setMyFloat(Float.MIN_VALUE); - JavaBean_data[0].setMyDouble(Double.MIN_VALUE); - JavaBean_data[0].setMyString(""); - JavaBean_data[0].setMyBigInteger(JAXWS_Data.BigInteger_data[0]); - JavaBean_data[0].setMyBigDecimal(JAXWS_Data.BigDecimal_data[0]); - JavaBean_data[0].setMyCalendar(JAXWS_Data.XMLGregorianCalendar_data[0]); - - JavaBean_data[1].setMyBoolean(true); - JavaBean_data[1].setMyByte(Byte.MAX_VALUE); - JavaBean_data[1].setMyShort(Short.MAX_VALUE); - JavaBean_data[1].setMyInt(Integer.MAX_VALUE); - JavaBean_data[1].setMyLong(Long.MAX_VALUE); - JavaBean_data[1].setMyFloat(Float.MAX_VALUE); - JavaBean_data[1].setMyDouble(Double.MAX_VALUE); - JavaBean_data[1].setMyString(""); - JavaBean_data[1].setMyBigInteger(JAXWS_Data.BigInteger_data[1]); - JavaBean_data[1].setMyBigDecimal(JAXWS_Data.BigDecimal_data[1]); - JavaBean_data[1].setMyCalendar(JAXWS_Data.XMLGregorianCalendar_data[1]); - - JavaBean2_data[0].setMyBoolean(false); - JavaBean2_data[0].setMyByte(Byte.MIN_VALUE); - JavaBean2_data[0].setMyShort(Short.MIN_VALUE); - JavaBean2_data[0].setMyInt(Integer.MIN_VALUE); - JavaBean2_data[0].setMyLong(Long.MIN_VALUE); - JavaBean2_data[0].setMyFloat(Float.MIN_VALUE); - JavaBean2_data[0].setMyDouble(Double.MIN_VALUE); - JavaBean2_data[0].setMyString(""); - JavaBean2_data[0].setMyBigInteger(JAXWS_Data.BigInteger_data[0]); - JavaBean2_data[0].setMyBigDecimal(JAXWS_Data.BigDecimal_data[0]); - JavaBean2_data[0].setMyCalendar(JAXWS_Data.XMLGregorianCalendar_data[0]); - - JavaBean2_data[1].setMyBoolean(true); - JavaBean2_data[1].setMyByte(Byte.MAX_VALUE); - JavaBean2_data[1].setMyShort(Short.MAX_VALUE); - JavaBean2_data[1].setMyInt(Integer.MAX_VALUE); - JavaBean2_data[1].setMyLong(Long.MAX_VALUE); - JavaBean2_data[1].setMyFloat(Float.MAX_VALUE); - JavaBean2_data[1].setMyDouble(Double.MAX_VALUE); - JavaBean2_data[1].setMyString(""); - JavaBean2_data[1].setMyBigInteger(JAXWS_Data.BigInteger_data[1]); - JavaBean2_data[1].setMyBigDecimal(JAXWS_Data.BigDecimal_data[1]); - JavaBean2_data[1].setMyCalendar(JAXWS_Data.XMLGregorianCalendar_data[1]); - - JavaBean_data[0].setMyJavaBean(JavaBean2_data[0]); - JavaBean_data[1].setMyJavaBean(JavaBean2_data[1]); - - } - - public String toStringJavaBean(JavaBean v) { - return "myBoolean: " + v.isMyBoolean() + ", myByte: " + v.getMyByte() - + ", myShort: " + v.getMyShort() + ", myInt: " + v.getMyInt() - + ", myLong: " + v.getMyLong() + ", myFloat: " + v.getMyFloat() - + ", myDouble: " + v.getMyDouble() + ", myString: " + v.getMyString() - + ", myBigInteger: " + v.getMyBigInteger() + ", myBigDecimal: " - + v.getMyBigDecimal() + ", myJavaBean: " - + toStringJavaBean2(v.getMyJavaBean()) + ", myCalendar: " - + v.getMyCalendar(); - } - - public String toStringJavaBean2(JavaBean2 v) { - return "myBoolean: " + v.isMyBoolean() + ", myByte: " + v.getMyByte() - + ", myShort: " + v.getMyShort() + ", myInt: " + v.getMyInt() - + ", myLong: " + v.getMyLong() + ", myFloat: " + v.getMyFloat() - + ", myDouble: " + v.getMyDouble() + ", myString: " + v.getMyString() - + ", myBigInteger: " + v.getMyBigInteger() + ", myBigDecimal: " - + v.getMyBigDecimal() + ", myCalendar: " + v.getMyCalendar(); - } - - public boolean compareJavaBeans(JavaBean e, JavaBean r) { - return e.isMyBoolean() == r.isMyBoolean() && e.getMyByte() == r.getMyByte() - && e.getMyShort() == r.getMyShort() && e.getMyInt() == r.getMyInt() - && e.getMyLong() == r.getMyLong() && e.getMyFloat() == r.getMyFloat() - && e.getMyDouble() == r.getMyDouble() - && e.getMyString().equals(r.getMyString()) - && e.getMyBigInteger().equals(r.getMyBigInteger()) - && e.getMyBigDecimal().equals(r.getMyBigDecimal()) - && compareJavaBean2(e.getMyJavaBean(), r.getMyJavaBean()) && JAXWS_Data - .compareXMLGregorianCalendars(e.getMyCalendar(), r.getMyCalendar()); - } - - public boolean compareJavaBean2(JavaBean2 e, JavaBean2 r) { - return e.isMyBoolean() == r.isMyBoolean() && e.getMyByte() == r.getMyByte() - && e.getMyShort() == r.getMyShort() && e.getMyInt() == r.getMyInt() - && e.getMyLong() == r.getMyLong() && e.getMyFloat() == r.getMyFloat() - && e.getMyDouble() == r.getMyDouble() - && e.getMyString().equals(r.getMyString()) - && e.getMyBigInteger().equals(r.getMyBigInteger()) - && e.getMyBigDecimal().equals(r.getMyBigDecimal()) && JAXWS_Data - .compareXMLGregorianCalendars(e.getMyCalendar(), r.getMyCalendar()); - } - - // ================================================================== - // Various utility classes used for dumping/comparing data - // ================================================================== - - private void dumpArrayValues(Object o, String t) { - System.out.println("JAXWS_Data:dumpArrayValues"); - System.out.println("Dumping " + t + " array, size=" + getArraySize(o, t)); - if (t.equals("JavaBean")) { - JavaBean[] v = (JavaBean[]) o; - for (int i = 0; i < v.length; i++) - System.out.println("- " + toStringJavaBean(v[i])); - } - } - - private int getArraySize(Object o, String t) { - System.out.println("JAXWS_Data:getArraySize"); - if (t.equals("JavaBean")) { - return ((JavaBean[]) o).length; - } - return -1; - } - - private boolean compareValues(Object e, Object r, String t) { - boolean pass = true; - - if (t.equals("JavaBean")) { - JavaBean exp = (JavaBean) e; - JavaBean rec = (JavaBean) r; - if (rec == exp) - return true; - if ((rec == null && exp != null) || (rec != null && exp == null)) { - pass = false; - } else if (!compareJavaBeans(exp, rec)) { - System.out.println("Value Mismatch: expected " + toStringJavaBean(exp) - + ", received " + toStringJavaBean(rec)); - pass = false; - } - } - return pass; - } - - private boolean compareArrayValues(Object e, Object r, String t) { - System.out.println("JAXWS_Data:compareArrayValues"); - boolean pass = true; - - if (t.equals("JavaBean")) { - JavaBean[] exp = (JavaBean[]) e; - JavaBean[] rec = (JavaBean[]) r; - if (rec.length != exp.length) { - System.out.println("Array Size MisMatch: expected " + exp.length - + ", received " + rec.length); - pass = false; - } - for (int i = 0; i < rec.length; i++) { - if (rec[i] == exp[i]) - continue; - if ((rec[i] == null && exp[i] != null) - || (rec[i] != null && exp[i] == null)) { - pass = false; - } else if (!compareJavaBeans(exp[i], rec[i])) { - System.out - .println("Array Mismatch: expected " + toStringJavaBean(exp[i]) - + ", received " + toStringJavaBean(rec[i])); - pass = false; - } - } - } - return pass; - } - - private String returnArrayValues(Object o, String t) { - StringBuilder values = new StringBuilder(); - if (t.equals("JavaBean")) { - JavaBean[] v = (JavaBean[]) o; - for (int i = 0; i < v.length; i++) - values.append(", ").append(toStringJavaBean(v[i])); - } - return values.toString(); - } - - private boolean doPersonTest() { - TestUtil.logMsg("doPersonTest"); - boolean pass = true; - // Person arguments - String name = "ChildPerson"; - String sex = "F"; - int age = 10; - float id = (float) Short.MAX_VALUE; - boolean adult = false; - Person person = null; - try { - person = new Person(); - person.setName(name); - person.setAge(age); - person.setSex(sex); - person.setAdult(adult); - person.setId(id); - EchoPersonRequest request = new EchoPersonRequest(); - request.setPerson(person); - EchoPersonResponse response = port3.echoPerson(request); - person = response.getPerson(); - String resultName = person.getName(); - String resultSex = person.getSex(); - int resultAge = person.getAge(); - boolean resultAdult = person.isAdult(); - float resultId = person.getId(); - if (!resultName.equals(name) || !resultSex.equals(sex) - || (resultAge != age) || (resultId != id) || resultAdult) { - TestUtil.logErr("Result mismatch in Person"); - pass = false; - TestUtil.logErr("Expected: <" + name + "," + sex + "," + age + "," + id - + "," + adult + ">, Got: <" + resultName + "," + resultSex + "," - + resultAge + "," + resultId + "," + resultAdult + ">"); - } else { - TestUtil.logMsg( - "Results match!\nExpected: <" + name + "," + sex + "," + age + "," - + id + "," + adult + ">, Got: <" + resultName + "," + resultSex - + "," + resultAge + "," + resultId + "," + resultAdult + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean doEmployeeTest() { - TestUtil.logMsg("doEmployeeTest"); - boolean pass = true; - // Person arguments - String name = "AdultPerson"; - String sex = "M"; - int age = 30; - boolean adult = true; - float id = (float) Short.MAX_VALUE; - // Employee other arguments - double salary = 200000; - int empId = 1; - try { - Person person = new Person(); - person.setName(name); - person.setSex(sex); - person.setAge(age); - person.setAdult(adult); - person.setId(id); - Employee employee = new Employee(); - employee.setPerson(person); - employee.setSalary(salary); - employee.setId(empId); - EchoEmployeeRequest request = new EchoEmployeeRequest(); - request.setEmployee(employee); - EchoEmployeeResponse response = port3.echoEmployee(request); - employee = response.getEmployee(); - // verify results - person = employee.getPerson(); - String resultName = person.getName(); - String resultSex = person.getSex(); - int resultAge = person.getAge(); - float resultId = person.getId(); - boolean resultAdult = person.isAdult(); - if (!resultName.equals(name) || !resultSex.equals(sex) - || (resultAdult != adult) || (resultAge != age) || (resultId != id) - || !resultAdult) { - TestUtil.logErr("Result mismatch in Person"); - pass = false; - TestUtil.logErr("Expected: <" + name + "," + sex + "," + age + "," + id - + "," + adult + ">, Got: <" + resultName + "," + resultSex + "," - + resultAge + "," + resultId + "," + resultAdult + ">"); - - } - float resultSalary = (float) employee.getSalary(); - int resultEmpId = employee.getId(); - if (!pass || (resultSalary != salary) || (resultEmpId != empId)) { - TestUtil.logErr("Result mismatch in Employee"); - pass = false; - TestUtil.logErr("Expected: <" + salary + ", " + empId + ">, Got: <" - + resultSalary + "," + resultEmpId + ">"); - } else { - TestUtil.logMsg("Results match\nExpected: <" + name + "," + sex + "," - + age + "," + id + "," + adult + ">, Got: <" + resultName + "," - + resultSex + "," + resultAge + "," + resultId + "," + resultAdult - + ">\n" + "Expected: <" + salary + ", " + empId + ">, Got: <" - + resultSalary + "," + resultEmpId + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean doDocumentTest() { - String stringID = "myID"; - String stringValue = "myValue"; - TestUtil.logMsg("doDocumentTest"); - boolean pass = true; - try { - Document request = new Document(); - request.setID(stringID); - request.setValue(stringValue); - Document response = port3.echoDocument(request); - if (!response.getID().equals(stringID)) { - TestUtil.logErr("Result mismatch in Document ID"); - TestUtil.logErr( - "Expected: <" + stringID + ">, Got: <" + response.getID() + ">"); - } - if (!response.getValue().equals(stringValue)) { - TestUtil.logErr("Result mismatch in Document Value"); - TestUtil.logErr("Expected: <" + stringValue + ">, Got: <" - + response.getValue() + ">"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean QNameTest() { - TestUtil.logMsg("QNameTest"); - boolean pass = true; - QName arg = new QName("http://foo.bar.com", "localPart"); - TestUtil.logMsg("arg=" + arg); - QNameTestResponse response; - QNameTest request; - TestUtil.logMsg("Passing Returning data to/from JAXWS Service"); - try { - request = new QNameTest(); - request.setQname1(arg); - response = port.qnameTest(request); - TestUtil.logMsg("response=" + response); - TestUtil.logMsg("result=" + response.getResult()); - if (!response.getResult().equals(arg)) { - TestUtil.logErr("QNameTest failed - expected " + arg + ", received: " - + response.getResult()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "QNameTest"); - return pass; - } - - private boolean Base64BinaryTest() { - TestUtil.logMsg("Base64BinaryTest"); - boolean pass = false; - byte values[] = JAXWS_Data.byte_data; - Base64BinaryTest request; - Base64BinaryTestResponse response; - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - request = new Base64BinaryTest(); - request.setBase64Binary1(values); - response = port.base64BinaryTest(request); - byte ret[] = response.getResult(); - - TestUtil.logTrace( - "base64 returned : " + ret[0] + "," + ret[1] + "," + ret[2]); - pass = JAXWS_Data.compareArrayValues(values, response.getResult(), - "byte"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "Base64BinaryTest"); - return pass; - } - - private boolean HexBinaryTest() { - TestUtil.logMsg("HexBinaryTest"); - boolean pass = false; - byte values[] = JAXWS_Data.byte_data; - HexBinaryTest request; - HexBinaryTestResponse response; - TestUtil.logMsg("Passing/Returning data to/from JAXWS Service"); - try { - request = new HexBinaryTest(); - request.setHexBinary1(values); - - response = port.hexBinaryTest(request); - byte ret[] = response.getResult(); - TestUtil.logTrace( - "HexBinary returned : " + ret[0] + "," + ret[1] + "," + ret[2]); - pass = JAXWS_Data.compareArrayValues(values, response.getResult(), - "byte"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "HexBinaryTest"); - return pass; - } - - private FooType FooType_data = null; - - private FooVariousSchemaTypes FooVariousSchemaTypes_data = null; - - private FooVariousSchemaTypes FooVariousSchemaTypes_array_data[] = null; - - private FooVariousSchemaTypesListType FooVariousSchemaTypesListType_data = null; - - private FooAnonymousType FooAnonymousType_data = null; - - private int getIteratorCount(Iterator i) { - int count = 0; - while (i.hasNext() && count < 100) { - ++count; - } - return count; - } - - private void InitExpectedFooTypeData() throws Exception { - init_FooVariousSchemaTypes_Data(); - init_FooAnonymousType_Data(); - init_FooType_Data(); - } - - private boolean CompareWithExpectedFooTypeData(FooType f) { - boolean valid = true; - - if (f.isFooA() != true) { - TestUtil.logErr( - "isFooA() returned " + f.isFooA() + ", expected " + !f.isFooA()); - valid = false; - } - if (f.getFooB() != Byte.MAX_VALUE) { - TestUtil.logErr( - "getFooB() returned " + f.getFooB() + ", expected " + Byte.MAX_VALUE); - valid = false; - } - if (f.getFooC() != Short.MAX_VALUE) { - TestUtil.logErr("getFooC() returned " + f.getFooC() + ", expected " - + Short.MAX_VALUE); - valid = false; - } - if (f.getFooD() != Integer.MAX_VALUE) { - TestUtil.logErr("getFooD() returned " + f.getFooD() + ", expected " - + Integer.MAX_VALUE); - valid = false; - } - if (f.getFooE() != Long.MAX_VALUE) { - TestUtil.logErr( - "getFooE() returned " + f.getFooE() + ", expected " + Long.MAX_VALUE); - valid = false; - } - if (f.getFooF() != Float.MAX_VALUE) { - TestUtil.logErr("getFooF() returned " + f.getFooF() + ", expected " - + Float.MAX_VALUE); - valid = false; - } - if (f.getFooG() != Double.MAX_VALUE) { - TestUtil.logErr("getFooG() returned " + f.getFooG() + ", expected " - + Double.MAX_VALUE); - valid = false; - } - if (!f.getFooH().equals("foostringH")) { - TestUtil.logErr( - "getFooH() returned " + f.getFooH() + ", expected foostringH"); - valid = false; - } - if (!f.getFooI().equals("123-ABC12")) { - TestUtil - .logErr("getFooI() returned " + f.getFooI() + ", expected 123-ABC12"); - valid = false; - } - FooVariousSchemaTypes fnst = f.getFooJ(); - if (fnst == null) { - TestUtil.logErr( - "getFooJ() returned null, " + "expected FooVariousSchemaTypes"); - valid = false; - } - if (fnst != null) { - TestUtil.logMsg("Send: " + FooVariousSchemaTypes_data.getFooA() + "|" - + FooVariousSchemaTypes_data.getFooB() + "|" - + FooVariousSchemaTypes_data.getFooC() + "|" - + FooVariousSchemaTypes_data.getFooD() + "|" - + FooVariousSchemaTypes_data.getFooE() + "|" - + FooVariousSchemaTypes_data.getFooF()); - TestUtil.logMsg("Recv: " + fnst.getFooA() + "|" + fnst.getFooB() + "|" - + fnst.getFooC() + "|" + fnst.getFooD() + "|" + fnst.getFooE() + "|" - + fnst.getFooF()); - if (fnst.getFooA() == FooVariousSchemaTypes_data.getFooA() - && fnst.getFooB().equals(FooVariousSchemaTypes_data.getFooB()) - && fnst.getFooC().equals(FooVariousSchemaTypes_data.getFooC()) - && fnst.getFooD().equals(FooVariousSchemaTypes_data.getFooD()) - && fnst.getFooE() == FooVariousSchemaTypes_data.getFooE() - && fnst.getFooF() == FooVariousSchemaTypes_data.getFooF()) { - TestUtil.logMsg("Result match"); - } else { - TestUtil.logErr("Result mismatch"); - valid = false; - } - } - if (!f.getFooK().equals(new BigInteger("101"))) { - TestUtil.logErr("getFooK() returned " + f.getFooK() + ", expected 101"); - valid = false; - } - if (!(f.getFooM().equals("hello,there"))) { - TestUtil.logErr( - "getFooM() returned " + f.getFooM() + ", expected hello,there"); - valid = false; - } - if (!compareFooAnonymousTypeData(f.getFooN(), FooAnonymousType_data)) - valid = false; - return valid; - } - - private void init_FooVariousSchemaTypes_Data() throws Exception { - FooVariousSchemaTypes_data = new FooVariousSchemaTypes(); - FooVariousSchemaTypes_data.setFooA(1); - FooVariousSchemaTypes_data.setFooB(new BigInteger("1000")); - FooVariousSchemaTypes_data.setFooC("NORMALIZEDSTRING"); - FooVariousSchemaTypes_data.setFooD("NMTOKEN"); - FooVariousSchemaTypes_data.setFooE(1); - FooVariousSchemaTypes_data.setFooF((short) 1); - - FooVariousSchemaTypes_array_data = new FooVariousSchemaTypes[2]; - - FooVariousSchemaTypes_array_data[0] = new FooVariousSchemaTypes(); - FooVariousSchemaTypes_array_data[1] = new FooVariousSchemaTypes(); - FooVariousSchemaTypes_array_data[0].setFooA(256); - FooVariousSchemaTypes_array_data[1].setFooA(0); - FooVariousSchemaTypes_array_data[0].setFooB(JAXWS_Data.BigInteger_data[0]); - FooVariousSchemaTypes_array_data[1].setFooB(JAXWS_Data.BigInteger_data[1]); - FooVariousSchemaTypes_array_data[0].setFooC("NORMALIZEDSTRING1"); - FooVariousSchemaTypes_array_data[1].setFooC("NORMALIZEDSTRING2"); - FooVariousSchemaTypes_array_data[0].setFooD("NMTOKEN1"); - FooVariousSchemaTypes_array_data[1].setFooD("NMTOKEN2"); - FooVariousSchemaTypes_array_data[0].setFooE(0); - FooVariousSchemaTypes_array_data[1].setFooE(1); - FooVariousSchemaTypes_array_data[0].setFooF((short) 0); - FooVariousSchemaTypes_array_data[1].setFooF((short) 1); - - FooVariousSchemaTypesListType_data = new FooVariousSchemaTypesListType(); - - for (int i = 0; i < FooVariousSchemaTypes_array_data.length; i++) { - FooVariousSchemaTypesListType_data.getFooA() - .add(FooVariousSchemaTypes_array_data[i]); - } - } - - private void init_FooAnonymousType_Data() throws Exception { - FooAnonymousType.FooAnonymousElement fe1 = new FooAnonymousType.FooAnonymousElement(); - FooAnonymousType.FooAnonymousElement fe2 = new FooAnonymousType.FooAnonymousElement(); - fe1.setFooA("foo"); - fe1.setFooB(1); - fe1.setFooC(true); - fe2.setFooA("bar"); - fe2.setFooB(0); - fe2.setFooC(false); - - FooAnonymousType_data = new FooAnonymousType(); - FooAnonymousType_data.getFooAnonymousElement().add(fe1); - FooAnonymousType_data.getFooAnonymousElement().add(fe2); - } - - private boolean compareFooAnonymousTypeData(FooAnonymousType request, - FooAnonymousType response) { - boolean valid = true; - - Object[] req = request.getFooAnonymousElement().toArray(); - Object[] res = response.getFooAnonymousElement().toArray(); - if (req.length == res.length) { - TestUtil.logMsg("Array length match - checking array elements"); - for (int i = 0; i < req.length; i++) { - FooAnonymousType.FooAnonymousElement exp = (FooAnonymousType.FooAnonymousElement) req[i]; - FooAnonymousType.FooAnonymousElement rec = (FooAnonymousType.FooAnonymousElement) res[i]; - TestUtil.logMsg("Request: " + exp.getFooA() + "|" + exp.getFooB() + "|" - + exp.isFooC()); - TestUtil.logMsg("Response: " + rec.getFooA() + "|" + rec.getFooB() + "|" - + rec.isFooC()); - if (!exp.getFooA().equals(rec.getFooA()) - || exp.getFooB() != rec.getFooB() || exp.isFooC() != rec.isFooC()) { - valid = false; - TestUtil.logErr("Element results mismatch ..."); - break; - } else - TestUtil.logMsg("Element results match ..."); - } - } else { - TestUtil.logErr("Array length mismatch - expected: " + req.length - + ", received: " + res.length); - } - return valid; - } - - private void init_FooType_Data() throws Exception { - FooType_data = new FooType(); - FooType_data.setFooA(true); - FooType_data.setFooB(Byte.MAX_VALUE); - FooType_data.setFooC(Short.MAX_VALUE); - FooType_data.setFooD(Integer.MAX_VALUE); - FooType_data.setFooE(Long.MAX_VALUE); - FooType_data.setFooF(Float.MAX_VALUE); - FooType_data.setFooG(Double.MAX_VALUE); - FooType_data.setFooH("foostringH"); - FooType_data.setFooI("123-ABC12"); - FooType_data.setFooJ(FooVariousSchemaTypes_data); - FooType_data.setFooK(new BigInteger("101")); - FooType_data.setFooM("hello,there"); - FooType_data.setFooN(FooAnonymousType_data); - } - - private boolean QNameArrayTest() { - TestUtil.logMsg("QNameArrayTest"); - boolean pass = true; - QName values[] = JAXWS_Data.QName_nonull_data; - QNameArrayTest request; - QNameArrayTestResponse response; - QName result[] = new QName[values.length]; - - TestUtil.logMsg("Passing/Returning array data to/from JAXWS Service"); - try { - request = new QNameArrayTest(); - for (int i = 0; i < values.length; i++) - request.getQnameArray1().add(values[i]); - response = port.qnameArrayTest(request); - List l = response.getResult(); - Iterator i = l.iterator(); - int j = 0; - while (i.hasNext()) { - result[j++] = (QName) i.next(); - } - pass = JAXWS_Data.compareArrayValues(values, result, "QName"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - printTestStatus(pass, "QNameArrayTest"); - return pass; - } - - private boolean StringEnumTypeTest() { - boolean pass = true; - FooStringEnumType request = FooStringEnumType.MA; - try { - TestUtil.logMsg("Sending request: " + request); - FooStringEnumType response = port2.echoStringEnumTypeTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean ByteEnumTypeTest() { - boolean pass = true; - byte request = 1; - try { - TestUtil.logMsg("Sending request: " + request); - byte response = port2.echoByteEnumTypeTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (request != response) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean ShortEnumTypeTest() { - boolean pass = true; - short request = 1; - try { - TestUtil.logMsg("Sending request: " + request); - short response = port2.echoShortEnumTypeTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (request != response) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean IntegerEnumTypeTest() { - boolean pass = true; - BigInteger request = new BigInteger("1"); - try { - TestUtil.logMsg("Sending request: " + request); - BigInteger response = port2.echoIntegerEnumTypeTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean IntEnumTypeTest() { - boolean pass = true; - int request = 1; - try { - TestUtil.logMsg("Sending request: " + request); - int response = port2.echoIntEnumTypeTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (request != response) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean LongEnumTypeTest() { - boolean pass = true; - long request = 1; - try { - TestUtil.logMsg("Sending request: " + request); - long response = port2.echoLongEnumTypeTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (request != response) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean DecimalEnumTypeTest() { - boolean pass = true; - BigDecimal request = new BigDecimal("1.1"); - try { - TestUtil.logMsg("Sending request: " + request); - BigDecimal response = port2.echoDecimalEnumTypeTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean FloatEnumTypeTest() { - boolean pass = true; - float request = 1.1f; - try { - TestUtil.logMsg("Sending request: " + request); - float response = port2.echoFloatEnumTypeTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (request != response) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean DoubleEnumTypeTest() { - boolean pass = true; - double request = 1.1; - try { - TestUtil.logMsg("Sending request: " + request); - double response = port2.echoDoubleEnumTypeTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (request != response) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean UnsignedShortTest() { - TestUtil.logTrace("UnsignedShortTest ..."); - boolean pass = true; - int request = 100; - try { - TestUtil.logMsg("Sending request: " + request); - int response = port2.echoUnsignedShortTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (request != response) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean UnsignedIntTest() { - TestUtil.logTrace("UnsignedIntTest ..."); - boolean pass = true; - long request = 100; - try { - TestUtil.logMsg("Sending request: " + request); - long response = port2.echoUnsignedIntTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (request != response) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean UnsignedByteTest() { - TestUtil.logTrace("UnsignedByteTest ..."); - boolean pass = true; - short request = 100; - try { - TestUtil.logMsg("Sending request: " + request); - short response = port2.echoUnsignedByteTest(request); - TestUtil.logMsg("Received respnse: " + response); - if (request != response) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean UnsignedLongTest() { - TestUtil.logTrace("UnsignedLongTest ..."); - boolean pass = true; - BigInteger request = new BigInteger("100"); - try { - TestUtil.logMsg("Sending request: " + request); - BigInteger response = port2.echoUnsignedLongTest(request); - TestUtil.logMsg("Received response: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean NonPositiveIntegerTest() { - TestUtil.logTrace("NonPositiveIntegerTest ..."); - boolean pass = true; - BigInteger request = new BigInteger("-100"); - try { - TestUtil.logMsg("Sending request: " + request); - BigInteger response = port2.echoNonPositiveIntegerTest(request); - TestUtil.logMsg("Received response: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean NonNegativeIntegerTest() { - TestUtil.logTrace("NonNegativeIntegerTest ..."); - boolean pass = true; - BigInteger request = new BigInteger("100"); - try { - TestUtil.logMsg("Sending request: " + request); - BigInteger response = port2.echoNonNegativeIntegerTest(request); - TestUtil.logMsg("Received response: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean NegativeIntegerTest() { - TestUtil.logTrace("NegativeIntegerTest ..."); - boolean pass = true; - BigInteger request = new BigInteger("-100"); - try { - TestUtil.logMsg("Sending request: " + request); - BigInteger response = port2.echoNegativeIntegerTest(request); - TestUtil.logMsg("Received response: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean PositiveIntegerTest() { - TestUtil.logTrace("PositiveIntegerTest ..."); - boolean pass = true; - BigInteger request = new BigInteger("100"); - try { - TestUtil.logMsg("Sending request: " + request); - BigInteger response = port2.echoPositiveIntegerTest(request); - TestUtil.logMsg("Received response: " + response); - if (!request.equals(response)) { - TestUtil.logErr("Result mismatch - expected: " + request - + ", received: " + response); - pass = false; - - } else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean TimeTest() { - TestUtil.logMsg("(TimeTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_nonull_data; - XMLGregorianCalendar request; - XMLGregorianCalendar response; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = values[i]; - response = port2.echoTimeTest(request); - if (!JAXWS_Data.compareValues(values[i], response, - "XMLGregorianCalendar")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(TimeTest)"); - return pass; - } - - private boolean DateTest() { - TestUtil.logMsg("(DateTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_nonull_data; - XMLGregorianCalendar request = null; - XMLGregorianCalendar response = null; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = values[i]; - response = port2.echoDateTest(request); - if (!JAXWS_Data.compareValues(values[i], response, - "XMLGregorianCalendar")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(DateTest)"); - return pass; - } - - private boolean StringListTest() { - TestUtil.logTrace("StringListTest ..."); - boolean pass = true; - String[] request = new String[] { "foo", "bar", "foobar" }; - try { - String[] response = port2.echoStringListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "String")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean DecimalListTest() { - TestUtil.logTrace("DecimalListTest..."); - boolean pass = true; - BigDecimal[] request = new BigDecimal[] { new BigDecimal("3512359.1456"), - new BigDecimal("1"), new BigDecimal("2") }; - try { - BigDecimal[] response = port2.echoDecimalListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "BigDecimal")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean FloatListTest() { - TestUtil.logTrace("FloatListTest..."); - boolean pass = true; - Float[] request = new Float[] { Float.valueOf(Float.MIN_VALUE), - Float.valueOf(Float.MAX_VALUE), Float.valueOf(1) }; - try { - Float[] response = port2.echoFloatListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "Float")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean IntListTest() { - TestUtil.logTrace("IntListTest..."); - boolean pass = true; - Integer[] request = new Integer[] { Integer.valueOf(Integer.MIN_VALUE), - Integer.valueOf(Integer.MAX_VALUE), Integer.valueOf(1) }; - try { - Integer[] response = port2.echoIntListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "Integer")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean IntegerListTest() { - TestUtil.logTrace("IntegerListTest..."); - boolean pass = true; - BigInteger[] request = new BigInteger[] { new BigInteger("0"), - new BigInteger("1"), new BigInteger("2") }; - try { - BigInteger[] response = port2.echoIntegerListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "BigInteger")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean DoubleListTest() { - TestUtil.logTrace("DoubleListTest..."); - boolean pass = true; - Double[] request = new Double[] { Double.valueOf(Double.MIN_VALUE), - Double.valueOf(Double.MAX_VALUE), Double.valueOf(1) }; - try { - Double[] response = port2.echoDoubleListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "Double")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean ByteListTest() { - TestUtil.logTrace("ByteListTest..."); - boolean pass = true; - Byte[] request = new Byte[] { Byte.valueOf(Byte.MIN_VALUE), - Byte.valueOf(Byte.MAX_VALUE) }; - try { - Byte[] response = port2.echoByteListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "Byte")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean LongListTest() { - TestUtil.logTrace("LongListTest..."); - boolean pass = true; - Long[] request = new Long[] { Long.valueOf(Long.MIN_VALUE), - Long.valueOf(Long.MAX_VALUE), Long.valueOf(1) }; - try { - Long[] response = port2.echoLongListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "Long")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean ShortListTest() { - TestUtil.logTrace("ShortListTest..."); - boolean pass = true; - Short[] request = new Short[] { Short.valueOf(Short.MIN_VALUE), - Short.valueOf(Short.MAX_VALUE) }; - try { - Short[] response = port2.echoShortListTypeTest(request); - if (!JAXWS_Data.compareArrayValues(request, response, "Short")) - pass = false; - else - TestUtil.logMsg("Result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean GYearMonthTest() { - TestUtil.logMsg("MarshallDateTimeTest(GYearMonthTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - GYearMonthTest request = null; - GYearMonthTestResponse response = null; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new GYearMonthTest(); - request.setValue(values[i]); - response = port.gYearMonthTest(request); - if (!JAXWS_Data.compareDate(values[i], response.getResult(), "YM")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(GYearMonthTest)"); - return pass; - } - - private boolean GYearTest() { - TestUtil.logMsg("MarshallDateTimeTest(GYearTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - GYearTest request = null; - GYearTestResponse response = null; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new GYearTest(); - request.setValue(values[i]); - response = port.gYearTest(request); - if (!JAXWS_Data.compareDate(values[i], response.getResult(), "Y")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(GYearTest)"); - return pass; - } - - private boolean GMonthDayTest() { - TestUtil.logMsg("MarshallDateTimeTest(GMonthDayTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - GMonthDayTest request = null; - GMonthDayTestResponse response = null; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new GMonthDayTest(); - request.setValue(values[i]); - response = port.gMonthDayTest(request); - if (!JAXWS_Data.compareDate(values[i], response.getResult(), "MD")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(GMonthDayTest)"); - return pass; - } - - private boolean GDayTest() { - TestUtil.logMsg("MarshallDateTimeTest(GDayTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - GDayTest request = null; - GDayTestResponse response = null; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new GDayTest(); - request.setValue(values[i]); - response = port.gDayTest(request); - if (!JAXWS_Data.compareDate(values[i], response.getResult(), "D")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(GDayTest)"); - return pass; - } - - private boolean GMonthTest() { - TestUtil.logMsg("MarshallDateTimeTest(GMonthTest)"); - boolean pass = true; - XMLGregorianCalendar values[] = JAXWS_Data.XMLGregorianCalendar_data; - GMonthTest request = null; - GMonthTestResponse response = null; - TestUtil.logMsg("Passing/Returning Time class to/from JAXWS Service"); - try { - for (int i = 0; i < values.length; i++) { - request = new GMonthTest(); - request.setValue(values[i]); - response = port.gMonthTest(request); - if (values[i] != null && response.getResult() == null) { // BUG 16793203 - pass = false; - TestUtil.logErr("response.getResult() is null"); - } - if (!JAXWS_Data.compareDate(values[i], response.getResult(), "M")) - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "(GMonthTest)"); - return pass; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/CompoundTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/CompoundTestImpl.java deleted file mode 100644 index 7c68b27764..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/CompoundTestImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.soap.Name; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.soap.SOAPException; - -import jakarta.jws.WebService; - -@WebService(targetNamespace = "http://marshalltestservice.org/MarshallTestService.wsdl", portName = "MarshallTestPort3", serviceName = "MarshallTestService", wsdlLocation = "WEB-INF/wsdl/WSW2JRLMarshallTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.CompoundTest") -public class CompoundTestImpl implements CompoundTest { - public EchoEmployeeResponse echoEmployee(EchoEmployeeRequest employee) { - EchoEmployeeResponse employeeResp = new EchoEmployeeResponse(); - employeeResp.setEmployee(employee.getEmployee()); - return employeeResp; - } - - public EchoPersonResponse echoPerson(EchoPersonRequest person) { - EchoPersonResponse personResp = new EchoPersonResponse(); - personResp.setPerson(person.getPerson()); - return personResp; - } - - public Document echoDocument(Document document) { - return document; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/MarshallTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/MarshallTestImpl.java deleted file mode 100644 index 632dd1abdd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/MarshallTestImpl.java +++ /dev/null @@ -1,511 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)MarshallTestImpl.java 1.19 06/03/24 - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(targetNamespace = "http://marshalltestservice.org/MarshallTestService.wsdl", portName = "MarshallTestPort1", serviceName = "MarshallTestService", wsdlLocation = "WEB-INF/wsdl/WSW2JRLMarshallTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.MarshallTest") -public class MarshallTestImpl implements MarshallTest { - - // ==================================================================== - // Java Primitive Types - // ==================================================================== - public BooleanTestResponse booleanTest(BooleanTest v) { - TestUtil.logTrace("booleanTest"); - TestUtil.logMsg("boolean=" + v.isBooleanValue()); - BooleanTestResponse r; - try { - r = new BooleanTestResponse(); - r.setBooleanValue(v.isBooleanValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public ByteTestResponse byteTest(ByteTest v) { - TestUtil.logTrace("byteTest"); - TestUtil.logMsg("byte=" + v.getByteValue()); - ByteTestResponse r; - try { - r = new ByteTestResponse(); - r.setByteValue(v.getByteValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public ShortTestResponse shortTest(ShortTest v) { - TestUtil.logTrace("shortTest"); - TestUtil.logMsg("short=" + v.getShortValue()); - ShortTestResponse r; - try { - r = new ShortTestResponse(); - r.setShortValue(v.getShortValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public IntTestResponse intTest(IntTest v) { - TestUtil.logTrace("intTest"); - TestUtil.logMsg("int=" + v.getIntValue()); - IntTestResponse r; - try { - r = new IntTestResponse(); - r.setIntValue(v.getIntValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public LongTestResponse longTest(LongTest v) { - TestUtil.logTrace("longTest"); - TestUtil.logMsg("long=" + v.getLongValue()); - LongTestResponse r; - try { - r = new LongTestResponse(); - r.setLongValue(v.getLongValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public FloatTestResponse floatTest(FloatTest v) { - TestUtil.logTrace("floatTest"); - TestUtil.logMsg("float=" + v.getFloatValue()); - FloatTestResponse r; - try { - r = new FloatTestResponse(); - r.setFloatValue(v.getFloatValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public DoubleTestResponse doubleTest(DoubleTest v) { - TestUtil.logTrace("doubleTest"); - TestUtil.logMsg("double=" + v.getDoubleValue()); - DoubleTestResponse r; - try { - r = new DoubleTestResponse(); - r.setDoubleValue(v.getDoubleValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - // ==================================================================== - // Java Primitive Type Arrays (Single Dimensional) - // ==================================================================== - public BooleanArrayTestResponse booleanArrayTest(BooleanArrayTest v) { - TestUtil.logTrace("booleanArrayTest"); - BooleanArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getBooleanArray()); - r = new BooleanArrayTestResponse(); - r.getBooleanArray().addAll(v.getBooleanArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public ByteArrayTestResponse byteArrayTest(ByteArrayTest v) { - TestUtil.logTrace("byteArrayTest"); - ByteArrayTestResponse r; - try { - JAXWS_Data.dumpArrayValues(v.getByteArray(), "byte"); - r = new ByteArrayTestResponse(); - r.setByteArray(v.getByteArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public ShortArrayTestResponse shortArrayTest(ShortArrayTest v) { - TestUtil.logTrace("shortArrayTest"); - ShortArrayTestResponse r; - try { - // JAXWS_Data.dumpListValues(v.getShortArray()); - r = new ShortArrayTestResponse(); - r.getShortArray().addAll(v.getShortArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public IntArrayTestResponse intArrayTest(IntArrayTest v) { - TestUtil.logTrace("intArrayTest"); - IntArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getIntArray()); - r = new IntArrayTestResponse(); - r.getIntArray().addAll(v.getIntArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public LongArrayTestResponse longArrayTest(LongArrayTest v) { - TestUtil.logTrace("longArrayTest"); - LongArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getLongArray()); - r = new LongArrayTestResponse(); - r.getLongArray().addAll(v.getLongArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public FloatArrayTestResponse floatArrayTest(FloatArrayTest v) { - TestUtil.logTrace("FloatArrayTest"); - FloatArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getFloatArray()); - r = new FloatArrayTestResponse(); - r.getFloatArray().addAll(v.getFloatArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public DoubleArrayTestResponse doubleArrayTest(DoubleArrayTest v) { - TestUtil.logTrace("doubleArrayTest"); - DoubleArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getDoubleArray()); - r = new DoubleArrayTestResponse(); - r.getDoubleArray().addAll(v.getDoubleArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public QNameArrayTestResponse qnameArrayTest(QNameArrayTest v) { - TestUtil.logTrace("qnameArrayTest"); - QNameArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getQnameArray1()); - r = new QNameArrayTestResponse(); - r.getResult().addAll(v.getQnameArray1()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public QNameTestResponse qnameTest(QNameTest v) { - TestUtil.logTrace("qnameTest"); - TestUtil.logMsg("QName=" + v.getQname1()); - System.out.println("QName=" + v.getQname1()); - QNameTestResponse res; - try { - res = new QNameTestResponse(); - res.setResult(v.getQname1()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return res; - } - - public Base64BinaryTestResponse base64BinaryTest(Base64BinaryTest v) { - TestUtil.logTrace("base64BinaryTest"); - Base64BinaryTestResponse res; - try { - res = new Base64BinaryTestResponse(); - res.setResult(v.getBase64Binary1()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return res; - } - - public HexBinaryTestResponse hexBinaryTest(HexBinaryTest v) { - TestUtil.logTrace("hexBinaryTest"); - HexBinaryTestResponse res; - try { - res = new HexBinaryTestResponse(); - res.setResult(v.getHexBinary1()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return res; - } - - // ==================================================================== - // Standard Java Classes (Scalar, Single Dimensional Arrays) - // ==================================================================== - public StringTestResponse stringTest(StringTest v) { - TestUtil.logTrace("stringTest"); - StringTestResponse r; - try { - TestUtil.logMsg("String=" + v.getStringValue()); - r = new StringTestResponse(); - r.setStringValue(v.getStringValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public StringArrayTestResponse stringArrayTest(StringArrayTest v) { - TestUtil.logTrace("stringArrayTest"); - StringArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getStringArray()); - r = new StringArrayTestResponse(); - r.getStringArray().addAll(v.getStringArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public CalendarTestResponse calendarTest(CalendarTest v) { - TestUtil.logTrace("calendarTest"); - TestUtil.logMsg("Calendar=" + v.getCalendar()); - CalendarTestResponse r; - try { - r = new CalendarTestResponse(); - r.setCalendar(v.getCalendar()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public CalendarArrayTestResponse calendarArrayTest(CalendarArrayTest v) { - TestUtil.logTrace("calendarArrayTest"); - CalendarArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getCalendarArray()); - r = new CalendarArrayTestResponse(); - r.getCalendarArray().addAll(v.getCalendarArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public BigIntegerTestResponse bigIntegerTest(BigIntegerTest v) { - TestUtil.logTrace("bigIntegerTest"); - TestUtil.logMsg("BigInteger=" + v.getBigInteger()); - BigIntegerTestResponse r; - try { - r = new BigIntegerTestResponse(); - r.setBigInteger(v.getBigInteger()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public BigIntegerArrayTestResponse bigIntegerArrayTest( - BigIntegerArrayTest v) { - TestUtil.logTrace("bigIntegerArrayTest"); - BigIntegerArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getBigIntegerArray()); - r = new BigIntegerArrayTestResponse(); - r.getBigIntegerArray().addAll(v.getBigIntegerArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public BigDecimalTestResponse bigDecimalTest(BigDecimalTest v) { - TestUtil.logTrace("bigDecimalTest"); - TestUtil.logMsg("BigDecimal=" + v.getBigDecimal()); - BigDecimalTestResponse r; - try { - r = new BigDecimalTestResponse(); - r.setBigDecimal(v.getBigDecimal()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public BigDecimalArrayTestResponse bigDecimalArrayTest( - BigDecimalArrayTest v) { - TestUtil.logTrace("bigDecimalArrayTest"); - BigDecimalArrayTestResponse r; - try { - JAXWS_Data.dumpListValues(v.getBigDecimalArray()); - r = new BigDecimalArrayTestResponse(); - r.getBigDecimalArray().addAll(v.getBigDecimalArray()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - // ==================================================================== - // JavaBeans Class (Scalar, Single Dimensional Arrays) - // ==================================================================== - public JavaBeanTestResponse javaBeanTest(JavaBeanTest v) { - TestUtil.logTrace("javaBeanTest"); - TestUtil.logMsg("JavaBean=" + v.getJavaBean()); - JavaBeanTestResponse r; - try { - r = new JavaBeanTestResponse(); - r.setJavaBean(v.getJavaBean()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public JavaBeanArrayTestResponse javaBeanArrayTest(JavaBeanArrayTest v) { - TestUtil.logTrace("javaBeanArrayTest"); - JavaBeanArrayTestResponse r; - try { - r = new JavaBeanArrayTestResponse(); - for (JavaBean e : v.getJavaBeanArray()) - r.getJavaBeanArray().add(e); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - // ==================================================================== - // The void type - // ==================================================================== - public VoidTestResponse voidTest(VoidTest v) { - TestUtil.logTrace("voidTest"); - VoidTestResponse r; - try { - r = new VoidTestResponse(); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - // ==================================================================== - // other types - // ==================================================================== - - public GYearMonthTestResponse gYearMonthTest(GYearMonthTest v) { - TestUtil.logTrace("gYearMonthTest"); - GYearMonthTestResponse g; - try { - g = new GYearMonthTestResponse(); - g.setResult(v.getValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return g; - } - - public GYearTestResponse gYearTest(GYearTest v) { - TestUtil.logTrace("gYearTest"); - GYearTestResponse g; - try { - g = new GYearTestResponse(); - g.setResult(v.getValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return g; - } - - public GMonthDayTestResponse gMonthDayTest(GMonthDayTest v) { - TestUtil.logTrace("gMonthDayTest"); - GMonthDayTestResponse g; - try { - g = new GMonthDayTestResponse(); - g.setResult(v.getValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return g; - } - - public GDayTestResponse gDayTest(GDayTest v) { - TestUtil.logTrace("gDayTest"); - GDayTestResponse g; - try { - g = new GDayTestResponse(); - g.setResult(v.getValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return g; - } - - public GMonthTestResponse gMonthTest(GMonthTest v) { - TestUtil.logTrace("gMonthTest"); - GMonthTestResponse g; - try { - g = new GMonthTestResponse(); - g.setResult(v.getValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return g; - } - - public DurationTestResponse durationTest(DurationTest v) { - TestUtil.logTrace("durationTest"); - DurationTestResponse r; - try { - TestUtil.logMsg("Duration=" + v.getDurationValue()); - r = new DurationTestResponse(); - r.setDurationValue(v.getDurationValue()); - } catch (Exception e) { - throw new WebServiceException("Failed on object creation: " + e); - } - return r; - } - - public String2TestResponse nullTest(String2Test v) { - TestUtil.logTrace("nullTest"); - if (v.getStringValue() == null) { - throw new WebServiceException("Null got to endpoint"); - } - return null; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/NewSchemaTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/NewSchemaTestImpl.java deleted file mode 100644 index e44514cd23..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/NewSchemaTestImpl.java +++ /dev/null @@ -1,530 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest; - -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; - -import java.math.BigInteger; -import java.math.BigDecimal; -import javax.xml.datatype.*; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(targetNamespace = "http://marshalltestservice.org/MarshallTestService.wsdl", portName = "MarshallTestPort2", serviceName = "MarshallTestService", wsdlLocation = "WEB-INF/wsdl/WSW2JRLMarshallTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.NewSchemaTest") - -public class NewSchemaTestImpl implements NewSchemaTest { - - public FooStringResponse fooFaultTest(FooStringRequest fooRequest) - throws FooFault { - FooStringResponse f = null; - FooFaultException ffe = null; - try { - f = new FooStringResponse(); - f.setVarString(fooRequest.getVarString()); - ffe = new FooFaultException(); - ffe.setWhyTheFault(fooRequest.getVarString()); - } catch (Exception e) { - throw new WebServiceException("failed on object creation: " + e); - } - if (fooRequest.getVarString().equals("FooBad1")) { - throw new FooFault("FooBad1", ffe); - } else if (fooRequest.getVarString().equals("FooBad2")) { - throw new FooFault("FooBad2", ffe); - } else if (fooRequest.getVarString().equals("FooBad3")) { - throw new FooFault("FooBad3", ffe); - } else if (fooRequest.getVarString().equals("FooBad4")) { - throw new FooFault("FooBad4", ffe); - } else if (fooRequest.getVarString().equals("FooBad5")) { - throw new FooFault("FooBad5", ffe); - } - return f; - } - - public IncludedStringResponse echoIncludedStringTest( - IncludedStringRequest request) { - IncludedStringResponse ret = null; - try { - String sret = request.getMyString(); - ret = new IncludedStringResponse(); - ret.setMyString(sret); - } catch (Exception e) { - throw new WebServiceException("failed on object creation: " + e); - } - return ret; - } - - public String echoFooStringTypeTest(String request) { - return request; - } - - public java.math.BigInteger echoFooIntegerTypeTest( - java.math.BigInteger request) { - return request; - } - - public int echoFooIntTypeTest(int request) { - return request; - } - - public long echoFooLongTypeTest(long request) { - return request; - } - - public short echoFooShortTypeTest(short request) { - return request; - } - - public BigDecimal echoFooDecimalTypeTest(BigDecimal request) { - return request; - } - - public float echoFooFloatTypeTest(float request) { - return request; - } - - public double echoFooDoubleTypeTest(double request) { - return request; - } - - public boolean echoFooBooleanTypeTest(boolean request) { - return request; - } - - public byte echoFooByteTypeTest(byte request) { - return request; - } - - public javax.xml.namespace.QName echoFooQNameTypeTest( - javax.xml.namespace.QName request) { - return request; - } - - public FooStatusType sendFoo1Test(FooType fooRequest) { - InitExpectedFooTypeData(); - FooStatusType fooStatus; - - try { - fooStatus = new FooStatusType(); - fooStatus.setFooA(CompareWithExpectedFooTypeData(fooRequest)); - } catch (Exception e) { - throw new WebServiceException("failed on object creation: " + e); - } - return fooStatus; - } - - public FooType sendFoo2Test(FooType fooRequest) { - return fooRequest; - } - - public String echoNormalizedStringTypeTest(String v) { - return v; - } - - public FooVariousSchemaTypes echoVariousSchemaTypesTest( - FooVariousSchemaTypes v) { - return v; - } - - public FooVariousSchemaTypesListType echoVariousSchemaTypesListTypeTest( - FooVariousSchemaTypesListType v) { - return v; - } - - public BigInteger echoIntegerRangeTypeTest(BigInteger v) { - return v; - } - - public FooStringEnumType echoStringEnumTypeTest(FooStringEnumType v) { - return v; - } - - public byte echoByteEnumTypeTest(byte v) { - return v; - } - - public short echoShortEnumTypeTest(short v) { - return v; - } - - public BigInteger echoIntegerEnumTypeTest(BigInteger v) { - return v; - } - - public int echoIntEnumTypeTest(int v) { - return v; - } - - public long echoLongEnumTypeTest(long v) { - return v; - } - - public BigDecimal echoDecimalEnumTypeTest(BigDecimal v) { - return v; - } - - public float echoFloatEnumTypeTest(float v) { - return v; - } - - public double echoDoubleEnumTypeTest(double v) { - return v; - } - - public FooAnonymousType echoAnonymousTypeTest(FooAnonymousType v) { - return v; - } - - public FooAnnotationType echoAnnotationTypeTest(FooAnnotationType v) { - return v; - } - - public FooAnySimpleType echoAnySimpleTypeTest(FooAnySimpleType v) { - return v; - } - - public FooAnyURIType echoAnyURITypeTest(FooAnyURIType v) { - return v; - } - - public LanguageElem echoLanguageTypeTest(LanguageElem v) { - return v; - } - - public TokenElem echoTokenTypeTest(TokenElem v) { - return v; - } - - public NameElem echoNameTypeTest(NameElem v) { - return v; - } - - public NCNameElem echoNCNameTypeTest(NCNameElem v) { - return v; - } - - public IDElem echoIDTypeTest(IDElem v) { - return v; - } - - public int echoUnsignedShortTest(int v) { - return v; - } - - public long echoUnsignedIntTest(long v) { - return v; - } - - public short echoUnsignedByteTest(short v) { - return v; - } - - public BigInteger echoUnsignedLongTest(BigInteger v) { - return v; - } - - public BigInteger echoNonPositiveIntegerTest(BigInteger v) { - return v; - } - - public BigInteger echoNonNegativeIntegerTest(BigInteger v) { - return v; - } - - public BigInteger echoPositiveIntegerTest(BigInteger v) { - return v; - } - - public BigInteger echoNegativeIntegerTest(BigInteger v) { - return v; - } - - public XMLGregorianCalendar echoTimeTest(XMLGregorianCalendar v) { - return v; - } - - public XMLGregorianCalendar echoDateTest(XMLGregorianCalendar v) { - return v; - } - - public String[] echoStringListTypeTest(String[] v) { - return v; - } - - public Float[] echoFloatListTypeTest(Float[] v) { - return v; - } - - public Integer[] echoIntListTypeTest(Integer[] v) { - return v; - } - - public java.math.BigDecimal[] echoDecimalListTypeTest( - java.math.BigDecimal[] v) { - return v; - } - - public Double[] echoDoubleListTypeTest(Double[] v) { - return v; - } - - public java.math.BigInteger[] echoIntegerListTypeTest( - java.math.BigInteger[] v) { - return v; - } - - public Long[] echoLongListTypeTest(Long[] v) { - return v; - } - - public Short[] echoShortListTypeTest(Short[] v) { - return v; - } - - public Byte[] echoByteListTypeTest(Byte[] v) { - return v; - } - - /********************************************************************** - * Private data methods to setup and compare expected FooType data - *********************************************************************/ - - private FooType FooType_data = null; - - private FooVariousSchemaTypes FooVariousSchemaTypes_data = null; - - private FooVariousSchemaTypes FooVariousSchemaTypes_array_data[] = null; - - private FooVariousSchemaTypesListType FooVariousSchemaTypesListType_data = null; - - private FooAnonymousType FooAnonymousType_data = null; - - private void InitExpectedFooTypeData() { - init_FooVariousSchemaTypes_Data(); - init_FooAnonymousType_Data(); - init_FooType_Data(); - } - - private boolean CompareWithExpectedFooTypeData(FooType f) { - boolean valid = true; - - if (f.isFooA() != true) { - System.err.println( - "isFooA() returned " + f.isFooA() + ", expected " + !f.isFooA()); - valid = false; - } - if (f.getFooB() != Byte.MAX_VALUE) { - System.err.println( - "getFooB() returned " + f.getFooB() + ", expected " + Byte.MAX_VALUE); - valid = false; - } - if (f.getFooC() != Short.MAX_VALUE) { - System.err.println("getFooC() returned " + f.getFooC() + ", expected " - + Short.MAX_VALUE); - valid = false; - } - if (f.getFooD() != Integer.MAX_VALUE) { - System.err.println("getFooD() returned " + f.getFooD() + ", expected " - + Integer.MAX_VALUE); - valid = false; - } - if (f.getFooE() != Long.MAX_VALUE) { - System.err.println( - "getFooE() returned " + f.getFooE() + ", expected " + Long.MAX_VALUE); - valid = false; - } - if (f.getFooF() != Float.MAX_VALUE) { - System.err.println("getFooF() returned " + f.getFooF() + ", expected " - + Float.MAX_VALUE); - valid = false; - } - if (f.getFooG() != Double.MAX_VALUE) { - System.err.println("getFooG() returned " + f.getFooG() + ", expected " - + Double.MAX_VALUE); - valid = false; - } - if (!f.getFooH().equals("foostringH")) { - System.err.println( - "getFooH() returned " + f.getFooH() + ", expected foostringH"); - valid = false; - } - if (!f.getFooI().equals("123-ABC12")) { - System.err.println( - "getFooI() returned " + f.getFooI() + ", expected 123-ABC12"); - valid = false; - } - FooVariousSchemaTypes fnst = f.getFooJ(); - if (fnst == null) { - System.err.println( - "getFooJ() returned null, " + "expected FooVariousSchemaTypes"); - valid = false; - } - if (fnst != null) { - System.out.println("Send: " + FooVariousSchemaTypes_data.getFooA() + "|" - + FooVariousSchemaTypes_data.getFooB() + "|" - + FooVariousSchemaTypes_data.getFooC() + "|" - + FooVariousSchemaTypes_data.getFooD() + "|" - + FooVariousSchemaTypes_data.getFooE() + "|" - + FooVariousSchemaTypes_data.getFooF()); - System.out.println("Recv: " + fnst.getFooA() + "|" + fnst.getFooB() + "|" - + fnst.getFooC() + "|" + fnst.getFooD() + "|" + fnst.getFooE() + "|" - + fnst.getFooF()); - if (fnst.getFooA() == FooVariousSchemaTypes_data.getFooA() - && fnst.getFooB().equals(FooVariousSchemaTypes_data.getFooB()) - && fnst.getFooC().equals(FooVariousSchemaTypes_data.getFooC()) - && fnst.getFooD().equals(FooVariousSchemaTypes_data.getFooD()) - && fnst.getFooE() == FooVariousSchemaTypes_data.getFooE() - && fnst.getFooF() == FooVariousSchemaTypes_data.getFooF()) { - System.out.println("Result match"); - } else { - System.err.println("Result mismatch"); - valid = false; - } - } - if (!f.getFooK().equals(new BigInteger("101"))) { - System.err - .println("getFooK() returned " + f.getFooK() + ", expected 101"); - valid = false; - } - if (!(f.getFooM().equals("hello,there"))) { - System.err.println( - "getFooM() returned " + f.getFooM() + ", expected hello,there"); - valid = false; - } - if (!compareFooAnonymousTypeData(f.getFooN(), FooAnonymousType_data)) - valid = false; - return valid; - } - - private void init_FooVariousSchemaTypes_Data() { - try { - FooVariousSchemaTypes_data = new FooVariousSchemaTypes(); - FooVariousSchemaTypes_data.setFooA(1); - FooVariousSchemaTypes_data.setFooB(new BigInteger("1000")); - FooVariousSchemaTypes_data.setFooC("NORMALIZEDSTRING"); - FooVariousSchemaTypes_data.setFooD("NMTOKEN"); - FooVariousSchemaTypes_data.setFooE(1); - FooVariousSchemaTypes_data.setFooF((short) 1); - - FooVariousSchemaTypes_array_data = new FooVariousSchemaTypes[2]; - - FooVariousSchemaTypes_array_data[0] = new FooVariousSchemaTypes(); - FooVariousSchemaTypes_array_data[1] = new FooVariousSchemaTypes(); - FooVariousSchemaTypes_array_data[0].setFooA(256); - FooVariousSchemaTypes_array_data[1].setFooA(0); - FooVariousSchemaTypes_array_data[0] - .setFooB(JAXWS_Data.BigInteger_data[0]); - FooVariousSchemaTypes_array_data[1] - .setFooB(JAXWS_Data.BigInteger_data[1]); - FooVariousSchemaTypes_array_data[0].setFooC("NORMALIZEDSTRING1"); - FooVariousSchemaTypes_array_data[1].setFooC("NORMALIZEDSTRING2"); - FooVariousSchemaTypes_array_data[0].setFooD("NMTOKEN1"); - FooVariousSchemaTypes_array_data[1].setFooD("NMTOKEN2"); - FooVariousSchemaTypes_array_data[0].setFooE(0); - FooVariousSchemaTypes_array_data[1].setFooE(1); - FooVariousSchemaTypes_array_data[0].setFooF((short) 0); - FooVariousSchemaTypes_array_data[1].setFooF((short) 1); - - FooVariousSchemaTypesListType_data = new FooVariousSchemaTypesListType(); - - for (int i = 0; i < FooVariousSchemaTypes_array_data.length; i++) { - FooVariousSchemaTypesListType_data.getFooA() - .add(FooVariousSchemaTypes_array_data[i]); - } - } catch (Exception e) { - throw new WebServiceException("failed on object creation: " + e); - } - } - - private void init_FooAnonymousType_Data() { - try { - FooAnonymousType.FooAnonymousElement fe1 = new FooAnonymousType.FooAnonymousElement(); - FooAnonymousType.FooAnonymousElement fe2 = new FooAnonymousType.FooAnonymousElement(); - fe1.setFooA("foo"); - fe1.setFooB(1); - fe1.setFooC(true); - fe2.setFooA("bar"); - fe2.setFooB(0); - fe2.setFooC(false); - - FooAnonymousType_data = new FooAnonymousType(); - FooAnonymousType_data.getFooAnonymousElement().add(fe1); - FooAnonymousType_data.getFooAnonymousElement().add(fe2); - } catch (Exception e) { - throw new WebServiceException("failed on object creation: " + e); - } - } - - private boolean compareFooAnonymousTypeData(FooAnonymousType request, - FooAnonymousType response) { - boolean valid = true; - - Object[] req = request.getFooAnonymousElement().toArray(); - Object[] res = response.getFooAnonymousElement().toArray(); - if (req.length == res.length) { - System.out.println("Array length match - checking array elements"); - for (int i = 0; i < req.length; i++) { - FooAnonymousType.FooAnonymousElement exp = (FooAnonymousType.FooAnonymousElement) req[i]; - FooAnonymousType.FooAnonymousElement rec = (FooAnonymousType.FooAnonymousElement) res[i]; - System.out.println("Request: " + exp.getFooA() + "|" + exp.getFooB() - + "|" + exp.isFooC()); - System.out.println("Response: " + rec.getFooA() + "|" + rec.getFooB() - + "|" + rec.isFooC()); - if (!exp.getFooA().equals(rec.getFooA()) - || exp.getFooB() != rec.getFooB() || exp.isFooC() != rec.isFooC()) { - valid = false; - System.err.println("Element results mismatch ..."); - break; - } else - System.out.println("Element results match ..."); - } - } else { - System.err.println("Array length mismatch - expected: " + req.length - + ", received: " + res.length); - } - return valid; - } - - private void init_FooType_Data() { - try { - FooType_data = new FooType(); - - FooType_data.setFooA(true); - FooType_data.setFooB(Byte.MAX_VALUE); - FooType_data.setFooC(Short.MAX_VALUE); - FooType_data.setFooD(Integer.MAX_VALUE); - FooType_data.setFooE(Long.MAX_VALUE); - FooType_data.setFooF(Float.MAX_VALUE); - FooType_data.setFooG(Double.MAX_VALUE); - FooType_data.setFooH("foostringH"); - FooType_data.setFooI("123-ABC12"); - FooType_data.setFooJ(FooVariousSchemaTypes_data); - FooType_data.setFooK(new BigInteger("101")); - FooType_data.setFooM("hello,there"); - FooType_data.setFooN(FooAnonymousType_data); - } catch (Exception e) { - throw new WebServiceException("failed on object creation: " + e); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/OneWayTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/OneWayTestImpl.java deleted file mode 100644 index b6990e2008..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/OneWayTestImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.xml.soap.*; - -import java.util.*; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(targetNamespace = "http://marshalltestservice.org/MarshallTestService.wsdl", portName = "MarshallTestPort4", serviceName = "MarshallTestService", wsdlLocation = "WEB-INF/wsdl/WSW2JRLMarshallTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.OneWayTest") -public class OneWayTestImpl implements OneWayTest { - - public void oneWayMethod(OneWayMessage v) { - TestUtil.logTrace("oneWayMethod"); - TestUtil.logMsg("OneWayMessage: " + v.getStringValue()); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestCompoundTestDefs.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestCompoundTestDefs.wsdl deleted file mode 100644 index 3a31c64fd7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestCompoundTestDefs.wsdl +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestCompoundTestDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestCompoundTestDefs.xsd deleted file mode 100644 index cf35477713..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestCompoundTestDefs.xsd +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestIncludedDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestIncludedDefs.xsd deleted file mode 100644 index e61646de6c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestIncludedDefs.xsd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestNewSchemaDefs.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestNewSchemaDefs.wsdl deleted file mode 100644 index a53413bb9d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestNewSchemaDefs.wsdl +++ /dev/null @@ -1,1103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestNewSchemaDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestNewSchemaDefs.xsd deleted file mode 100644 index 6e12dc1b19..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestNewSchemaDefs.xsd +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Test results - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestOneWayTestDefs.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestOneWayTestDefs.wsdl deleted file mode 100644 index ec77dd3a0a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestOneWayTestDefs.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestOneWayTestDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestOneWayTestDefs.xsd deleted file mode 100644 index 670c346369..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestOneWayTestDefs.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestService.wsdl deleted file mode 100644 index 9b353219d3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestService.wsdl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestServiceDefs.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestServiceDefs.wsdl deleted file mode 100644 index 3eabdddde1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestServiceDefs.wsdl +++ /dev/null @@ -1,716 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestServiceDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestServiceDefs.xsd deleted file mode 100644 index b80c1c91e2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/WSW2JRLMarshallTestServiceDefs.xsd +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/build.xml deleted file mode 100644 index 2ca080b2e6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/customfile.xml deleted file mode 100644 index 93577850fe..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/customfile.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/customfile2.xml deleted file mode 100644 index 786e475f62..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/customfile2.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/jakartaEE.tokens deleted file mode 100644 index 4cead9c200..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/jakartaEE.tokens +++ /dev/null @@ -1,27 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jrlmarshalltest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.MarshallTestService -SEI=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.MarshallTest -SEI2=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.NewSchemaTest -SEI3=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.CompoundTest -SEI4=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.OneWayTest -IMPL=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.MarshallTestImpl -IMPL2=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.NewSchemaTestImpl -IMPL3=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.CompoundTestImpl -IMPL4=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.OneWayTestImpl -NAMESPACEURI=http://marshalltestservice.org/MarshallTestService.wsdl -PORT=MarshallTestPort1 -PORT2=MarshallTestPort2 -PORT3=MarshallTestPort3 -PORT4=MarshallTestPort4 -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.MarshallTestImpl -SERVLETNAME2=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.NewSchemaTestImpl -SERVLETNAME3=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.CompoundTestImpl -SERVLETNAME4=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.marshalltest.OneWayTestImpl -URLALIAS=/jaxws/MarshallTest -URLALIAS2=/jaxws/NewSchemaTest -URLALIAS3=/jaxws/CompoundTest -URLALIAS4=/jaxws/OneWayTest -WEBSERVICEDESCRIPTION=MarshallTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jrlmarshalltest -SERVICEREFNAMEWSEJB=service/wsw2jrlmarshalltest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jrlmarshalltest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/jakartaEE.web.xml deleted file mode 100644 index 0350ec9463..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/jakartaEE.web.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME3@ - @IMPL3@ - 0 - - - @SERVLETNAME4@ - @IMPL4@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - @SERVLETNAME3@ - @URLALIAS3@ - - - @SERVLETNAME4@ - @URLALIAS4@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/standalone-sun-jaxws.xml deleted file mode 100644 index 752f9d3908..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/standalone.web.xml deleted file mode 100644 index 3f206db4cd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/marshalltest/standalone.web.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - WSW2JRLMarshallTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -NewSchemaTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -MarshallTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -OneWayTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -CompoundTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -NewSchemaTest -/jaxws/NewSchemaTest - - -MarshallTest -/jaxws/MarshallTest - - -OneWayTest -/jaxws/OneWayTest - - -CompoundTest -/jaxws/CompoundTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/build.xml deleted file mode 100644 index 7f25022057..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/Client.java deleted file mode 100644 index 09dca3ab16..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/Client.java +++ /dev/null @@ -1,1357 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)Client.java 1.16 06/02/11 - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.handler.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private static final String CLIENTDELAY = "client.delay"; - - private int clientDelay = 1; - - private String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String HARNESSHOST = "harness.host"; - - private String harnessHost = null; - - private static final String HARNESSLOGPORT = "harness.log.port"; - - private String harnessLogPort = null; - - private static final String TRACEFLAG = "harness.log.traceflag"; - - private String harnessLogTraceFlag = "false"; // false or true - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String WSDLLOC_URL = "rlowhandlertest.wsdlloc.1"; - - private static final String ENDPOINT1_URL = "rlowhandlertest.endpoint.1"; - - private static final String ENDPOINT4_URL = "rlowhandlertest.endpoint.2"; - - private String url1 = null; - - private String url4 = null; - - private URL wsdlurl = null; - - // service and port information - private static final String NAMESPACEURI = "http://rlowhandlertestservice.org/wsdl"; - - private static final String SERVICE_NAME = "RLOWHandlerTestService"; - - private static final String PORT_NAME1 = "HelloPort"; - - private static final String PORT_NAME4 = "GetTrackerDataPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.RLOWHandlerTestService.class; - - private static final String THEBINDINGPROTOCOL = jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING; - - private static final String LOGICAL = "Logical"; - - private static final String SOAP = "SOAP"; - - private static final String TEST_TYPE = LOGICAL + "Test"; - - private Handler handler = null; - - Hello port1 = null; - - GetTrackerData port4 = null; - - static RLOWHandlerTestService service = null; - - BindingProvider bp1 = null; - - BindingProvider bp4 = null; - - Binding binding1 = null; - - Binding binding4 = null; - - List listOfBindings = new ArrayList(); - - List port1HandlerChain = null; - - List port4HandlerChain = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT1_URL); - url1 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT4_URL); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint1 URL: " + url1); - TestUtil.logMsg("Service Endpoint4 URL: " + url4); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private boolean setupPorts() { - boolean result = true; - TestUtil.logTrace("entering setupPorts"); - try { - if (modeProperty.equals("standalone")) { - getPortsStandalone(); - } else { - getPortsJavaEE(); - } - } catch (Exception e) { - TestUtil.logErr("Could not setup stubs properly"); - TestUtil.printStackTrace(e); - result = false; - } - TestUtil.logTrace("leaving setupPorts"); - return result; - - } - - private void getPortsStandalone() throws Exception { - getPorts(); - JAXWS_Util.setTargetEndpointAddress(port1, url1); - JAXWS_Util.setTargetEndpointAddress(port4, url4); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - getPorts(); - getTargetEndpointAddress(port1, port4); - } - - private void getTargetEndpointAddress(Object port1, Object port4) - throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port1=" + port1); - String url1 = JAXWS_Util.getTargetEndpointAddress(port1); - TestUtil.logMsg("Target Endpoint Address=" + url1); - TestUtil.logMsg("Get Target Endpoint Address for port4=" + port4); - String url4 = JAXWS_Util.getTargetEndpointAddress(port4); - TestUtil.logMsg("Target Endpoint Address=" + url4); - } - - private void getPorts() throws Exception { - TestUtil.logTrace("entering getPorts"); - - TestUtil.logMsg("Get port 1 = " + PORT_NAME1); - port1 = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port1=" + port1); - - TestUtil.logMsg("Get port 4 = " + PORT_NAME4); - port4 = (GetTrackerData) service.getPort(GetTrackerData.class); - TestUtil.logMsg("port4=" + port4); - - TestUtil.logMsg("Get binding for port 1 = " + PORT_NAME1); - bp1 = (BindingProvider) port1; - binding1 = bp1.getBinding(); - port1HandlerChain = binding1.getHandlerChain(); - TestUtil.logMsg("Port1 HandlerChain =" + port1HandlerChain); - TestUtil.logMsg("Port1 HandlerChain size = " + port1HandlerChain.size()); - - TestUtil.logMsg("------------------------------------------------------"); - - TestUtil.logMsg("Get binding for port 4 = " + PORT_NAME4); - bp4 = (BindingProvider) port4; - binding4 = bp4.getBinding(); - port4HandlerChain = binding4.getHandlerChain(); - TestUtil.logMsg("Port4 HandlerChain=" + port4HandlerChain); - TestUtil.logMsg("Port4 HandlerChain size = " + port4HandlerChain.size()); - - listOfBindings.add(binding1); - listOfBindings.add(binding4); - - TestUtil.logTrace("leaving getPorts"); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * client.delay; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - try { - harnessHost = p.getProperty(HARNESSHOST); - } catch (Exception e) { - harnessHost = null; - } - try { - harnessLogPort = p.getProperty(HARNESSLOGPORT); - } catch (Exception e) { - harnessLogPort = null; - } - try { - harnessLogTraceFlag = p.getProperty(TRACEFLAG); - } catch (Exception e) { - harnessLogTraceFlag = "false"; - } - - try { - clientDelay = Integer.parseInt(p.getProperty(CLIENTDELAY)); - } catch (Exception e) { - TestUtil.logMsg("An ERROR occurred for the property " + CLIENTDELAY - + ", using default value of " + clientDelay + " second"); - TestUtil.printStackTrace(e); - } - - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - TestUtil.logMsg("Create Service object"); - getTestURLs(); - service = (RLOWHandlerTestService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, SERVICE_CLASS); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (RLOWHandlerTestService) getSharedObject(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: ClientOneWayHandlerTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9012; - * JAXWS:SPEC:9014; JAXWS:SPEC:9015.1; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the client-side - * logical message handler callbacks are called. - */ - public void ClientOneWayHandlerTest() throws Fault { - TestUtil.logTrace("ClientOneWayHandlerTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler1, ClientLogicalHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler1(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientSOAPHandler2, ClientLogicalHandler2"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler2(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler3(); - handlerList.add(handler); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ClientLogicalTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - if (!Handler_Util.VerifyOneWayCallbacks("Client", Constants.OUTBOUND, - clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientOneWayHandlerTest failed"); - } - - /* - * @testName: ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.3.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest() - throws Fault { - TestUtil.logTrace("ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler1, ClientLogicalHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler1(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientSOAPHandler2, ClientLogicalHandler2"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler2(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler3(); - handlerList.add(handler); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - if (!Handler_Util.VerifyOneWaySOAPFaultCallbacks("Client", - Constants.OUTBOUND, LOGICAL, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest failed"); - } - - /* - * @testName: ClientSOAPOutboundHandleMessageThrowsSOAPFaultTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.3.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ClientSOAPOutboundHandleMessageThrowsSOAPFaultTest() - throws Fault { - TestUtil.logTrace("ClientSOAPOutboundHandleMessageThrowsSOAPFaultTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientLogicalHandler1, ClientSOAPHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler1(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientLogicalHandler2, ClientSOAPHandler2"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler2(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler3(); - handlerList.add(handler); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ClientSOAPOutboundHandleMessageThrowsSOAPFaultTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - if (!Handler_Util.VerifyOneWaySOAPFaultCallbacks("Client", - Constants.OUTBOUND, SOAP, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientSOAPOutboundHandleMessageThrowsSOAPFaultTest failed"); - } - - /* - * @testName: ClientLogicalOutboundHandleMessageReturnsFalseTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.2.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ClientLogicalOutboundHandleMessageReturnsFalseTest() - throws Fault { - TestUtil.logTrace("ClientLogicalOutboundHandleMessageReturnsFalseTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientSOAPHandler1, ClientLogicalHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler1(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientSOAPHandler2, ClientLogicalHandler2"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler2(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler3(); - handlerList.add(handler); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ClientLogicalOutboundHandleMessageReturnsFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - if (!Handler_Util.VerifyOneWayHandleMessageFalseCallbacks("Client", - Constants.OUTBOUND, LOGICAL, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault( - "ClientLogicalOutboundHandleMessageReturnsFalseTest failed"); - } - - /* - * @testName: ClientSOAPOutboundHandleMessageReturnsFalseTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.2.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ClientSOAPOutboundHandleMessageReturnsFalseTest() throws Fault { - TestUtil.logTrace("ClientSOAPOutboundHandleMessageReturnsFalseTest"); - boolean pass = true; - try { - TestUtil.logMsg( - "Programatically registering the client side handlers by creating new HandlerResolver."); - service.setHandlerResolver(new HandlerResolver() { - public List getHandlerChain(PortInfo info) { - List handlerList = new ArrayList(); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following service based handlers through the binding: \n" - + "ClientLogicalHandler1, ClientSOAPHandler1"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler1(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler1 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler1(); - handlerList.add(handler); - if (info.getBindingID().equals(THEBINDINGPROTOCOL)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Programmatically registering the following protocol based handlers through the binding: \n" - + "ClientLogicalHandler2, ClientSOAPHandler2"); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler2(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler2 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler2(); - handlerList.add(handler); - } - if (info.getPortName().equals(PORT_QNAME1)) { - TestUtil.logMsg("----------------------------------------------"); - TestUtil - .logMsg("Create port based handlers for port: " + PORT_QNAME1); - TestUtil.logMsg("----------------------------------------------"); - TestUtil.logMsg( - "Construct HandleInfo for ClientLogicalHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientLogicalHandler3(); - handlerList.add(handler); - TestUtil.logMsg( - "Construct HandleInfo for ClientSOAPHandler3 and add to HandlerChain"); - handler = new com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.ClientSOAPHandler3(); - handlerList.add(handler); - } - TestUtil.logMsg("HandlerChainList=" + handlerList); - TestUtil.logMsg("HandlerChain size = " + handlerList.size()); - return handlerList; - } - - }); - - if (!setupPorts()) { - pass = false; - } - if (pass) { - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ClientSOAPOutboundHandleMessageReturnsFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - Handler_Util.clearHandlers(listOfBindings); - - TestUtil.logMsg("Get client side results back from Tracker"); - List clientSideMsgs = HandlerTracker.getListMessages1(); - - // verify client-side callbacks - - if (!Handler_Util.VerifyOneWayHandleMessageFalseCallbacks("Client", - Constants.OUTBOUND, SOAP, clientSideMsgs)) { - TestUtil.logErr("Client-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Client-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging client-side tracker data"); - HandlerTracker.purge(); - - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - - if (!pass) - throw new Fault("ClientSOAPOutboundHandleMessageReturnsFalseTest failed"); - } - - /* - * @testName: ServerLogicalHandlerTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.1; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerLogicalHandlerTest() throws Fault { - TestUtil.logTrace("ServerLogicalHandlerTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ServerLogicalTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - // MyResultType mr = null; - try { - // mr = port1.doHandlerTest1(ma); - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - StringBuffer sb = new StringBuffer(); - sb.append( - "\n-------------------------------------------------------------------\n"); - sb.append("Sleeping: " + clientDelay - + " second(s) before getting results from server\n"); - sb.append( - "-------------------------------------------------------------------\n"); - TestUtil.logMsg(sb.toString()); - TestUtil.sleepSec(clientDelay); - - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyOneWayCallbacks("Server", Constants.INBOUND, - serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault("ServerLogicalHandlerTest failed"); - } - - /* - * @testName: ServerLogicalInboundHandleMessageThrowsSOAPFaultTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.3.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerLogicalInboundHandleMessageThrowsSOAPFaultTest() - throws Fault { - TestUtil.logTrace("ServerLogicalInboundHandleMessageThrowsSOAPFaultTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ServerLogicalInboundHandleMessageThrowsSOAPFaultTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - // MyResultType mr = null; - try { - // mr = port1.doHandlerTest1(ma); - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - StringBuffer sb = new StringBuffer(); - sb.append( - "\n-------------------------------------------------------------------\n"); - sb.append("Sleeping: " + clientDelay - + " second(s) before getting results from server\n"); - sb.append( - "-------------------------------------------------------------------\n"); - TestUtil.logMsg(sb.toString()); - TestUtil.sleepSec(clientDelay); - - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyOneWaySOAPFaultCallbacks("Server", - Constants.INBOUND, LOGICAL, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault( - "ServerLogicalInboundHandleMessageThrowsSOAPFaultTest failed"); - } - - /* - * @testName: ServerSOAPInboundHandleMessageThrowsSOAPFaultTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.3.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerSOAPInboundHandleMessageThrowsSOAPFaultTest() throws Fault { - TestUtil.logTrace("ServerSOAPInboundHandleMessageThrowsSOAPFaultTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ServerSOAPInboundHandleMessageThrowsSOAPFaultTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - // MyResultType mr = null; - try { - // mr = port1.doHandlerTest1(ma); - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - StringBuffer sb = new StringBuffer(); - sb.append( - "\n-------------------------------------------------------------------\n"); - sb.append("Sleeping: " + clientDelay - + " second(s) before getting results from server\n"); - sb.append( - "-------------------------------------------------------------------\n"); - TestUtil.logMsg(sb.toString()); - TestUtil.sleepSec(clientDelay); - - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyOneWaySOAPFaultCallbacks("Server", - Constants.INBOUND, SOAP, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault( - "ServerSOAPInboundHandleMessageThrowsSOAPFaultTest failed"); - } - - /* - * @testName: ServerLogicalInboundHandleMessageReturnsFalseTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.2.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerLogicalInboundHandleMessageReturnsFalseTest() throws Fault { - TestUtil.logTrace("ServerLogicalInboundHandleMessageReturnsFalseTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ServerLogicalInboundHandleMessageReturnsFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - // MyResultType mr = null; - try { - // mr = port1.doHandlerTest1(ma); - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - StringBuffer sb = new StringBuffer(); - sb.append( - "\n-------------------------------------------------------------------\n"); - sb.append("Sleeping: " + clientDelay - + " second(s) before getting results from server\n"); - sb.append( - "-------------------------------------------------------------------\n"); - TestUtil.logMsg(sb.toString()); - TestUtil.sleepSec(clientDelay); - - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyOneWayHandleMessageFalseCallbacks("Server", - Constants.INBOUND, LOGICAL, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault( - "ServerLogicalInboundHandleMessageReturnsFalseTest failed"); - } - - /* - * @testName: ServerSOAPInboundHandleMessageReturnsFalseTest - * - * @assertion_ids: JAXWS:SPEC:9002; JAXWS:SPEC:9007; JAXWS:SPEC:9014; - * JAXWS:SPEC:9015.2.2; JAXWS:SPEC:9017; JAXWS:SPEC:9018; - * - * @test_Strategy: Invoke an RPC method and ensure that the server-side soap - * message handler callbacks are called. - */ - public void ServerSOAPInboundHandleMessageReturnsFalseTest() throws Fault { - TestUtil.logTrace("ServerSOAPInboundHandleMessageReturnsFalseTest"); - boolean pass = true; - if (!setupPorts()) { - pass = false; - } - if (pass) { - Handler_Util.clearHandlers(listOfBindings); - try { - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - - TestUtil.logMsg("Invoking RPC method port1.doHandlerTest1()"); - MyActionType ma = new MyActionType(); - ma.setAction("ServerSOAPInboundHandleMessageReturnsFalseTest"); - ma.setTestType(TEST_TYPE); - ma.setHarnessloghost(harnessHost); - ma.setHarnesslogport(harnessLogPort); - ma.setHarnesslogtraceflag(harnessLogTraceFlag); - // MyResultType mr = null; - try { - // mr = port1.doHandlerTest1(ma); - port1.doHandlerTest1(ma); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - StringBuffer sb = new StringBuffer(); - sb.append( - "\n-------------------------------------------------------------------\n"); - sb.append("Sleeping: " + clientDelay - + " second(s) before getting results from server\n"); - sb.append( - "-------------------------------------------------------------------\n"); - TestUtil.logMsg(sb.toString()); - TestUtil.sleepSec(clientDelay); - - List serverSideMsgs = null; - - TestUtil.logMsg("Get server side result back from endpoint"); - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("getArrayMessages1"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - try { - serverSideMsgs = port4.getTrackerData(gtda).getResult(); - } catch (Exception e) { - TestUtil.logErr("Endpoint threw an exception:"); - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Verifying Server-Side Handler callbacks"); - serverSideMsgs = JAXWS_Util.getMessagesStartingFrom(serverSideMsgs, - Constants.INBOUND); - - if (!Handler_Util.VerifyOneWayHandleMessageFalseCallbacks("Server", - Constants.INBOUND, SOAP, serverSideMsgs)) { - TestUtil.logErr("Server-Side Callbacks are (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("Server-Side Callbacks are (correct)"); - } - - TestUtil.logMsg("Purging server-side tracker data"); - purgeServerSideTrackerData(); - } catch (Exception e) { - TestUtil.logErr("Exception occurred: " + e); - pass = false; - } - } - if (!pass) - throw new Fault("ServerSOAPInboundHandleMessageReturnsFalseTest failed"); - } - - private void purgeServerSideTrackerData() { - try { - GetTrackerDataAction gtda = new GetTrackerDataAction(); - gtda.setAction("purge"); - gtda.setHarnessloghost(harnessHost); - gtda.setHarnesslogport(harnessLogPort); - gtda.setHarnesslogtraceflag(harnessLogTraceFlag); - port4.getTrackerData(gtda); - } catch (Exception e) { - TestUtil.logErr("Call to purge server-side tracker data failed:" + e); - } - } - - static class MyStatus { - private boolean status = true; - - public void setStatus(boolean b) { - status = b; - } - - public boolean getStatus() { - return status; - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientLogicalHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientLogicalHandler1.java deleted file mode 100644 index e3d1425f1e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientLogicalHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ClientLogicalHandler1 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler1"; - - public ClientLogicalHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientLogicalHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientLogicalHandler2.java deleted file mode 100644 index d0f172e174..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientLogicalHandler2.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Constants; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.soap.SOAPFault; -import jakarta.xml.soap.Name; -import jakarta.xml.ws.handler.LogicalMessageContext; - -public class ClientLogicalHandler2 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler2"; - - private static final String NAMESPACEURI = "http://rlowhandlertestservice.org/wsdl"; - - private static final QName FAULTCODE = new QName(NAMESPACEURI, - "ItsASoapFault", "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private SOAPFault sf; - - public ClientLogicalHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - try { - preinvoke(); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - String direction = Handler_Util.getDirection(context); - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.OUTBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ClientLogicalHandler2.handleMessage throwing an outbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleMessageReturnsFalseTest")) { - HandlerTracker.reportComment(this, "HandleMessage returns false"); - return false; - } - } - } else { - TestUtil.logTrace("found GetTrackerData message, handler will ignore"); - } - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientLogicalHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientLogicalHandler3.java deleted file mode 100644 index 3d41e48bd7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientLogicalHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ClientLogicalHandler3 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler3"; - - public ClientLogicalHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientSOAPHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientSOAPHandler1.java deleted file mode 100644 index 6a3201b202..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientSOAPHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ClientSOAPHandler1 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler1"; - - public ClientSOAPHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientSOAPHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientSOAPHandler2.java deleted file mode 100644 index 31c23868f3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientSOAPHandler2.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Constants; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.soap.SOAPFault; -import jakarta.xml.soap.Name; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ClientSOAPHandler2 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler2"; - - private static final String NAMESPACEURI = "http://rlowhandlertestservice.org/wsdl"; - - private static final QName FAULTCODE = new QName(NAMESPACEURI, - "ItsASoapFault", "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private SOAPFault sf; - - public ClientSOAPHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - try { - preinvoke(); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - String direction = Handler_Util.getDirection(context); - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.OUTBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleMessageThrowsSOAPFaultTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ClientSOAPHandler2.handleMessage throwing an outbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, - new Exception( - "Unexpected errorin handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleMessageReturnsFalseTest")) { - HandlerTracker.reportComment(this, "HandleMessage returns false"); - return false; - } - } - } else { - TestUtil.logTrace("found GetTrackerData message, handler will ignore"); - } - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientSOAPHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientSOAPHandler3.java deleted file mode 100644 index f72924497d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/ClientSOAPHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ClientSOAPHandler3 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler3"; - - public ClientSOAPHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/build.xml deleted file mode 100644 index c70114a284..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/customfile.xml deleted file mode 100644 index e2fc4843db..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/customfile.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/handler_process_flow2.pdf b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/handler_process_flow2.pdf deleted file mode 100644 index 4e3af23087..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/handler_process_flow2.pdf and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/jakartaEE.tokens deleted file mode 100644 index 234aab9b3d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/client/jakartaEE.tokens +++ /dev/null @@ -1,8 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsrlowhandlertestservice") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.client.RLOWHandlerTestService -URLALIAS=/jaxws/Hello -URLALIAS4=/jaxws/GetTrackerData -WEBSERVICEDESCRIPTION=RLOWHandlerTestService -SERVICEREFNAMEWSSERVLET=service/wsrlowhandlertestservice -SERVICEREFNAMEWSEJB=service/wsrlowhandlertestservice -SERVICEREFNAMEWSAPPCLIENT=service/wsrlowhandlertestservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/GetTrackerDataImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/GetTrackerDataImpl.java deleted file mode 100644 index ca4d304654..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/GetTrackerDataImpl.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "GetTrackerDataPort", targetNamespace = "http://rlowhandlertestservice.org/wsdl", serviceName = "RLOWHandlerTestService", wsdlLocation = "WEB-INF/wsdl/WSRLOWHandlerTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.GetTrackerData") - -public class GetTrackerDataImpl implements GetTrackerData { - public GetTrackerDataResult getTrackerData(GetTrackerDataAction action) { - - Handler_Util.setTraceFlag(action.getHarnesslogtraceflag()); - - Handler_Util.initTestUtil("GetTrackerDataImpl", action.getHarnessloghost(), - action.getHarnesslogport(), action.getHarnesslogtraceflag()); - - TestUtil.logTrace("*** in GetTrackerDataImpl ***"); - String[] messages = null; - - String theAction = action.getAction(); - TestUtil.logTrace("*** action = " + theAction + " ***"); - - if (theAction.equals("getArrayMessages1")) { - messages = HandlerTracker.getArrayMessages1(); - } else if (theAction.equals("getArrayMessages2")) { - messages = HandlerTracker.getArrayMessages2(); - } else if (theAction.equals("getArrayMessages3")) { - messages = HandlerTracker.getArrayMessages3(); - } else if (theAction.equals("getArrayMessages4")) { - messages = HandlerTracker.getArrayMessages4(); - } else if (theAction.equals("getArrayThrowables")) { - messages = HandlerTracker.getArrayThrowables(); - } else if (theAction.equals("purge")) { - HandlerTracker.purge(); - String m[] = { "purge complete" }; - messages = m; - } else { - String[] m = { - "Did not get one of the excepted GetTrackerData action messages, the action message received was:" - + theAction }; - messages = m; - } - - GetTrackerDataResult r = null; - try { - TestUtil.logTrace("The endpoint is sending back the following data:"); - TestUtil.logTrace("action=" + action.getAction()); - TestUtil.logTrace("harnessloghost=" + action.getHarnessloghost()); - TestUtil.logTrace("harnesslogport=" + action.getHarnesslogport()); - TestUtil - .logTrace("harnesslogtraceflag=" + action.getHarnesslogtraceflag()); - - r = new GetTrackerDataResult(); - for (int i = 0; i < messages.length; i++) { - r.getResult().add(messages[i]); - TestUtil.logTrace("message[" + i + "]=" + messages[i]); - } - - r.setHarnessloghost(action.getHarnessloghost()); - r.setHarnesslogport(action.getHarnesslogport()); - r.setHarnesslogtraceflag(action.getHarnesslogtraceflag()); - } catch (Exception e) { - throw new WebServiceException(e.getMessage(), e); - } - return r; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/HelloImpl.java deleted file mode 100644 index 4e6f14328c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/HelloImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.*; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", targetNamespace = "http://rlowhandlertestservice.org/wsdl", serviceName = "RLOWHandlerTestService", wsdlLocation = "WEB-INF/wsdl/WSRLOWHandlerTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.Hello") - -public class HelloImpl implements Hello { - - public void doHandlerTest1( - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.MyActionType action) { - - Handler_Util.setTraceFlag(action.getHarnesslogtraceflag()); - - Handler_Util.initTestUtil("HelloImpl", action.getHarnessloghost(), - action.getHarnesslogport(), action.getHarnesslogtraceflag()); - - TestUtil.logTrace("*** in HelloImpl:doHandlerTest1 ***"); - String theAction = action.getAction(); - TestUtil.logTrace("*** action = " + theAction + " ***"); - String testType = action.getTestType(); - TestUtil.logTrace("*** testType = " + testType + " ***"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerLogicalHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerLogicalHandler1.java deleted file mode 100644 index 202a86deb9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerLogicalHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ServerLogicalHandler1 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler1"; - - public ServerLogicalHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerLogicalHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerLogicalHandler2.java deleted file mode 100644 index 9b9b094207..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerLogicalHandler2.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Constants; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.soap.SOAPFault; -import jakarta.xml.soap.Name; -import jakarta.xml.ws.handler.LogicalMessageContext; - -public class ServerLogicalHandler2 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler2"; - - private static final String NAMESPACEURI = "http://rlowhandlertestservice.org/wsdl"; - - private static final QName FAULTCODE = new QName(NAMESPACEURI, - "ItsASoapFault", "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private SOAPFault sf; - - public ServerLogicalHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - try { - preinvoke(); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - String direction = Handler_Util.getDirection(context); - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerLogicalInboundHandleMessageThrowsSOAPFaultTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerLogicalHandler2.handleMessage throwing an inbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, - new Exception( - "Unexpected errorin handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ServerLogicalInboundHandleMessageReturnsFalseTest")) { - HandlerTracker.reportComment(this, "HandleMessage returns false"); - return false; - } - } - } else { - TestUtil.logTrace("found GetTrackerData message, handler will ignore"); - } - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerLogicalHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerLogicalHandler3.java deleted file mode 100644 index cabb3b4a3f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerLogicalHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ServerLogicalHandler3 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler3"; - - public ServerLogicalHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerSOAPHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerSOAPHandler1.java deleted file mode 100644 index dd4daeef2a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerSOAPHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ServerSOAPHandler1 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler1"; - - public ServerSOAPHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerSOAPHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerSOAPHandler2.java deleted file mode 100644 index 5bcc2ef789..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerSOAPHandler2.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Constants; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.soap.SOAPFault; -import jakarta.xml.soap.Name; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ServerSOAPHandler2 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler2"; - - private static final String NAMESPACEURI = "http://rlowhandlertestservice.org/wsdl"; - - private static final QName FAULTCODE = new QName(NAMESPACEURI, - "ItsASoapFault", "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private SOAPFault sf; - - public ServerSOAPHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - try { - preinvoke(); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - String direction = Handler_Util.getDirection(context); - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerSOAPInboundHandleMessageThrowsSOAPFaultTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerSOAPHandler2.handleMessage throwing an inbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, - new Exception( - "Unexpected errorin handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ServerSOAPInboundHandleMessageReturnsFalseTest")) { - HandlerTracker.reportComment(this, "HandleMessage returns false"); - return false; - } - } - } else { - TestUtil.logTrace("found GetTrackerData message, handler will ignore"); - } - } finally { - postinvoke(); - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerSOAPHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerSOAPHandler3.java deleted file mode 100644 index beace5cc96..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/ServerSOAPHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ServerSOAPHandler3 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler3"; - - public ServerSOAPHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/WSRLOWHandlerTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/WSRLOWHandlerTestService.wsdl deleted file mode 100644 index ae0dd9936b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/WSRLOWHandlerTestService.wsdl +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/build.xml deleted file mode 100644 index 67b7fc038d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/customfile.xml deleted file mode 100644 index 69ed915bc0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/customfile.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - -ervice"/> - - - - - - - - - - - ServerLogicalHandler1 - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.ServerLogicalHandler1 - - - ServerSOAPHandler1 - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.ServerSOAPHandler1 - - - - - - - - ns1:HelloPort - - ServerLogicalHandler2 - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.ServerLogicalHandler2 - - - ServerSOAPHandler2 - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.ServerSOAPHandler2 - - - - - - - - ##SOAP11_HTTP - - ServerLogicalHandler3 - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.ServerLogicalHandler3 - - - ServerSOAPHandler3 - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.ServerSOAPHandler3 - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/jakartaEE.tokens deleted file mode 100644 index 9767221c13..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsrlowhandlertestservice") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.RLOWHandlerTestService -SEI=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.Hello -SEI4=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.GetTrackerData -IMPL=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.HelloImpl -IMPL4=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.GetTrackerDataImpl -NAMESPACEURI=http://rlowhandlertestservice.org/wsdl -PORT=HelloPort -PORT4=GetTrackerDataPort -SERVLET=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.HelloImpl -SERVLET4=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.onewayhandlertest.server.GetTrackerDataImpl -URLALIAS=/jaxws/Hello -URLALIAS4=/jaxws/GetTrackerData -WEBSERVICEDESCRIPTION=RLOWHandlerTestService -SERVICEREFNAMEWSSERVLET=service/wsrlowhandlertestservice -SERVICEREFNAMEWSEJB=service/wsrlowhandlertestservice -SERVICEREFNAMEWSAPPCLIENT=service/wsrlowhandlertestservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/jakartaEE.web.xml deleted file mode 100644 index 0c316e0c0b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @WEBSERVICEDESCRIPTION@App - - @SERVLET@ - @IMPL@ - 0 - - - @SERVLET4@ - @IMPL4@ - 0 - - - @SERVLET@ - @URLALIAS@ - - - @SERVLET4@ - @URLALIAS4@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/standalone-sun-jaxws.xml deleted file mode 100644 index 0409cb9ecb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/standalone.web.xml deleted file mode 100644 index 60a909c133..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/onewayhandlertest/server/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSHandlerServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -GetTrackerData -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -GetTrackerData -/jaxws/GetTrackerData - - -Hello -/jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/Client.java deleted file mode 100644 index f4b18e8bc4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/Client.java +++ /dev/null @@ -1,1816 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.parametermodetest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; - -import java.util.Properties; -import java.util.List; -import javax.xml.datatype.XMLGregorianCalendar; -import javax.xml.datatype.DatatypeFactory; -import javax.xml.datatype.DatatypeConfigurationException; - -import java.math.BigInteger; -import java.math.BigDecimal; -import jakarta.xml.ws.Holder; -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.parametermodetest."; - - // service and port information - private static final String NAMESPACEURI = "http://ParameterModeTest.org/"; - - private static final String SERVICE_NAME = "ParameterModeTestService"; - - private static final String PORT_NAME = "ParameterModeTestPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private DatatypeFactory dtfactory = null; - - ParameterModeTest port = null; - - static ParameterModeTestService service = null; - - String in1 = null, in1_tmp = null; - - BigInteger in2 = null, in2_tmp = null; - - int in3, in3_tmp; - - long in4, in4_tmp; - - short in5, in5_tmp; - - BigDecimal in6 = null, in6_tmp = null; - - float in7, in7_tmp; - - double in8, in8_tmp; - - boolean in9, in9_tmp; - - byte in10, in10_tmp; - - QName in11 = null, in11_tmp = null; - - XMLGregorianCalendar in12 = null, in12_tmp = null; - - byte[] in13, in13_tmp; - - byte[] in14, in14_tmp; - - Holder out_inout1, out_inout1_tmp; - - Holder out_inout2, out_inout2_tmp; - - Holder out_inout3, out_inout3_tmp; - - Holder out_inout4, out_inout4_tmp; - - Holder out_inout5, out_inout5_tmp; - - Holder out_inout6, out_inout6_tmp; - - Holder out_inout7, out_inout7_tmp; - - Holder out_inout8, out_inout8_tmp; - - Holder out_inout9, out_inout9_tmp; - - Holder out_inout10, out_inout10_tmp; - - Holder out_inout11, out_inout11_tmp; - - Holder out_inout12, out_inout12_tmp; - - Holder out_inout13, out_inout13_tmp; - - Holder out_inout14, out_inout14_tmp; - - Holder out_inoutarray1, out_inoutarray1_tmp; - - Holder out_inoutarray2, out_inoutarray2_tmp; - - Holder out_inoutarray3, out_inoutarray3_tmp; - - Holder out_inoutarray4, out_inoutarray4_tmp; - - Holder out_inoutarray5, out_inoutarray5_tmp; - - Holder out_inoutarray6, out_inoutarray6_tmp; - - Holder out_inoutarray7, out_inoutarray7_tmp; - - Holder out_inoutarray8, out_inoutarray8_tmp; - - Holder out_inoutarray9, out_inoutarray9_tmp; - - Holder out_inoutarray10, out_inoutarray10_tmp; - - Holder out_inoutarray11, out_inoutarray11_tmp; - - Holder out_inoutarray12, out_inoutarray12_tmp; - - EnumString inEnum1, inEnum1_tmp; - - BigInteger inEnum2, inEnum2_tmp; - - Integer inEnum3, inEnum3_tmp; - - Long inEnum4, inEnum4_tmp; - - Short inEnum5, inEnum5_tmp; - - BigDecimal inEnum6, inEnum6_tmp; - - Float inEnum7, inEnum7_tmp; - - Double inEnum8, inEnum8_tmp; - - Byte inEnum9, inEnum9_tmp; - - Holder out_inoutEnum1, out_inoutEnum1_tmp; - - Holder out_inoutEnum2, out_inoutEnum2_tmp; - - Holder out_inoutEnum3, out_inoutEnum3_tmp; - - Holder out_inoutEnum4, out_inoutEnum4_tmp; - - Holder out_inoutEnum5, out_inoutEnum5_tmp; - - Holder out_inoutEnum6, out_inoutEnum6_tmp; - - Holder out_inoutEnum7, out_inoutEnum7_tmp; - - Holder out_inoutEnum8, out_inoutEnum8_tmp; - - Holder out_inoutEnum9, out_inoutEnum9_tmp; - - AllStruct inStruct = null; - - AllStruct inStruct_tmp = null; - - // URL properties used by the test - private static final String ENDPOINT_URL = "w2jrlparametermodetest.endpoint.1"; - - private static final String WSDLLOC_URL = "w2jrlparametermodetest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (ParameterModeTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - ParameterModeTestService.class, PORT_QNAME, ParameterModeTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (ParameterModeTest) service.getParameterModeTestPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - getTestURLs(); - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (ParameterModeTestService) getSharedObject(); - getPortJavaEE(); - } - try { - dtfactory = DatatypeFactory.newInstance(); - } catch (DatatypeConfigurationException e) { - TestUtil.logErr("Could not configure DatatypeFactory object"); - TestUtil.printStackTrace(e); - pass = false; - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - private boolean printTestStatus(boolean pass, String test) { - if (pass) - TestUtil.logMsg("" + test + " ... PASSED"); - else - TestUtil.logErr("" + test + " ... FAILED"); - - return pass; - } - - private void initialize_in_SimpleType_data() { - in1 = "String1"; - in2 = new BigInteger("3512359"); - in3 = (int) Integer.MIN_VALUE; - in4 = (long) Long.MIN_VALUE; - in5 = (short) Short.MIN_VALUE; - in6 = new BigDecimal("3512359.1456"); - in7 = (float) Float.MIN_VALUE; - in8 = (double) Double.MIN_VALUE; - in9 = false; - in10 = (byte) Byte.MIN_VALUE; - in11 = new QName("String2"); - in12 = dtfactory.newXMLGregorianCalendar(96, 5, 1, 10, 0, 0, 0, 0); - in13 = JAXWS_Data.byte_data; - in14 = JAXWS_Data.byte_data; - } - - private void initialize_out_inout_SimpleType_data() { - out_inout1 = new Holder("String1"); - out_inout2 = new Holder(new BigInteger("3512359")); - out_inout3 = new Holder(Integer.MIN_VALUE); - out_inout4 = new Holder(Long.MIN_VALUE); - out_inout5 = new Holder(Short.MIN_VALUE); - out_inout6 = new Holder(new BigDecimal("3512359.1456")); - out_inout7 = new Holder(Float.MIN_VALUE); - out_inout8 = new Holder(Double.MIN_VALUE); - out_inout9 = new Holder(false); - out_inout10 = new Holder(Byte.MIN_VALUE); - out_inout11 = new Holder(new QName("String2")); - out_inout12 = new Holder( - dtfactory.newXMLGregorianCalendar(6, 5, 1, 10, 0, 0, 0, 0)); - out_inout13 = new Holder(JAXWS_Data.byte_data); - out_inout14 = new Holder(JAXWS_Data.byte_data); - } - - private void initialize_out_inout_SimpleTypeArray_data() { - - ArrayOfstring astring = new ArrayOfstring(); - int j = JAXWS_Data.String_nonull_data.length; - for (int i = 0; i < JAXWS_Data.String_nonull_data.length; i++) { - astring.getArrayOfstring().add(JAXWS_Data.String_nonull_data[--j]); - } - out_inoutarray1 = new Holder(astring); - - ArrayOfinteger ainteger = new ArrayOfinteger(); - j = JAXWS_Data.BigInteger_nonull_data.length; - for (int i = 0; i < JAXWS_Data.BigInteger_nonull_data.length; i++) { - ainteger.getArrayOfinteger().add(JAXWS_Data.BigInteger_nonull_data[--j]); - } - out_inoutarray2 = new Holder(ainteger); - - ArrayOfint aint = new ArrayOfint(); - j = JAXWS_Data.int_data.length; - for (int i = 0; i < JAXWS_Data.int_data.length; i++) { - aint.getArrayOfint().add(JAXWS_Data.int_data[--j]); - } - out_inoutarray3 = new Holder(aint); - - ArrayOflong along = new ArrayOflong(); - j = JAXWS_Data.long_data.length; - for (int i = 0; i < JAXWS_Data.long_data.length; i++) { - along.getArrayOflong().add(JAXWS_Data.long_data[--j]); - } - out_inoutarray4 = new Holder(along); - - ArrayOfshort ashort = new ArrayOfshort(); - j = JAXWS_Data.short_data.length; - for (int i = 0; i < JAXWS_Data.short_data.length; i++) { - ashort.getArrayOfshort().add(JAXWS_Data.short_data[--j]); - } - out_inoutarray5 = new Holder(ashort); - - ArrayOfdecimal adecimal = new ArrayOfdecimal(); - j = JAXWS_Data.BigDecimal_nonull_data.length; - for (int i = 0; i < JAXWS_Data.BigDecimal_nonull_data.length; i++) { - adecimal.getArrayOfdecimal().add(JAXWS_Data.BigDecimal_nonull_data[--j]); - } - out_inoutarray6 = new Holder(adecimal); - - ArrayOffloat afloat = new ArrayOffloat(); - j = JAXWS_Data.float_data.length; - for (int i = 0; i < JAXWS_Data.float_data.length; i++) { - afloat.getArrayOffloat().add(JAXWS_Data.float_data[--j]); - } - out_inoutarray7 = new Holder(afloat); - - ArrayOfdouble adouble = new ArrayOfdouble(); - j = JAXWS_Data.double_data.length; - for (int i = 0; i < JAXWS_Data.double_data.length; i++) { - adouble.getArrayOfdouble().add(JAXWS_Data.double_data[--j]); - } - out_inoutarray8 = new Holder(adouble); - - ArrayOfboolean abool = new ArrayOfboolean(); - j = JAXWS_Data.boolean_data.length; - for (int i = 0; i < JAXWS_Data.boolean_data.length; i++) { - abool.getArrayOfboolean().add(JAXWS_Data.boolean_data[--j]); - } - out_inoutarray9 = new Holder(abool); - - ArrayOfbyte abyte = new ArrayOfbyte(); - j = JAXWS_Data.byte_data.length; - for (int i = 0; i < JAXWS_Data.byte_data.length; i++) { - abyte.getArrayOfbyte().add(JAXWS_Data.byte_data[--j]); - } - out_inoutarray10 = new Holder(abyte); - - ArrayOfQName aqname = new ArrayOfQName(); - j = JAXWS_Data.QName_nonull_data.length; - for (int i = 0; i < JAXWS_Data.QName_nonull_data.length; i++) { - aqname.getArrayOfQName().add(JAXWS_Data.QName_nonull_data[--j]); - } - out_inoutarray11 = new Holder(aqname); - - ArrayOfdateTime adt = new ArrayOfdateTime(); - j = JAXWS_Data.XMLGregorianCalendar_nonull_data.length; - for (int i = 0; i < JAXWS_Data.XMLGregorianCalendar_nonull_data.length; i++) { - adt.getArrayOfdateTime() - .add(JAXWS_Data.XMLGregorianCalendar_nonull_data[--j]); - } - out_inoutarray12 = new Holder(adt); - } - - private void initialize_saved_out_inout_SimpleTypeArray_data() { - - ArrayOfstring astring = new ArrayOfstring(); - for (int i = 0; i < JAXWS_Data.String_nonull_data.length; i++) { - astring.getArrayOfstring().add(JAXWS_Data.String_nonull_data[i]); - } - out_inoutarray1_tmp = new Holder(astring); - - ArrayOfinteger ainteger = new ArrayOfinteger(); - for (int i = 0; i < JAXWS_Data.BigInteger_nonull_data.length; i++) { - ainteger.getArrayOfinteger().add(JAXWS_Data.BigInteger_nonull_data[i]); - } - out_inoutarray2_tmp = new Holder(ainteger); - - ArrayOfint aint = new ArrayOfint(); - for (int i = 0; i < JAXWS_Data.int_data.length; i++) { - aint.getArrayOfint().add(JAXWS_Data.int_data[i]); - } - out_inoutarray3_tmp = new Holder(aint); - - ArrayOflong along = new ArrayOflong(); - for (int i = 0; i < JAXWS_Data.long_data.length; i++) { - along.getArrayOflong().add(JAXWS_Data.long_data[i]); - } - out_inoutarray4_tmp = new Holder(along); - - ArrayOfshort ashort = new ArrayOfshort(); - for (int i = 0; i < JAXWS_Data.short_data.length; i++) { - ashort.getArrayOfshort().add(JAXWS_Data.short_data[i]); - } - out_inoutarray5_tmp = new Holder(ashort); - - ArrayOfdecimal adecimal = new ArrayOfdecimal(); - for (int i = 0; i < JAXWS_Data.BigDecimal_nonull_data.length; i++) { - adecimal.getArrayOfdecimal().add(JAXWS_Data.BigDecimal_nonull_data[i]); - } - out_inoutarray6_tmp = new Holder(adecimal); - - ArrayOffloat afloat = new ArrayOffloat(); - for (int i = 0; i < JAXWS_Data.float_data.length; i++) { - afloat.getArrayOffloat().add(JAXWS_Data.float_data[i]); - } - out_inoutarray7_tmp = new Holder(afloat); - - ArrayOfdouble adouble = new ArrayOfdouble(); - for (int i = 0; i < JAXWS_Data.double_data.length; i++) { - adouble.getArrayOfdouble().add(JAXWS_Data.double_data[i]); - } - out_inoutarray8_tmp = new Holder(adouble); - - ArrayOfboolean abool = new ArrayOfboolean(); - for (int i = 0; i < JAXWS_Data.boolean_data.length; i++) { - abool.getArrayOfboolean().add(JAXWS_Data.boolean_data[i]); - } - out_inoutarray9_tmp = new Holder(abool); - - ArrayOfbyte abyte = new ArrayOfbyte(); - for (int i = 0; i < JAXWS_Data.byte_data.length; i++) { - abyte.getArrayOfbyte().add(JAXWS_Data.byte_data[i]); - } - out_inoutarray10_tmp = new Holder(abyte); - - ArrayOfQName aqname = new ArrayOfQName(); - for (int i = 0; i < JAXWS_Data.QName_nonull_data.length; i++) { - aqname.getArrayOfQName().add(JAXWS_Data.QName_nonull_data[i]); - } - out_inoutarray11_tmp = new Holder(aqname); - - ArrayOfdateTime adt = new ArrayOfdateTime(); - for (int i = 0; i < JAXWS_Data.XMLGregorianCalendar_nonull_data.length; i++) { - adt.getArrayOfdateTime() - .add(JAXWS_Data.XMLGregorianCalendar_nonull_data[i]); - } - out_inoutarray12_tmp = new Holder(adt); - } - - private void initialize_inEnum_data() { - try { - inEnum1 = EnumString.STRING_1; - inEnum2 = new BigInteger("3512359"); - inEnum3 = Integer.MIN_VALUE; - inEnum4 = Long.MIN_VALUE; - inEnum5 = Short.MIN_VALUE; - inEnum6 = new BigDecimal("3512359.1456"); - inEnum7 = Float.valueOf("-1.00000000"); - inEnum8 = Double.valueOf("-1.0000000000000"); - inEnum9 = Byte.valueOf(Byte.MIN_VALUE); - } catch (IllegalArgumentException e) { - TestUtil.logErr("Couldn't initialize enumeration data", e); - throw e; - } - } - - private void initialize_out_inoutEnum_data() { - out_inoutEnum1 = new Holder(EnumString.STRING_1); - out_inoutEnum2 = new Holder(new BigInteger("3512359")); - out_inoutEnum3 = new Holder(Integer.MIN_VALUE); - out_inoutEnum4 = new Holder(Long.MIN_VALUE); - out_inoutEnum5 = new Holder(Short.MIN_VALUE); - out_inoutEnum6 = new Holder(new BigDecimal("3512359.1456")); - out_inoutEnum7 = new Holder(Float.valueOf("-1.00000000")); - out_inoutEnum8 = new Holder(Double.valueOf("-1.0000000000000")); - out_inoutEnum9 = new Holder(Byte.valueOf(Byte.MIN_VALUE)); - } - - private void initialize_in_Struct_data() { - inStruct = new AllStruct(); - inStruct.setVarString("String1"); - inStruct.setVarInteger(new BigInteger("3512359")); - inStruct.setVarInt((int) Integer.MIN_VALUE); - inStruct.setVarLong((long) Long.MIN_VALUE); - inStruct.setVarShort((short) Short.MIN_VALUE); - inStruct.setVarDecimal(new BigDecimal("3512359.1456")); - inStruct.setVarFloat((float) Float.MIN_VALUE); - inStruct.setVarDouble((double) Double.MIN_VALUE); - inStruct.setVarBoolean(false); - inStruct.setVarByte((byte) Byte.MIN_VALUE); - inStruct.setVarQName(new QName("String2")); - inStruct.setVarDateTime( - dtfactory.newXMLGregorianCalendar(96, 5, 1, 10, 0, 0, 0, 0)); - inStruct.setVarBase64Binary(JAXWS_Data.byte_data); - inStruct.setVarHexBinary(JAXWS_Data.byte_data); - } - - private void initialize_saved_in_SimpleType_data() { - in1_tmp = "String4"; - in2_tmp = new BigInteger("3512360"); - in3_tmp = (int) Integer.MAX_VALUE; - in4_tmp = (long) Long.MAX_VALUE; - in5_tmp = (short) Short.MAX_VALUE; - in6_tmp = new BigDecimal("3512360.1456"); - in7_tmp = (float) Float.MAX_VALUE; - in8_tmp = (double) Double.MAX_VALUE; - in9_tmp = true; - in10_tmp = (byte) Byte.MAX_VALUE; - in11_tmp = new QName("String5"); - in12_tmp = dtfactory.newXMLGregorianCalendar(96, 5, 2, 10, 0, 0, 0, 0); - in13_tmp = JAXWS_Data.byte_data2; - in14_tmp = JAXWS_Data.byte_data2; - } - - private void initialize_saved_out_inout_SimpleType_data() { - out_inout1_tmp = new Holder("String4"); - out_inout2_tmp = new Holder(new BigInteger("3512360")); - out_inout3_tmp = new Holder(Integer.MAX_VALUE); - out_inout4_tmp = new Holder(Long.MAX_VALUE); - out_inout5_tmp = new Holder(Short.MAX_VALUE); - out_inout6_tmp = new Holder(new BigDecimal("3512360.1456")); - out_inout7_tmp = new Holder(Float.MAX_VALUE); - out_inout8_tmp = new Holder(Double.MAX_VALUE); - out_inout9_tmp = new Holder(true); - out_inout10_tmp = new Holder(Byte.MAX_VALUE); - out_inout11_tmp = new Holder(new QName("String5")); - out_inout12_tmp = new Holder( - dtfactory.newXMLGregorianCalendar(96, 5, 2, 10, 0, 0, 0, 0)); - out_inout13_tmp = new Holder(JAXWS_Data.byte_data2); - out_inout14_tmp = new Holder(JAXWS_Data.byte_data2); - - } - - private void initialize_saved_out_inoutEnum_data() { - out_inoutEnum1_tmp = new Holder(EnumString.STRING_2); - out_inoutEnum2_tmp = new Holder(new BigInteger("3512360")); - out_inoutEnum3_tmp = new Holder(Integer.MAX_VALUE); - out_inoutEnum4_tmp = new Holder(Long.MAX_VALUE); - out_inoutEnum5_tmp = new Holder(Short.MAX_VALUE); - out_inoutEnum6_tmp = new Holder(new BigDecimal("3512360.1456")); - out_inoutEnum7_tmp = new Holder(Float.valueOf("3.00000000")); - out_inoutEnum8_tmp = new Holder(Double.valueOf("3.0000000000000")); - out_inoutEnum9_tmp = new Holder(Byte.valueOf(Byte.MAX_VALUE)); - } - - private void initialize_saved_in_Struct_data() { - inStruct = new AllStruct(); - inStruct.setVarString("String4"); - inStruct.setVarInteger(new BigInteger("3512360")); - inStruct.setVarInt((int) Integer.MAX_VALUE); - inStruct.setVarLong((long) Long.MAX_VALUE); - inStruct.setVarShort((short) Short.MAX_VALUE); - inStruct.setVarDecimal(new BigDecimal("3512360.1456")); - inStruct.setVarFloat((float) Float.MAX_VALUE); - inStruct.setVarDouble((double) Double.MAX_VALUE); - inStruct.setVarBoolean(true); - inStruct.setVarByte((byte) Byte.MAX_VALUE); - inStruct.setVarQName(new QName("String5")); - inStruct.setVarDateTime( - dtfactory.newXMLGregorianCalendar(96, 5, 2, 10, 0, 0, 0, 0)); - inStruct.setVarBase64Binary(JAXWS_Data.byte_data2); - inStruct.setVarHexBinary(JAXWS_Data.byte_data2); - } - - private void save_in_SimpleType_data() { - in1_tmp = in1; - in2_tmp = in2; - in3_tmp = in3; - in4_tmp = in4; - in5_tmp = in5; - in6_tmp = in6; - in7_tmp = in7; - in8_tmp = in8; - in9_tmp = in9; - in10_tmp = in10; - in11_tmp = in11; - in12_tmp = in12; - in13_tmp = in13; - in14_tmp = in14; - } - - private void save_out_inout_SimpleType_data() { - out_inout1_tmp = out_inout1; - out_inout2_tmp = out_inout2; - out_inout3_tmp = out_inout3; - out_inout4_tmp = out_inout4; - out_inout5_tmp = out_inout5; - out_inout6_tmp = out_inout6; - out_inout7_tmp = out_inout7; - out_inout8_tmp = out_inout8; - out_inout9_tmp = out_inout9; - out_inout10_tmp = out_inout10; - out_inout11_tmp = out_inout11; - out_inout12_tmp = out_inout12; - out_inout13_tmp = out_inout13; - out_inout14_tmp = out_inout14; - } - - private void save_inEnum_data() { - inEnum1_tmp = inEnum1; - inEnum2_tmp = inEnum2; - inEnum3_tmp = inEnum3; - inEnum4_tmp = inEnum4; - inEnum5_tmp = inEnum5; - inEnum6_tmp = inEnum6; - inEnum7_tmp = inEnum7; - inEnum8_tmp = inEnum8; - inEnum9_tmp = inEnum9; - } - - private void save_in_Struct_data() { - boolean bool; - inStruct_tmp = new AllStruct(); - inStruct_tmp.setVarString(inStruct.getVarString()); - inStruct_tmp.setVarInteger(inStruct.getVarInteger()); - inStruct_tmp.setVarInt(inStruct.getVarInt()); - inStruct_tmp.setVarLong(inStruct.getVarLong()); - inStruct_tmp.setVarShort(inStruct.getVarShort()); - inStruct_tmp.setVarDecimal(inStruct.getVarDecimal()); - inStruct_tmp.setVarFloat(inStruct.getVarFloat()); - inStruct_tmp.setVarDouble(inStruct.getVarDouble()); - inStruct_tmp.setVarBoolean(inStruct.isVarBoolean()); - inStruct_tmp.setVarByte(inStruct.getVarByte()); - inStruct_tmp.setVarQName(inStruct.getVarQName()); - inStruct_tmp.setVarDateTime(inStruct.getVarDateTime()); - inStruct_tmp.setVarBase64Binary(inStruct.getVarBase64Binary()); - inStruct_tmp.setVarHexBinary(inStruct.getVarHexBinary()); - } - - private boolean compare_in_SimpleType_data() { - TestUtil.logMsg("Comparing IN data"); - - boolean pass = true; - if (!in1.equals(in1_tmp)) { - TestUtil.logErr("compare_data failed for String- expected " + in1_tmp - + ", received: " + in1); - pass = false; - } - if (!in2.equals(in2_tmp)) { - TestUtil.logErr("compare_data failed for BigInteger - expected " + in2_tmp - + ", received: " + in2); - pass = false; - } - if (in3 != in3_tmp) { - TestUtil.logErr("compare_data failed for int - expected " + in3_tmp - + ", received: " + in3); - pass = false; - } - if (in4 != in4_tmp) { - TestUtil.logErr("compare_data failed for long - expected " + in4_tmp - + ", received: " + in4); - pass = false; - } - if (in5 != in5_tmp) { - TestUtil.logErr("compare_data failed for short - expected " + in5_tmp - + ", received: " + in5); - pass = false; - } - if (!in6.equals(in6_tmp)) { - TestUtil.logErr("compare_data failed for BigDecimal - expected " + in6_tmp - + ", received: " + in6); - pass = false; - } - if (in7 != in7_tmp) { - TestUtil.logErr("compare_data failed for float - expected " + in7_tmp - + ", received: " + in7); - pass = false; - } - if (in8 != in8_tmp) { - TestUtil.logErr("compare_data failed for double - expected " + in8_tmp - + ", received: " + in8); - pass = false; - } - if (in9 != in9_tmp) { - TestUtil.logErr("compare_data failed for boolean - expected " + in9_tmp - + ", received: " + in9); - pass = false; - } - if (in10 != in10_tmp) { - TestUtil.logErr("compare_data failed for byte - expected " + in10_tmp - + ", received: " + in10); - pass = false; - } - if (!in11.equals(in11_tmp)) { - TestUtil.logErr("compare_data failed for QName - expected " + in11_tmp - + ", received: " + in11); - pass = false; - } - if (!JAXWS_Data.compareXMLGregorianCalendars(in12, in12_tmp)) { - TestUtil.logErr("compare_data failed for XMLGregorianCalendar - expected " - + in12_tmp + ", received: " + in12); - pass = false; - } - if (!JAXWS_Data.compareArrayValues(in13, in13_tmp, "byte")) { - TestUtil.logErr("compare_data failed for base64binary - expected " - + in13_tmp + ", received: " + in13); - pass = false; - } - if (!JAXWS_Data.compareArrayValues(in14, in14_tmp, "byte")) { - TestUtil.logErr("compare_data failed for hexbinary - expected " + in14_tmp - + ", received: " + in14); - pass = false; - } - - return pass; - } - - private boolean compare_out_inout_data() { - TestUtil.logMsg("Comparing IN/INOUT data"); - boolean pass = true; - if (!out_inout1.value.equals(out_inout1_tmp.value)) { - TestUtil.logErr("compare_data failed for StringHolder - expected " - + out_inout1_tmp.value + ", received: " + out_inout1.value); - pass = false; - } - if (!out_inout2.value.equals(out_inout2_tmp.value)) { - TestUtil.logErr("compare_data failed for BigIntegerHolder - expected " - + out_inout2_tmp.value + ", received: " + out_inout2.value); - pass = false; - } - if (!out_inout3.value.equals(out_inout3_tmp.value)) { - TestUtil.logErr("compare_data failed for IntHolder - expected " - + out_inout3_tmp.value + ", received: " + out_inout3.value); - pass = false; - } - if (!out_inout4.value.equals(out_inout4_tmp.value)) { - TestUtil.logErr("compare_data failed for LongHolder - expected " - + out_inout4_tmp.value + ", received: " + out_inout4.value); - pass = false; - } - if (!out_inout5.value.equals(out_inout5_tmp.value)) { - TestUtil.logErr("compare_data failed for ShortHolder - expected " - + out_inout5_tmp.value + ", received: " + out_inout5.value); - pass = false; - } - if (!out_inout6.value.equals(out_inout6_tmp.value)) { - TestUtil.logErr("compare_data failed for BigDecimalHolder - expected " - + out_inout6_tmp.value + ", received: " + out_inout6.value); - pass = false; - } - if (!out_inout7.value.equals(out_inout7_tmp.value)) { - TestUtil.logErr("compare_data failed for FloatHolder - expected " - + out_inout7_tmp.value + ", received: " + out_inout7.value); - pass = false; - } - if (!out_inout8.value.equals(out_inout8_tmp.value)) { - TestUtil.logErr("compare_data failed for DoubleHolder - expected " - + out_inout8_tmp.value + ", received: " + out_inout8.value); - pass = false; - } - if (!out_inout9.value.equals(out_inout9_tmp.value)) { - TestUtil.logErr("compare_data failed for BooleanHolder - expected " - + out_inout9_tmp.value + ", received: " + out_inout9.value); - pass = false; - } - if (!out_inout10.value.equals(out_inout10_tmp.value)) { - TestUtil.logErr("compare_data failed for ByteHolder - expected " - + out_inout10_tmp.value + ", received: " + out_inout10.value); - pass = false; - } - if (!out_inout11.value.equals(out_inout11_tmp.value)) { - TestUtil.logErr("compare_data failed for QNameHolder - expected " - + out_inout11_tmp.value + ", received: " + out_inout11.value); - pass = false; - } - if (!JAXWS_Data.compareXMLGregorianCalendars(out_inout12.value, - out_inout12_tmp.value)) { - TestUtil.logErr("compare_data failed for XMLGregorianCalendar - expected " - + out_inout12_tmp.value + ", received: " + out_inout12.value); - pass = false; - } - if (!JAXWS_Data.compareArrayValues(out_inout13.value, out_inout13_tmp.value, - "byte")) { - TestUtil - .logErr("compare_data failed for ByteArrayWrapperHolder - expected "); - JAXWS_Data.dumpArrayValues(out_inout13_tmp.value, "byte"); - TestUtil.logErr(" received: "); - JAXWS_Data.dumpArrayValues(out_inout13.value, "byte"); - pass = false; - } - if (!JAXWS_Data.compareArrayValues(out_inout14.value, out_inout14_tmp.value, - "byte")) { - TestUtil - .logErr("compare_data failed for ByteArrayWrapperHolder - expected "); - JAXWS_Data.dumpArrayValues(out_inout14_tmp.value, "byte"); - TestUtil.logErr(" received: "); - JAXWS_Data.dumpArrayValues(out_inout14.value, "byte"); - pass = false; - } - - return pass; - } - - private boolean compare_inEnum_data() { - TestUtil.logMsg("Comparing IN enumeration data"); - - boolean pass = true; - if (inEnum1 != inEnum1_tmp) { - TestUtil.logErr("compare_data failed for String- expected " + inEnum1_tmp - + ", received: " + inEnum1); - pass = false; - } - if (!inEnum2.equals(inEnum2_tmp)) { - TestUtil.logErr("compare_data failed for BigInteger - expected " - + inEnum2_tmp + ", received: " + inEnum2); - pass = false; - } - if (inEnum3 != inEnum3_tmp) { - TestUtil.logErr("compare_data failed for int - expected " + inEnum3_tmp - + ", received: " + inEnum3); - pass = false; - } - if (inEnum4 != inEnum4_tmp) { - TestUtil.logErr("compare_data failed for long - expected " + inEnum4_tmp - + ", received: " + inEnum4); - pass = false; - } - if (inEnum5 != inEnum5_tmp) { - TestUtil.logErr("compare_data failed for short - expected " + inEnum5_tmp - + ", received: " + inEnum5); - pass = false; - } - if (!inEnum6.equals(inEnum6_tmp)) { - TestUtil.logErr("compare_data failed for BigDecimal - expected " - + inEnum6_tmp + ", received: " + inEnum6); - pass = false; - } - if (inEnum7 != inEnum7_tmp) { - TestUtil.logErr("compare_data failed for float - expected " + inEnum7_tmp - + ", received: " + inEnum7); - pass = false; - } - if (inEnum8 != inEnum8_tmp) { - TestUtil.logErr("compare_data failed for double - expected " + inEnum8_tmp - + ", received: " + inEnum8); - pass = false; - } - if (inEnum9 != inEnum9_tmp) { - TestUtil.logErr("compare_data failed for byte - expected " + inEnum9_tmp - + ", received: " + inEnum9); - pass = false; - } - return pass; - } - - private boolean compare_out_inoutEnum_data() { - TestUtil.logMsg("Comparing OUT_INOUT enumeration data"); - - boolean pass = true; - if (out_inoutEnum1.value != out_inoutEnum1_tmp.value) { - TestUtil.logErr("compare_data failed for String- expected " - + out_inoutEnum1_tmp.value + ", received: " + out_inoutEnum1.value); - pass = false; - } - if (!out_inoutEnum2.value.equals(out_inoutEnum2_tmp.value)) { - TestUtil.logErr("compare_data failed for BigInteger - expected " - + out_inoutEnum2_tmp.value + ", received: " + out_inoutEnum2.value); - pass = false; - } - if (!out_inoutEnum3.value.equals(out_inoutEnum3_tmp.value)) { - TestUtil.logErr("compare_data failed for Integer - expected " - + out_inoutEnum3_tmp.value + ", received: " + out_inoutEnum3.value); - pass = false; - } - if (!out_inoutEnum4.value.equals(out_inoutEnum4_tmp.value)) { - TestUtil.logErr("compare_data failed for Long - expected " - + out_inoutEnum4_tmp.value + ", received: " + out_inoutEnum4.value); - pass = false; - } - if (!out_inoutEnum5.value.equals(out_inoutEnum5_tmp.value)) { - TestUtil.logErr("compare_data failed for Short - expected " - + out_inoutEnum5_tmp.value + ", received: " + out_inoutEnum5.value); - pass = false; - } - if (!out_inoutEnum6.value.equals(out_inoutEnum6_tmp.value)) { - TestUtil.logErr("compare_data failed for BigDecimal - expected " - + out_inoutEnum6_tmp.value + ", received: " + out_inoutEnum6.value); - pass = false; - } - if (!out_inoutEnum7.value.equals(out_inoutEnum7_tmp.value)) { - TestUtil.logErr("compare_data failed for Float - expected " - + out_inoutEnum7_tmp.value + ", received: " + out_inoutEnum7.value); - pass = false; - } - if (!out_inoutEnum8.value.equals(out_inoutEnum8_tmp.value)) { - TestUtil.logErr("compare_data failed for Double - expected " - + out_inoutEnum8_tmp.value + ", received: " + out_inoutEnum8.value); - pass = false; - } - if (!out_inoutEnum9.value.equals(out_inoutEnum9_tmp.value)) { - TestUtil.logErr("compare_data failed for Byte - expected " - + out_inoutEnum9_tmp.value + ", received: " + out_inoutEnum9.value); - pass = false; - } - return pass; - } - - private boolean compare_in_Struct_data() { - TestUtil.logMsg("Comparing IN data"); - - boolean pass = true; - if (!inStruct.getVarString().equals(inStruct_tmp.getVarString())) { - TestUtil.logErr("compare_data failed for String- expected " - + inStruct_tmp.getVarString() + ", received: " - + inStruct.getVarString()); - pass = false; - } - if (!inStruct.getVarInteger().equals(inStruct_tmp.getVarInteger())) { - TestUtil.logErr("compare_data failed for BigInteger - expected " - + inStruct_tmp.getVarInteger() + ", received: " - + inStruct.getVarInteger()); - pass = false; - } - if (inStruct.getVarInt() != inStruct_tmp.getVarInt()) { - TestUtil.logErr("compare_data failed for int - expected " - + inStruct_tmp.getVarInt() + ", received: " + inStruct.getVarInt()); - pass = false; - } - if (inStruct.getVarLong() != inStruct_tmp.getVarLong()) { - TestUtil.logErr( - "compare_data failed for long - expected " + inStruct_tmp.getVarLong() - + ", received: " + inStruct.getVarLong()); - pass = false; - } - if (inStruct.getVarShort() != inStruct_tmp.getVarShort()) { - TestUtil.logErr("compare_data failed for short - expected " - + inStruct_tmp.getVarShort() + ", received: " - + inStruct.getVarShort()); - pass = false; - } - if (!inStruct.getVarDecimal().equals(inStruct_tmp.getVarDecimal())) { - TestUtil.logErr("compare_data failed for BigDecimal - expected " - + inStruct_tmp.getVarDecimal() + ", received: " - + inStruct.getVarDecimal()); - pass = false; - } - if (inStruct.getVarFloat() != inStruct_tmp.getVarFloat()) { - TestUtil.logErr("compare_data failed for float - expected " - + inStruct_tmp.getVarFloat() + ", received: " - + inStruct.getVarFloat()); - pass = false; - } - if (inStruct.getVarDouble() != inStruct_tmp.getVarDouble()) { - TestUtil.logErr("compare_data failed for double - expected " - + inStruct_tmp.getVarDouble() + ", received: " - + inStruct.getVarDouble()); - pass = false; - } - if (inStruct.isVarBoolean() != inStruct_tmp.isVarBoolean()) { - TestUtil.logErr("compare_data failed for boolean - expected " - + inStruct_tmp.isVarBoolean() + ", received: " - + inStruct.isVarBoolean()); - pass = false; - } - if (inStruct.getVarByte() != inStruct_tmp.getVarByte()) { - TestUtil.logErr( - "compare_data failed for byte - expected " + inStruct_tmp.getVarByte() - + ", received: " + inStruct.getVarByte()); - pass = false; - } - if (!inStruct.getVarQName().equals(inStruct_tmp.getVarQName())) { - TestUtil.logErr("compare_data failed for QName - expected " - + inStruct_tmp.getVarQName() + ", received: " - + inStruct.getVarQName()); - pass = false; - } - if (!JAXWS_Data.compareXMLGregorianCalendars(inStruct.getVarDateTime(), - inStruct_tmp.getVarDateTime())) { - TestUtil.logErr("compare_data failed for XMLGregorianCalendar - expected " - + inStruct_tmp.getVarDateTime() + ", received: " - + inStruct.getVarDateTime()); - pass = false; - } - if (!JAXWS_Data.compareArrayValues(inStruct.getVarBase64Binary(), - inStruct_tmp.getVarBase64Binary(), "byte")) { - TestUtil.logErr("compare_data failed for base64binary - expected " - + inStruct_tmp.getVarBase64Binary() + ", received: " - + inStruct.getVarBase64Binary()); - pass = false; - } - if (!JAXWS_Data.compareArrayValues(inStruct.getVarHexBinary(), - inStruct_tmp.getVarHexBinary(), "byte")) { - TestUtil.logErr("compare_data failed for hexbinary - expected " - + inStruct_tmp.getVarHexBinary() + ", received: " - + inStruct.getVarHexBinary()); - pass = false; - } - - return pass; - } - - private boolean compare_out_inoutarray_data() { - TestUtil.logMsg("Comparing IN/INOUT ARRAY data"); - boolean pass = true; - if (!JAXWS_Data.compareArrayValues( - out_inoutarray1_tmp.value.getArrayOfstring(), - out_inoutarray1.value.getArrayOfstring(), "String")) { - TestUtil.logMsg("String array data miscompare"); - pass = false; - } - if (!JAXWS_Data.compareArrayValues( - out_inoutarray2_tmp.value.getArrayOfinteger(), - out_inoutarray2.value.getArrayOfinteger(), "BigInteger")) { - TestUtil.logMsg("BigInteger array data miscompare"); - pass = false; - } - if (!JAXWS_Data.compareArrayValues( - out_inoutarray3_tmp.value.getArrayOfint(), - out_inoutarray3.value.getArrayOfint(), "int")) { - TestUtil.logMsg("int array data miscompare"); - pass = false; - } - if (!JAXWS_Data.compareArrayValues( - out_inoutarray4_tmp.value.getArrayOflong(), - out_inoutarray4.value.getArrayOflong(), "long")) { - TestUtil.logMsg("long array data miscompare"); - pass = false; - } - if (!JAXWS_Data.compareArrayValues( - out_inoutarray5_tmp.value.getArrayOfshort(), - out_inoutarray5.value.getArrayOfshort(), "short")) { - TestUtil.logMsg("short array data miscompare"); - pass = false; - } - if (!JAXWS_Data.compareArrayValues( - out_inoutarray6_tmp.value.getArrayOfdecimal(), - out_inoutarray6.value.getArrayOfdecimal(), "BigDecimal")) { - TestUtil.logMsg("BigDecimal array data miscompare"); - pass = false; - } - if (!JAXWS_Data.compareArrayValues( - out_inoutarray7_tmp.value.getArrayOffloat(), - out_inoutarray7.value.getArrayOffloat(), "float")) { - TestUtil.logMsg("float array data miscompare"); - pass = false; - } - if (!JAXWS_Data.compareArrayValues( - out_inoutarray8_tmp.value.getArrayOfdouble(), - out_inoutarray8.value.getArrayOfdouble(), "double")) { - TestUtil.logMsg("double array data miscompare"); - pass = false; - } - if (!JAXWS_Data.compareArrayValues( - out_inoutarray9_tmp.value.getArrayOfboolean(), - out_inoutarray9.value.getArrayOfboolean(), "boolean")) { - TestUtil.logMsg("boolean array data miscompare"); - pass = false; - } - if (!JAXWS_Data.compareArrayValues( - out_inoutarray10_tmp.value.getArrayOfbyte(), - out_inoutarray10.value.getArrayOfbyte(), "byte")) { - TestUtil.logMsg("byte array data miscompare"); - pass = false; - } - if (!JAXWS_Data.compareArrayValues( - out_inoutarray11_tmp.value.getArrayOfQName(), - out_inoutarray11.value.getArrayOfQName(), "QName")) { - TestUtil.logMsg("QNameBigDecimal array data miscompare"); - pass = false; - } - if (!JAXWS_Data.compareArrayValues( - out_inoutarray12_tmp.value.getArrayOfdateTime(), - out_inoutarray12.value.getArrayOfdateTime(), "XMLGregorianCalendar")) { - TestUtil.logMsg("XMLGregorianCalendar array data miscompare"); - pass = false; - } - return pass; - } - - /* - * @testName: InTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InTest() throws Fault { - TestUtil.logTrace("InTest"); - boolean pass = true; - try { - TestUtil.logMsg("Marshalling input data"); - String in = "String1"; - String in_tmp = "String1"; - port.echoIn(in); - TestUtil.logMsg("Comparing expected data"); - if (!in.equals(in_tmp)) { - TestUtil.logErr("compare_data failed for String- expected " + in_tmp - + ", received: " + in); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InTest failed"); - } - - /* - * @testName: OutTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void OutTest() throws Fault { - TestUtil.logTrace("OutTest"); - boolean pass = true; - try { - Holder out = new Holder("String1"); - Holder out_tmp = new Holder("String4"); - TestUtil.logMsg("Marshalling output data"); - port.echoOut(out); - TestUtil.logMsg("Comparing expected data"); - if (!out.value.equals(out_tmp.value)) { - TestUtil.logErr("compare_data failed for String- expected " - + out_tmp.value + ", received: " + out.value); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("OutTest failed"); - } - - /* - * @testName: InOutTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InOutTest() throws Fault { - TestUtil.logTrace("InOutTest"); - boolean pass = true; - try { - Holder inout = new Holder("String1"); - Holder inout_tmp = new Holder("String4"); - TestUtil.logMsg("Marshalling input/output data"); - port.echoInOut(inout); - TestUtil.logMsg("Comparing expected data"); - if (!inout.value.equals(inout_tmp.value)) { - TestUtil.logErr("compare_data failed for String- expected " - + inout_tmp.value + ", received: " + inout.value); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutTest failed"); - } - - /* - * @testName: InOut2Test - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - * This specific test does not use the parameterOrder attribute for the - * operate tag - */ - public void InOut2Test() throws Fault { - TestUtil.logTrace("InOut2Test"); - boolean pass = true; - try { - Holder inout = new Holder("String1"); - Holder inout_tmp = new Holder("String4"); - TestUtil.logMsg("Marshalling input/output data"); - port.echoInOut(inout); - TestUtil.logMsg("Comparing expected data"); - if (!inout.value.equals(inout_tmp.value)) { - TestUtil.logErr("compare_data failed for String- expected " - + inout_tmp.value + ", received: " + inout.value); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutTest failed"); - } - - /* - * @testName: InOut3Test - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - * This specific test does not use the parameterOrder attribute for the - * operate tag and it has different part names - */ - public void InOut3Test() throws Fault { - TestUtil.logTrace("InOut3Test"); - boolean pass = true; - try { - TestUtil.logMsg("Marshalling input/output data"); - String inout = "String1"; - String inout_tmp = "String4"; - String result = port.echoInOut3(inout); - TestUtil.logMsg("Comparing expected data"); - if (!result.equals(inout_tmp)) { - TestUtil.logErr("compare_data failed for String- expected " + inout_tmp - + ", received: " + inout); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOut3Test failed"); - } - - /* - * @testName: InOut4Test - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - * This specific test uses the parameterOrder attribute for the operate tag - * and has different part names - */ - public void InOut4Test() throws Fault { - TestUtil.logTrace("InOut4Test"); - boolean pass = true; - try { - TestUtil.logMsg("Marshalling input/output data"); - String inout = "String1"; - String inout_tmp = "String4"; - String result = port.echoInOut4(inout); - TestUtil.logMsg("Comparing expected data"); - if (!result.equals(inout_tmp)) { - TestUtil.logErr("compare_data failed for String- expected " + inout_tmp - + ", received: " + inout); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOut4Test failed"); - } - - /* - * @testName: MixTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * WSI:SPEC:R2302; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void MixTest() throws Fault { - TestUtil.logTrace("MixTest"); - boolean pass = true; - try { - String in = "String1"; - String in_tmp = "String1"; - Holder out = new Holder("String2"); - Holder out_tmp = new Holder("String3"); - Holder inout = new Holder("String4"); - Holder inout_tmp = new Holder("String5"); - TestUtil.logMsg("Marshalling input/output data"); - port.echoMix(in, inout, out); - TestUtil.logMsg("Comparing expected data"); - if (!in.equals(in_tmp)) { - TestUtil.logErr("compare_data failed for IN String- expected " + in_tmp - + ", received: " + in); - pass = false; - } - if (!out.value.equals(out_tmp.value)) { - TestUtil.logErr("compare_data failed for OUT String- expected " - + out_tmp.value + ", received: " + out.value); - pass = false; - } - if (!inout.value.equals(inout_tmp.value)) { - TestUtil.logErr("compare_data failed for INOUT String- expected " - + inout_tmp.value + ", received: " + inout.value); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("MixTest failed"); - } - - /* - * @testName: InSimpleTypesTest - * - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InSimpleTypesTest() throws Fault { - TestUtil.logTrace("InSimpleTypesTest"); - boolean pass = true; - initialize_in_SimpleType_data(); - save_in_SimpleType_data(); - try { - TestUtil.logMsg("Marshalling input data"); - port.echoInSimpleTypes(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, - in11, in12, in13, in14); - TestUtil.logMsg("Comparing expected data"); - if (!compare_in_SimpleType_data()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InSimpleTypesTest failed"); - } - - /* - * @testName: OutSimpleTypesTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void OutSimpleTypesTest() throws Fault { - TestUtil.logTrace("OutSimpleTypesTest"); - boolean pass = true; - initialize_out_inout_SimpleType_data(); - initialize_saved_out_inout_SimpleType_data(); - try { - TestUtil.logMsg("Marshalling output data"); - port.echoOutSimpleTypes(out_inout1, out_inout2, out_inout3, out_inout4, - out_inout5, out_inout6, out_inout7, out_inout8, out_inout9, - out_inout10, out_inout11, out_inout12, out_inout13, out_inout14); - TestUtil.logMsg("Comparing expected data"); - - if (!compare_out_inout_data()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("OutSimpleTypesTest failed"); - } - - /* - * @testName: InOutSimpleTypesTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InOutSimpleTypesTest() throws Fault { - TestUtil.logTrace("InOutSimpleTypesTest"); - boolean pass = true; - initialize_out_inout_SimpleType_data(); - initialize_saved_out_inout_SimpleType_data(); - try { - TestUtil.logMsg("Marshalling input/output data"); - port.echoInOutSimpleTypes(out_inout1, out_inout2, out_inout3, out_inout4, - out_inout5, out_inout6, out_inout7, out_inout8, out_inout9, - out_inout10, out_inout11, out_inout12, out_inout13, out_inout14); - TestUtil.logMsg("Comparing expected data"); - if (!compare_out_inout_data()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutSimpleTypesTest failed"); - } - - /* - * @testName: InEnumerationTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InEnumerationTest() throws Fault { - TestUtil.logTrace("InEnumerationTest"); - boolean pass = true; - initialize_inEnum_data(); - save_inEnum_data(); - try { - TestUtil.logMsg("Marshalling input data"); - port.echoInEnum(inEnum1, inEnum2, inEnum3, inEnum4, inEnum5, inEnum6, - inEnum7, inEnum8, inEnum9); - TestUtil.logMsg("Comparing expected data"); - if (!compare_inEnum_data()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InEnumerationTest failed"); - } - - /* - * @testName: OutEnumerationTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void OutEnumerationTest() throws Fault { - TestUtil.logTrace("OutEnumerationTest"); - initialize_out_inoutEnum_data(); - initialize_saved_out_inoutEnum_data(); - boolean pass = true; - try { - TestUtil.logMsg("Marshalling output data"); - port.echoOutEnum(out_inoutEnum1, out_inoutEnum2, out_inoutEnum3, - out_inoutEnum4, out_inoutEnum5, out_inoutEnum6, out_inoutEnum7, - out_inoutEnum8, out_inoutEnum9); - TestUtil.logMsg("Comparing expected data"); - if (!compare_out_inoutEnum_data()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("OutEnumerationTest failed"); - } - - /* - * @testName: InOutEnumerationTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InOutEnumerationTest() throws Fault { - TestUtil.logTrace("InOutEnumerationTest"); - initialize_out_inoutEnum_data(); - initialize_saved_out_inoutEnum_data(); - boolean pass = true; - try { - TestUtil.logMsg("Marshalling input/output data"); - port.echoInOutEnum(out_inoutEnum1, out_inoutEnum2, out_inoutEnum3, - out_inoutEnum4, out_inoutEnum5, out_inoutEnum6, out_inoutEnum7, - out_inoutEnum8, out_inoutEnum9); - TestUtil.logMsg("Comparing expected data"); - if (!compare_out_inoutEnum_data()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutEnumerationTest failed"); - } - - /* - * @testName: InStructTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InStructTest() throws Fault { - TestUtil.logTrace("InStructTest"); - boolean pass = true; - initialize_in_Struct_data(); - save_in_Struct_data(); - try { - TestUtil.logMsg("Marshalling input data"); - port.echoInStruct(inStruct); - TestUtil.logMsg("Comparing expected data"); - if (!compare_in_Struct_data()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InStructTest failed"); - } - - /* - * @testName: InOutSimpleTypesArrayTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InOutSimpleTypesArrayTest() throws Fault { - TestUtil.logTrace("InOutSimpleTypesArrayTest"); - boolean pass = true; - initialize_out_inout_SimpleTypeArray_data(); - initialize_saved_out_inout_SimpleTypeArray_data(); - try { - TestUtil.logMsg("Marshalling input/output data"); - port.echoInOutSimpleTypesArray(out_inoutarray1, out_inoutarray2, - out_inoutarray3, out_inoutarray4, out_inoutarray5, out_inoutarray6, - out_inoutarray7, out_inoutarray8, out_inoutarray9, out_inoutarray10, - out_inoutarray11, out_inoutarray12); - TestUtil.logMsg("Comparing expected data"); - if (!compare_out_inoutarray_data()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutSimpleTypesArrayTest failed"); - } - - /* - * @testName: InOutUserDefinedTypeTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InOutUserDefinedTypeTest() throws Fault { - TestUtil.logTrace("InOutUserDefinedTypeTest"); - boolean pass = true; - Book b0 = new Book(); - b0.setAuthor("author0"); - b0.setTitle("title0"); - b0.setIsbn(0); - Book b1 = new Book(); - b1.setAuthor("author1"); - b1.setTitle("title1"); - b1.setIsbn(1); - Holder out_inout_b = new Holder(b0); - - try { - TestUtil.logMsg("Marshalling input/output data"); - TestUtil.logMsg("Data In: [author0|title0|0]"); - port.echoInOutBook(out_inout_b); - TestUtil.logMsg("Comparing expected data"); - Book b = out_inout_b.value; - TestUtil.logMsg("Data Out: [" + b.getAuthor() + "|" + b.getTitle() + "|" - + b.getIsbn() + "]"); - if (!b.getAuthor().equals(b1.getAuthor()) - || !b.getTitle().equals(b1.getTitle()) - || b.getIsbn() != b1.getIsbn()) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutUserDefinedTypeTest failed"); - } - - /* - * @testName: InOutUserDefinedTypeArrayTest - * - * @assertion_ids: JAXWS:SPEC:2030; WS4EE:SPEC:35; WS4EE:SPEC:36; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke the RPC methods for each - * primitive type. For each type pass its value as input to the corresponding - * RPC method and receive it back as the return value. Compare results of each - * value/type of what was sent and what was returned. Verify they are equal. - */ - public void InOutUserDefinedTypeArrayTest() throws Fault { - TestUtil.logTrace("InOutUserDefinedTypeArrayTest"); - boolean pass = true; - Book b0 = new Book(); - b0.setAuthor("author0"); - b0.setTitle("title0"); - b0.setIsbn(0); - Book b1 = new Book(); - b1.setAuthor("author1"); - b1.setTitle("title1"); - b1.setIsbn(1); - Book b[] = new Book[2]; - b[0] = b0; - b[1] = b1; - ArrayOfBook ab = new ArrayOfBook(); - ab.getArrayOfBook().add(b0); - ab.getArrayOfBook().add(b1); - Holder out_inout_ab = new Holder(ab); - Book expected[] = new Book[2]; - expected[0] = b1; - expected[1] = b0; - - try { - TestUtil.logMsg("Marshalling input/output data"); - TestUtil.logMsg("Data In: [author0|title0|0," + "author1|title1|1]"); - port.echoInOutBookArray(out_inout_ab); - TestUtil.logMsg("Comparing expected data"); - List lb = out_inout_ab.value.getArrayOfBook(); - if (lb.size() != 2) { - TestUtil.logErr("List size are not equal "); - TestUtil.logErr(" expected a list size of 2"); - TestUtil.logErr(" actual list size = " + lb.size()); - pass = false; - } - Book[] result = lb.toArray(new Book[lb.size()]); - for (int i = 0; i < result.length; i++) { - if (!result[i].getAuthor().equals(expected[i].getAuthor()) - || !result[i].getTitle().equals(expected[i].getTitle()) - || result[i].getIsbn() != expected[i].getIsbn()) { - pass = false; - TestUtil.logErr("Expected result: [" + expected[i].getAuthor() + "|" - + expected[i].getTitle() + "|" + expected[i].getIsbn() + "]"); - TestUtil.logErr("Actual result: [" + result[i].getAuthor() + "|" - + result[i].getTitle() + "|" + result[i].getIsbn() + "]"); - } - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!pass) - throw new Fault("InOutUserDefinedTypeArrayTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/ParameterModeTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/ParameterModeTestImpl.java deleted file mode 100644 index 34d9b15b98..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/ParameterModeTestImpl.java +++ /dev/null @@ -1,929 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.parametermodetest; - -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; - -import javax.xml.datatype.XMLGregorianCalendar; -import javax.xml.datatype.DatatypeFactory; -import javax.xml.datatype.DatatypeConfigurationException; - -import java.math.BigInteger; -import java.math.BigDecimal; -import javax.xml.namespace.QName; - -import jakarta.xml.ws.Holder; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "ParameterModeTestPort", serviceName = "ParameterModeTestService", targetNamespace = "http://ParameterModeTest.org/", wsdlLocation = "WEB-INF/wsdl/WSW2JRLParameterModeTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.parametermodetest.ParameterModeTest") -public class ParameterModeTestImpl implements ParameterModeTest { - private static DatatypeFactory dtfactory = null; - - static { - System.out.println("Configure DatatypeFactory object"); - try { - dtfactory = DatatypeFactory.newInstance(); - } catch (DatatypeConfigurationException e) { - System.out.println("Could not configure DatatypeFactory object" + e); - } - } - - public void echoIn(java.lang.String varString) { - System.out.println("in echoIn"); - String result = ""; - boolean pass = true; - String v1 = "String1"; - if (!v1.equals(varString)) { - result = "compare of data failed for String - received " + varString - + ", expected: " + v1; - pass = false; - } - if (!pass) { - throw new WebServiceException(result); - } - varString = "String4"; - } - - public void echoOut(Holder varString) { - System.out.println("in echoOut"); - varString.value = "String4"; - } - - public void echoInOut(Holder varString) { - System.out.println("in echoInOut"); - String result = ""; - boolean pass = true; - String v1 = "String1"; - if (!v1.equals(varString.value)) { - result = "compare of data failed for String - received " + varString.value - + ", expected: " + v1; - pass = false; - } - if (!pass) { - throw new WebServiceException(result); - } - varString.value = "String4"; - } - - public void echoInOut2(Holder varString) { - System.out.println("in echoInOut2"); - String result = ""; - boolean pass = true; - String v1 = "String1"; - if (!v1.equals(varString.value)) { - result = "compare of data failed for String - received " + varString.value - + ", expected: " + v1; - pass = false; - } - if (!pass) { - throw new WebServiceException(result); - } - varString.value = "String4"; - } - - public String echoInOut3(java.lang.String param) { - System.out.println("in echoInOut3"); - String result = ""; - boolean pass = true; - String v1 = "String1"; - if (!v1.equals(param)) { - result = "compare of data failed for String - received " + param - + ", expected: " + v1; - pass = false; - } - if (!pass) { - throw new WebServiceException(result); - } - param = "String4"; - return param; - } - - public String echoInOut4(java.lang.String param) { - System.out.println("in echoInOut4"); - String result = ""; - boolean pass = true; - String v1 = "String1"; - if (!v1.equals(param)) { - result = "compare of data failed for String - received " + param - + ", expected: " + v1; - pass = false; - } - if (!pass) { - throw new WebServiceException(result); - } - param = "String4"; - return param; - } - - public void echoMix(java.lang.String varInString, - Holder varInOutString, - Holder varOutString) { - System.out.println("in echoMix"); - String result = ""; - boolean pass = true; - String v1 = "String1"; - if (!v1.equals(varInString)) { - result = "compare of data failed for String - received " + varInString - + ", expected: " + v1; - pass = false; - } - v1 = "String4"; - if (!v1.equals(varInOutString.value)) { - result = "compare of data failed for String - received " - + varInOutString.value + ", expected: " + v1; - pass = false; - } - if (!pass) { - throw new WebServiceException(result); - } - varOutString.value = "String3"; - varInOutString.value = "String5"; - } - - public void echoInSimpleTypes(java.lang.String varString, - java.math.BigInteger varInteger, int varInt, long varLong, short varShort, - java.math.BigDecimal varDecimal, float varFloat, double varDouble, - boolean varBoolean, byte varByte, javax.xml.namespace.QName varQName, - XMLGregorianCalendar varDateTime, byte[] varBase64Binary, - byte[] varHexBinary) { - System.out.println("in echoInSimpleTypes"); - boolean pass = true; - String v1 = "String1"; - BigInteger v2 = new BigInteger("3512359"); - int v3 = (int) Integer.MIN_VALUE; - long v4 = (long) Long.MIN_VALUE; - short v5 = (short) Short.MIN_VALUE; - BigDecimal v6 = new BigDecimal("3512359.1456"); - float v7 = (float) Float.MIN_VALUE; - double v8 = (double) Double.MIN_VALUE; - boolean v9 = false; - byte v10 = (byte) Byte.MIN_VALUE; - QName v11 = new QName("String2"); - XMLGregorianCalendar v12 = dtfactory.newXMLGregorianCalendar(96, 5, 1, 10, - 0, 0, 0, 0); - byte v13[] = JAXWS_Data.byte_data; - byte v14[] = JAXWS_Data.byte_data; - StringBuffer result = new StringBuffer(); - if (!v1.equals(varString)) { - result.append("compare of data failed for String - received " + varString - + ", expected: " + v1); - pass = false; - } - if (!v2.equals(varInteger)) { - result.append("\ncompare of data failed for BigInteger - received " - + varInteger + ", expected: " + v2); - pass = false; - } - if (v3 != varInt) { - result.append("\ncompare of data failed for int - received " + varInt - + ", expected: " + v3); - pass = false; - } - if (v4 != varLong) { - result.append("\ncompare of data failed for long - received " + varLong - + ", expected: " + v4); - pass = false; - } - if (v5 != varShort) { - result.append("\ncompare of data failed for short - received " + varShort - + ", expected: " + v5); - pass = false; - } - if (!v6.equals(varDecimal)) { - result.append("\ncompare of data failed for decimal - received " - + varDecimal + ", expected: " + v6); - pass = false; - } - if (v7 != varFloat) { - result.append("\ncompare of data failed for float - received " + varFloat - + ", expected: " + v7); - pass = false; - } - if (v8 != varDouble) { - result.append("\ncompare of data failed for double - received " - + varDouble + ", expected: " + v8); - pass = false; - } - if (v9 != varBoolean) { - result.append("\ncompare of data failed for boolean - received " - + varBoolean + ", expected: " + v9); - pass = false; - } - if (v10 != varByte) { - result.append("\ncompare of data failed for byte - received " + varByte - + ", expected: " + v10); - pass = false; - } - if (!v11.equals(varQName)) { - result.append("\ncompare of data failed for QName - received " + varQName - + ", expected: " + v11); - pass = false; - } - if (!JAXWS_Data.compareXMLGregorianCalendars(v12, varDateTime)) { - result.append( - "\ncompare of data failed for XMLGregorianCalendar - received " - + varDateTime + ", expected: " + v12); - pass = false; - } - if (!JAXWS_Data.compareArrayValues(v13, varBase64Binary, "byte")) { - result.append("\ncompare of data failed for Base64Binary - received ["); - for (int i = 0; i < varBase64Binary.length; i++) { - result.append(varBase64Binary[i]); - if (i + 1 != varBase64Binary.length) - result.append(","); - else - result.append("]"); - } - result.append(", expected: ["); - for (int i = 0; i < v13.length; i++) { - result.append(v13[i]); - if (i + 1 != v13.length) - result.append(","); - else - result.append("]"); - } - pass = false; - } - if (!JAXWS_Data.compareArrayValues(v14, varHexBinary, "byte")) { - result.append("\ncompare of data failed for HexBinary - received ["); - for (int i = 0; i < varHexBinary.length; i++) { - result.append(varHexBinary[i]); - if (i + 1 != varHexBinary.length) - result.append(","); - else - result.append("]"); - } - result.append(", expected: ["); - for (int i = 0; i < v14.length; i++) { - result.append(v14[i]); - if (i + 1 != v14.length) - result.append(","); - else - result.append("]"); - } - pass = false; - } - - if (!pass) { - throw new WebServiceException(result.toString()); - } - varString = "String4"; - varInteger = new BigInteger("3512360"); - varInt = (int) Integer.MAX_VALUE; - varLong = (long) Long.MAX_VALUE; - varShort = (short) Short.MAX_VALUE; - varDecimal = new BigDecimal("3512360.1456"); - varFloat = (float) Float.MAX_VALUE; - varDouble = (double) Double.MAX_VALUE; - varBoolean = true; - varByte = (byte) Byte.MAX_VALUE; - varQName = new QName("String5"); - varDateTime = dtfactory.newXMLGregorianCalendar(96, 5, 2, 10, 0, 0, 0, 0); - varBase64Binary = JAXWS_Data.byte_data2; - varHexBinary = JAXWS_Data.byte_data2; - } - - public void echoOutSimpleTypes(Holder varString, - Holder varInteger, Holder varInt, - Holder varLong, Holder varShort, - Holder varDecimal, Holder varFloat, - Holder varDouble, Holder varBoolean, - Holder varByte, Holder varQName, - Holder varDateTime, Holder varBase64Binary, - Holder varHexBinary) { - System.out.println("in echoOutSimpleTypes"); - varString.value = "String4"; - varInteger.value = new BigInteger("3512360"); - varInt.value = Integer.valueOf(Integer.MAX_VALUE); - varLong.value = Long.valueOf(Long.MAX_VALUE); - varShort.value = Short.valueOf(Short.MAX_VALUE); - varDecimal.value = new BigDecimal("3512360.1456"); - varFloat.value = Float.valueOf(Float.MAX_VALUE); - varDouble.value = Double.valueOf(Double.MAX_VALUE); - varBoolean.value = Boolean.valueOf(Boolean.TRUE); - varByte.value = Byte.valueOf(Byte.MAX_VALUE); - varQName.value = new QName("String5"); - varDateTime.value = dtfactory.newXMLGregorianCalendar(96, 5, 2, 10, 0, 0, 0, - 0); - varBase64Binary.value = JAXWS_Data.byte_data2; - varHexBinary.value = JAXWS_Data.byte_data2; - } - - public void echoInOutSimpleTypes(Holder varString, - Holder varInteger, Holder varInt, - Holder varLong, Holder varShort, - Holder varDecimal, Holder varFloat, - Holder varDouble, Holder varBoolean, - Holder varByte, Holder varQName, - Holder varDateTime, Holder varBase64Binary, - Holder varHexBinary) { - - System.out.println("in echoInOutSimpleTypes"); - String v1 = "String1"; - BigInteger v2 = new BigInteger("3512359"); - Integer v3 = Integer.MIN_VALUE; - Long v4 = Long.MIN_VALUE; - Short v5 = Short.MIN_VALUE; - BigDecimal v6 = new BigDecimal("3512359.1456"); - Float v7 = Float.MIN_VALUE; - Double v8 = Double.MIN_VALUE; - Boolean v9 = Boolean.FALSE; - Byte v10 = Byte.MIN_VALUE; - QName v11 = new QName("String2"); - XMLGregorianCalendar v12 = dtfactory.newXMLGregorianCalendar(6, 5, 1, 10, 0, - 0, 0, 0); - byte[] v13 = JAXWS_Data.byte_data; - byte[] v14 = JAXWS_Data.byte_data; - boolean pass = true; - StringBuffer result = new StringBuffer(); - if (!v1.equals(varString.value)) { - result.append("compare of data failed for String - received " - + varString.value + ", expected: " + v1); - pass = false; - } - if (!v2.equals(varInteger.value)) { - result.append("\ncompare of data failed for BigInteger - received " - + varInteger.value + ", expected: " + v2); - pass = false; - } - if (!v3.equals(varInt.value)) { - result.append("\ncompare of data failed for int - received " - + varInt.value + ", expected: " + v3); - pass = false; - } - if (!v4.equals(varLong.value)) { - result.append("\ncompare of data failed for long - received " - + varLong.value + ", expected: " + v4); - pass = false; - } - if (!v5.equals(varShort.value)) { - result.append("\ncompare of data failed for short - received " - + varShort.value + ", expected: " + v5); - pass = false; - } - if (!v6.equals(varDecimal.value)) { - result.append("\ncompare of data failed for decimal - received " - + varDecimal.value + ", expected: " + v6); - pass = false; - } - if (!v7.equals(varFloat.value)) { - result.append("\ncompare of data failed for float - received " - + varFloat.value + ", expected: " + v7); - pass = false; - } - if (!v8.equals(varDouble.value)) { - result.append("\ncompare of data failed for double - received " - + varDouble.value + ", expected: " + v8); - pass = false; - } - if (!v9.equals(varBoolean.value)) { - result.append("\ncompare of data failed for boolean - received " - + varBoolean.value + ", expected: " + v9); - pass = false; - } - if (!v10.equals(varByte.value)) { - result.append("\ncompare of data failed for byte - received " - + varByte.value + ", expected: " + v10); - pass = false; - } - if (!v11.equals(varQName.value)) { - result.append("\ncompare of data failed for QName - received " - + varQName.value + ", expected: " + v11); - pass = false; - } - if (!JAXWS_Data.compareXMLGregorianCalendars(v12, varDateTime.value)) { - - result.append( - "\ncompare of data failed for XMLGregorianCalendar - received " - + varDateTime.value + ", expected: " + v12); - pass = false; - } - if (!JAXWS_Data.compareArrayValues(v13, varBase64Binary.value, "byte")) { - result.append("\ncompare of data failed for Base64Binary - received ["); - for (int i = 0; i < varBase64Binary.value.length; i++) { - result.append(varBase64Binary.value[i]); - if (i + 1 != varBase64Binary.value.length) - result.append(","); - else - result.append("]"); - } - result.append(", expected: ["); - for (int i = 0; i < v13.length; i++) { - result.append(v13[i]); - if (i + 1 != v13.length) - result.append(","); - else - result.append("]"); - } - pass = false; - } - if (!JAXWS_Data.compareArrayValues(v14, varHexBinary.value, "byte")) { - result.append("\ncompare of data failed for HexBinary - received ["); - for (int i = 0; i < varHexBinary.value.length; i++) { - result.append(varHexBinary.value[i]); - if (i + 1 != varHexBinary.value.length) - result.append(","); - else - result.append("]"); - } - result.append(", expected: ["); - for (int i = 0; i < v14.length; i++) { - result.append(v14[i]); - if (i + 1 != v14.length) - result.append(","); - else - result.append("]"); - } - pass = false; - } - - if (!pass) { - throw new WebServiceException(result.toString()); - } - - varString.value = "String4"; - varInteger.value = new BigInteger("3512360"); - varInt.value = Integer.MAX_VALUE; - varLong.value = Long.MAX_VALUE; - varShort.value = Short.MAX_VALUE; - varDecimal.value = new BigDecimal("3512360.1456"); - varFloat.value = Float.MAX_VALUE; - varDouble.value = Double.MAX_VALUE; - varBoolean.value = Boolean.TRUE; - varByte.value = Byte.MAX_VALUE; - varQName.value = new QName("String5"); - varDateTime.value = dtfactory.newXMLGregorianCalendar(96, 5, 2, 10, 0, 0, 0, - 0); - varBase64Binary.value = JAXWS_Data.byte_data2; - varHexBinary.value = JAXWS_Data.byte_data2; - } - - public void echoInEnum(EnumString varEnumString, BigInteger varEnumInteger, - int varEnumInt, long varEnumLong, short varEnumShort, - java.math.BigDecimal varEnumDecimal, float varEnumFloat, - double varEnumDouble, byte varEnumByte) { - System.out.println("in echoInEnum"); - boolean pass = true; - EnumString v1 = EnumString.STRING_1; - BigInteger v2 = new BigInteger("3512359"); - int v3 = (int) Integer.MIN_VALUE; - long v4 = (long) Long.MIN_VALUE; - short v5 = (short) Short.MIN_VALUE; - BigDecimal v6 = new BigDecimal("3512359.1456"); - float v7 = (float) -1.00000000; - double v8 = (double) -1.00000000; - byte v9 = (byte) Byte.MIN_VALUE; - StringBuffer result = new StringBuffer(); - if (v1 != varEnumString) { - result.append("compare of data failed for String - received " - + varEnumString + ", expected: " + v1); - pass = false; - } - if (!v2.equals(varEnumInteger)) { - result.append("\ncompare of data failed for BigInteger - received " - + varEnumInteger + ", expected: " + v2); - pass = false; - } - if (v3 != varEnumInt) { - result.append("\ncompare of data failed for int - received " + varEnumInt - + ", expected: " + v3); - pass = false; - } - if (v4 != varEnumLong) { - result.append("\ncompare of data failed for long - received " - + varEnumLong + ", expected: " + v4); - pass = false; - } - if (v5 != varEnumShort) { - result.append("\ncompare of data failed for short - received " - + varEnumShort + ", expected: " + v5); - pass = false; - } - if (!v6.equals(varEnumDecimal)) { - result.append("\ncompare of data failed for decimal - received " - + varEnumDecimal + ", expected: " + v6); - pass = false; - } - if (v7 != varEnumFloat) { - result.append("\ncompare of data failed for float - received " - + varEnumFloat + ", expected: " + v7); - pass = false; - } - if (v8 != varEnumDouble) { - result.append("\ncompare of data failed for double - received " - + varEnumDouble + ", expected: " + v8); - pass = false; - } - if (v9 != varEnumByte) { - result.append("\ncompare of data failed for byte - received " - + varEnumByte + ", expected: " + v9); - pass = false; - } - - if (!pass) { - throw new WebServiceException(result.toString()); - } - - varEnumString = EnumString.STRING_2; - varEnumInteger = new BigInteger("3512360"); - varEnumInt = (int) Integer.MAX_VALUE; - varEnumLong = (long) Long.MAX_VALUE; - varEnumShort = (short) Short.MAX_VALUE; - varEnumDecimal = new BigDecimal("3512360.1456"); - varEnumFloat = (float) 3.00000000; - varEnumDouble = (double) 3.0000000000000; - varEnumByte = (byte) Byte.MAX_VALUE; - } - - public void echoOutEnum(Holder varEnumString, - Holder varEnumInteger, Holder varEnumInt, - Holder varEnumLong, Holder varEnumShort, - Holder varEnumDecimal, Holder varEnumFloat, - Holder varEnumDouble, Holder varEnumByte) { - - System.out.println("in echoOutEnum"); - varEnumString.value = EnumString.STRING_2; - varEnumInteger.value = new BigInteger("3512360"); - varEnumInt.value = Integer.MAX_VALUE; - varEnumLong.value = Long.MAX_VALUE; - varEnumShort.value = Short.MAX_VALUE; - varEnumDecimal.value = new BigDecimal("3512360.1456"); - varEnumFloat.value = new Float(3.00000000); - varEnumDouble.value = Double.valueOf(3.0000000000000); - varEnumByte.value = Byte.MAX_VALUE; - } - - public void echoInOutEnum(Holder varEnumString, - Holder varEnumInteger, Holder varEnumInt, - Holder varEnumLong, Holder varEnumShort, - Holder varEnumDecimal, Holder varEnumFloat, - Holder varEnumDouble, Holder varEnumByte) { - - System.out.println("in echoInOutEnum"); - boolean pass = true; - EnumString v1 = EnumString.STRING_1; - BigInteger v2 = new BigInteger("3512359"); - Integer v3 = Integer.valueOf(Integer.MIN_VALUE); - Long v4 = Long.valueOf(Long.MIN_VALUE); - Short v5 = Short.valueOf(Short.MIN_VALUE); - BigDecimal v6 = new BigDecimal("3512359.1456"); - Float v7 = new Float("-1.00000000"); - Double v8 = Double.valueOf("-1.00000000"); - Byte v9 = (byte) Byte.MIN_VALUE; - StringBuffer result = new StringBuffer(); - if (v1 != varEnumString.value) { - result.append("compare of data failed for String - received " - + varEnumString.value + ", expected: " + v1); - pass = false; - } - if (!v2.equals(varEnumInteger.value)) { - result.append("\ncompare of data failed for BigInteger - received " - + varEnumInteger.value + ", expected: " + v2); - pass = false; - } - if (!v3.equals(varEnumInt.value)) { - result.append("\ncompare of data failed for Integer - received " - + varEnumInt.value + ", expected: " + v3); - pass = false; - } - if (!v4.equals(varEnumLong.value)) { - result.append("\ncompare of data failed for Long - received " - + varEnumLong.value + ", expected: " + v4); - pass = false; - } - if (!v5.equals(varEnumShort.value)) { - result.append("\ncompare of data failed for Short - received " - + varEnumShort.value + ", expected: " + v5); - pass = false; - } - if (!v6.equals(varEnumDecimal.value)) { - result.append("\ncompare of data failed for Decimal - received " - + varEnumDecimal.value + ", expected: " + v6); - pass = false; - } - if (!v7.equals(varEnumFloat.value)) { - result.append("\ncompare of data failed for Float - received " - + varEnumFloat.value + ", expected: " + v7); - pass = false; - } - if (!v8.equals(varEnumDouble.value)) { - result.append("\ncompare of data failed for Double - received " - + varEnumDouble.value + ", expected: " + v8); - pass = false; - } - if (!v9.equals(varEnumByte.value)) { - result.append("\ncompare of data failed for Byte - received " - + varEnumByte.value + ", expected: " + v9); - pass = false; - } - - if (!pass) { - throw new WebServiceException(result.toString()); - } - varEnumString.value = EnumString.STRING_2; - varEnumInteger.value = new BigInteger("3512360"); - varEnumInt.value = Integer.MAX_VALUE; - varEnumLong.value = Long.MAX_VALUE; - varEnumShort.value = Short.MAX_VALUE; - varEnumDecimal.value = new BigDecimal("3512360.1456"); - varEnumFloat.value = new Float(3.00000000); - varEnumDouble.value = Double.valueOf(3.0000000000000); - varEnumByte.value = Byte.MAX_VALUE; - } - - public void echoInStruct( - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.parametermodetest.AllStruct varStruct) { - - System.out.println("in echoInStruct"); - boolean pass = true; - String v1 = "String1"; - BigInteger v2 = new BigInteger("3512359"); - int v3 = (int) Integer.MIN_VALUE; - long v4 = (long) Long.MIN_VALUE; - short v5 = (short) Short.MIN_VALUE; - BigDecimal v6 = new BigDecimal("3512359.1456"); - float v7 = (float) Float.MIN_VALUE; - double v8 = (double) Double.MIN_VALUE; - boolean v9 = false; - byte v10 = (byte) Byte.MIN_VALUE; - QName v11 = new QName("String2"); - XMLGregorianCalendar v12 = dtfactory.newXMLGregorianCalendar(96, 5, 1, 10, - 0, 0, 0, 0); - byte v13[] = JAXWS_Data.byte_data; - byte v14[] = JAXWS_Data.byte_data; - StringBuffer result = new StringBuffer(); - if (!v1.equals(varStruct.getVarString())) { - result.append("compare of data failed for String - received " - + varStruct.getVarString() + ", expected: " + v1); - pass = false; - } - if (!v2.equals(varStruct.getVarInteger())) { - result.append("\ncompare of data failed for BigInteger - received " - + varStruct.getVarInteger() + ", expected: " + v2); - pass = false; - } - if (v3 != varStruct.getVarInt()) { - result.append("\ncompare of data failed for int - received " - + varStruct.getVarInt() + ", expected: " + v3); - pass = false; - } - if (v4 != varStruct.getVarLong()) { - result.append("\ncompare of data failed for long - received " - + varStruct.getVarLong() + ", expected: " + v4); - pass = false; - } - if (v5 != varStruct.getVarShort()) { - result.append("\ncompare of data failed for short - received " - + varStruct.getVarShort() + ", expected: " + v5); - pass = false; - } - if (!v6.equals(varStruct.getVarDecimal())) { - result.append("\ncompare of data failed for decimal - received " - + varStruct.getVarDecimal() + ", expected: " + v6); - pass = false; - } - if (v7 != varStruct.getVarFloat()) { - result.append("\ncompare of data failed for float - received " - + varStruct.getVarFloat() + ", expected: " + v7); - pass = false; - } - if (v8 != varStruct.getVarDouble()) { - result.append("\ncompare of data failed for double - received " - + varStruct.getVarDouble() + ", expected: " + v8); - pass = false; - } - if (v9 != varStruct.isVarBoolean()) { - result.append("\ncompare of data failed for boolean - received " - + varStruct.isVarBoolean() + ", expected: " + v9); - pass = false; - } - if (v10 != varStruct.getVarByte()) { - result.append("\ncompare of data failed for byte - received " - + varStruct.getVarByte() + ", expected: " + v10); - pass = false; - } - if (!v11.equals(varStruct.getVarQName())) { - result.append("\ncompare of data failed for QName - received " - + varStruct.getVarQName() + ", expected: " + v11); - pass = false; - } - if (!JAXWS_Data.compareXMLGregorianCalendars(v12, - varStruct.getVarDateTime())) { - result.append( - "\ncompare of data failed for XMLGregorianCalendar - received " - + varStruct.getVarDateTime() + ", expected: " + v12); - pass = false; - } - if (!JAXWS_Data.compareArrayValues(v13, varStruct.getVarBase64Binary(), - "byte")) { - result.append("\ncompare of data failed for Base64Binary - received ["); - byte thedata[] = varStruct.getVarBase64Binary(); - for (int i = 0; i < thedata.length; i++) { - result.append(thedata[i]); - if (i + 1 != thedata.length) - result.append(","); - else - result.append("]"); - } - result.append(", expected: ["); - for (int i = 0; i < v13.length; i++) { - result.append(v13[i]); - if (i + 1 != v13.length) - result.append(","); - else - result.append("]"); - } - pass = false; - } - if (!JAXWS_Data.compareArrayValues(v14, varStruct.getVarHexBinary(), - "byte")) { - result.append("\ncompare of data failed for HexBinary - received ["); - byte thedata[] = varStruct.getVarHexBinary(); - for (int i = 0; i < thedata.length; i++) { - result.append(thedata[i]); - if (i + 1 != thedata.length) - result.append(","); - else - result.append("]"); - } - result.append(", expected: ["); - for (int i = 0; i < v14.length; i++) { - result.append(v14[i]); - if (i + 1 != v14.length) - result.append(","); - else - result.append("]"); - } - pass = false; - } - - if (!pass) { - throw new WebServiceException(result.toString()); - } - varStruct.setVarString("String4"); - varStruct.setVarInteger(new BigInteger("3512360")); - varStruct.setVarInt((int) Integer.MAX_VALUE); - varStruct.setVarLong((long) Long.MAX_VALUE); - varStruct.setVarShort((short) Short.MAX_VALUE); - varStruct.setVarDecimal(new BigDecimal("3512360.1456")); - varStruct.setVarFloat((float) Float.MAX_VALUE); - varStruct.setVarDouble((double) Double.MAX_VALUE); - varStruct.setVarBoolean(true); - varStruct.setVarByte((byte) Byte.MAX_VALUE); - varStruct.setVarQName(new QName("String5")); - varStruct.setVarDateTime( - dtfactory.newXMLGregorianCalendar(6, 5, 2, 10, 0, 0, 0, 0)); - varStruct.setVarBase64Binary(JAXWS_Data.byte_data2); - varStruct.setVarHexBinary(JAXWS_Data.byte_data2); - } - - public void echoInOutSimpleTypesArray( - Holder varString, - Holder varInteger, - Holder varInt, - Holder varLong, - Holder varShort, - Holder varDecimal, - Holder varFloat, - Holder varDouble, - Holder varBoolean, - Holder varByte, - Holder varQName, - Holder varDateTime) { - - System.out.println("in echoInOutSimpleTypesArray"); - - ArrayOfstring astring = new ArrayOfstring(); - for (int i = 0; i < JAXWS_Data.String_nonull_data.length; i++) { - astring.getArrayOfstring().add(JAXWS_Data.String_nonull_data[i]); - } - varString.value = astring; - - ArrayOfinteger ainteger = new ArrayOfinteger(); - for (int i = 0; i < JAXWS_Data.BigInteger_nonull_data.length; i++) { - ainteger.getArrayOfinteger().add(JAXWS_Data.BigInteger_nonull_data[i]); - } - varInteger.value = ainteger; - - ArrayOfint aint = new ArrayOfint(); - for (int i = 0; i < JAXWS_Data.int_data.length; i++) { - aint.getArrayOfint().add(JAXWS_Data.int_data[i]); - } - varInt.value = aint; - - ArrayOflong along = new ArrayOflong(); - for (int i = 0; i < JAXWS_Data.long_data.length; i++) { - along.getArrayOflong().add(JAXWS_Data.long_data[i]); - } - varLong.value = along; - - ArrayOfshort ashort = new ArrayOfshort(); - for (int i = 0; i < JAXWS_Data.short_data.length; i++) { - ashort.getArrayOfshort().add(JAXWS_Data.short_data[i]); - } - varShort.value = ashort; - - ArrayOfdecimal adecimal = new ArrayOfdecimal(); - for (int i = 0; i < JAXWS_Data.BigDecimal_nonull_data.length; i++) { - adecimal.getArrayOfdecimal().add(JAXWS_Data.BigDecimal_nonull_data[i]); - } - varDecimal.value = adecimal; - - ArrayOffloat afloat = new ArrayOffloat(); - for (int i = 0; i < JAXWS_Data.float_data.length; i++) { - afloat.getArrayOffloat().add(JAXWS_Data.float_data[i]); - } - varFloat.value = afloat; - - ArrayOfdouble adouble = new ArrayOfdouble(); - for (int i = 0; i < JAXWS_Data.double_data.length; i++) { - adouble.getArrayOfdouble().add(JAXWS_Data.double_data[i]); - } - varDouble.value = adouble; - - ArrayOfboolean abool = new ArrayOfboolean(); - for (int i = 0; i < JAXWS_Data.boolean_data.length; i++) { - abool.getArrayOfboolean().add(JAXWS_Data.boolean_data[i]); - } - varBoolean.value = abool; - - ArrayOfbyte abyte = new ArrayOfbyte(); - for (int i = 0; i < JAXWS_Data.byte_data.length; i++) { - abyte.getArrayOfbyte().add(JAXWS_Data.byte_data[i]); - } - varByte.value = abyte; - - ArrayOfQName aqname = new ArrayOfQName(); - for (int i = 0; i < JAXWS_Data.QName_nonull_data.length; i++) { - aqname.getArrayOfQName().add(JAXWS_Data.QName_nonull_data[i]); - } - varQName.value = aqname; - - ArrayOfdateTime adt = new ArrayOfdateTime(); - for (int i = 0; i < JAXWS_Data.XMLGregorianCalendar_nonull_data.length; i++) { - adt.getArrayOfdateTime() - .add(JAXWS_Data.XMLGregorianCalendar_nonull_data[i]); - } - varDateTime.value = adt; - - } - - public void echoInOutBook( - Holder varBook) { - System.out.println("in echoInOutBook"); - Book b = varBook.value; - b.setAuthor("author1"); - b.setTitle("title1"); - b.setIsbn(1); - varBook.value = b; - } - - public void echoInOutBookArray( - Holder varBook) { - - System.out.println("in echoInOutBookArray"); - Book[] b = varBook.value.getArrayOfBook() - .toArray(new Book[varBook.value.getArrayOfBook().size()]); - if (b.length != 2) - throw new WebServiceException("array size not 2"); - String author = b[0].getAuthor(); - String title = b[0].getTitle(); - int isbn = b[0].getIsbn(); - b[0].setAuthor(b[1].getAuthor()); - b[0].setTitle(b[1].getTitle()); - b[0].setIsbn(b[1].getIsbn()); - b[1].setAuthor(author); - b[1].setTitle(title); - b[1].setIsbn(isbn); - ArrayOfBook ab = new ArrayOfBook(); - for (int i = 0; i < b.length; i++) { - ab.getArrayOfBook().add(b[i]); - } - varBook.value = ab; - - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/WSW2JRLParameterModeTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/WSW2JRLParameterModeTestService.wsdl deleted file mode 100644 index 9e1f419065..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/WSW2JRLParameterModeTestService.wsdl +++ /dev/null @@ -1,598 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/build.xml deleted file mode 100644 index 309b75feca..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/customfile.xml deleted file mode 100644 index 23b62ad0db..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/jakartaEE.tokens deleted file mode 100644 index 951fc81a72..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jrlparametermodetest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.parametermodetest.ParameterModeTestService -SEI=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.parametermodetest.ParameterModeTest -IMPL=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.parametermodetest.ParameterModeTestImpl -NAMESPACEURI=http://ParameterModeTest.org -PORT=ParameterModeTestPort -URLALIAS=/jaxws/ParameterModeTest -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.parametermodetest.ParameterModeTestImpl -WEBSERVICEDESCRIPTION=ParameterModeTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jrlparametermodetest -SERVICEREFNAMEWSEJB=service/wsw2jrlparametermodetest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jrlparametermodetest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/standalone-sun-jaxws.xml deleted file mode 100644 index adbf1eaf67..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/standalone.web.xml deleted file mode 100644 index e2b952ba60..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/parametermodetest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLParameterModeTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -ParameterModeTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -ParameterModeTest -/jaxws/ParameterModeTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/build.xml deleted file mode 100644 index b143a3b5aa..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/BasicAuthServiceTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/BasicAuthServiceTestService.wsdl deleted file mode 100644 index 26c642d01f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/BasicAuthServiceTestService.wsdl +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/Client.java deleted file mode 100644 index c345142a8f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/Client.java +++ /dev/null @@ -1,755 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; - -import java.net.*; -import java.util.*; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - private static final long serialVersionUID = 1L; - - private String hostname = null; - - private int portnum = 0; - - private String username = ""; - - private String password = ""; - - private String unauthUsername = ""; - - private String unauthPassword = ""; - - String vehicle = null; - - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - private static final String WebHostProp = "webServerHost"; - - private static final String WebPortProp = "webServerPort"; - - private static final String UserNameProp = "user"; - - private static final String PasswordProp = "password"; - - private static final String unauthUserNameProp = "authuser"; - - private static final String unauthPasswordProp = "authpassword"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic."; - - // service and port information - private static final String NAMESPACEURI = "http://BasicAuthServiceTestService.org/wsdl"; - - private static final String SERVICE_NAME = "BasicAuthServiceTestService"; - - private static final String PORT_NAME1 = "HelloUnprotectedPort"; - - private static final String PORT_NAME2 = "HelloProtectedPort"; - - private static final String PORT_NAME3 = "HelloGuestPort"; - - private static final String PORT_NAME4 = "HelloProtectedPort1"; - - private static final String PORT_NAME5 = "HelloProtectedPort2"; - - private static final String PORT_NAME6 = "HelloProtectedPort3"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private QName PORT_QNAME2 = new QName(NAMESPACEURI, PORT_NAME2); - - private QName PORT_QNAME3 = new QName(NAMESPACEURI, PORT_NAME3); - - private QName PORT_QNAME4 = new QName(NAMESPACEURI, PORT_NAME4); - - private QName PORT_QNAME5 = new QName(NAMESPACEURI, PORT_NAME5); - - private QName PORT_QNAME6 = new QName(NAMESPACEURI, PORT_NAME6); - - // URL properties used by the test - private static final String ENDPOINT1_URL = "secbasic.endpoint.1"; - - private static final String ENDPOINT2_URL = "secbasic.endpoint.2"; - - private static final String ENDPOINT3_URL = "secbasic.endpoint.3"; - - private static final String ENDPOINT4_URL = "secbasic.endpoint.4"; - - private static final String ENDPOINT5_URL = "secbasic.endpoint.5"; - - private static final String ENDPOINT6_URL = "secbasic.endpoint.6"; - - private static final String WSDLLOC1_URL = "secbasic.wsdlloc.1"; - - private static final String WSDLLOC2_URL = "secbasic.wsdlloc.2"; - - private static final String WSDLLOC3_URL = "secbasic.wsdlloc.3"; - - private static final String WSDLLOC4_URL = "secbasic.wsdlloc.4"; - - private static final String WSDLLOC5_URL = "secbasic.wsdlloc.5"; - - private static final String WSDLLOC6_URL = "secbasic.wsdlloc.6"; - - private Properties props = null; - - private String request = null; - - private String url1 = null; - - private String url2 = null; - - private String url3 = null; - - private String url4 = null; - - private String url5 = null; - - private String url6 = null; - - private TSURL ctsurl = new TSURL(); - - private URL wsdlurl1 = null; - - private URL wsdlurl2 = null; - - private URL wsdlurl3 = null; - - private URL wsdlurl4 = null; - - private URL wsdlurl5 = null; - - private URL wsdlurl6 = null; - - transient HelloUnprotected port1 = null; - - transient HelloProtected port2noid = null; - - transient HelloProtected1 port2validid = null; - - transient HelloProtected2 port2invalidid = null; - - transient HelloProtected3 port2unauthid = null; - - transient HelloGuest port3 = null; - - transient javax.naming.InitialContext ic = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT1_URL); - url1 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT2_URL); - url2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT3_URL); - url3 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT4_URL); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT5_URL); - url5 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT6_URL); - url6 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC1_URL); - wsdlurl1 = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC2_URL); - wsdlurl2 = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC3_URL); - wsdlurl3 = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC4_URL); - wsdlurl4 = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC5_URL); - wsdlurl5 = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC6_URL); - wsdlurl6 = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint1 URL: " + url1); - TestUtil.logMsg("Service Endpoint2 URL: " + url2); - TestUtil.logMsg("Service Endpoint3 URL: " + url3); - TestUtil.logMsg("Service Endpoint4 URL: " + url4); - TestUtil.logMsg("Service Endpoint5 URL: " + url5); - TestUtil.logMsg("Service Endpoint6 URL: " + url6); - TestUtil.logMsg("WSDL Location URL1: " + wsdlurl1); - TestUtil.logMsg("WSDL Location URL2: " + wsdlurl2); - TestUtil.logMsg("WSDL Location URL3: " + wsdlurl3); - TestUtil.logMsg("WSDL Location URL4: " + wsdlurl4); - TestUtil.logMsg("WSDL Location URL5: " + wsdlurl5); - TestUtil.logMsg("WSDL Location URL6: " + wsdlurl6); - } - - private void getUnprotectedServiceStubStandalone() throws Exception { - port1 = (HelloUnprotected) JAXWS_Util.getPort(wsdlurl1, SERVICE_QNAME, - BasicAuthServiceTestService.class, PORT_QNAME1, HelloUnprotected.class); - JAXWS_Util.setTargetEndpointAddress(port1, url1); - } - - private void getProtectedNoIdServiceStubStandalone() throws Exception { - port2noid = (HelloProtected) JAXWS_Util.getPort(wsdlurl2, SERVICE_QNAME, - BasicAuthServiceTestService.class, PORT_QNAME2, HelloProtected.class); - JAXWS_Util.setTargetEndpointAddress(port2noid, url2); - } - - private void getProtectedValidIdServiceStubStandalone() throws Exception { - port2validid = (HelloProtected1) JAXWS_Util.getPort(wsdlurl4, SERVICE_QNAME, - BasicAuthServiceTestService.class, PORT_QNAME4, HelloProtected1.class); - JAXWS_Util.setTargetEndpointAddress(port2validid, url4); - } - - private void getProtectedInvalidIdServiceStubStandalone() throws Exception { - port2invalidid = (HelloProtected2) JAXWS_Util.getPort(wsdlurl5, - SERVICE_QNAME, BasicAuthServiceTestService.class, PORT_QNAME5, - HelloProtected2.class); - JAXWS_Util.setTargetEndpointAddress(port2invalidid, url5); - } - - private void getProtectedUnauthIdServiceStubStandalone() throws Exception { - port2unauthid = (HelloProtected3) JAXWS_Util.getPort(wsdlurl6, - SERVICE_QNAME, BasicAuthServiceTestService.class, PORT_QNAME6, - HelloProtected3.class); - JAXWS_Util.setTargetEndpointAddress(port2unauthid, url6); - } - - private void getGuestServiceStubStandalone() throws Exception { - port3 = (HelloGuest) JAXWS_Util.getPort(wsdlurl3, SERVICE_QNAME, - BasicAuthServiceTestService.class, PORT_QNAME3, HelloGuest.class); - JAXWS_Util.setTargetEndpointAddress(port3, url3); - } - - private void getUnprotectedServiceStub() throws Exception { - try { - BasicAuthServiceTestService service = (BasicAuthServiceTestService) ic - .lookup("java:comp/env/service/unprotected"); - port1 = (HelloUnprotected) service.getPort(HelloUnprotected.class); - JAXWS_Util.dumpTargetEndpointAddress(port1); - JAXWS_Util.setSOAPLogging(port1); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault(t.toString()); - } - } - - private void getProtectedNoIdServiceStub() throws Exception { - try { - BasicAuthServiceTestService service = (BasicAuthServiceTestService) ic - .lookup("java:comp/env/service/protectednoid"); - port2noid = (HelloProtected) service.getPort(HelloProtected.class); - JAXWS_Util.dumpTargetEndpointAddress(port2noid); - JAXWS_Util.setSOAPLogging(port2noid); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault(t.toString()); - } - } - - private void getProtectedValidIdServiceStub() throws Exception { - try { - BasicAuthServiceTestService service = (BasicAuthServiceTestService) ic - .lookup("java:comp/env/service/protectedvalidid"); - port2validid = (HelloProtected1) service.getPort(HelloProtected1.class); - JAXWS_Util.dumpTargetEndpointAddress(port2validid); - JAXWS_Util.setSOAPLogging(port2validid); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault(t.toString()); - } - } - - private void getProtectedInvalidIdServiceStub() throws Exception { - try { - BasicAuthServiceTestService service = (BasicAuthServiceTestService) ic - .lookup("java:comp/env/service/protectedinvalidid"); - port2invalidid = (HelloProtected2) service.getPort(HelloProtected2.class); - JAXWS_Util.dumpTargetEndpointAddress(port2invalidid); - JAXWS_Util.setSOAPLogging(port2invalidid); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault(t.toString()); - } - } - - private void getProtectedUnauthIdServiceStub() throws Exception { - try { - BasicAuthServiceTestService service = (BasicAuthServiceTestService) ic - .lookup("java:comp/env/service/protectedunauthid"); - port2unauthid = (HelloProtected3) service.getPort(HelloProtected3.class); - JAXWS_Util.dumpTargetEndpointAddress(port2unauthid); - JAXWS_Util.setSOAPLogging(port2unauthid); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault(t.toString()); - } - } - - private void getGuestServiceStub() throws Exception { - try { - BasicAuthServiceTestService service = (BasicAuthServiceTestService) ic - .lookup("java:comp/env/service/guest"); - port3 = (HelloGuest) service.getPort(HelloGuest.class); - JAXWS_Util.dumpTargetEndpointAddress(port3); - JAXWS_Util.setSOAPLogging(port3); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault(t.toString()); - } - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; user; password; authuser; - * authpassword; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - - try { - hostname = p.getProperty(WebHostProp); - portnum = Integer.parseInt(p.getProperty(WebPortProp)); - username = p.getProperty(UserNameProp); - password = p.getProperty(PasswordProp); - unauthUsername = p.getProperty(unauthUserNameProp); - unauthPassword = p.getProperty(unauthPasswordProp); - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - } else { - ic = new javax.naming.InitialContext(); - getTestURLs(); - } - vehicle = p.getProperty("vehicle"); - } catch (Exception e) { - TestUtil.logErr("setup failed:", e); - } - } - - /* - * @testName: BasicAuthTest1 - * - * @assertion_ids: JAXWS:SPEC:11006; JAXWS:SPEC:11007; JAXWS:SPEC:10017; - * JAXWS:SPEC:10018; WS4EE:SPEC:113; WS4EE:SPEC:114; WS4EE:SPEC:115; - * WS4EE:SPEC:117; WS4EE:SPEC:213; WS4EE:SPEC:219; WS4EE:SPEC:221; - * WS4EE:SPEC:223; WS4EE:SPEC:224; WS4EE:SPEC:228; WS4EE:SPEC:248; - * WS4EE:SPEC:249; WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; - * WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:5000; WS4EE:SPEC:5002; WS4EE:SPEC:32; WS4EE:SPEC:4011; - * WS4EE:SPEC:9000; WS4EE:SPEC:9001; JAXWS:SPEC:129; - * - * @test_Strategy: 1. Invoke RPC on a protected JAXWS service definition - * without authenticating. 2. The JAXWS runtime must deny access and throw a - * WebServiceException (UnAuthorized). - * - * Description Test BASIC authentication as specified in the JAXWS - * Specification. - * - * 1. If user has not been authenticated and user attempts to access a - * protected JAXWS service definition, the JAXWS runtime must deny access and - * throw a WebService- Exception (UnAuthorized). - */ - - public void BasicAuthTest1() throws Fault { - TestUtil.logTrace("BasicAuthTest1"); - boolean pass = true; - String expected = "Hello, foo!"; - try { - if (vehicle.equals("wsappclient")) { - TestUtil.logMsg("Skipping BasicAuthTest1 test for appclient vehicle"); - return; - } - TestUtil.logMsg("Get stub for Protected Service Definition"); - if (modeProperty.equals("standalone")) - getProtectedNoIdServiceStubStandalone(); - else - getProtectedNoIdServiceStub(); - TestUtil.logMsg("Invoke RPC method without authenticating"); - TestUtil.logMsg("JAXWS runtime must throw a WebServiceException"); - try { - String response = port2noid.helloProtected("foo"); - TestUtil.logErr("Authorization was allowed - failed"); - TestUtil.logErr("Did not get expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected WebServiceException"); - TestUtil.logMsg("Detail exception message: " + e.getMessage()); - TestUtil.logMsg("Authorization was not allowed - passed"); - TestUtil.logMsg("RPC invocation was denied - passed"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("BasicAuthTest1 failed: ", e); - } - if (!pass) - throw new Fault("BasicAuthTest1 failed"); - } - - /* - * @testName: BasicAuthTest2 - * - * @assertion_ids: JAXWS:SPEC:11006; JAXWS:SPEC:11007; JAXWS:SPEC:10017; - * JAXWS:SPEC:10018; WS4EE:SPEC:113; WS4EE:SPEC:114; WS4EE:SPEC:115; - * WS4EE:SPEC:117; WS4EE:SPEC:213; WS4EE:SPEC:219; WS4EE:SPEC:221; - * WS4EE:SPEC:223; WS4EE:SPEC:224; WS4EE:SPEC:228; WS4EE:SPEC:248; - * WS4EE:SPEC:249; WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; - * WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:5000; WS4EE:SPEC:5002; WS4EE:SPEC:32; WS4EE:SPEC:4011; - * WS4EE:SPEC:9000; WS4EE:SPEC:9001; JAXWS:SPEC:129; - * - * @test_Strategy: 1. Invoke RPC on a protected JAXWS service definition - * authenticating with a valid username and password. 2. The JAXWS runtime - * must allow access. - * - * Description Test BASIC authentication as specified in the JAXWS - * Specification. - * - * 1. If user has not been authenticated and user attempts to access a - * protected JAXWS service definition, and user enters a valid username and - * password, then the JAXWS runtime must allow access. - */ - - public void BasicAuthTest2() throws Fault { - TestUtil.logTrace("BasicAuthTest2"); - boolean pass = true; - String expected = "Hello, foo!"; - try { - TestUtil.logMsg("Get stub for Protected Service Definition"); - if (modeProperty.equals("standalone")) { - getProtectedValidIdServiceStubStandalone(); - JAXWS_Util.setUserNameAndPassword(port2validid, username, password); - } else - getProtectedValidIdServiceStub(); - TestUtil.logMsg("Invoke RPC method authenticating with a valid" - + " username/password"); - TestUtil.logMsg( - "User is in the required security role to access" + " the resource"); - TestUtil.logMsg("JAXWS runtime must allow access"); - TestUtil.logMsg("Username=" + username + ", Password=" + password); - try { - String response = port2validid.helloProtected1("foo"); - TestUtil.logMsg("Authorization was allowed - passed"); - TestUtil.logMsg("RPC invocation was allowed - passed"); - TestUtil.logMsg("Checking return response"); - if (!response.equals(expected)) { - TestUtil.logErr("Received incorrect response - expected [" + expected - + "], received: [" + response + "]"); - pass = false; - } else { - TestUtil.logMsg("Received expected response: [" + response + "]"); - } - } catch (WebServiceException e) { - TestUtil.logErr("Authorization was not allowed - failed", e); - TestUtil.logErr("RPC invocation was denied - failed"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("BasicAuthTest2 failed: ", e); - } - if (!pass) - throw new Fault("BasicAuthTest2 failed"); - } - - /* - * @testName: BasicAuthTest3 - * - * @assertion_ids: JAXWS:SPEC:11006; JAXWS:SPEC:11007; JAXWS:SPEC:10017; - * JAXWS:SPEC:10018; WS4EE:SPEC:113; WS4EE:SPEC:114; WS4EE:SPEC:115; - * WS4EE:SPEC:117; WS4EE:SPEC:213; WS4EE:SPEC:219; WS4EE:SPEC:221; - * WS4EE:SPEC:223; WS4EE:SPEC:224; WS4EE:SPEC:228; WS4EE:SPEC:248; - * WS4EE:SPEC:249; WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; - * WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:5000; WS4EE:SPEC:5002; WS4EE:SPEC:32; WS4EE:SPEC:4011; - * WS4EE:SPEC:9000; WS4EE:SPEC:9001; JAXWS:SPEC:129; - * - * @test_Strategy: 1. Invoke RPC on a protected JAXWS service definition - * authenticating with invalid username and password. 2. The JAXWS runtime - * must deny access and throw a WebServiceException (UnAuthorized). - * - * Description Test BASIC authentication as specified in the JAXWS - * Specification. - * - * 1. If user has not been authenticated and user attempts to access a - * protected JAXWS service definition, and user enters an invalid username and - * password, then the JAXWS runtime must deny access and throw a WebService- - * Exception (UnAuthorized). - */ - - public void BasicAuthTest3() throws Fault { - TestUtil.logTrace("BasicAuthTest3"); - boolean pass = true; - String expected = "Hello, foo!"; - try { - if (vehicle.equals("wsappclient")) { - TestUtil.logMsg("Skipping BasicAuthTest3 test for appclient vehicle"); - return; - } - TestUtil.logMsg("Get stub for Protected Service Definition"); - if (modeProperty.equals("standalone")) { - getProtectedInvalidIdServiceStubStandalone(); - JAXWS_Util.setUserNameAndPassword(port2invalidid, "invalid", "invalid"); - } else - getProtectedInvalidIdServiceStub(); - TestUtil.logMsg("Invoke RPC method authenticating with an" - + " invalid username/password"); - TestUtil.logMsg("Username=invalid, Password=invalid"); - TestUtil.logMsg("Username=invalid, Password=invalid"); - TestUtil.logMsg("JAXWS runtime must throw a WebServiceException"); - try { - String response = port2invalidid.helloProtected2("foo"); - TestUtil.logErr("Did not get expected WebServiceException"); - TestUtil.logErr("Authorization was allowed - failed"); - TestUtil.logErr("RPC invocation was allowed - failed"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected WebServiceException"); - TestUtil.logMsg("Detail exception message: " + e.getMessage()); - TestUtil.logMsg("Authorization was not allowed - passed"); - TestUtil.logMsg("RPC invocation was denied - passed"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("BasicAuthTest3 failed: ", e); - } - if (!pass) - throw new Fault("BasicAuthTest3 failed"); - } - - /* - * @testName: BasicAuthTest4 - * - * @assertion_ids: JAXWS:SPEC:11006; JAXWS:SPEC:11007; JAXWS:SPEC:10017; - * JAXWS:SPEC:10018; WS4EE:SPEC:113; WS4EE:SPEC:114; WS4EE:SPEC:115; - * WS4EE:SPEC:117; WS4EE:SPEC:213; WS4EE:SPEC:219; WS4EE:SPEC:221; - * WS4EE:SPEC:223; WS4EE:SPEC:224; WS4EE:SPEC:228; WS4EE:SPEC:248; - * WS4EE:SPEC:249; WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; - * WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:5000; WS4EE:SPEC:5002; WS4EE:SPEC:32; WS4EE:SPEC:4011; - * WS4EE:SPEC:9000; WS4EE:SPEC:9001; JAXWS:SPEC:129; - * - * @test_Strategy: 1. Invoke RPC on a protected JAXWS service definition - * authenticating with valid username and password but user is not in the - * required secuirty role allowed by the JAXWS service definition. 2. The - * JAXWS runtime must deny access and throw a WebServiceException - * (UnAuthorized). - * - * Description Test BASIC authentication as specified in the JAXWS - * Specification. - * - * 1. If user has not been authenticated and user attempts to access a - * protected JAXWS service definition, and user enters a valid username and - * password, but user is not in the required security role allowed by the - * JAXWS service definition then the JAXWS runtime must deny access and throw - * a WebServiceException (UnAuthorized). - */ - - public void BasicAuthTest4() throws Fault { - TestUtil.logTrace("BasicAuthTest4"); - boolean pass = true; - String expected = "Hello, foo!"; - try { - TestUtil.logMsg("Get stub for Protected Service Definition"); - if (modeProperty.equals("standalone")) { - getProtectedUnauthIdServiceStubStandalone(); - JAXWS_Util.setUserNameAndPassword(port2unauthid, unauthUsername, - unauthPassword); - } else - getProtectedUnauthIdServiceStub(); - TestUtil.logMsg("Invoke RPC method authenticating with a valid" - + " username/password"); - TestUtil.logMsg("User is not in the required security role to" - + " access the resource"); - TestUtil.logMsg( - "Username=" + unauthUsername + ", Password=" + unauthPassword); - TestUtil.logMsg("JAXWS runtime must throw a WebServiceException"); - try { - String response = port2unauthid.helloProtected3("foo"); - TestUtil.logErr("Did not get expected WebServiceException"); - TestUtil.logErr("Authorization was allowed - failed"); - TestUtil.logErr("RPC invocation was allowed - failed"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected WebServiceException"); - TestUtil.logMsg("Detail exception message: " + e.getMessage()); - TestUtil.logMsg("Authorization was not allowed - passed"); - TestUtil.logMsg("RPC invocation was denied - passed"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("BasicAuthTest4 failed: ", e); - } - if (!pass) - throw new Fault("BasicAuthTest4 failed"); - } - - /* - * @testName: BasicAuthTest5 - * - * @assertion_ids: JAXWS:SPEC:11006; JAXWS:SPEC:11007; JAXWS:SPEC:10017; - * JAXWS:SPEC:10018; WS4EE:SPEC:113; WS4EE:SPEC:114; WS4EE:SPEC:115; - * WS4EE:SPEC:117; WS4EE:SPEC:213; WS4EE:SPEC:219; WS4EE:SPEC:221; - * WS4EE:SPEC:223; WS4EE:SPEC:224; WS4EE:SPEC:228; WS4EE:SPEC:248; - * WS4EE:SPEC:249; WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; - * WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:5000; WS4EE:SPEC:5002; WS4EE:SPEC:32; WS4EE:SPEC:4011; - * WS4EE:SPEC:9000; WS4EE:SPEC:9001; JAXWS:SPEC:129; - * - * @test_Strategy: 1. Invoke RPC on a unprotected JAXWS service definition. 2. - * The JAXWS runtime must allow access without the need to authenticate. - * - * Description Test BASIC authentication as specified in the JAXWS - * Specification. - * - * 1. If user has not been authenticated and user attempts to access an - * unprotected JAXWS service definition, then the JAXWS runtime must allow - * access without the need to authenticate. - */ - - public void BasicAuthTest5() throws Fault { - TestUtil.logTrace("BasicAuthTest5"); - boolean pass = true; - String expected = "Hello, foo!"; - try { - TestUtil.logMsg("Get stub for Unprotected Service Definition"); - if (modeProperty.equals("standalone")) - getUnprotectedServiceStubStandalone(); - else - getUnprotectedServiceStub(); - TestUtil.logMsg("Invoke RPC method without authenticating"); - TestUtil.logMsg("JAXWS runtime must allow access without the" - + " need to authenticate user"); - try { - String response = port1.helloUnprotected("foo"); - TestUtil.logMsg("Authorization was allowed - passed"); - TestUtil.logMsg("RPC invocation was allowed - passed"); - TestUtil.logMsg("Checking return response"); - if (!response.equals(expected)) { - TestUtil.logErr("Received incorrect response - expected [" + expected - + "], received: [" + response + "]"); - pass = false; - } else { - TestUtil.logMsg("Received expected response: [" + response + "]"); - } - } catch (WebServiceException e) { - TestUtil.logErr("Authorization was not allowed - failed", e); - TestUtil.logErr("RPC invocation was denied - failed"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("BasicAuthTest5 failed: ", e); - } - if (!pass) - throw new Fault("BasicAuthTest5 failed"); - } - - /* - * @testName: BasicAuthTest6 - * - * @assertion_ids: JAXWS:SPEC:11006; JAXWS:SPEC:11007; JAXWS:SPEC:10017; - * JAXWS:SPEC:10018; WS4EE:SPEC:113; WS4EE:SPEC:114; WS4EE:SPEC:115; - * WS4EE:SPEC:117; WS4EE:SPEC:213; WS4EE:SPEC:219; WS4EE:SPEC:221; - * WS4EE:SPEC:223; WS4EE:SPEC:224; WS4EE:SPEC:228; WS4EE:SPEC:248; - * WS4EE:SPEC:249; WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; - * WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:5000; WS4EE:SPEC:5002; WS4EE:SPEC:32; WS4EE:SPEC:4011; - * WS4EE:SPEC:9000; WS4EE:SPEC:9001; JAXWS:SPEC:129; - * - * @test_Strategy: 1. Invoke RPC on a guest JAXWS service definition. 2. The - * JAXWS runtime must allow access since all users have access to the guest - * JAXWS service definition. - * - * Description Test BASIC authentication as specified in the JAXWS - * Specification. - * - * 1. If user has not been authenticated and user attempts to access a guest - * JAXWS service definition, and a user enters a valid username and password, - * then the JAXWS runtime must allow access since all users have access to the - * guest JAXWS service definition. - */ - - public void BasicAuthTest6() throws Fault { - TestUtil.logTrace("BasicAuthTest6"); - boolean pass = true; - String expected = "Hello, foo!"; - try { - TestUtil.logMsg("Get stub for Guest Service Definition"); - if (modeProperty.equals("standalone")) { - getGuestServiceStubStandalone(); - JAXWS_Util.setUserNameAndPassword(port3, unauthUsername, - unauthPassword); - } else - getGuestServiceStub(); - TestUtil.logMsg("Invoke RPC method authenticating with a" - + " valid username/password"); - TestUtil.logMsg( - "Username=" + unauthUsername + ", Password=" + unauthPassword); - TestUtil.logMsg("JAXWS runtime must allow access since all" - + " users have guest access"); - try { - String response = port3.helloGuest("foo"); - TestUtil.logMsg("Authorization was allowed - passed"); - TestUtil.logMsg("RPC invocation was allowed - passed"); - } catch (WebServiceException e) { - TestUtil.logErr("Authorization was not allowed - failed", e); - TestUtil.logErr("RPC invocation was denied - failed"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("BasicAuthTest6 failed: ", e); - } - if (!pass) - throw new Fault("BasicAuthTest6 failed"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloGuestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloGuestImpl.java deleted file mode 100644 index 2ea7fd8434..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloGuestImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "HelloGuestPort", serviceName = "BasicAuthServiceTestService", targetNamespace = "http://BasicAuthServiceTestService.org/wsdl", wsdlLocation = "WEB-INF/wsdl/BasicAuthServiceTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloGuest") -public class HelloGuestImpl implements HelloGuest { - - public String helloGuest(String s) { - return "Hello, " + s + "!"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloProtectedImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloProtectedImpl.java deleted file mode 100644 index 9e08f035bb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloProtectedImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "HelloProtectedPort", serviceName = "BasicAuthServiceTestService", targetNamespace = "http://BasicAuthServiceTestService.org/wsdl", wsdlLocation = "WEB-INF/wsdl/BasicAuthServiceTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected") -public class HelloProtectedImpl implements HelloProtected { - - public String helloProtected(String s) { - return "Hello, " + s + "!"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloProtectedImpl1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloProtectedImpl1.java deleted file mode 100644 index a9e25b8ee6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloProtectedImpl1.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)HelloProtectedImpl1.java 1.1 08/09/05 - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "HelloProtectedPort1", serviceName = "BasicAuthServiceTestService", targetNamespace = "http://BasicAuthServiceTestService.org/wsdl", wsdlLocation = "WEB-INF/wsdl/BasicAuthServiceTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected1") -public class HelloProtectedImpl1 implements HelloProtected1 { - - public String helloProtected1(String s) { - return "Hello, " + s + "!"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloProtectedImpl2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloProtectedImpl2.java deleted file mode 100644 index 7f14ee5a2f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloProtectedImpl2.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)HelloProtectedImpl2.java 1.1 08/09/05 - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "HelloProtectedPort2", serviceName = "BasicAuthServiceTestService", targetNamespace = "http://BasicAuthServiceTestService.org/wsdl", wsdlLocation = "WEB-INF/wsdl/BasicAuthServiceTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected2") -public class HelloProtectedImpl2 implements HelloProtected2 { - - public String helloProtected2(String s) { - return "Hello, " + s + "!"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloProtectedImpl3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloProtectedImpl3.java deleted file mode 100644 index f1f6e91773..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloProtectedImpl3.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)HelloProtectedImpl3.java 1.1 08/09/05 - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "HelloProtectedPort3", serviceName = "BasicAuthServiceTestService", targetNamespace = "http://BasicAuthServiceTestService.org/wsdl", wsdlLocation = "WEB-INF/wsdl/BasicAuthServiceTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected3") -public class HelloProtectedImpl3 implements HelloProtected3 { - - public String helloProtected3(String s) { - return "Hello, " + s + "!"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloUnprotectedImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloUnprotectedImpl.java deleted file mode 100644 index 9c40d4f55d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/HelloUnprotectedImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "HelloUnprotectedPort", serviceName = "BasicAuthServiceTestService", targetNamespace = "http://BasicAuthServiceTestService.org/wsdl", wsdlLocation = "WEB-INF/wsdl/BasicAuthServiceTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloUnprotected") -public class HelloUnprotectedImpl implements HelloUnprotected { - - public String helloUnprotected(String s) { - return "Hello, " + s + "!"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT.ear.sun-application.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT.ear.sun-application.xml deleted file mode 100644 index c719fce250..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT.ear.sun-application.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - WSW2JBAT_web.war - WSW2JBAT_web - - 0 - - Administrator - j2ee - - - Manager - javajoe - - - Guest - javajoe - j2ee - guest - - - Employee - javajoe - j2ee - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_web.war.sun-web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_web.war.sun-web.xml deleted file mode 100644 index 6ac9132488..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - BasicAuthServiceTestService - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws1/HelloUnprotected?WSDL - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_wsappclient_vehicle_client.jar.sun-application-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 0ea7fc3fcd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - service/unprotected - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloUnprotected - - http://BasicAuthServiceTestService.org/wsdl - HelloUnprotectedPort - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws1/HelloUnprotected?WSDL - - - service/protectednoid - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected - - http://BasicAuthServiceTestService.org/wsdl - HelloProtectedPort - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws2/HelloProtected?WSDL - - - service/protectedvalidid - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected1 - - http://BasicAuthServiceTestService.org/wsdl - HelloProtectedPort1 - - - jakarta.xml.ws.security.auth.password - j2ee - - - jakarta.xml.ws.security.auth.username - j2ee - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws2/HelloProtected1?WSDL - - - service/protectedinvalidid - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected2 - - http://BasicAuthServiceTestService.org/wsdl - HelloProtectedPort2 - - - jakarta.xml.ws.security.auth.username - invalid - - - jakarta.xml.ws.security.auth.password - invalid - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws2/HelloProtected2?WSDL - - - service/protectedunauthid - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected3 - - http://BasicAuthServiceTestService.org/wsdl - HelloProtectedPort3 - - - jakarta.xml.ws.security.auth.password - javajoe - - - jakarta.xml.ws.security.auth.username - javajoe - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws2/HelloProtected3?WSDL - - - service/guest - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloGuest - - http://BasicAuthServiceTestService.org/wsdl - HelloGuestPort - - - jakarta.xml.ws.security.auth.username - javajoe - - - jakarta.xml.ws.security.auth.password - javajoe - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws3/HelloGuest?WSDL - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_wsejb_vehicle_client.jar.sun-application-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 064f197c80..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - WSW2JBAT_wsejb_vehicle - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 5e1339069a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - WSW2JBAT_wsejb_vehicle - - service/unprotected - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloUnprotected - - http://BasicAuthServiceTestService.org/wsdl - HelloUnprotectedPort - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws1/HelloUnprotected?WSDL - - - service/protectednoid - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected - - http://BasicAuthServiceTestService.org/wsdl - HelloProtectedPort - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws2/HelloProtected?WSDL - - - service/protectedvalidid - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected1 - - http://BasicAuthServiceTestService.org/wsdl - HelloProtectedPort1 - - - jakarta.xml.ws.security.auth.password - j2ee - - - jakarta.xml.ws.security.auth.username - j2ee - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws2/HelloProtected1?WSDL - - - service/protectedinvalidid - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected2 - - http://BasicAuthServiceTestService.org/wsdl - HelloProtectedPort2 - - - jakarta.xml.ws.security.auth.username - invalid - - - jakarta.xml.ws.security.auth.password - invalid - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws2/HelloProtected2?WSDL - - - service/protectedunauthid - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected3 - - http://BasicAuthServiceTestService.org/wsdl - HelloProtectedPort3 - - - jakarta.xml.ws.security.auth.password - javajoe - - - jakarta.xml.ws.security.auth.username - javajoe - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws2/HelloProtected3?WSDL - - - service/guest - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloGuest - - http://BasicAuthServiceTestService.org/wsdl - HelloGuestPort - - - jakarta.xml.ws.security.auth.username - javajoe - - - jakarta.xml.ws.security.auth.password - javajoe - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws3/HelloGuest?WSDL - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_wsservlet_vehicle_web.war.sun-web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index bbbb72f39b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/WSW2JBAT_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - service/unprotected - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloUnprotected - - http://BasicAuthServiceTestService.org/wsdl - HelloUnprotectedPort - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws1/HelloUnprotected?WSDL - - - service/protectednoid - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected - - http://BasicAuthServiceTestService.org/wsdl - HelloProtectedPort - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws2/HelloProtected?WSDL - - - service/protectedvalidid - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected1 - - http://BasicAuthServiceTestService.org/wsdl - HelloProtectedPort1 - - - jakarta.xml.ws.security.auth.password - j2ee - - - jakarta.xml.ws.security.auth.username - j2ee - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws2/HelloProtected1?WSDL - - - service/protectedinvalidid - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected2 - - http://BasicAuthServiceTestService.org/wsdl - HelloProtectedPort2 - - - jakarta.xml.ws.security.auth.username - invalid - - - jakarta.xml.ws.security.auth.password - invalid - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws2/HelloProtected2?WSDL - - - service/protectedunauthid - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected3 - - http://BasicAuthServiceTestService.org/wsdl - HelloProtectedPort3 - - - jakarta.xml.ws.security.auth.password - javajoe - - - jakarta.xml.ws.security.auth.username - javajoe - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws2/HelloProtected3?WSDL - - - service/guest - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloGuest - - http://BasicAuthServiceTestService.org/wsdl - HelloGuestPort - - - jakarta.xml.ws.security.auth.username - javajoe - - - jakarta.xml.ws.security.auth.password - javajoe - - - http://webServerHost.1:webServerPort.1/WSW2JBAT_web/jaxws3/HelloGuest?WSDL - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/build.xml deleted file mode 100644 index 189b03e3f0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/build.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/customfile.xml deleted file mode 100644 index 6c575cee71..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/customfile.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/jakartaEE.tokens deleted file mode 100644 index 7d3120cf08..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/jakartaEE.tokens +++ /dev/null @@ -1,36 +0,0 @@ -WSREFSEJBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/unprotected", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="META-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/protectednoid", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="META-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/protectedvalidid", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="META-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/protectedinvalidid", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="META-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/protectedunauthid", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="META-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/guest", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="META-INF/wsdl/BasicAuthServiceTestService.wsdl") }) -WSREFSAPPCLIENT=@WebServiceRefs({@WebServiceRef(name="service/unprotected", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="META-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/protectednoid", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="META-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/protectedvalidid", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="META-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/protectedinvalidid", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="META-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/protectedunauthid", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="META-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/guest", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="META-INF/wsdl/BasicAuthServiceTestService.wsdl") }) -WSREFSWEBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/unprotected", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="WEB-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/protectednoid", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="WEB-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/protectedvalidid", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="WEB-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/protectedinvalidid", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="WEB-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/protectedunauthid", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="WEB-INF/wsdl/BasicAuthServiceTestService.wsdl"), @WebServiceRef(name="service/guest", type=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService.class, wsdlLocation="WEB-INF/wsdl/BasicAuthServiceTestService.wsdl") }) -SEI=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloUnprotected -SEI2=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected -SEI3=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloGuest -SEI4=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected1 -SEI5=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected2 -SEI6=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected3 -IMPL=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloUnprotectedImpl -IMPL2=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtectedImpl -IMPL3=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloGuestImpl -IMPL4=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtectedImpl1 -IMPL5=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtectedImpl2 -IMPL6=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtectedImpl3 -NAMESPACEURI=http://BasicAuthServiceTestService.org/wsdl -PORT=HelloUnprotectedPort -PORT2=HelloProtectedPort -PORT3=HelloGuestPort -PORT4=HelloProtectedPort1 -PORT5=HelloProtectedPort2 -PORT6=HelloProtectedPort3 -URLALIAS=/jaxws1/HelloUnprotected -URLALIAS2=/jaxws2/HelloProtected -URLALIAS3=/jaxws3/HelloGuest -URLALIAS4=/jaxws2/HelloProtected1 -URLALIAS5=/jaxws2/HelloProtected2 -URLALIAS6=/jaxws2/HelloProtected3 -SERVLETNAME=HelloUnprotectedPort -SERVLETNAME2=HelloProtectedPort -SERVLETNAME3=HelloGuestPort -SERVLETNAME4=HelloProtectedPort1 -SERVLETNAME5=HelloProtectedPort2 -SERVLETNAME6=HelloProtectedPort3 -WEBSERVICEDESCRIPTION=BasicAuthServiceTestService -WEBSERVICECNTXROOT=WSW2JBAT diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/jakartaEE.web.xml deleted file mode 100644 index 1e69984668..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/jakartaEE.web.xml +++ /dev/null @@ -1,243 +0,0 @@ - - - - - @WEBSERVICECNTXROOT@ - - @SERVLETNAME@ - @IMPL@ - 0 - - ADM - Administrator - - - MGR - Manager - - - EMP - Employee - - - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - ADM - Administrator - - - MGR - Manager - - - EMP - Employee - - - - - @SERVLETNAME3@ - @IMPL3@ - 0 - - ADM - Administrator - - - MGR - Manager - - - EMP - Employee - - - GUEST - Guest - - - - - @SERVLETNAME4@ - @IMPL4@ - 0 - - ADM - Administrator - - - MGR - Manager - - - EMP - Employee - - - - @SERVLETNAME5@ - @IMPL5@ - 0 - - ADM - Administrator - - - MGR - Manager - - - EMP - Employee - - - - @SERVLETNAME6@ - @IMPL6@ - 0 - - ADM - Administrator - - - MGR - Manager - - - EMP - Employee - - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - @SERVLETNAME3@ - @URLALIAS3@ - - - @SERVLETNAME4@ - @URLALIAS4@ - - - @SERVLETNAME5@ - @URLALIAS5@ - - - @SERVLETNAME6@ - @URLALIAS6@ - - - 54 - - - - MySecureBit2 - @URLALIAS2@ - POST - - - Administrator - - - NONE - - - - - MySecureBit3 - @URLALIAS3@ - POST - - - Guest - - - NONE - - - - - MySecureBit2 - @URLALIAS4@ - POST - - - Administrator - - - NONE - - - - - MySecureBit2 - @URLALIAS5@ - POST - - - Administrator - - - NONE - - - - - MySecureBit2 - @URLALIAS6@ - POST - - - Administrator - - - NONE - - - - BASIC - default - - - the administrator role - Administrator - - - the manager role - Manager - - - the employee role - Employee - - - the guest role - Guest - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/jakartaEE.webservices.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/jakartaEE.webservices.xml deleted file mode 100644 index 01f40c6d62..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/jakartaEE.webservices.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - BasicAuthServiceTestService - WEB-INF/wsdl/BasicAuthServiceTestService.wsdl - - HelloUnprotectedImpl - wsdl:HelloUnprotectedPort - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloUnprotected - - HelloUnprotectedPort - - - - HelloProtectedImpl - wsdl:HelloProtectedPort - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected - - HelloProtectedPort - - - - HelloGuestImpl - wsdl:HelloGuestPort - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloGuest - - HelloGuestPort - - - - HelloProtectedImpl1 - wsdl:HelloProtectedPort1 - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected1 - - HelloProtectedPort1 - - - - HelloProtectedImpl2 - wsdl:HelloProtectedPort2 - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected2 - - HelloProtectedPort2 - - - - HelloProtectedImpl3 - wsdl:HelloProtectedPort3 - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected3 - - HelloProtectedPort3 - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/standalone-sun-jaxws.xml deleted file mode 100644 index 795a5a9857..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/standalone-sun-jaxws.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/standalone.sun-web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/standalone.sun-web.xml deleted file mode 100644 index d2e58295c3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/standalone.sun-web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Administrator - j2ee - - - Manager - javajoe - - - Employee - javajoe - j2ee - - - Guest - javajoe - j2ee - guest - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/standalone.web.xml deleted file mode 100644 index 3a8abe8ac3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/standalone.web.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - - WSW2JBATApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - HelloGuest - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - HelloUnprotected - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - HelloProtected - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - HelloProtected1 - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - HelloProtected2 - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - HelloProtected3 - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - HelloGuest - /jaxws3/HelloGuest - - - HelloUnprotected - /jaxws1/HelloUnprotected - - - HelloProtected - /jaxws2/HelloProtected - - - HelloProtected1 - /jaxws2/HelloProtected1 - - - HelloProtected2 - /jaxws2/HelloProtected2 - - - HelloProtected3 - /jaxws2/HelloProtected3 - - - 54 - - - - HelloProtectedService - /jaxws2/* - POST - - - Administrator - - - NONE - - - - - HelloGuestService - /jaxws3/* - POST - - - Guest - Employee - Manager - Administrator - - - NONE - - - - BASIC - default - - - Administrator - - - Manager - - - Employee - - - Guest - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/wsappclient_vehicle_client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/wsappclient_vehicle_client.xml deleted file mode 100644 index 115bdcff8f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/wsappclient_vehicle_client.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - TS app client vehicle - wsappclient_vehicle_client - - service/unprotected - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - META-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloUnprotected - - - - service/protectednoid - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - META-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected - - - - service/protectedvalidid - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - META-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected1 - - - - service/protectedinvalidid - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - META-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected2 - - - - service/protectedunauthid - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - META-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected3 - - - - service/guest - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - META-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloGuest - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/wsejb_vehicle_ejb.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/wsejb_vehicle_ejb.xml deleted file mode 100644 index a1464d61a4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/wsejb_vehicle_ejb.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - Ejb1 - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicleRemote - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicle - Stateful - Container - - - service/unprotected - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - META-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloUnprotected - - - - service/protectednoid - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - META-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected - - - - service/protectedvalidid - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - META-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected1 - - - - service/protectedinvalidid - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - META-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected2 - - - - service/protectedunauthid - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - META-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected3 - - - - service/guest - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - META-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloGuest - - - - - - - - - - - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - Remote - runTest - - Required - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/wsservlet_vehicle_web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/wsservlet_vehicle_web.xml deleted file mode 100644 index ef039e1d72..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/sec/secbasic/wsservlet_vehicle_web.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - wsservlet_vehicle - - WSServlet_VehicleLogicalName - com.sun.ts.tests.common.vehicle.wsservlet.WSServletVehicle - - - WSServlet_VehicleLogicalName - /wsservlet_vehicle - - - 54 - - - service/unprotected - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - WEB-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloUnprotected - - - - service/protectednoid - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - WEB-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected - - - - service/protectedvalidid - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - WEB-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected1 - - - - service/protectedinvalidid - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - WEB-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected2 - - - - service/protectedunauthid - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - WEB-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloProtected3 - - - - service/guest - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.BasicAuthServiceTestService - WEB-INF/wsdl/BasicAuthServiceTestService.wsdl - - com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.sec.secbasic.HelloGuest - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/Client.java deleted file mode 100644 index d693e18b50..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/Client.java +++ /dev/null @@ -1,1075 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.xmlnamemappingtest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; - -import javax.xml.namespace.QName; - -import java.util.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.xmlnamemappingtest."; - - // service and port information - private static final String NAMESPACEURI = "http://XMLNameMappingTest.org/wsdl"; - - private static final String SERVICE_NAME = "xMLNameMappingTest"; - - private static final String PORT_NAME = "XMLNameMappingTestPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - // EyeColor data - private static EyeColor eyeColor_data = null; - - // XMLNameMappingTest_Type struct data - private static XMLNameMappingTest_Type xmlNameMapping_data = null; - - static { - try { - xmlNameMapping_data = new XMLNameMappingTest_Type(); - xmlNameMapping_data.setVarString("string1"); - xmlNameMapping_data.setVarInt(Integer.MIN_VALUE); - xmlNameMapping_data.setVarFloat(Float.MIN_VALUE); - - eyeColor_data = new EyeColor(); - eyeColor_data.setColor("blue"); - } catch (Exception e) { - TestUtil.logErr("exception on data initialization." + e); - e.printStackTrace(); - } - } - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "xmlnamemappingtest.endpoint.1"; - - private static final String WSDLLOC_URL = "xmlnamemappingtest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - XMLNameMappingTest port = null; - - static XMLNameMappingTest_Service service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (XMLNameMappingTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - XMLNameMappingTest_Service.class, PORT_QNAME, XMLNameMappingTest.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (XMLNameMappingTest) service.getXMLNameMappingTestPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setSOAPLogging(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (XMLNameMappingTest_Service) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: JavaKeywordsTest - * - * @assertion_ids: JAXWS:SPEC:2057; JAXWS:SPEC:2066; JAXWS:SPEC:2067; - * JAXWS:SPEC:2068; - * - * @test_Strategy: - */ - public void JavaKeywordsTest() throws Fault { - TestUtil.logTrace("JavaKeywordsTest"); - boolean pass = true; - - if (!nullTest()) - pass = false; - printSeperationLine(); - if (!trueTest()) - pass = false; - printSeperationLine(); - if (!falseTest()) - pass = false; - printSeperationLine(); - if (!abstractTest()) - pass = false; - printSeperationLine(); - if (!booleanTest()) - pass = false; - printSeperationLine(); - if (!breakTest()) - pass = false; - printSeperationLine(); - if (!byteTest()) - pass = false; - printSeperationLine(); - if (!caseTest()) - pass = false; - printSeperationLine(); - if (!catchTest()) - pass = false; - printSeperationLine(); - if (!charTest()) - pass = false; - printSeperationLine(); - if (!classTest()) - pass = false; - printSeperationLine(); - if (!constTest()) - pass = false; - printSeperationLine(); - if (!continueTest()) - pass = false; - printSeperationLine(); - if (!defaultTest()) - pass = false; - printSeperationLine(); - if (!doTest()) - pass = false; - printSeperationLine(); - if (!doubleTest()) - pass = false; - printSeperationLine(); - if (!elseTest()) - pass = false; - printSeperationLine(); - if (!extendsTest()) - pass = false; - printSeperationLine(); - if (!finalTest()) - pass = false; - printSeperationLine(); - if (!finallyTest()) - pass = false; - printSeperationLine(); - if (!floatTest()) - pass = false; - printSeperationLine(); - if (!forTest()) - pass = false; - printSeperationLine(); - if (!gotoTest()) - pass = false; - printSeperationLine(); - if (!ifTest()) - pass = false; - printSeperationLine(); - if (!implementsTest()) - pass = false; - printSeperationLine(); - if (!importTest()) - pass = false; - printSeperationLine(); - if (!instanceofTest()) - pass = false; - printSeperationLine(); - if (!intTest()) - pass = false; - printSeperationLine(); - if (!interfaceTest()) - pass = false; - printSeperationLine(); - if (!longTest()) - pass = false; - printSeperationLine(); - if (!nativeTest()) - pass = false; - printSeperationLine(); - if (!newTest()) - pass = false; - printSeperationLine(); - if (!packageTest()) - pass = false; - printSeperationLine(); - if (!privateTest()) - pass = false; - printSeperationLine(); - if (!protectedTest()) - pass = false; - printSeperationLine(); - if (!publicTest()) - pass = false; - printSeperationLine(); - if (!returnTest()) - pass = false; - printSeperationLine(); - if (!shortTest()) - pass = false; - printSeperationLine(); - if (!staticTest()) - pass = false; - printSeperationLine(); - if (!superTest()) - pass = false; - printSeperationLine(); - if (!switchTest()) - pass = false; - printSeperationLine(); - if (!synchronizedTest()) - pass = false; - printSeperationLine(); - if (!thisTest()) - pass = false; - printSeperationLine(); - if (!throwTest()) - pass = false; - printSeperationLine(); - if (!throwsTest()) - pass = false; - printSeperationLine(); - if (!transientTest()) - pass = false; - printSeperationLine(); - if (!tryTest()) - pass = false; - printSeperationLine(); - if (!voidTest()) - pass = false; - printSeperationLine(); - if (!volatileTest()) - pass = false; - printSeperationLine(); - if (!whileTest()) - pass = false; - printSeperationLine(); - - if (!pass) - throw new Fault("JavaKeywordsTest failed"); - } - - /* - * @testName: JavaNamingConventionsTest - * - * @assertion_ids: JAXWS:SPEC:2057; JAXWS:SPEC:2066; JAXWS:SPEC:2067; - * JAXWS:SPEC:2068; - * - * @test_Strategy: - */ - public void JavaNamingConventionsTest() throws Fault { - TestUtil.logTrace("JavaNamingConventionsTest"); - boolean pass = true; - - if (!eyeColorTest()) - pass = false; - printSeperationLine(); - if (!structTest()) - pass = false; - printSeperationLine(); - - if (!pass) - throw new Fault("JavaNamingConventionsTest failed"); - } - - private boolean printTestStatus(boolean pass, String test) { - if (pass) - TestUtil.logMsg("" + test + " ... PASSED"); - else - TestUtil.logErr("" + test + " ... FAILED"); - - return pass; - } - - private boolean nullTest() { - boolean pass = true; - try { - port.nullTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "nullTest"); - return pass; - } - - private boolean trueTest() { - boolean pass = true; - try { - port.trueTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "trueTest"); - return pass; - } - - private boolean falseTest() { - boolean pass = true; - try { - port.falseTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "falseTest"); - return pass; - } - - private boolean abstractTest() { - boolean pass = true; - try { - port.abstractTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "abstractTest"); - return pass; - } - - private boolean booleanTest() { - boolean pass = true; - try { - port.booleanTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "booleanTest"); - return pass; - } - - private boolean breakTest() { - boolean pass = true; - try { - port.breakTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "breakTest"); - return pass; - } - - private boolean byteTest() { - boolean pass = true; - try { - port.byteTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "byteTest"); - return pass; - } - - private boolean caseTest() { - boolean pass = true; - try { - port.caseTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "caseTest"); - return pass; - } - - private boolean catchTest() { - boolean pass = true; - try { - port.catchTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "catchTest"); - return pass; - } - - private boolean charTest() { - boolean pass = true; - try { - port.charTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "charTest"); - return pass; - } - - private boolean classTest() { - boolean pass = true; - try { - port.classTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "classTest"); - return pass; - } - - private boolean constTest() { - boolean pass = true; - try { - port.constTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "constTest"); - return pass; - } - - private boolean continueTest() { - boolean pass = true; - try { - port.continueTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "continueTest"); - return pass; - } - - private boolean defaultTest() { - boolean pass = true; - try { - port.defaultTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "defaultTest"); - return pass; - } - - private boolean doTest() { - boolean pass = true; - try { - port.doTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "doTest"); - return pass; - } - - private boolean doubleTest() { - boolean pass = true; - try { - port.doubleTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "doubleTest"); - return pass; - } - - private boolean elseTest() { - boolean pass = true; - try { - port.elseTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "elseTest"); - return pass; - } - - private boolean extendsTest() { - boolean pass = true; - try { - port.extendsTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "extendsTest"); - return pass; - } - - private boolean finalTest() { - boolean pass = true; - try { - port.finalTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "finalTest"); - return pass; - } - - private boolean finallyTest() { - boolean pass = true; - try { - port.finallyTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "finallyTest"); - return pass; - } - - private boolean floatTest() { - boolean pass = true; - try { - port.floatTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "floatTest"); - return pass; - } - - private boolean forTest() { - boolean pass = true; - try { - port.forTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "forTest"); - return pass; - } - - private boolean gotoTest() { - boolean pass = true; - try { - port.gotoTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "gotoTest"); - return pass; - } - - private boolean ifTest() { - boolean pass = true; - try { - port.ifTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "ifTest"); - return pass; - } - - private boolean implementsTest() { - boolean pass = true; - try { - port.implementsTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "implementsTest"); - return pass; - } - - private boolean importTest() { - boolean pass = true; - try { - port.importTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "importTest"); - return pass; - } - - private boolean instanceofTest() { - boolean pass = true; - try { - port.instanceofTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "instanceofTest"); - return pass; - } - - private boolean intTest() { - boolean pass = true; - try { - port.intTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "intTest"); - return pass; - } - - private boolean interfaceTest() { - boolean pass = true; - try { - port.interfaceTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "interfaceTest"); - return pass; - } - - private boolean longTest() { - boolean pass = true; - try { - port.longTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "longTest"); - return pass; - } - - private boolean nativeTest() { - boolean pass = true; - try { - port.nativeTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "nativeTest"); - return pass; - } - - private boolean newTest() { - boolean pass = true; - try { - port.newTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "newTest"); - return pass; - } - - private boolean packageTest() { - boolean pass = true; - try { - port.packageTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "packageTest"); - return pass; - } - - private boolean privateTest() { - boolean pass = true; - try { - port.privateTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "privateTest"); - return pass; - } - - private boolean protectedTest() { - boolean pass = true; - try { - port.protectedTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "protectedTest"); - return pass; - } - - private boolean publicTest() { - boolean pass = true; - try { - port.publicTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "publicTest"); - return pass; - } - - private boolean returnTest() { - boolean pass = true; - try { - port.returnTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "returnTest"); - return pass; - } - - private boolean shortTest() { - boolean pass = true; - try { - port.shortTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "shortTest"); - return pass; - } - - private boolean staticTest() { - boolean pass = true; - try { - port.staticTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "staticTest"); - return pass; - } - - private boolean superTest() { - boolean pass = true; - try { - port.superTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "superTest"); - return pass; - } - - private boolean switchTest() { - boolean pass = true; - try { - port.switchTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "switchTest"); - return pass; - } - - private boolean synchronizedTest() { - boolean pass = true; - try { - port.synchronizedTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "synchronizeTest"); - return pass; - } - - private boolean thisTest() { - boolean pass = true; - try { - port.thisTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "thisTest"); - return pass; - } - - private boolean throwTest() { - boolean pass = true; - try { - port.throwTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "throwTest"); - return pass; - } - - private boolean throwsTest() { - boolean pass = true; - try { - port.throwsTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "throwsTest"); - return pass; - } - - private boolean transientTest() { - boolean pass = true; - try { - port.transientTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "transientTest"); - return pass; - } - - private boolean tryTest() { - boolean pass = true; - try { - port.tryTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "tryTest"); - return pass; - } - - private boolean voidTest() { - boolean pass = true; - try { - port.voidTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "voidTest"); - return pass; - } - - private boolean volatileTest() { - boolean pass = true; - try { - port.volatileTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "volatileTest"); - return pass; - } - - private boolean whileTest() { - boolean pass = true; - try { - port.whileTest(); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "whileTest"); - return pass; - } - - private boolean eyeColorTest() { - boolean pass = true; - try { - EyeColor o = port.echoEyeColor(eyeColor_data); - TestUtil.logMsg("EyeColor=" + o); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "eyeColorTest"); - return pass; - } - - private boolean structTest() { - boolean pass = true; - try { - XMLNameMappingTest_Type o = port.echoXMLNameMapping(xmlNameMapping_data); - TestUtil.logMsg("XMLNameMappingTest_Type=" + o); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - printTestStatus(pass, "structTest"); - return pass; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/WSW2JXMLNameMappingTest.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/WSW2JXMLNameMappingTest.xsd deleted file mode 100644 index e085ebb7e1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/WSW2JXMLNameMappingTest.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/WSW2JXMLNameMappingTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/WSW2JXMLNameMappingTestService.wsdl deleted file mode 100644 index e97bc9b6c4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/WSW2JXMLNameMappingTestService.wsdl +++ /dev/null @@ -1,961 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/XMLNameMappingTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/XMLNameMappingTestImpl.java deleted file mode 100644 index d5d691e8ca..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/XMLNameMappingTestImpl.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.xmlnamemappingtest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; - -import java.rmi.*; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "XMLNameMappingTestPort", serviceName = "xMLNameMappingTest", targetNamespace = "http://XMLNameMappingTest.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JXMLNameMappingTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.xmlnamemappingtest.XMLNameMappingTest") -public class XMLNameMappingTestImpl implements XMLNameMappingTest { - public EyeColor echoEyeColor(EyeColor inputEyeColor) - - { - return inputEyeColor; - } - - public XMLNameMappingTest_Type echoXMLNameMapping( - XMLNameMappingTest_Type inputXMLNameMappingTest) - throws XMLNameMappingTest_Exception { - return inputXMLNameMappingTest; - } - - public void nameWithdash() { - } - - public void nameWithunderscore() { - } - - public void nameWithcolon() { - } - - public void nameWithdot() { - } - - public void nullTest() { - } - - public void trueTest() { - } - - public void falseTest() { - } - - public void abstractTest() { - } - - public void booleanTest() { - } - - public void breakTest() { - } - - public void byteTest() { - } - - public void caseTest() { - } - - public void catchTest() { - } - - public void charTest() { - } - - public void classTest() { - } - - public void constTest() { - } - - public void continueTest() { - } - - public void defaultTest() { - } - - public void doTest() { - } - - public void doubleTest() { - } - - public void elseTest() { - } - - public void extendsTest() { - } - - public void finalTest() { - } - - public void finallyTest() { - } - - public void floatTest() { - } - - public void forTest() { - } - - public void gotoTest() { - } - - public void ifTest() { - } - - public void implementsTest() { - } - - public void importTest() { - } - - public void instanceofTest() { - } - - public void intTest() { - } - - public void interfaceTest() { - } - - public void longTest() { - } - - public void nativeTest() { - } - - public void newTest() { - } - - public void packageTest() { - } - - public void privateTest() { - } - - public void protectedTest() { - } - - public void publicTest() { - } - - public void returnTest() { - } - - public void shortTest() { - } - - public void staticTest() { - } - - public void superTest() { - } - - public void switchTest() { - } - - public void synchronizedTest() { - } - - public void thisTest() { - } - - public void throwTest() { - } - - public void throwsTest() { - } - - public void transientTest() { - } - - public void tryTest() { - } - - public void voidTest() { - } - - public void volatileTest() { - } - - public void whileTest() { - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/build.xml deleted file mode 100644 index fef7efc6b1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/customfile.xml deleted file mode 100644 index 2160ea931e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/customfile.xml +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/jakartaEE.tokens deleted file mode 100644 index 5544babf29..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jrlxmlnamemappingtest") -SERVICE=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.xmlnamemappingtest.XMLNameMappingTest_Service -SEI=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.xmlnamemappingtest.XMLNameMappingTest -IMPL=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.xmlnamemappingtest.XMLNameMappingTestImpl -NAMESPACEURI=http://XMLNameMappingTest.org/wsdl -PORT=XMLNameMappingTestPort -URLALIAS=/jaxws/XMLNameMappingTest -SERVLETNAME=com.sun.ts.tests.jaxws.ee.w2j.rpc.literal.xmlnamemappingtest.XMLNameMappingTestImpl -WEBSERVICEDESCRIPTION=XMLNameMappingTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jrlxmlnamemappingtest -SERVICEREFNAMEWSEJB=service/wsw2jrlxmlnamemappingtest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jrlxmlnamemappingtest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/standalone-sun-jaxws.xml deleted file mode 100644 index df6178281d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/standalone.web.xml deleted file mode 100644 index 2727702a73..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/ee/w2j/rpc/literal/xmlnamemappingtest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JXMLNameMappingTestApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -XMLNameMappingTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -XMLNameMappingTest -/jaxws/XMLNameMappingTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/build.xml deleted file mode 100644 index 6df4cca8bc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/build.xml deleted file mode 100644 index c44d5cc6da..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/build.xml deleted file mode 100644 index 73835e48ab..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/build.xml deleted file mode 100644 index 86c4f0ad78..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23001.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23001.wsdl deleted file mode 100644 index 89107808da..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23001.wsdl +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23001_schema1.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23001_schema1.xsd deleted file mode 100644 index 964c0e96c1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23001_schema1.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23002.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23002.wsdl deleted file mode 100644 index 64cf15ece4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23002.wsdl +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23002_schema1.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23002_schema1.xsd deleted file mode 100644 index 964c0e96c1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/AddNumbersService23002_schema1.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/Client.java deleted file mode 100644 index 53723fca55..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/Client.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import java.net.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.xml.soap.*; -import java.util.Properties; -import javax.xml.namespace.QName; - -/* - * Test Repeatable annotation on WebServiceRef - * @Repeatable(value=WebServiceRefs.class) - */ -public class Client extends ServiceEETest { - - private static final long serialVersionUID = 23L; - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String ENDPOINTPUBLISHPROP = "http.server.supports.endpoint.publish"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private boolean endpointPublishSupport; - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous."; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private static final String MINPORT = "port.range.min"; - - private int minPort = -1; - - private static final String MAXPORT = "port.range.max"; - - private int maxPort = -1; - - private int javaseServerPort; - - // URL properties used by the test - private static final String ENDPOINT_URL23001 = "wsaj2wdlanonymoustest23.endpoint.23001"; - - private static final String WSDLLOC_URL23001 = "wsaj2wdlanonymoustest23.wsdlloc.23001"; - - private static final String ENDPOINT_URL23002 = "wsaj2wdlanonymoustest23.endpoint.23002"; - - private static final String WSDLLOC_URL23002 = "wsaj2wdlanonymoustest23.wsdlloc.23002"; - - // NonAnonymousProcessor's - private static final String NONANONYMOUSPROCESSOR = "/NonAnonymousProcessor"; - - private static final String NONANONYMOUSPROCESSOR2 = "/NonAnonymousProcessor2"; - - // service and port information - private static final String NAMESPACEURI = "http://example.com/"; - - private static final String TARGET_NAMESPACE = NAMESPACEURI; - - private static final String SERVICE_NAME23001 = "AddNumbersService23001"; - - private static final String SERVICE_NAME23002 = "AddNumbersService23002"; - - private static final String PORT_NAME23001 = "AddNumbersPort23001"; - - private static final String PORT_NAME23002 = "AddNumbersPort23002"; - - private static QName SERVICE_QNAME23001 = new QName(NAMESPACEURI, - SERVICE_NAME23001); - - private static QName SERVICE_QNAME23002 = new QName(NAMESPACEURI, - SERVICE_NAME23002); - - private static QName PORT_QNAME23001 = new QName(NAMESPACEURI, - PORT_NAME23001); - - private static QName PORT_QNAME23002 = new QName(NAMESPACEURI, - PORT_NAME23002); - - private static AddressingFeature ENABLED_ADDRESSING_FEATURE = new AddressingFeature( - true, true); - - private static AddressingFeature DISABLED_ADDRESSING_FEATURE = new AddressingFeature( - false); - - private String file23001 = null; - - private String file23002 = null; - - private String urlToNonAnonymousProcessor = null; - - private String urlToNonAnonymousProcessor2 = null; - - private String url23001 = null; - - private String url23002 = null; - - private URL wsdlurl23001 = null; - - private URL wsdlurl23002 = null; - - AddNumbersPortType23001 port23001 = null; - - AddNumbersPortType23002 port23002 = null; - - static AddNumbersService23001 service23001 = null; - - static AddNumbersService23002 service23002 = null; - - String ReplyToHeaderForAnonymousResponsesSoapMsg = "{0}uuid:{1}
{2}
http://example.com/AddNumbersPortType23001/add
1010testAnonymousResponsesReplyToHeader
"; - - String FaultToHeaderForAnonymousResponsesSoapMsg = "{0}uuid:{1}
{2}
{3}
http://example.com/AddNumbersPortType23001/add
-10-10testAnonymousResponsesFaultToHeader
"; - - String ReplyToHeaderForNonAnonymousResponsesSoapMsg = "{0}uuid:{1}
{2}
http://example.com/AddNumbersPortType23002/add
1010testNonAnonymousResponsesReplyToHeader
"; - - String FaultToHeaderForNonAnonymousResponsesSoapMsg = "{0}uuid:{1}
{2}
{3}
http://example.com/AddNumbersPortType23002/add
-10-10testNonAnonymousResponsesFaultToHeader
"; - - String TestNonAnonymousResponsesAssertionSoapMsg = "{0}uuid:{1}
{2}
http://example.com/AddNumbersPortType23002/add
1010testNonAnonymousResponsesAssertion
"; - - private Dispatch createDispatchSOAPMessage(Service service, - QName port) throws Exception { - return service.createDispatch(port, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE, DISABLED_ADDRESSING_FEATURE); - } - - private Dispatch createAnonymousResponsesDispatch() { - return service23001.createDispatch(PORT_QNAME23001, SOAPMessage.class, - Service.Mode.MESSAGE, ENABLED_ADDRESSING_FEATURE); - } - - private Dispatch createNonAnonymousResponsesDispatch() { - return service23002.createDispatch(PORT_QNAME23002, SOAPMessage.class, - Service.Mode.MESSAGE, ENABLED_ADDRESSING_FEATURE); - } - - private Dispatch createAnonymousResponsesDispatchWithoutAddressing() { - return service23001.createDispatch(PORT_QNAME23001, SOAPMessage.class, - Service.Mode.MESSAGE, DISABLED_ADDRESSING_FEATURE); - } - - private Dispatch createNonAnonymousResponsesDispatchWithoutAddressing() { - return service23002.createDispatch(PORT_QNAME23002, SOAPMessage.class, - Service.Mode.MESSAGE, DISABLED_ADDRESSING_FEATURE); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - file23001 = JAXWS_Util.getURLFromProp(ENDPOINT_URL23001); - url23001 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file23001); - file23002 = JAXWS_Util.getURLFromProp(ENDPOINT_URL23002); - url23002 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file23002); - if (endpointPublishSupport) { - urlToNonAnonymousProcessor = ctsurl.getURLString(PROTOCOL, hostname, - javaseServerPort, NONANONYMOUSPROCESSOR); - urlToNonAnonymousProcessor2 = ctsurl.getURLString(PROTOCOL, hostname, - javaseServerPort, NONANONYMOUSPROCESSOR2); - } else { - urlToNonAnonymousProcessor = ctsurl.getURLString(PROTOCOL, hostname, - portnum, NONANONYMOUSPROCESSOR); - urlToNonAnonymousProcessor2 = ctsurl.getURLString(PROTOCOL, hostname, - portnum, NONANONYMOUSPROCESSOR2); - } - - file23001 = JAXWS_Util.getURLFromProp(WSDLLOC_URL23001); - wsdlurl23001 = ctsurl.getURL(PROTOCOL, hostname, portnum, file23001); - file23002 = JAXWS_Util.getURLFromProp(WSDLLOC_URL23002); - wsdlurl23002 = ctsurl.getURL(PROTOCOL, hostname, portnum, file23002); - TestUtil.logMsg( - "NonAnonymousProcessor Endpoint: " + urlToNonAnonymousProcessor); - TestUtil.logMsg( - "NonAnonymousProcessor2 Endpoint: " + urlToNonAnonymousProcessor2); - TestUtil.logMsg("Service Endpoint URL23001: " + url23001); - TestUtil.logMsg("Service Endpoint URL23002: " + url23002); - TestUtil.logMsg("WSDL Location URL23001: " + wsdlurl23001); - TestUtil.logMsg("WSDL Location URL23002: " + wsdlurl23002); - } - - private void getPortsStandalone() throws Exception { - port23001 = (AddNumbersPortType23001) JAXWS_Util.getPort(service23001, - PORT_QNAME23001, AddNumbersPortType23001.class); - port23002 = (AddNumbersPortType23002) JAXWS_Util.getPort(service23002, - PORT_QNAME23002, AddNumbersPortType23002.class); - TestUtil.logMsg("port3=" + port23001); - TestUtil.logMsg("port4=" + port23002); - JAXWS_Util.setTargetEndpointAddress(port23001, url23001); - JAXWS_Util.setTargetEndpointAddress(port23002, url23002); - JAXWS_Util.setSOAPLogging(port23001); - JAXWS_Util.setSOAPLogging(port23002); - } - - private void getPortsJavaEE() throws Exception { - javax.naming.InitialContext ic = new javax.naming.InitialContext(); - - TestUtil.logMsg("Obtain service23001 via JNDI lookup"); - service23001 = (AddNumbersService23001) ic - .lookup("java:comp/env/service/WSAJ2WDLAnonymousTest23001"); - TestUtil.logMsg("service23001=" + service23001); - port23001 = (AddNumbersPortType23001) service23001 - .getPort(AddNumbersPortType23001.class); - - TestUtil.logMsg("Obtain service23002 via JNDI lookup"); - service23002 = (AddNumbersService23002) ic - .lookup("java:comp/env/service/WSAJ2WDLAnonymousTest23002"); - TestUtil.logMsg("service23002=" + service23002); - port23002 = (AddNumbersPortType23002) service23002 - .getPort(AddNumbersPortType23002.class); - - JAXWS_Util.dumpTargetEndpointAddress(port23001); - JAXWS_Util.dumpTargetEndpointAddress(port23002); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * port.range.min; port.range.max; http.server.supports.endpoint.publish; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - endpointPublishSupport = Boolean - .parseBoolean(p.getProperty(ENDPOINTPUBLISHPROP)); - modeProperty = p.getProperty(MODEPROP); - - if (endpointPublishSupport) { - try { - maxPort = Integer.parseInt(p.getProperty(MAXPORT)); - } catch (Exception e) { - maxPort = -1; - } - try { - minPort = Integer.parseInt(p.getProperty(MINPORT)); - } catch (Exception e) { - minPort = -1; - } - - TestUtil.logMsg("minPort=" + minPort); - TestUtil.logMsg("maxPort=" + maxPort); - - javaseServerPort = JAXWS_Util.getFreePort(); - if (javaseServerPort <= 0) { - TestUtil.logMsg("Free port not found, use standard webserver port."); - javaseServerPort = portnum; - pass = false; - } - - getTestURLs(); - service23001 = (AddNumbersService23001) JAXWS_Util.getService( - wsdlurl23001, SERVICE_QNAME23001, AddNumbersService23001.class); - service23002 = (AddNumbersService23002) JAXWS_Util.getService( - wsdlurl23002, SERVICE_QNAME23002, AddNumbersService23002.class); - getPortsStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - getTestURLs(); - getPortsJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: testAnonymousResponsesAssertion - * - * @assertion_ids: JAXWS:JAVADOC:83; JAXWS:JAVADOC:84; JAXWS:JAVADOC:86; - * WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * - * @test_Strategy: Invocation on port marked with AnonymousResponses assertion - * Verify that wsa:ReplyTo in the SOAPRequest is the anonymous URI. Verify - * that wsa:To in the SOAPResponse is the anonymous URI. - * - * Test multiple @WebServiceRef annotations can be used due - * to @Repeatable(value=WebServiceRefs.class) - */ - public void testAnonymousResponsesAssertion() throws Fault { - TestUtil.logMsg("testAnonymousResponsesAssertion"); - boolean pass = true; - - try { - port23001.addNumbers(10, 10, "testAnonymousResponsesAssertion"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: ", e); - pass = false; - } - - if (!pass) - throw new Fault("testAnonymousResponsesAssertion failed"); - } - - /* - * @testName: testNonAnonymousResponsesAssertion - * - * @assertion_ids: JAXWS:JAVADOC:83; JAXWS:JAVADOC:84; JAXWS:JAVADOC:86; - * WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.3; - * - * @test_Strategy: Invocation on port marked with NonAnonymousResponses - * assertion. The header may or may not be set by default depending - * on the implementation. The test has to account for this. - * - * Test multiple @WebServiceRef annotations can be used due - * to @Repeatable(value=WebServiceRefs.class) - */ - public void testNonAnonymousResponsesAssertion() throws Fault { - TestUtil.logMsg("testNonAnonymousResponsesAssertion"); - boolean pass = true; - - try { - TestUtil.logMsg("Expect a WebServiceException on port invocation"); - port23002.addNumbers(10, 10, "testNonAnonymousResponsesAssertion"); - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - - if (!pass) - throw new Fault("testNonAnonymousResponsesAssertion failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/ClientSOAPHandler.java deleted file mode 100644 index ce7750de95..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/ClientSOAPHandler.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, "testAnonymousResponsesAssertion")) { - verifyAddressingHeadersForAnonymousResponsesAssertion(context, action); - } else if (Handler_Util.checkForMsg(context, - "testNonAnonymousResponsesAssertion")) { - verifyAddressingHeadersForNonAnonymousResponsesAssertion(context, action); - } - } - - private void verifyAddressingHeadersForAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ClientSOAPHandler.VerifyAddressingHeadersForAnonymousResponsesAssertion"); - if (!TestConstants.TEST_ANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION - .equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.TEST_ANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION - + ", Actual:" + action); - } - String to = null; - try { - to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - } catch (Exception e) { - } - if (to != null) { - if (!to.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI) - && !to.equals(W3CAddressingConstants.WSA_NONE_ADDRESS)) { - throw new AddressingPropertyException("Expected: wsa:To=" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI + " or " - + W3CAddressingConstants.WSA_NONE_ADDRESS + ", Actual: wsa:To=" - + to); - } - } - try { - String relatesTo = getRelatesTo(context); - TestUtil.logMsg("[RelatesTo=" + relatesTo + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:RelatesTo was not set (unexpected)"); - } - } - - private void verifyAddressingHeadersForNonAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ClientSOAPHandler.VerifyAddressingHeadersForNonAnonymousResponsesAssertion"); - if (!TestConstants.TEST_NONANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION - .equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.TEST_NONANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION - + ", Actual:" + action); - } - String to = null; - try { - to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - } catch (Exception e) { - } - if (to != null - && to.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI)) { - throw new AddressingPropertyException("Expected: wsa:To=!" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI - + ", Actual: wsa:To=" + to); - } - try { - String relatesTo = getRelatesTo(context); - TestUtil.logMsg("[RelatesTo=" + relatesTo + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:RelatesTo was not set (unexpected)"); - } - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/build.xml deleted file mode 100644 index 7a7f32be44..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/build.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/wsappclient_vehicle_client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/wsappclient_vehicle_client.xml deleted file mode 100644 index 94ad8984a0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/wsappclient_vehicle_client.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - TS app client vehicle - wsappclient_vehicle_client - - service/WSAJ2WDLAnonymousTest23001 - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23001 - META-INF/wsdl/AddNumbersService23001.wsdl - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23001 - - - - service/WSAJ2WDLAnonymousTest23002 - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23002 - META-INF/wsdl/AddNumbersService23002.wsdl - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23002 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/wsejb_vehicle_ejb.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/wsejb_vehicle_ejb.xml deleted file mode 100644 index 4f84aebd46..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/anonymous/wsejb_vehicle_ejb.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - Ejb1 - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicleRemote - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicle - Stateful - Container - - - service/WSAJ2WDLAnonymousTest23001 - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23001 - META-INF/wsdl/AddNumbersService23001.wsdl - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23001 - - - - service/WSAJ2WDLAnonymousTest23002 - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersService23002 - META-INF/wsdl/AddNumbersService23002.wsdl - - com.sun.ts.tests.jaxws.jaxws23.wsa.j2w.document.literal.anonymous.AddNumbersPortType23002 - - - - - - - - - - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - Remote - runTest - - Required - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/build.xml deleted file mode 100644 index 4da190034e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/jaxws23/wsa/j2w/document/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/build.xml deleted file mode 100644 index c5c1bfcf71..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/build.xml deleted file mode 100644 index 5f88a509f3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/build.xml deleted file mode 100644 index 7d25ef937e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/AddressingEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/AddressingEndpointImpl.java deleted file mode 100644 index 6ef960f590..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/AddressingEndpointImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingEndpointImpl.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.bare; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.Addressing; - -@WebService(name = "AddressingEndpoint", serviceName = "AddressingService", targetNamespace = "http://doclitservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.DOCUMENT, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.BARE) -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing -public class AddressingEndpointImpl { - - @jakarta.xml.ws.Action(input = "input1") - public void address1(String s) { - } - - @jakarta.xml.ws.Action(output = "output2") - public String address2() { - return "hello"; - } - - @jakarta.xml.ws.Action(fault = { - @jakarta.xml.ws.FaultAction(className = MyFault1.class, value = "fault1") }) - public String address3(String s) throws MyFault1 { - throw new MyFault1("MyFault1"); - } - - @jakarta.xml.ws.Action(output = "output4", fault = { - @jakarta.xml.ws.FaultAction(className = MyFault1.class, value = "fault1") }) - public String address4() throws MyFault1 { - throw new MyFault1("MyFault1"); - } - - @jakarta.xml.ws.Action(input = "input5", output = "output5", fault = { - @jakarta.xml.ws.FaultAction(className = MyFault1.class, value = "fault1") }) - public String address5(String s) throws MyFault1 { - throw new MyFault1("MyFault1"); - } - - @jakarta.xml.ws.Action(input = "") - public void address6(String s) throws MyFault1 { - } - - @jakarta.xml.ws.Action(output = "") - public String address7() throws MyFault1 { - return "hello"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/Bar.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/Bar.java deleted file mode 100644 index 14cb23bb86..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/Bar.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.bare; - -public class Bar { - - private String bar; - - public Bar() { - } - - public String getBar() { - return bar; - } - - public void setBar(String bar) { - this.bar = bar; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/Client.java deleted file mode 100644 index c401a6d982..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/Client.java +++ /dev/null @@ -1,548 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.bare; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.harness.*; - -import java.util.*; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import com.sun.ts.tests.jaxws.sharedclients.DescriptionClient; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants, SchemaConstants { - /* - * The client. - */ - private DescriptionClient client; - - private DescriptionClient client2; - - /* - * The document. - */ - private Document document; - - /** - * The generated WSDL file. - */ - private static final String WSDLLOC_URL = "j2wdlbare.wsdlloc.1"; - - private static final String WSDLLOC_URL2 = "j2wdlbare.wsdlloc.2"; - - private static final String TSHOME = "ts.home"; - - private String baseURL, wsdlFile, wsdlFile2; - - private String tshome = null; - - private String wsdlFileUrl = null; - - private String wsdlFileUrl2 = null; - - private static final String EXPECTED_TARGETNAMESPACE = "http://doclitservice.org/wsdl"; - - private static final String EXPECTED_PORTTYPE_NAME = "J2WDLSharedEndpoint"; - - private static final String EXPECTED_PORT_NAME = "J2WDLSharedEndpointPort"; - - private static final String EXPECTED_SERVICE_NAME = "J2WDLSharedService"; - - private static final String EXPECTED_ADDRESSING_PORTTYPE_NAME = "AddressingEndpoint"; - - private boolean debug = false; - - // private methods - - private boolean verifyGlobalElement(String prefix, String name) - throws EETest.Fault { - - TestUtil.logMsg("Verifying Global Element " + prefix + ":" + name); - - Document schemaDoc = DescriptionUtils - .getSchemaDocument(client.getDocument(), prefix, tshome + baseURL); - if (schemaDoc != null) { - boolean found = DescriptionUtils.findGlobalElementByName(schemaDoc, name); - if (found) { - TestUtil.logMsg("global element found in schema doc for " + name); - return true; - } else { - TestUtil.logErr("global element not found in schema doc for " + name); - return false; - } - } else { - if (DescriptionUtils.getSchemaElementName(client.getDocument(), - name) != null) { - TestUtil.logMsg("global element found in schema types for " + name); - return true; - } else { - TestUtil.logErr("global element not found in schema types for " + name); - return false; - } - - } - } - - private boolean verifyPrefixNamespace(String prefix) throws EETest.Fault { - - TestUtil.logMsg("Verifying prefix namespace matches targetNamespace"); - - String targetNamespace = DescriptionUtils - .getTargetNamespaceAttr(client.getDocument()); - String namespace = DescriptionUtils - .getNamespaceOfPrefix(client.getDocument(), prefix); - if (namespace == null || targetNamespace == null) { - return false; - } else if (!namespace.equals(targetNamespace)) { - TestUtil.logErr( - "The namespace of global element does not match targetNamespace of WSDL definitions:"); - TestUtil.logErr("Target Namespace=" + targetNamespace); - TestUtil.logErr("Element Namespace=" + namespace); - return false; - } - return true; - } - - /* - * Test entry point. - * - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: ts.home; - */ - public void setup(String[] args, Properties properties) throws Fault { - tshome = properties.getProperty(TSHOME); - try { - wsdlFile = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - } catch (Exception e) { - throw new Fault("Failed getting wsdl prop", e); - } - baseURL = wsdlFile.substring(0, wsdlFile.lastIndexOf("/") + 1); - wsdlFileUrl = "file:" + tshome + wsdlFile; - TestUtil.logMsg("wsdlFileUrl=" + wsdlFileUrl); - client = new DescriptionClient(); - client.setURL(wsdlFileUrl); - try { - wsdlFile2 = JAXWS_Util.getURLFromProp(WSDLLOC_URL2); - } catch (Exception e) { - throw new Fault("Failed getting wsdl prop", e); - } - baseURL = wsdlFile2.substring(0, wsdlFile2.lastIndexOf("/") + 1); - wsdlFileUrl2 = "file:" + tshome + wsdlFile2; - TestUtil.logMsg("wsdlFileUrl2=" + wsdlFileUrl2); - client2 = new DescriptionClient(); - client2.setURL(wsdlFileUrl2); - TestUtil.logMsg("setup ok"); - } - - public void cleanup() { - TestUtil.logMsg("cleanup"); - } - - /* - * @testName: VerifyServiceNameWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3037; - * - * @test_Strategy: Verify the wsdl:service element name is correct in the - * generated WSDL. Conformance requirement done: - service naming - * - */ - public void VerifyServiceNameWithAnnotation() throws Fault { - TestUtil.logMsg("VerifyServiceNameWithAnnotation"); - boolean pass = true; - - TestUtil.logMsg( - "Checking for service name verification of: " + EXPECTED_SERVICE_NAME); - pass = DescriptionUtils.isServiceNameAttr(client.getDocument(), - EXPECTED_SERVICE_NAME); - if (!pass) - throw new Fault("VerifyServiceNameWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyPortTypeNameWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; - * - * @test_Strategy: Verify the wsdl:portType name is correct in the generated - * WSDL. Conformance requirement done: - portType naming - * - * - */ - public void VerifyPortTypeNameWithAnnotation() throws Fault { - TestUtil.logMsg("VerifyPortTypeNameWithAnnotation"); - boolean pass = true; - - TestUtil.logMsg("Checking for portType name verification of: " - + EXPECTED_PORTTYPE_NAME); - pass = DescriptionUtils.isPortTypeNameAttr(client.getDocument(), - EXPECTED_PORTTYPE_NAME); - if (!pass) - throw new Fault("VerifyPortTypeNameWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyPortNameWithoutAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; - * - * @test_Strategy: Verify the wsdl:port name is correct in the generated WSDL. - * Conformance requirement done: - port naming - * - * - */ - public void VerifyPortNameWithoutAnnotation() throws Fault { - TestUtil.logMsg("VerifyPortNameWithoutAnnotation"); - boolean pass = true; - - TestUtil.logMsg( - "Checking for port name verification of: " + EXPECTED_PORT_NAME); - pass = DescriptionUtils.isPortNameAttr(client.getDocument(), - EXPECTED_PORT_NAME); - if (!pass) - throw new Fault("VerifyPortNameWithoutAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyWsdlMessagePartAndAttrStyle - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3026; JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3035; - * JAXWS:SPEC:3033; JAXWS:SPEC:3034; - * - * @test_Strategy: SOAPBinding annotation with style of DOCUMENT, a use of - * LITERAL and a parameterStyle of BARE. Verify each message has a single - * wsdl:part child element that refers, via an element attribute to a global - * element declaration. The namespace name of the input and output global - * elements is the value of the targetNamespace attribute of the WSDL - * definitions element. - * - */ - public void VerifyWsdlMessagePartAndAttrStyle() throws Fault { - TestUtil.logMsg("VerifyWsdlMessagePartAndAttrStyle"); - boolean pass = true; - - TestUtil - .logMsg("Getting all input and output messages for portType operations" - + " in portType " + EXPECTED_PORTTYPE_NAME); - String imessages[] = DescriptionUtils - .getInputMessageNames(client.getDocument(), EXPECTED_PORTTYPE_NAME); - Arrays.sort(imessages); - for (int i = 0; i < imessages.length; i++) - TestUtil.logMsg("input message: " + imessages[i]); - String omessages[] = DescriptionUtils - .getOutputMessageNames(client.getDocument(), EXPECTED_PORTTYPE_NAME); - Arrays.sort(omessages); - for (int i = 0; i < omessages.length; i++) - TestUtil.logMsg("output message: " + omessages[i]); - - Element messages[] = DescriptionUtils.getMessages(client.getDocument()); - for (int i = 0; i < messages.length; i++) { - String messageName = messages[i].getAttribute(WSDL_NAME_ATTR); - TestUtil.logMsg("Checking message: " + messageName); - if (Arrays.binarySearch(imessages, messageName) >= 0 - || Arrays.binarySearch(omessages, messageName) >= 0) { - Element[] parts = DescriptionUtils.getChildElements(messages[i], - WSDL_NAMESPACE_URI, WSDL_PART_LOCAL_NAME); - for (int j = 0; j < parts.length; j++) { - String part = parts[j].getAttribute(WSDL_NAME_ATTR); - String element = parts[j].getAttribute(WSDL_ELEMENT_ATTR); - TestUtil.logMsg(" part=" + part + ", element=" + element); - if (element == null || element.equals("")) { - TestUtil.logErr(" no element attribute for this part"); - pass = false; - } else { - String prefix = element.substring(0, element.indexOf(":")); - String name = element.substring(element.indexOf(":") + 1); - if (!verifyGlobalElement(prefix, name)) - pass = false; - if (!verifyPrefixNamespace(prefix)) - pass = false; - - } - } - } else - TestUtil.logMsg("Skipping message parts checking ..."); - } - - if (!pass) - throw new Fault("VerifyWsdlMessagePartAndAttrStyle failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: ActionFaultActionAndAddressingAnnotationsTest - * - * @assertion_ids: JAXWS:JAVADOC:130; JAXWS:JAVADOC:131; JAXWS:JAVADOC:132; - * JAXWS:JAVADOC:144; JAXWS:SPEC:3043; JAXWS:SPEC:3044; JAXWS:SPEC:3045; - * JAXWS:SPEC:3049; JAXWS:SPEC:3050; JAXWS:SPEC:3051; JAXWS:SPEC:3055; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - * - * @test_Strategy: Verify the Action and FaultAction annotations are correct - * in the generated WSDL. - */ - public void ActionFaultActionAndAddressingAnnotationsTest() throws Fault { - TestUtil.logTrace("ActionFaultActionAndAddressingAnnotationsTest"); - boolean pass = true; - - if (!VerifyBindingHasAddressing()) - pass = false; - if (!VerifyActionFaultAction()) - pass = false; - - if (!pass) - throw new Fault("ActionFaultActionAndAddressingAnnotationsTest failed"); - } - - private boolean VerifyBindingHasAddressing() throws Fault { - TestUtil.logMsg("VerifyBindingHasAddressing"); - boolean pass = false; - - Element[] bindings = DescriptionUtils.getBindings(client2.getDocument()); - TestUtil.logMsg( - "Find wsam:Addressing policys via [wsp:Policy] or [wsp:PolicyReference] tags"); - NodeList policyrefs = bindings[0].getElementsByTagNameNS(WSP_NAMESPACE_URI, - WSP_POLICYREFERENCE_LOCAL_NAME); - Element[] policys = DescriptionUtils.getChildElements(client2.getDocument(), - WSP_NAMESPACE_URI, WSP_POLICY_LOCAL_NAME); - if (policyrefs.getLength() == 0 && policys.length == 0) { - TestUtil.logErr("No wsam:Addressing policy element was found on binding"); - return false; - } - TestUtil.logMsg( - "Search for wsam:Addressing policy element via wsp:PolicyReference tag on binding"); - for (int i = 0; i < policyrefs.getLength(); i++) { - Element element = (Element) policyrefs.item(i); - String uri = element.getAttribute("URI"); - for (int j = 0; j < policys.length; j++) { - NamedNodeMap map = policys[j].getAttributes(); - for (int k = 0; k < map.getLength(); k++) { - Node node = map.item(k); - String nodeValue = "#" + node.getNodeValue(); - if (uri.equals(nodeValue)) { - NodeList list = policys[j].getElementsByTagNameNS( - WSAM_NAMESPACE_URI, WSAM_ADDRESSING_LOCAL_NAME); - Element addressing = (Element) list.item(0); - if (addressing != null) { - pass = true; - TestUtil.logMsg("See if for wsp:Optional attribute exists"); - NamedNodeMap map2 = addressing.getAttributes(); - for (int m = 0; m < map2.getLength(); m++) { - Node node2 = map2.item(m); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR) - && !node2.getNodeValue().equals("true")) { - TestUtil.logErr( - "wsp:Optional attribute should exist and should be true"); - pass = false; - break; - } - } - } - } - } - if (!pass) - break; - } - } - if (!pass) { - TestUtil.logMsg( - "Search for wsam:Addressing policy element via explicit wsp:Policy tag on binding"); - Element addressing = DescriptionUtils.getChildElement(bindings[0], - WSAM_NAMESPACE_URI, WSAM_ADDRESSING_LOCAL_NAME); - if (addressing == null) { - TestUtil - .logErr("No wsam:Addressing policy element was found on binding"); - pass = false; - } else { - pass = true; - TestUtil.logMsg("See if for wsp:Optional attribute exists"); - NamedNodeMap map2 = addressing.getAttributes(); - for (int m = 0; m < map2.getLength(); m++) { - Node node2 = map2.item(m); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR) - && !node2.getNodeValue().equals("true")) { - TestUtil.logErr( - "wsp:Optional attribute should exist and should be true"); - pass = false; - break; - } - } - } - } - return pass; - } - - private boolean VerifyActionFaultAction() throws Fault { - TestUtil.logMsg("VerifyActionFaultAction"); - boolean pass = true; - - TestUtil.logMsg("Checking for operation names for portType: " - + EXPECTED_ADDRESSING_PORTTYPE_NAME); - Element operations[] = DescriptionUtils.getPortTypeOperationNameElements( - client2.getDocument(), EXPECTED_ADDRESSING_PORTTYPE_NAME); - - for (int i = 0; i < operations.length; i++) { - String name = operations[i].getAttribute(WSDL_NAME_ATTR); - TestUtil.logMsg("Operation-> " + name); - - Element input = DescriptionUtils.getChildElement(operations[i], - WSDL_NAMESPACE_URI, WSDL_INPUT_LOCAL_NAME); - Element output = DescriptionUtils.getChildElement(operations[i], - WSDL_NAMESPACE_URI, WSDL_OUTPUT_LOCAL_NAME); - Element fault = DescriptionUtils.getChildElement(operations[i], - WSDL_NAMESPACE_URI, WSDL_FAULT_LOCAL_NAME); - - String iaction = "", oaction = "", faction = ""; - - if (input != null) - iaction = input.getAttributeNS(WSAM_NAMESPACE_URI, - WSAM_ACTION_LOCAL_NAME); - if (output != null) - oaction = output.getAttributeNS(WSAM_NAMESPACE_URI, - WSAM_ACTION_LOCAL_NAME); - if (fault != null) - faction = fault.getAttributeNS(WSAM_NAMESPACE_URI, - WSAM_ACTION_LOCAL_NAME); - - TestUtil.logMsg("iaction=" + iaction); - TestUtil.logMsg("oaction=" + oaction); - TestUtil.logMsg("faction=" + faction); - - if (name.equals("address1")) { - if (iaction.equals("input1") && oaction.equals( - "http://doclitservice.org/wsdl/AddressingEndpoint/address1Response") - && faction.equals("")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - } else if (name.equals("address2")) { - if (iaction.equals( - "http://doclitservice.org/wsdl/AddressingEndpoint/address2Request") - && oaction.equals("output2") && faction.equals("")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - - } else if (name.equals("address3")) { - if (iaction.equals( - "http://doclitservice.org/wsdl/AddressingEndpoint/address3Request") - && oaction.equals( - "http://doclitservice.org/wsdl/AddressingEndpoint/address3Response") - && faction.equals("fault1")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - - } else if (name.equals("address4")) { - if (iaction.equals( - "http://doclitservice.org/wsdl/AddressingEndpoint/address4Request") - && oaction.equals("output4") && faction.equals("fault1")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - - } else if (name.equals("address5")) { - if (iaction.equals("input5") && oaction.equals("output5") - && faction.equals("fault1")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - - } else if (name.equals("address6")) { - if (iaction.equals( - "http://doclitservice.org/wsdl/AddressingEndpoint/address6Request") - && oaction.equals( - "http://doclitservice.org/wsdl/AddressingEndpoint/address6Response") - && faction.equals( - "http://doclitservice.org/wsdl/AddressingEndpoint/address6/Fault/MyFault1")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - - } else if (name.equals("address7")) { - if (iaction.equals( - "http://doclitservice.org/wsdl/AddressingEndpoint/address7Request") - && oaction.equals( - "http://doclitservice.org/wsdl/AddressingEndpoint/address7Response") - && faction.equals( - "http://doclitservice.org/wsdl/AddressingEndpoint/address7/Fault/MyFault1")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - } - } - return pass; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/J2WDLSharedEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/J2WDLSharedEndpointImpl.java deleted file mode 100644 index 6e9304c910..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/J2WDLSharedEndpointImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.bare; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(name = "J2WDLSharedEndpoint", serviceName = "J2WDLSharedService", targetNamespace = "http://doclitservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.DOCUMENT, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.BARE) -public class J2WDLSharedEndpointImpl { - - public void foo(jakarta.xml.ws.Holder fooString) { - } - - public Bar bar(String barString) { - Bar bar = new Bar(); - bar.setBar(barString); - return bar; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/MyFault1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/MyFault1.java deleted file mode 100644 index d8d9f85d70..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/MyFault1.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.bare; - -public class MyFault1 extends Exception { - - public MyFault1(String message) { - super(message); - } - - public MyFault1(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/MyFault2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/MyFault2.java deleted file mode 100644 index be954a606e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/MyFault2.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.bare; - -public class MyFault2 extends Exception { - - public MyFault2(String message) { - super(message); - } - - public MyFault2(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/build.xml deleted file mode 100644 index ac6a9f8c79..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/bare/build.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/build.xml deleted file mode 100644 index b58037c698..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/Client.java deleted file mode 100644 index 97f8f52dc1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/Client.java +++ /dev/null @@ -1,1635 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped; - -import com.sun.ts.lib.util.*; - -import java.util.*; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import com.sun.ts.tests.jaxws.sharedclients.DescriptionClient; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.tests.jaxws.wsi.j2w.NamespaceAttributeVerifier; - -import jakarta.xml.bind.annotation.*; -import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants, SchemaConstants { - /* - * The client. - */ - private DescriptionClient client; - - /* - * The document. - */ - private Document document; - - /** - * The generated WSDL file. - */ - private static final String WSDLLOC_URL = "j2wdlwrapped.wsdlloc.1"; - - private static final String TSHOME = "ts.home"; - - private String baseURL, wsdlFile; - - private String tshome = null; - - private String wsdlFileUrl = null; - - private static final String EXPECTED_TARGETNAMESPACE = "http://doclitservice.org/wsdl"; - - private static final String EXPECTED_PORTTYPE_NAME = "MYJ2WDLSharedEndpoint"; - - private static final String EXPECTED_PORT_NAME = "J2WDLSharedEndpointPort"; - - private static final String EXPECTED_SERVICE_NAME = "J2WDLSharedService"; - - private static final String ONEWAY_METHOD = "oneWayOperation"; - - private static final String TWOWAY_METHOD_WITH_FAULTS = "operationWithHeaderAndHeaderFaultAndFault"; - - private static final String FAULT = "MyFault"; - - private static final String HEADERFAULT = "ConfigHeaderFault"; - - private static final String PARAMETER_RESULT_NAMING_METHOD = "stringOperation"; - - private static final String INPUT_PART_NAME = "ivalue0"; - - private static final String OUTPUT_PART_NAME = "rvalue"; - - private static final String THREE_INPUT_PART_METHOD = "oneTwoThree"; - - private static final String[] EXPECTED_OPERATION_NAMES = { - "arrayOperationFromClient", "getBean", "arrayOperation", - "stringOperation", "stringOperation2", "oneTwoThree", - "holderMethodDefault", "holderMethodInOut", "holderMethodOut", - "helloWorld", "helloWorld2", "oneWayOperation", - "operationWithHeaderAndHeaderFaultAndFault", "hello", "bye", - "methodWithNoReturn", "methodWithNoReturn2", - "operationThatThrowsAFault", }; - - private static final int[][] EXPECTED_PART_COUNTS = { { 1, 1, 0 }, // arrayOperationFromClient - { 1, 1, 0 }, // getBean - { 1, 1, 0 }, // arrayOperation - { 1, 1, 0 }, // stringOperation - { 1, 1, 0 }, // stringOperation2 - { 1, 1, 0 }, // oneTwoThree - { 1, 1, 0 }, // holderMethodDefault - { 1, 1, 0 }, // holderMethodInOut - { 1, 1, 0 }, // holderMethodOut - { 1, 1, 0 }, // helloWorld - { 1, 1, 0 }, // helloWorld2 - { 1, 0, 0 }, // oneWayOperation - { 2, 1, 2 }, // operationWithHeaderAndHeaderFaultAndFault - { 1, 1, 0 }, // hello - { 1, 1, 0 }, // bye - { 1, 1, 0 }, // methodWithNoReturn - { 1, 1, 0 }, // methodWithNoReturn2 - { 1, 1, 1 }, // operationThatThrowsAFault - }; - - private static final String[][] EXPECTED_TYPE_ELEMENT_MAPPINGS = { - { "arrayOperationFromClient", "arrayOperationFromClientResponse", "", "", - "", "" }, // arrayOperationFromClient - { "getBean", "getBeanResponse", "", "", "", "" }, // getBean - { "arrayOperation", "arrayOperationResponse", "", "", "", "" }, // arrayOperation - { "stringOperation", "stringOperationResponse", "", "", "", "" }, // stringOperation - { "myStringOperation", "myStringOperationResponse", "", "", "", "" }, // stringOperation2 - { "oneTwoThree", "oneTwoThreeResponse", "", "", "", "" }, // oneTwoThree - { "holderMethodDefault", "holderMethodDefaultResponse", "", "", "", "" }, // holderMethodDefault - { "holderMethodInOut", "holderMethodInOutResponse", "", "", "", "" }, // holderMethodInOut - { "holderMethodOut", "holderMethodOutResponse", "", "", "", "" }, // holderMethodOut - { "helloWorld", "helloWorldResponse", "", "", "", "" }, // helloWorld - { "helloWorld2", "helloWorld2Response", "", "", "", "" }, // helloWorld2 - { "oneWayOperation", "", "", "", "", "" }, // oneWayOperation - { "operationWithHeaderAndHeaderFaultAndFault", "ConfigHeader", - "operationWithHeaderAndHeaderFaultAndFaultResponse", - "ConfigHeaderFault", "MyFault", "" }, // operationWithHeaderAndHeaderFaultAndFault - { "hello", "helloResponse", "", "", "", "" }, // hello - { "bye", "byeResponse", "", "", "", "" }, // bye - { "methodWithNoReturn", "methodWithNoReturnResponse", "", "", "", "" }, // methodWithNoReturn - { "methodWithNoReturn2", "methodWithNoReturn2Response", "", "", "", "" }, // methodWithNoReturn2 - { "operationThatThrowsAFault", "MyOtherFault", - "operationThatThrowsAFaultResponse", "", "", "" }, // operationThatThrowsAFault - }; - - // For verifying document/wrapped default naming - private static final String DEFAULT_DOCUMENT_WRAPPED_METHOD = "stringOperation"; - - private static final String DEFAULT_STRING_OPERATION_REQUEST = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.jaxws.StringOperation"; - - private static final String DEFAULT_STRING_OPERATION_RESPONSE = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.jaxws.StringOperationResponse"; - - // For verifying document/wrapped customized naming - private static final String CUSTOMIZED_DOCUMENT_WRAPPED_METHOD = "stringOperation2"; - - private static final String CUSTOMIZED_STRING_OPERATION_REQUEST = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.MyStringOperation"; - - private static final String CUSTOMIZED_STRING_OPERATION_RESPONSE = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.MyStringOperationResponse"; - - private static final String JAXB_ANNOTATIONS_TEST1 = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.jaxws.JaxbAnnotationsTest1"; - - private static final String JAXB_ANNOTATIONS_TEST2 = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.jaxws.JaxbAnnotationsTest2"; - - private static final String JAXB_ANNOTATIONS_TEST3 = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.jaxws.JaxbAnnotationsTest3"; - - private static final String JAXB_ANNOTATIONS_TEST4 = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.jaxws.JaxbAnnotationsTest4"; - - private static final String JAXB_ANNOTATIONS_FAULTBEAN = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.jaxws.MyFaultBean"; - - private boolean debug = false; - - Hashtable ht = new Hashtable(); - - Hashtable ht2 = new Hashtable(); - - // private methods here - private boolean ProcessWsdlDocument(Document document) throws Fault { - boolean pass = true; - - // Process wsdl elements (imported wsdl's) - Document[] wsdlDocs = DescriptionUtils.getWsdlDocuments(document, - tshome + baseURL); - if (wsdlDocs != null) { - for (int i = 0; i < wsdlDocs.length; i++) { - TestUtil.logMsg("Process imported wsdl file: " - + wsdlDocs[i].getDocumentElement().getAttribute("WsdlFile")); - wsdlDocs[i].getDocumentElement().removeAttribute("WsdlFile"); - pass = ProcessWsdlDocument(wsdlDocs[i]); - } - } - - // Process wsdl element (If none then we are done) - Element types = DescriptionUtils.getTypes(document); - if (types == null) - return pass; - - // Verify namespaceURI on wsdl elements if any - Element[] schemas = DescriptionUtils.getChildElements(types, null, - WSDL_SCHEMA_LOCAL_NAME); - TestUtil.logMsg("Verify namespaceURI on wsdl elements"); - if (schemas != null) { - for (int i = 0; i < schemas.length; i++) { - String namespaceURI = schemas[i].getNamespaceURI(); - Attr[] attributes = DescriptionUtils.getElementAttributes(schemas[i]); - for (int j = 0; j < attributes.length; j++) { - String aname = attributes[j].getName(); - String avalue = attributes[j].getValue(); - if (aname.startsWith("xmlns:")) { - String aprefix = aname.substring(6, aname.length()); - ht.put(aprefix, avalue); - } - } - - if (!namespaceURI.equals(XSD_NAMESPACE_URI)) { - TestUtil - .logErr("Encountered 'schema' element with invalid namespaceURI '" - + namespaceURI); - pass = false; - } - } - } - - // Verify schema element types defined in wsdl element if any - NodeList list = types.getElementsByTagNameNS(XSD_NAMESPACE_URI, - XSD_ELEMENT_LOCAL_NAME); - TestUtil - .logMsg("Verify schema element types defined in wsdl element"); - if (list.getLength() != 0) { - if (!VerifyElementTypes(list)) - pass = false; - } - - // Process schema elements (imported schema's) - Document[] schemaDocs = DescriptionUtils.getSchemaDocuments(document, - tshome + baseURL); - if (schemaDocs != null) { - for (int i = 0; i < schemaDocs.length; i++) { - TestUtil.logMsg("Process imported schema file: " - + schemaDocs[i].getDocumentElement().getAttribute("SchemaFile")); - schemaDocs[i].getDocumentElement().removeAttribute("SchemaFile"); - pass = ProcessSchemaDocument(schemaDocs[i]); - } - } - - return pass; - } - - private boolean ProcessSchemaDocument(Document document) throws Fault { - boolean pass = true; - - // Process schema elements (imported schema's) - Document[] schemaDocs = DescriptionUtils.getSchemaDocuments(document, - tshome + baseURL); - if (schemaDocs != null) { - for (int i = 0; i < schemaDocs.length; i++) { - TestUtil.logMsg("Process imported schema file: " - + schemaDocs[i].getDocumentElement().getAttribute("SchemaFile")); - schemaDocs[i].getDocumentElement().removeAttribute("SchemaFile"); - pass = ProcessSchemaDocument(schemaDocs[i]); - } - } - - // Verify schema element types defined in imported schema if any - TestUtil.logMsg("Verify schema element types defined in imported schema"); - ht2 = new Hashtable(); - String[] s = DescriptionUtils.getAllPrefixAndNamespace(document); - for (int i = 0; i < s.length; i++) { - String prefix = s[i].substring(0, s[i].indexOf(":")); - String namespace = s[i].substring(s[i].indexOf(":") + 1, s[i].length()); - ht2.put(prefix, namespace); - } - NodeList list = document.getDocumentElement() - .getElementsByTagNameNS(XSD_NAMESPACE_URI, XSD_ELEMENT_LOCAL_NAME); - if (!VerifyElementTypes(list)) - pass = false; - - return pass; - } - - private boolean VerifyElementTypes(NodeList list) { - boolean pass = true; - for (int j = 0; j < list.getLength(); j++) { - boolean ok = false; - Element element = (Element) list.item(j); - String type = element.getAttribute(XSD_TYPE_ATTR); - String name = element.getAttribute(XSD_NAME_ATTR); - String prefix = element.getPrefix(); - String uri = element.getNamespaceURI(); - ht.put(prefix, uri); - if (type.contains(":")) { - prefix = type.substring(0, type.indexOf(":")); - Attr attributes[] = DescriptionUtils.getElementAttributes(element); - for (int k = 0; k < attributes.length; k++) { - String aname = attributes[k].getName(); - String avalue = attributes[k].getValue(); - if (aname.startsWith("xmlns:")) { - String aprefix = aname.substring(6, aname.length()); - ht.put(aprefix, avalue); - if (prefix.equals(aprefix)) { - uri = avalue; - } - } - } - } - // Verify element type and prefix has associated (prefix,namespace) in - // hashtable - TestUtil.logMsg("Verify 'element' name=" + name + " type=" + type - + " prefix=" + prefix); - // Check hashtable prefix's of current element - Enumeration e = ht.keys(); - while (e.hasMoreElements()) { - String cprefix = (String) e.nextElement(); - if (prefix.equals(cprefix)) { - ok = true; - break; - } - } - - // Check hashtable prefix's of document root element - if (!ok) { - e = ht2.keys(); - while (e.hasMoreElements()) { - String cprefix = (String) e.nextElement(); - if (prefix.equals(cprefix)) { - ok = true; - break; - } - } - } - if (!ok) { - TestUtil.logErr( - "Encountered 'element' " + name + " with invalid prefix " + prefix); - pass = false; - } - } - return pass; - } - - private boolean VerifyTypeElementMappings(Element[] iparts, Element[] oparts, - Element[] fparts, String opname) throws Fault { - boolean ok = true; - - if (!PartCountsOk(iparts, oparts, fparts, opname)) - ok = false; - if (!TypesElementsOk(iparts, oparts, fparts, opname)) - ok = false; - - return ok; - } - - private boolean PartCountsOk(Element[] iparts, Element[] oparts, - Element[] fparts, String opname) { - boolean ok = true; - int index, icnt, ocnt, fcnt; - - TestUtil.logMsg("Verify part counts for operation: " + opname); - index = GetIndex(opname); - if (index == -1) { - TestUtil.logErr("Unexpected operation name: " + opname); - ok = false; - } else { - icnt = EXPECTED_PART_COUNTS[index][0]; - ocnt = EXPECTED_PART_COUNTS[index][1]; - fcnt = EXPECTED_PART_COUNTS[index][2]; - if ((iparts == null && icnt != 0) - || (iparts != null && iparts.length != icnt)) { - TestUtil.logErr("Incorrect number of input parts"); - ok = false; - } - if ((oparts == null && ocnt != 0) - || (oparts != null && oparts.length != ocnt)) { - TestUtil.logErr("Incorrect number of output parts"); - ok = false; - } - if ((fparts == null && fcnt != 0) - || (fparts != null && fparts.length != fcnt)) { - TestUtil.logErr("Incorrect number of fault parts"); - ok = false; - } - } - return ok; - } - - private boolean TypesElementsOk(Element[] iparts, Element[] oparts, - Element[] fparts, String opname) { - boolean ok = true; - int index; - - TestUtil.logMsg("Verify types for operation: " + opname); - index = GetIndex(opname); - if (index == -1) { - TestUtil.logErr("Unexpected operation name: " + opname); - ok = false; - } else { - ArrayList alist1 = new ArrayList(); - ArrayList alist2 = new ArrayList(); - String expectedtypes[] = null; - String types[] = null; - String str = null; - for (int i = 0; i < 6; i++) { - if (!EXPECTED_TYPE_ELEMENT_MAPPINGS[index][i].equals("")) - alist1.add(EXPECTED_TYPE_ELEMENT_MAPPINGS[index][i]); - } - if (alist1.size() > 0) - expectedtypes = (String[]) alist1.toArray(new String[alist1.size()]); - if (iparts != null) { - for (int i = 0; i < iparts.length; i++) { - str = iparts[i].getAttribute(XSD_ELEMENT_ATTR); - alist2.add(str.substring(str.indexOf(":") + 1)); - } - } - if (oparts != null) { - for (int i = 0; i < oparts.length; i++) { - str = oparts[i].getAttribute(XSD_ELEMENT_ATTR); - alist2.add(str.substring(str.indexOf(":") + 1)); - } - } - if (fparts != null) { - for (int i = 0; i < fparts.length; i++) { - str = fparts[i].getAttribute(XSD_ELEMENT_ATTR); - alist2.add(str.substring(str.indexOf(":") + 1)); - } - } - if (alist2.size() > 0) - types = (String[]) alist2.toArray(new String[alist2.size()]); - if (!CompareTypesElementsOk(expectedtypes, types, opname)) - ok = false; - } - - return ok; - } - - private int GetIndex(String opname) { - for (int i = 0; i < EXPECTED_OPERATION_NAMES.length; i++) { - if (opname.equals(EXPECTED_OPERATION_NAMES[i])) - return i; - } - return -1; - } - - private boolean CompareTypesElementsOk(String[] expectedtypes, String[] types, - String opname) { - boolean ok = true; - boolean found = false; - - if (expectedtypes == null && types == null) { - ; - } else if (expectedtypes == null && types != null) { - TestUtil.logErr( - "Incorrect number of types: got " + types.length + ", expected null"); - ok = false; - } else if (expectedtypes != null && types == null) { - TestUtil.logErr("Incorrect number of types: got null " + ", expected " - + expectedtypes.length); - ok = false; - } else if (types != null && types.length != expectedtypes.length) { - TestUtil.logErr("Incorrect number of types: got " + types.length - + ", expected " + expectedtypes.length); - ok = false; - } else { - if (types != null) { - for (int i = 0; i < types.length; i++) { - for (int j = 0; j < types.length; j++) { - if (types[i].equals(expectedtypes[j])) - found = true; - } - if (!found) - ok = false; - else - found = false; - } - StringBuffer got = new StringBuffer("[ "); - StringBuffer exp = new StringBuffer("[ "); - for (int i = 0; i < types.length; i++) { - got.append(types[i] + " "); - exp.append(expectedtypes[i] + " "); - } - got.append("]"); - exp.append("]"); - if (!ok) - TestUtil.logErr("Incorrect types: got " + got.toString() - + ", expected " + exp.toString()); - else - TestUtil.logMsg("Types are correct: " + got.toString()); - } - } - return ok; - } - - /* - * Test entry point. - * - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: ts.home; - */ - public void setup(String[] args, Properties properties) throws Fault { - tshome = properties.getProperty(TSHOME); - try { - wsdlFile = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - } catch (Exception e) { - throw new Fault("Failed getting wsdl prop", e); - } - baseURL = wsdlFile.substring(0, wsdlFile.lastIndexOf("/") + 1); - wsdlFileUrl = "file:" + tshome + wsdlFile; - TestUtil.logMsg("wsdlFileUrl=" + wsdlFileUrl); - client = new DescriptionClient(); - client.setURL(wsdlFileUrl); - TestUtil.logMsg("setup ok"); - } - - public void cleanup() { - TestUtil.logMsg("cleanup"); - } - - /* - * @testName: VerifyTargetNamespaceWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; - * - * @test_Strategy: Verify that the targetNamespace in the generated WSDL - * matches the targetNamespace as specified in the jakarta.jws.WebService - * annotation. (Java to WSDL 1.1 Mapping). Conformance requirement done: - - * Package name mapping - * - */ - public void VerifyTargetNamespaceWithAnnotation() throws Fault { - TestUtil.logMsg("VerifyTargetNamespaceWithAnnotation"); - boolean pass = true; - - try { - String targetNamespace = DescriptionUtils - .getTargetNamespaceAttr(client.getDocument()); - TestUtil - .logMsg("Verify that targetNamespace is correct in generated WSDL"); - if (!targetNamespace.equals(EXPECTED_TARGETNAMESPACE)) { - TestUtil.logErr("TargetNamespace is incorrect, expected: " - + EXPECTED_TARGETNAMESPACE + ", got: " + targetNamespace); - pass = false; - } else - TestUtil.logMsg("TargetNamespace is correct: " + targetNamespace); - } catch (Exception e) { - TestUtil.logErr("Caught exception:" + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("VerifyTargetNamespaceWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifySOAPElementNamespaceUseAttributeWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; - * - * @test_Strategy: Verify the namespace and use attributes for all SOAP - * Elements in the generated WSDL (Java to WSDL 1.1 Mapping and BP1.1). - * Conformance requirement done: - verify use attribute of literal for all - * SOAP elements - verify no namespace attribute on all soap:body elements - * - * - */ - public void VerifySOAPElementNamespaceUseAttributeWithAnnotation() - throws Fault { - TestUtil.logMsg("VerifySOAPElementNamespaceUseAttributeWithAnnotation"); - boolean pass = true; - - Document document = client.getDocument(); - TestUtil.logMsg( - "Verify that no namespace and use attribute does exist on soap:body elements"); - NamespaceAttributeVerifier verifier = new NamespaceAttributeVerifier( - document, 2716); - verifier.verify(); - if (!pass) - throw new Fault( - "VerifySOAPElementNamespaceUseAttributeWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifySOAPBindingTransportStyleAttributeWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; - * - * @test_Strategy: Verify the soap:binding transport and style attributes in - * the generated WSDL. (Java to WSDL 1.1 Mapping and BP1.1). Conformance - * requirement done: - SOAP binding support - SOAP binding style required - - * SOAP binding transport required - * - * - */ - public void VerifySOAPBindingTransportStyleAttributeWithAnnotation() - throws Fault { - TestUtil.logMsg("VerifySOAPBindingTransportStyleAttributeWithAnnotation"); - boolean pass = true; - - Document document = client.getDocument(); - TestUtil.logMsg("Verify soap:binding transport and style attribute"); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - if (debug) - DescriptionUtils.dumpDOMNodes(bindings[i]); - Element soapBinding = DescriptionUtils.getChildElement(bindings[i], - SOAP_NAMESPACE_URI, SOAP_BINDING_LOCAL_NAME); - if (soapBinding == null) { - TestUtil.logErr("soap:binding is null unexpected"); - pass = false; - } else { - String style = soapBinding.getAttribute(SOAP_STYLE_ATTR); - if (!style.equals(SOAP_DOCUMENT)) { - TestUtil.logErr("soap:binding style attribute incorrect, expected: " - + SOAP_DOCUMENT + ", got: " + style); - pass = false; - } else - TestUtil.logMsg("soap:binding style attribute is correct: " + style); - String transport = soapBinding.getAttribute(SOAP_TRANSPORT_ATTR); - if (!transport.equals(SOAP_TRANSPORT)) { - TestUtil - .logErr("soap:binding transport attribute incorrect, expected: " - + SOAP_TRANSPORT + ", got: " + transport); - pass = false; - } else - TestUtil.logMsg( - "soap:binding transport attribute is correct: " + transport); - } - } - if (!pass) - throw new Fault( - "VerifySOAPBindingTransportStyleAttributeWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyPortTypeNameWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; - * - * @test_Strategy: Verify the wsdl:portType name is correct in the generated - * WSDL. Conformance requirement done: - portType naming - * - * - */ - public void VerifyPortTypeNameWithAnnotation() throws Fault { - TestUtil.logMsg("VerifyPortTypeNameWithAnnotation"); - boolean pass = true; - - TestUtil.logMsg("Checking for portType name verification of: " - + EXPECTED_PORTTYPE_NAME); - pass = DescriptionUtils.isPortTypeNameAttr(client.getDocument(), - EXPECTED_PORTTYPE_NAME); - if (!pass) - throw new Fault("VerifyPortTypeNameWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyServiceNameWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3037; - * - * @test_Strategy: Verify the wsdl:service element name is correct in the - * generated WSDL. Conformance requirement done: - service naming - * - */ - public void VerifyServiceNameWithAnnotation() throws Fault { - TestUtil.logMsg("VerifyServiceNameWithAnnotation"); - boolean pass = true; - - TestUtil.logMsg( - "Checking for service name verification of: " + EXPECTED_SERVICE_NAME); - pass = DescriptionUtils.isServiceNameAttr(client.getDocument(), - EXPECTED_SERVICE_NAME); - if (!pass) - throw new Fault("VerifyServiceNameWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyPortNameWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; - * - * @test_Strategy: Verify the wsdl:port name is correct in the generated WSDL. - * Conformance requirement done: - port naming - * - * - */ - public void VerifyPortNameWithAnnotation() throws Fault { - TestUtil.logMsg("VerifyPortNameWithAnnotation"); - boolean pass = true; - - TestUtil.logMsg( - "Checking for port name verification of: " + EXPECTED_PORT_NAME); - pass = DescriptionUtils.isPortNameAttr(client.getDocument(), - EXPECTED_PORT_NAME); - if (!pass) - throw new Fault("VerifyPortNameWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyOperationNames - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3010; JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; - * JAXWS:SPEC:3033; JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:3003; - * JAXWS:SPEC:7004; JAXWS:SPEC:7005; - * - * @test_Strategy: Verify wsdl:portType operation names are correct in the - * generated WSDL. Verify all public method mapping to wsdl:operation - * elements. Conformance requirement done: - Inheritance flattening - - * Operation naming - Method name disambiguation - * - * - */ - public void VerifyOperationNames() throws Fault { - TestUtil.logMsg("VerifyOperationNames"); - boolean pass = true; - - TestUtil.logMsg( - "Checking for operation names for portType: " + EXPECTED_PORTTYPE_NAME); - String opNames[] = DescriptionUtils.getPortTypeOperationNames( - client.getDocument(), EXPECTED_PORTTYPE_NAME); - if (opNames.length == EXPECTED_OPERATION_NAMES.length) - TestUtil.logMsg("operation name count is as expected: " - + EXPECTED_OPERATION_NAMES.length); - else { - pass = false; - TestUtil.logErr("operation count expected: " - + EXPECTED_OPERATION_NAMES.length + ", received: " + opNames.length); - } - int cnt = 0; - for (int i = 0; i < opNames.length; i++) { - boolean found = false; - for (int j = 0; j < EXPECTED_OPERATION_NAMES.length; j++) { - if (opNames[i].equals(EXPECTED_OPERATION_NAMES[j])) { - found = true; - cnt++; - TestUtil.logMsg("Matched operation name ... " + opNames[i]); - break; - } - } - if (!found) { - TestUtil.logErr("UnMatched operation name: " + opNames[i]); - pass = false; - } - } - if (cnt == EXPECTED_OPERATION_NAMES.length) - TestUtil.logMsg("All operation names matched expected ..."); - - if (!pass) - throw new Fault("VerifyOperationNames failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyOneWayAndTwoWayOperations - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3011; JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; - * JAXWS:SPEC:3033; JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:3014; - * - * @test_Strategy: Verify operations are correctly identifed as OneWay or - * TwoWay. Conformance requirement done: - One-way mapping - Two-way mapping - - * Two-way mapping with faults - Method and parameters where expected in both - * wsdl:portType and wsdl:binding - * - * - */ - public void VerifyOneWayAndTwoWayOperations() throws Fault { - TestUtil.logMsg("VerifyOneWayAndTwoWayOperations"); - boolean pass = true; - - TestUtil.logMsg( - "Checking for operation names for portType: " + EXPECTED_PORTTYPE_NAME); - Element operations[] = DescriptionUtils.getPortTypeOperationNameElements( - client.getDocument(), EXPECTED_PORTTYPE_NAME); - for (int i = 0; i < operations.length; i++) { - String name = operations[i].getAttribute(WSDL_NAME_ATTR); - Element e = DescriptionUtils - .getBindingOperationNameElement(client.getDocument(), name); - if (name.equals(ONEWAY_METHOD)) { - TestUtil - .logMsg("Checking for one way operation for operation: " + name); - TestUtil.logMsg("verify in portType operation ..."); - if (DescriptionUtils.isOneWay(operations[i])) - TestUtil.logMsg("is One way"); - else { - TestUtil.logErr("is not One way"); - pass = false; - } - TestUtil.logMsg("verify in binding operation ..."); - if (DescriptionUtils.isOneWay(e)) - TestUtil.logMsg("is One way"); - else { - TestUtil.logErr("is not One way"); - pass = false; - } - } else { - TestUtil - .logMsg("Checking for two way operation for operation: " + name); - TestUtil.logMsg("verify in portType operation ..."); - if (DescriptionUtils.isTwoWay(operations[i])) - TestUtil.logMsg("is Two way"); - else { - TestUtil.logErr("is not Two way"); - pass = false; - } - TestUtil.logMsg("verify in binding operation ..."); - if (DescriptionUtils.isTwoWay(e)) - TestUtil.logMsg("is Two way"); - else { - TestUtil.logErr("is not Two way"); - pass = false; - } - if (name.equals(TWOWAY_METHOD_WITH_FAULTS)) { - TestUtil.logMsg("Checking for faults for operation: " + name); - TestUtil.logMsg("Expected faults are: " + FAULT + "," + HEADERFAULT); - TestUtil.logMsg("verify in portType operation ..."); - if (DescriptionUtils.hasFault(operations[i], FAULT) - && DescriptionUtils.hasFault(operations[i], HEADERFAULT)) - TestUtil.logMsg("fault match"); - else { - TestUtil.logErr("fault mismatch, did not get expected faults: " - + FAULT + "," + HEADERFAULT); - pass = false; - } - TestUtil.logMsg("verify in binding operation ..."); - if (DescriptionUtils.hasFault(e, FAULT) - && DescriptionUtils.hasFault(e, HEADERFAULT)) - TestUtil.logMsg("fault match"); - else { - TestUtil.logErr("fault mismatch, did not get expected faults: " - + FAULT + "," + HEADERFAULT); - pass = false; - } - } - } - } - if (!pass) - throw new Fault("VerifyOneWayAndTwoWayOperations failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyParameterAndResultNaming - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:3017; JAXWS:SPEC:3018; - * - * @test_Strategy: Verify use of annotations to name parameters and results. - * Conformance requirement done: - Parameter naming - Result naming - * - * - */ - public void VerifyParameterAndResultNaming() throws Fault { - TestUtil.logMsg("VerifyParameterAndResultNaming"); - boolean pass = true; - - Document document = client.getDocument(); - - TestUtil - .logMsg("Checking for operation name " + PARAMETER_RESULT_NAMING_METHOD - + " in portType " + EXPECTED_PORTTYPE_NAME); - Element operation = DescriptionUtils.getPortTypeOperationNameElement( - document, EXPECTED_PORTTYPE_NAME, PARAMETER_RESULT_NAMING_METHOD); - Element input = DescriptionUtils.getChildElement(operation, - WSDL_NAMESPACE_URI, WSDL_INPUT_LOCAL_NAME); - Element output = DescriptionUtils.getChildElement(operation, - WSDL_NAMESPACE_URI, WSDL_OUTPUT_LOCAL_NAME); - String imsg = input.getAttribute(WSDL_MESSAGE_ATTR); - String omsg = output.getAttribute(WSDL_MESSAGE_ATTR); - int iidx = imsg.indexOf(":"); - int oidx = omsg.indexOf(":"); - String imessage, omessage; - if (iidx != -1) { - imessage = imsg.substring(iidx + 1); - omessage = omsg.substring(oidx + 1); - } else { - imessage = imsg; - omessage = omsg; - } - TestUtil.logMsg("input message name is " + imessage); - TestUtil.logMsg("output message name is " + omessage); - Element ipart = DescriptionUtils.getPartElement(document, imessage); - String ielement = ipart.getAttribute(WSDL_ELEMENT_ATTR); - String ielementName = ielement; - if (ielementName.indexOf(":") >= 0) { - ielementName = ielementName.substring(ielementName.indexOf(":") + 1, - ielementName.length()); - } - String iprefix = ielement.substring(0, ielement.indexOf(":")); - Element opart = DescriptionUtils.getPartElement(document, omessage); - String oelement = opart.getAttribute(WSDL_ELEMENT_ATTR); - String oelementName = oelement; - if (oelementName.indexOf(":") >= 0) { - oelementName = oelementName.substring(oelementName.indexOf(":") + 1, - oelementName.length()); - } - String oprefix = oelement.substring(0, oelement.indexOf(":")); - TestUtil.logMsg("input prefix " + iprefix); - TestUtil.logMsg("output prefix " + oprefix); - - Document schemaDoc = null; - NodeList list = null; - - // Search first types section of WSDL to see if element declared there - // else look in schema imports as below. - Element element = DescriptionUtils.getSchemaElementName(document, - ielementName); - String type = null; - Element complexType = null; - if (element != null) { - type = element.getAttribute(WSDL_TYPE_ATTR); - if (type.indexOf(":") != -1) - type = type.substring(type.indexOf(":") + 1, type.length()); - complexType = DescriptionUtils.getSchemaComplexTypeName(document, type); - if (complexType != null) - list = complexType.getElementsByTagNameNS(XSD_NAMESPACE_URI, - XSD_ELEMENT_LOCAL_NAME); - } else { - element = DescriptionUtils.getSchemaElementName(document, ielementName); - if (element != null) { - type = element.getAttribute(WSDL_TYPE_ATTR); - if (type.indexOf(":") != -1) - type = type.substring(type.indexOf(":") + 1, type.length()); - complexType = DescriptionUtils.getSchemaComplexTypeName(document, type); - if (complexType != null) - list = complexType.getElementsByTagNameNS(XSD_NAMESPACE_URI, - XSD_ELEMENT_LOCAL_NAME); - } else - type = ielementName; - // Find complex type of imessage in schema and element name matches - schemaDoc = DescriptionUtils.getSchemaDocument(document, iprefix, - tshome + baseURL); - if (schemaDoc != null) { - complexType = DescriptionUtils.getNamedChildElement( - schemaDoc.getDocumentElement(), XSD_NAMESPACE_URI, - XSD_COMPLEXTYPE_LOCAL_NAME, type); - if (complexType != null) - list = complexType.getElementsByTagNameNS(XSD_NAMESPACE_URI, - XSD_ELEMENT_LOCAL_NAME); - } - } - String ipartName = null; - if (list != null) { - if (list.getLength() == 1) { - Element e = (Element) list.item(0); - ipartName = e.getAttribute(XSD_NAME_ATTR); - } - } - TestUtil.logMsg("ipartName=" + ipartName); - - element = DescriptionUtils.getSchemaElementName(document, oelementName); - list = null; - if (element != null) { - type = element.getAttribute(WSDL_TYPE_ATTR); - if (type.indexOf(":") != -1) - type = type.substring(type.indexOf(":") + 1, type.length()); - complexType = DescriptionUtils.getSchemaComplexTypeName(document, type); - if (complexType != null) - list = complexType.getElementsByTagNameNS(XSD_NAMESPACE_URI, - XSD_ELEMENT_LOCAL_NAME); - } else { - element = DescriptionUtils.getSchemaElementName(document, oelementName); - if (element != null) { - type = element.getAttribute(WSDL_TYPE_ATTR); - if (type.indexOf(":") != -1) - type = type.substring(type.indexOf(":") + 1, type.length()); - complexType = DescriptionUtils.getSchemaComplexTypeName(document, type); - if (complexType != null) - list = complexType.getElementsByTagNameNS(XSD_NAMESPACE_URI, - XSD_ELEMENT_LOCAL_NAME); - } else - type = oelementName; - // Find complex type of omessage in schema and element name matches - if (!oprefix.equals(iprefix)) - schemaDoc = DescriptionUtils.getSchemaDocument(document, oprefix, - tshome + baseURL); - if (schemaDoc != null) { - complexType = DescriptionUtils.getNamedChildElement( - schemaDoc.getDocumentElement(), XSD_NAMESPACE_URI, - XSD_COMPLEXTYPE_LOCAL_NAME, omessage); - if (complexType != null) - list = complexType.getElementsByTagNameNS(XSD_NAMESPACE_URI, - XSD_ELEMENT_LOCAL_NAME); - } - } - String opartName = null; - if (list != null) { - if (list.getLength() == 1) { - Element e = (Element) list.item(0); - opartName = e.getAttribute(XSD_NAME_ATTR); - } - } - TestUtil.logMsg("opartName=" + opartName); - - // Check that both annotated input and output arguments are correctly named - // in wsdl. - if (ipartName != null) { - if (ipartName.equals(INPUT_PART_NAME)) - TestUtil.logMsg("Parameter naming passed, expected: " + INPUT_PART_NAME - + ", received: " + ipartName); - else { - TestUtil.logErr("Parameter naming failed, expected: " + INPUT_PART_NAME - + ", received: " + ipartName); - pass = false; - } - } else { - TestUtil.logMsg("Failed to find partName of " + INPUT_PART_NAME); - pass = false; - } - - if (opartName != null) { - if (opartName.equals(OUTPUT_PART_NAME)) - TestUtil.logMsg("Result naming passed, expected: " + OUTPUT_PART_NAME - + ", received: " + opartName); - else { - TestUtil.logErr("Result naming failed, expected: " + OUTPUT_PART_NAME - + ", received: " + opartName); - pass = false; - } - } else { - TestUtil.logMsg("Failed to find partName of " + OUTPUT_PART_NAME); - pass = false; - } - - if (!pass) - throw new Fault("VerifyParameterAndResultNaming failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyWsdlMessagePartAndAttrStyle - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; - * - * @test_Strategy: Verify each message has a single wsdl:part child element - * that refers, via an element attribute to a named type declaration. - * Conformance requirement done: - A single wsdl:part child element that - * refers, via an element attribute, to a global element declaration in the - * wsdl:types section. - * - */ - public void VerifyWsdlMessagePartAndAttrStyle() throws Fault { - TestUtil.logMsg("VerifyWsdlMessagePartAndAttrStyle"); - boolean pass = true; - - TestUtil - .logMsg("Getting all input and output messages for portType operations" - + " in portType " + EXPECTED_PORTTYPE_NAME); - String imessages[] = DescriptionUtils - .getInputMessageNames(client.getDocument(), EXPECTED_PORTTYPE_NAME); - Arrays.sort(imessages); - for (int i = 0; i < imessages.length; i++) - TestUtil.logMsg("input message: " + imessages[i]); - String omessages[] = DescriptionUtils - .getOutputMessageNames(client.getDocument(), EXPECTED_PORTTYPE_NAME); - Arrays.sort(omessages); - for (int i = 0; i < omessages.length; i++) - TestUtil.logMsg("output message: " + omessages[i]); - - // Header parts are not checked but filtered out - String headerParts[] = DescriptionUtils - .getSoapHeaderElementsPartAttr(client.getDocument()); - for (int i = 0; i < headerParts.length; i++) - TestUtil.logMsg("part=" + headerParts[i]); - - Element messages[] = DescriptionUtils.getMessages(client.getDocument()); - for (int i = 0; i < messages.length; i++) { - String messageName = messages[i].getAttribute(WSDL_NAME_ATTR); - TestUtil.logMsg("Checking message: " + messageName); - if (Arrays.binarySearch(imessages, messageName) >= 0 - || Arrays.binarySearch(omessages, messageName) >= 0) { - Element[] parts = DescriptionUtils.getChildElements(messages[i], - WSDL_NAMESPACE_URI, WSDL_PART_LOCAL_NAME); - if (parts.length == 0) { - TestUtil.logErr(" no parts exist for message " + messageName); - pass = false; - continue; - } else - TestUtil.logMsg( - " check that element attribute exists for all its message parts ..."); - int partCnt = 0; - for (int j = 0; j < parts.length; j++) { - String part = parts[j].getAttribute(WSDL_NAME_ATTR); - String element = parts[j].getAttribute(WSDL_ELEMENT_ATTR); - String type = parts[j].getAttribute(WSDL_TYPE_ATTR); - TestUtil.logMsg( - " part=" + part + ", element=" + element + ", type=" + type); - boolean isHeader = false; - for (int k = 0; k < headerParts.length; k++) { - if (part.equals(headerParts[k])) { - isHeader = true; - TestUtil.logMsg(" not counting this as a part"); - break; - } else - partCnt++; - } - if (element == null || element.equals("")) { - TestUtil.logErr(" no element attribute for this part"); - pass = false; - } - if (type != null && !type.equals("")) { - TestUtil.logErr(" a type attribute exists for this part"); - pass = false; - } - } - TestUtil.logMsg("message: " + messageName + ", parts: " + partCnt); - if (partCnt > 1) { - TestUtil.logMsg( - " more than a single part exists for this message which is not a header"); - pass = false; - } - } else - TestUtil.logMsg("Skipping message parts checking ..."); - } - - if (!pass) - throw new Fault("VerifyWsdlMessagePartAndAttrStyle failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyWsdlPartNamesAndMessageNamesForMessages - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:3057; JAXWS:JAVADOC:214; - * JAXWS:JAVADOC:215; JAXWS:JAVADOC:221; - * - * @test_Strategy: Verify the wsdl:part names for each input and output - * message Conformance requirement done: - (Default Wrapper wsdl:part names): - * The name of wsdl:part for the wrapper must be named as "parameters" for - * input messages in the generated WSDL. If a SEI method doesn't have any - * header parameters or return type, then the name of wsdl:part for the - * wrapper must be named as "parameters" for output messages in the generated - * WSDL, otherwise it would be named as "result". - (Customizing Wrapper - * wsdl:part names): Non-default partName values of the - * jakarta.xml.ws.RequestWrapper and jakarta.xml.ws.ResponseWrapper annotations, - * if specified on SEI method, MUST be used as wsdl:part name for input and - * output messages respectively in the generated WSDL. - (wsdl:message naming - * using WebFault): If an exception has @WebFault, then messageName MUST be - * the name of the corresponding wsdl:message element - (wsdl:message naming): - * In the absence of customizations, the name of the wsdl:message element MUST - * be the name of the Java exception. - */ - public void VerifyWsdlPartNamesAndMessageNamesForMessages() throws Fault { - TestUtil.logMsg("VerifyWsdlPartNamesAndMessageNamesForMessages"); - boolean pass = true; - - TestUtil - .logMsg("Getting all input and output messages for portType operations" - + " in portType " + EXPECTED_PORTTYPE_NAME); - String imessages[] = DescriptionUtils - .getInputMessageNames(client.getDocument(), EXPECTED_PORTTYPE_NAME); - Arrays.sort(imessages); - for (int i = 0; i < imessages.length; i++) - TestUtil.logMsg("input message: " + imessages[i]); - String omessages[] = DescriptionUtils - .getOutputMessageNames(client.getDocument(), EXPECTED_PORTTYPE_NAME); - Arrays.sort(omessages); - for (int i = 0; i < omessages.length; i++) - TestUtil.logMsg("output message: " + omessages[i]); - String fmessages[] = DescriptionUtils - .getFaultMessageNames(client.getDocument(), EXPECTED_PORTTYPE_NAME); - Arrays.sort(fmessages); - for (int i = 0; i < fmessages.length; i++) - TestUtil.logMsg("fault message: " + fmessages[i]); - - // Header parts are not checked but filtered out - String headerParts[] = DescriptionUtils - .getSoapHeaderElementsPartAttr(client.getDocument()); - - Element messages[] = DescriptionUtils.getMessages(client.getDocument()); - for (int i = 0; i < messages.length; i++) { - String messageName = messages[i].getAttribute(WSDL_NAME_ATTR); - TestUtil.logMsg("Checking partname for message: " + messageName); - if (Arrays.binarySearch(imessages, messageName) >= 0 - || Arrays.binarySearch(omessages, messageName) >= 0) { - Element[] parts = DescriptionUtils.getChildElements(messages[i], - WSDL_NAMESPACE_URI, WSDL_PART_LOCAL_NAME); - if (parts.length == 0) { - TestUtil.logErr(" no parts exist for message " + messageName); - pass = false; - continue; - } - int partCnt = 0; - String partname = null; - String previousPartname = null; - for (int j = 0; j < parts.length; j++) { - previousPartname = partname; - partname = parts[j].getAttribute(WSDL_NAME_ATTR); - boolean isHeader = false; - for (int k = 0; k < headerParts.length; k++) { - if (partname.equals(headerParts[k])) { - isHeader = true; - partname = previousPartname; - break; - } else - partCnt++; - } - } - if (partCnt > 1) { - TestUtil.logMsg( - " more than a single part exists for this message which is not a header"); - pass = false; - } - String expectedPartname = "parameters"; - if (messageName.contains("Response")) { - if (messageName - .equals("operationWithHeaderAndHeaderFaultAndFaultResponse")) - expectedPartname = "result"; - if (messageName.equals("methodWithNoReturn2Response")) - expectedPartname = "response"; - if (!partname.equals(expectedPartname)) { - TestUtil.logErr(" partname is <" + partname + "> expected <" - + expectedPartname + ">"); - pass = false; - } else { - TestUtil - .logMsg(" partname is expected <" + expectedPartname + ">"); - } - } else { - if (messageName.equals("methodWithNoReturn2")) - expectedPartname = "request"; - if (!partname.equals(expectedPartname)) { - TestUtil.logErr(" partname is <" + partname + "> expected: <" - + expectedPartname + ">"); - pass = false; - } else { - TestUtil - .logMsg(" partname is expected <" + expectedPartname + ">"); - } - } - } - } - for (int i = 0; i < fmessages.length; i++) { - TestUtil.logMsg("Checking fault message: " + fmessages[i]); - if (!fmessages[i].equals("ConfigHeaderFault") - && !fmessages[i].equals("MyFault") - && !fmessages[i].equals("YesItsMyOtherFault")) { - TestUtil.logErr(" fault message name is <" + fmessages[i] - + "> expected "); - pass = false; - } - } - - if (!pass) - throw new Fault("VerifyWsdlPartNamesAndMessageNamesForMessages failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifySchemaNamespacesImportsElementsAndTypes - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; - * - * @test_Strategy: Verify schema namespace, schema imports, schema element - * types. - * - */ - public void VerifySchemaNamespacesImportsElementsAndTypes() throws Fault { - TestUtil.logMsg("VerifySchemaNamespacesImportsElementsAndTypes"); - boolean pass = true; - - pass = ProcessWsdlDocument(client.getDocument()); - if (!pass) - throw new Fault("VerifySchemaNamespacesImportsElementsAndTypes failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyDocumentWrapped - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3024; JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; - * JAXWS:SPEC:3033; JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:3025; - * JAXWS:SPEC:2037; JAXWS:SPEC:3021; JAXWS:SPEC:3022; - * - * @test_Strategy: Verify document wrapped style for generated classes - * Conformance requirement done: - Default wrapper bean names - Default - * wrapper bean package - Default Customized wrapper bean names - * - * - */ - public void VerifyDocumentWrapped() throws Fault { - TestUtil.logMsg("VerifyDocumentWrapped"); - boolean pass = true; - - TestUtil.logMsg("Checking for default document/literal wrapped bean names " - + "for method " + DEFAULT_DOCUMENT_WRAPPED_METHOD); - try { - TestUtil - .logMsg("Loading wrapper bean " + DEFAULT_STRING_OPERATION_REQUEST); - Class c = Class.forName(DEFAULT_STRING_OPERATION_REQUEST); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - try { - TestUtil - .logMsg("Loading wrapper bean " + DEFAULT_STRING_OPERATION_RESPONSE); - Class c = Class.forName(DEFAULT_STRING_OPERATION_RESPONSE); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - TestUtil - .logMsg("Checking for customized document/literal wrapped bean names " - + "for method " + CUSTOMIZED_DOCUMENT_WRAPPED_METHOD); - try { - TestUtil.logMsg( - "Loading wrapper bean " + CUSTOMIZED_STRING_OPERATION_REQUEST); - Class c = Class.forName(CUSTOMIZED_STRING_OPERATION_REQUEST); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - try { - TestUtil.logMsg( - "Loading wrapper bean " + CUSTOMIZED_STRING_OPERATION_RESPONSE); - Class c = Class.forName(CUSTOMIZED_STRING_OPERATION_RESPONSE); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - if (!pass) - throw new Fault("VerifyDocumentWrapped failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyInputOutputReturnAndFaultTypeElementMappings - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:3058; - * - * @test_Strategy: Verify that the Java types for all in, out, in/out - * parameter's and return value's are mapped to named XML Schema types using - * the mapping defined in JAXB. Conformance requirement done: - Each method - * parameter and return type is mapped to a valid XML schema type - Exception - * naming: In the absence of customizations, the name of the wsdl:message - * element MUST be the name of the Java exception - * - */ - public void VerifyInputOutputReturnAndFaultTypeElementMappings() - throws Fault { - TestUtil.logMsg("VerifyInputOutputReturnAndFaultTypeElementMappings"); - boolean pass = true; - - TestUtil.logMsg( - "Get all operation elements for portType: " + EXPECTED_PORTTYPE_NAME); - Element operations[] = DescriptionUtils.getPortTypeOperationNameElements( - client.getDocument(), EXPECTED_PORTTYPE_NAME); - for (int i = 0; i < operations.length; i++) { - String opname = operations[i].getAttribute(WSDL_NAME_ATTR); - Element input = DescriptionUtils.getChildElement(operations[i], - WSDL_NAMESPACE_URI, WSDL_INPUT_LOCAL_NAME); - Element output = DescriptionUtils.getChildElement(operations[i], - WSDL_NAMESPACE_URI, WSDL_OUTPUT_LOCAL_NAME); - Element fault[] = DescriptionUtils.getChildElements(operations[i], - WSDL_NAMESPACE_URI, WSDL_FAULT_LOCAL_NAME); - String imsg = null; - String omsg = null; - String fmsg[] = null; - String imsgstr = null; - String omsgstr = null; - String fmsgstr[] = null; - ArrayList alist1 = new ArrayList(); - ArrayList alist2 = new ArrayList(); - if (input != null) { - imsg = input.getAttribute(WSDL_MESSAGE_ATTR); - imsgstr = imsg.substring(imsg.indexOf(":") + 1); - } - if (output != null) { - omsg = output.getAttribute(WSDL_MESSAGE_ATTR); - omsgstr = omsg.substring(omsg.indexOf(":") + 1); - } - if (fault != null) { - for (int k = 0; k < fault.length; k++) { - String str1 = fault[k].getAttribute(WSDL_MESSAGE_ATTR); - alist1.add(str1); - String str2 = str1.substring(str1.indexOf(":") + 1); - alist2.add(str2); - } - if (alist1.size() > 0) - fmsg = (String[]) alist1.toArray(new String[alist1.size()]); - if (alist2.size() > 0) - fmsgstr = (String[]) alist2.toArray(new String[alist2.size()]); - } - TestUtil.logMsg("operation name is " + opname); - TestUtil.logMsg("input message name is " + imsgstr); - TestUtil.logMsg("output message name is " + omsgstr); - if (fmsgstr == null) - TestUtil.logMsg("fault message name is null"); - else { - for (int k = 0; k < fmsgstr.length; k++) - TestUtil.logMsg("fault message name is " + fmsgstr[k]); - } - Element[] iparts = null; - Element[] oparts = null; - Element[] fparts = null; - if (imsgstr != null) { - iparts = DescriptionUtils.getPartElements(client.getDocument(), - imsgstr); - } - if (omsgstr != null) { - oparts = DescriptionUtils.getPartElements(client.getDocument(), - omsgstr); - } - if (fmsgstr != null) { - Element[] parts = null; - ArrayList alist = new ArrayList(); - for (int k = 0; k < fmsgstr.length; k++) { - parts = DescriptionUtils.getPartElements(client.getDocument(), - fmsgstr[k]); - if (parts != null) { - for (int l = 0; l < parts.length; l++) - alist.add(parts[l]); - } - } - if (alist.size() > 0) - fparts = (Element[]) alist.toArray(new Element[alist.size()]); - } - if (!VerifyTypeElementMappings(iparts, oparts, fparts, opname)) - pass = false; - } - if (!pass) - throw new Fault( - "VerifyInputOutputReturnAndFaultTypeElementMappings failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyJAXBMappingsTest - * - * @assertion_ids: JAXWS:SPEC:2088; JAXWS:SPEC:2084; JAXWS:SPEC:2085; - * JAXWS:SPEC:3052; JAXWS:SPEC:3054; JAXWS:SPEC:3057; - * - * @test_Strategy: Verify that the JAXBMappings are generated - * - */ - public void VerifyJAXBMappingsTest() throws Fault { - TestUtil.logMsg("JAXBMappingsTest"); - boolean pass = true; - - // Load generated JAXB JavaBean Object for each type - try { - TestUtil.logMsg("Loading wrapper bean " + JAXB_ANNOTATIONS_TEST1); - Class c = Class.forName(JAXB_ANNOTATIONS_TEST1); - if (!AnnotationUtils.isAnnotationOnFieldPresent(c, "xmljavatypeadapter", - jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter.class)) { - TestUtil.logErr( - "jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter not present for field (xmljavatypeadapter)"); - pass = false; - } - XmlJavaTypeAdapter a = (XmlJavaTypeAdapter) AnnotationUtils - .getAnnotationOnField(c, "xmljavatypeadapter", - jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter.class); - String type = a.value().getName(); - if (type.equals("jakarta.xml.bind.annotation.adapters.HexBinaryAdapter")) - TestUtil.logMsg("XmlJavaTypeAdapter value is of expected type: " - + "jakarta.xml.bind.annotation.adapters.HexBinaryAdapter"); - else - TestUtil - .logErr("XmlJavaTypeAdapter value is of unexpected type: " + type); - - XmlElement x = (XmlElement) AnnotationUtils.getAnnotationOnField(c, - "xmljavatypeadapter", jakarta.xml.bind.annotation.XmlElement.class); - if (!AnnotationUtils.verifyXmlElement(x, "xmljavatypeadapter", "foo", - true, true)) - pass = false; - - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - try { - TestUtil.logMsg("Loading wrapper bean " + JAXB_ANNOTATIONS_TEST2); - Class c = Class.forName(JAXB_ANNOTATIONS_TEST2); - if (!AnnotationUtils.isAnnotationOnFieldPresent(c, "xmlmimetype", - jakarta.xml.bind.annotation.XmlMimeType.class)) { - TestUtil.logErr( - "jakarta.xml.bind.annotation.XmlMimeType not present for field (xmlmimetype)"); - pass = false; - } - XmlMimeType a = (XmlMimeType) AnnotationUtils.getAnnotationOnField(c, - "xmlmimetype", jakarta.xml.bind.annotation.XmlMimeType.class); - String type = a.value(); - if (type.equals("application/octet-stream")) - TestUtil.logMsg("XmlMimeType value is of expected type: " - + "application/octet-stream"); - else - TestUtil.logErr("XmlMimeType value is of unexpected type: " + type); - - XmlElement x = (XmlElement) AnnotationUtils.getAnnotationOnField(c, - "xmlmimetype", jakarta.xml.bind.annotation.XmlElement.class); - if (!AnnotationUtils.verifyXmlElement(x, "xmlmimetype", "foo", false, - false)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - try { - TestUtil.logMsg("Loading wrapper bean " + JAXB_ANNOTATIONS_TEST3); - Class c = Class.forName(JAXB_ANNOTATIONS_TEST3); - if (!AnnotationUtils.isAnnotationOnFieldPresent(c, "xmlattachmentref", - jakarta.xml.bind.annotation.XmlAttachmentRef.class)) { - TestUtil.logErr( - "jakarta.xml.bind.annotation.XmlAttachmentRef not present for field (xmlattachmentref)"); - pass = false; - } - - XmlElement x = (XmlElement) AnnotationUtils.getAnnotationOnField(c, - "xmlattachmentref", jakarta.xml.bind.annotation.XmlElement.class); - if (!AnnotationUtils.verifyXmlElement(x, "xmlattachmentref", "foo", false, - false)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - try { - TestUtil.logMsg("Loading wrapper bean " + JAXB_ANNOTATIONS_TEST4); - Class c = Class.forName(JAXB_ANNOTATIONS_TEST4); - if (!AnnotationUtils.isAnnotationOnFieldPresent(c, "xmllist", - jakarta.xml.bind.annotation.XmlList.class)) { - TestUtil.logErr( - "jakarta.xml.bind.annotation.XmlList not present for field (xmllist)"); - pass = false; - } - - XmlElement x = (XmlElement) AnnotationUtils.getAnnotationOnField(c, - "xmllist", jakarta.xml.bind.annotation.XmlElement.class); - if (!AnnotationUtils.verifyXmlElement(x, "xmllist", "foo", false, true)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - if (!pass) - throw new Fault("VerifyJAXBMappingsTest failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyXmlTypeAnnotationOnFaultBean - * - * @assertion_ids: JAXWS:SPEC:3030; - * - * @test_Strategy: Verify that the generated fault bean has the correct - * XmlType - * - */ - public void VerifyXmlTypeAnnotationOnFaultBean() throws Fault { - TestUtil.logMsg("VerifyXmlTypeAnnotationOnFaultBean"); - boolean pass = true; - - // Load generated JAXB FaultBean Class - try { - TestUtil.logMsg("Loading fault bean " + JAXB_ANNOTATIONS_FAULTBEAN); - Class c = Class.forName(JAXB_ANNOTATIONS_FAULTBEAN); - XmlType x = (XmlType) AnnotationUtils.getAnnotationOnClass(c, - jakarta.xml.bind.annotation.XmlType.class); - if (!AnnotationUtils.verifyXmlType(x, "Bozo", "http://bozo.org/wsdl")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - if (!pass) - throw new Fault("VerifyXmlTypeAnnotationOnFaultBean failed"); - else - TestUtil.logMsg("Verification passed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/ConfigHeader.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/ConfigHeader.java deleted file mode 100644 index 297765b0e6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/ConfigHeader.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped; - -public class ConfigHeader { - - protected String message; - - protected String testName; - - protected boolean mustUnderstand; - - /** - * Gets the value of the message property. - */ - public String getMessage() { - return message; - } - - /** - * Sets the value of the message property. - */ - public void setMessage(String value) { - this.message = value; - } - - /** - * Gets the value of the testName property. - */ - public String getTestName() { - return testName; - } - - /** - * Sets the value of the testName property. - */ - public void setTestName(String value) { - this.testName = value; - } - - /** - * Gets the value of the mustUnderstand property. - */ - public boolean isMustUnderstand() { - return mustUnderstand; - } - - /** - * Sets the value of the mustUnderstand property. - */ - public void setMustUnderstand(boolean value) { - this.mustUnderstand = value; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/ConfigHeaderFault.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/ConfigHeaderFault.java deleted file mode 100644 index 27a1f9ca72..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/ConfigHeaderFault.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped; - -public class ConfigHeaderFault extends Exception { - - public ConfigHeaderFault(String message) { - super(message); - } - - public ConfigHeaderFault(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/InheritedInterface.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/InheritedInterface.java deleted file mode 100644 index dffc18524d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/InheritedInterface.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped; - -public interface InheritedInterface { - public String hello(String hello); - - public String bye(String bye); -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/J2WDLSharedBean.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/J2WDLSharedBean.java deleted file mode 100644 index d34a329acc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/J2WDLSharedBean.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped; - -public class J2WDLSharedBean { - - private int myInt; - - private String myString; - - public J2WDLSharedBean() { - } - - public J2WDLSharedBean(int i, String s) { - setMyInt(i); - setMyString(s); - } - - public int getMyInt() { - return myInt; - } - - public void setMyInt(int myInt) { - this.myInt = myInt; - } - - public String getMyString() { - return myString; - } - - public void setMyString(String myString) { - this.myString = myString; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/J2WDLSharedEndpoint.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/J2WDLSharedEndpoint.java deleted file mode 100644 index c36ed8ac1f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/J2WDLSharedEndpoint.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped; - -@jakarta.jws.WebService(name = "MYJ2WDLSharedEndpoint", targetNamespace = "http://doclitservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.DOCUMENT, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -public interface J2WDLSharedEndpoint extends InheritedInterface { - - @jakarta.jws.WebMethod(operationName = "arrayOperationFromClient") - @jakarta.jws.WebResult(name = "return", targetNamespace = "http://doclitservice.org/wsdl") - public java.lang.String arrayOperationFromClient( - @jakarta.jws.WebParam(name = "arg0") java.lang.String[] arg0); - - public com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.J2WDLSharedBean getBean(); - - public java.lang.String[] arrayOperation(); - - @jakarta.jws.WebMethod(operationName = "stringOperation") - @jakarta.jws.WebResult(name = "rvalue", targetNamespace = "http://doclitservice.org/wsdl") - public java.lang.String stringOperation( - @jakarta.jws.WebParam(name = "ivalue0") java.lang.String ivalue0); - - @jakarta.jws.WebMethod(operationName = "stringOperation2") - @jakarta.jws.WebResult(name = "response", targetNamespace = "http://doclitservice.org/wsdl") - @jakarta.xml.ws.RequestWrapper(localName = "myStringOperation", targetNamespace = "http://doclitservice.org/wsdl", className = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.MyStringOperation") - @jakarta.xml.ws.ResponseWrapper(localName = "myStringOperationResponse", targetNamespace = "http://doclitservice.org/wsdl", className = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.MyStringOperationResponse") - public java.lang.String stringOperation2( - @jakarta.jws.WebParam(name = "request") java.lang.String request); - - // Holder method with annotations for parameters - public String holderMethodDefault( - jakarta.xml.ws.Holder varStringDefault); - - public String holderMethodInOut( - @jakarta.jws.WebParam(name = "varStringInOut", mode = jakarta.jws.WebParam.Mode.INOUT) jakarta.xml.ws.Holder varStringInOut); - - public String holderMethodOut( - @jakarta.jws.WebParam(name = "varStringOut", mode = jakarta.jws.WebParam.Mode.OUT) jakarta.xml.ws.Holder varStringOut); - - // A method with more than 1 input parts - public java.lang.String oneTwoThree(int one, long two, double three); - - // An overloaded method helloWorld - public java.lang.String helloWorld(); - - // Annotation to disambiguate name of overloaded method helloWorld - // and to disambiguate name of Wrappers from HelloWorld - > HelloWorld2 - @jakarta.jws.WebMethod(operationName = "helloWorld2") - @jakarta.xml.ws.RequestWrapper(localName = "helloWorld2", targetNamespace = "http://doclitservice.org/wsdl", className = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.HelloWorld2") - @jakarta.xml.ws.ResponseWrapper(localName = "helloWorld2Response", targetNamespace = "http://doclitservice.org/wsdl", className = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.HelloWorld2Response") - public java.lang.String helloWorld(String hello); - - @jakarta.jws.WebMethod - @jakarta.jws.Oneway - public void oneWayOperation(); - - @jakarta.jws.WebMethod - public void operationWithHeaderAndHeaderFaultAndFault( - @jakarta.jws.WebParam(name = "ConfigHeader", header = true, mode = jakarta.jws.WebParam.Mode.IN) ConfigHeader configheader) - throws ConfigHeaderFault, MyFault; - - @jakarta.jws.WebMethod - public void methodWithNoReturn(int a, int b); - - @jakarta.jws.WebMethod - @jakarta.xml.ws.RequestWrapper(partName = "request", localName = "", targetNamespace = "", className = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.MethodWithNoReturn2Request") - @jakarta.xml.ws.ResponseWrapper(partName = "response", localName = "", targetNamespace = "", className = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.MethodWithNoReturn2Response") - public void methodWithNoReturn2(String s); - - @jakarta.jws.WebMethod - public void operationThatThrowsAFault() throws MyOtherFault; -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/J2WDLSharedEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/J2WDLSharedEndpointImpl.java deleted file mode 100644 index 5d3884fbfd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/J2WDLSharedEndpointImpl.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "J2WDLSharedEndpointPort", serviceName = "J2WDLSharedService", targetNamespace = "http://doclitservice.org/wsdl", endpointInterface = "com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped.J2WDLSharedEndpoint") -public class J2WDLSharedEndpointImpl implements J2WDLSharedEndpoint { - public String oneTwoThree(int one, long two, double three) { - return "" + one + ":" + two + ":" + three; - } - - public String holderMethodDefault( - jakarta.xml.ws.Holder varStringDefault) { - varStringDefault.value = "holderMethodDefault"; - return varStringDefault.value; - } - - public String holderMethodInOut( - jakarta.xml.ws.Holder varStringInOut) { - varStringInOut.value = "holderMethodInOut"; - return varStringInOut.value; - } - - public String holderMethodOut( - jakarta.xml.ws.Holder varStringOut) { - varStringOut.value = "holderMethodOut"; - return varStringOut.value; - } - - public String helloWorld() { - return "hello world"; - } - - public String helloWorld(String hello) { - return hello; - } - - public String stringOperation(String param) { - return param; - } - - public String stringOperation2(String param) { - return param; - } - - public String[] arrayOperation() { - return new String[] { "one", "two", "three" }; - } - - public J2WDLSharedBean getBean() { - return new J2WDLSharedBean(5, "A String"); - } - - public String arrayOperationFromClient(String[] array) { - return "success"; - } - - public void oneWayOperation() { - } - - public void operationWithHeaderAndHeaderFaultAndFault( - ConfigHeader configheader) throws ConfigHeaderFault, MyFault { - } - - public String hello(String hello) { - return hello; - } - - public String bye(String bye) { - return bye; - } - - public void methodWithNoReturn(int a, int b) { - } - - public void methodWithNoReturn2(String s) { - } - - public void operationThatThrowsAFault() throws MyOtherFault { - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/JAXBAnnotationsImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/JAXBAnnotationsImpl.java deleted file mode 100644 index 1f1e9ef71c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/JAXBAnnotationsImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: JAXBAnnotationsImpl.java 52501 2007-01-24 02:29:49Z adf $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; -import jakarta.jws.WebParam; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.MTOM; -import jakarta.xml.bind.annotation.*; -import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import jakarta.xml.bind.annotation.adapters.HexBinaryAdapter; -import jakarta.activation.DataHandler; -import java.util.List; - -@WebService(name = "JAXBAnnotationsEndpoint", serviceName = "JAXBAnnotationsService", targetNamespace = "http://doclitservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.DOCUMENT, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing -@MTOM -public class JAXBAnnotationsImpl { - - @WebMethod - @XmlJavaTypeAdapter(HexBinaryAdapter.class) - public byte[] jaxbAnnotationsTest1( - @WebParam(name = "name") java.lang.String str, - @WebParam(name = "xmljavatypeadapter") @XmlElement(namespace = "foo", name = "xmljavatypeadapter", required = true, nillable = true) @XmlJavaTypeAdapter(HexBinaryAdapter.class) byte[] bin) { - return bin; - } - - @WebMethod - public void jaxbAnnotationsTest2( - @WebParam(name = "name") java.lang.String name, - @WebParam(name = "xmlmimetype") @XmlElement(namespace = "foo", name = "xmlmimetype", required = false, nillable = false) @XmlMimeType("application/octet-stream") DataHandler data) { - } - - @WebMethod - public void jaxbAnnotationsTest3( - @WebParam(name = "name") java.lang.String name, - @WebParam(name = "xmlattachmentref") @XmlElement(namespace = "foo", name = "xmlattachmentref") @XmlAttachmentRef DataHandler data) { - } - - @WebMethod - public void jaxbAnnotationsTest4( - @WebParam(name = "name") java.lang.String name, - @WebParam(name = "xmllist") @XmlElement(namespace = "foo", name = "xmllist", nillable = true) @XmlList List data) { - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/MyFault.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/MyFault.java deleted file mode 100644 index 68b4350be9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/MyFault.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped; - -import jakarta.xml.bind.annotation.XmlType; - -@XmlType(name = "Bozo", namespace = "http://bozo.org/wsdl") -public class MyFault extends Exception { - - public MyFault(String message) { - super(message); - } - - public MyFault(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/MyOtherFault.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/MyOtherFault.java deleted file mode 100644 index eba180f90c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/MyOtherFault.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: MyOtherFault.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped; - -@jakarta.xml.ws.WebFault(name = "MyOtherFault", messageName = "YesItsMyOtherFault", targetNamespace = "http://doclitservice.org/wsdl", faultBean = "MyOtherFaultBean") -public class MyOtherFault extends Exception { - private MyOtherFaultBean faultInfo; - - public MyOtherFault(String message, MyOtherFaultBean faultInfo) { - super(message); - this.faultInfo = faultInfo; - } - - public MyOtherFault(String message, MyOtherFaultBean faultInfo, - Throwable cause) { - super(message, cause); - this.faultInfo = faultInfo; - } - - public MyOtherFaultBean getFaultInfo() { - return faultInfo; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/MyOtherFaultBean.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/MyOtherFaultBean.java deleted file mode 100644 index 0319561964..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/MyOtherFaultBean.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: MyOtherFaultBean.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.document.literal.wrapped; - -import jakarta.xml.bind.annotation.XmlRootElement; - -@XmlRootElement(name = "MyOtherFaultBean", namespace = "http://doclitservice.org/wsdl") -public class MyOtherFaultBean { - protected String message; - - public String getMessage() { - return message; - } - - public void setMessage(String value) { - this.message = value; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/build.xml deleted file mode 100644 index 63576bfb44..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/document/literal/wrapped/build.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/build.xml deleted file mode 100644 index 3d969df9fc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/build.xml deleted file mode 100644 index bd2ce9de3b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint.java deleted file mode 100644 index a6c0a7e086..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingEndpoint.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import jakarta.xml.ws.WebServiceException; - -@jakarta.jws.WebService(name = "AddressingEndpoint", targetNamespace = "http://rpclitservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -public interface AddressingEndpoint { - - @jakarta.xml.ws.Action(input = "input1") - public void address1(String s); - - @jakarta.xml.ws.Action(output = "output2") - public String address2(); - - @jakarta.xml.ws.Action(fault = { - @jakarta.xml.ws.FaultAction(className = MyFault1.class, value = "fault1") }) - public String address3(String s) throws MyFault1; - - @jakarta.xml.ws.Action(output = "output4", fault = { - @jakarta.xml.ws.FaultAction(className = MyFault1.class, value = "fault1") }) - public String address4() throws MyFault1; - - @jakarta.xml.ws.Action(input = "input5", output = "output5", fault = { - @jakarta.xml.ws.FaultAction(className = MyFault1.class, value = "fault1") }) - public String address5(String s) throws MyFault1; - - @jakarta.xml.ws.Action(input = "") - public void address6(String s) throws MyFault1; - - @jakarta.xml.ws.Action(output = "") - public String address7() throws MyFault1; -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint3.java deleted file mode 100644 index 652bc51c31..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingEndpoint3.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import jakarta.xml.ws.WebServiceException; - -@jakarta.jws.WebService(name = "AddressingEndpoint3", targetNamespace = "http://rpclitservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -public interface AddressingEndpoint3 { - - @jakarta.xml.ws.Action(input = "input1") - public void address1(String s); - - @jakarta.xml.ws.Action(output = "output2") - public String address2(); - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint3Impl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint3Impl.java deleted file mode 100644 index 1db501104f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint3Impl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingEndpoint3Impl.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.Addressing; - -@WebService(portName = "AddressingEndpoint3Port", serviceName = "AddressingService3", targetNamespace = "http://rpclitservice.org/wsdl", endpointInterface = "com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations.AddressingEndpoint3") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = false) -public class AddressingEndpoint3Impl implements AddressingEndpoint3 { - - public void address1(String s) { - } - - public String address2() { - return "hello"; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint4.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint4.java deleted file mode 100644 index d7ad8fcbbb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint4.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingEndpoint4.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import jakarta.xml.ws.WebServiceException; - -@jakarta.jws.WebService(name = "AddressingEndpoint4", targetNamespace = "http://rpclitservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -public interface AddressingEndpoint4 { - - public void address1(String s); - - public String address2(); - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint4Impl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint4Impl.java deleted file mode 100644 index 19c5c69790..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint4Impl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingEndpoint4Impl.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.AddressingFeature; - -@WebService(portName = "AddressingEndpoint4Port", serviceName = "AddressingService4", targetNamespace = "http://rpclitservice.org/wsdl", endpointInterface = "com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations.AddressingEndpoint4") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = true, required = true, responses = AddressingFeature.Responses.ANONYMOUS) -public class AddressingEndpoint4Impl implements AddressingEndpoint4 { - - public void address1(String s) { - } - - public String address2() { - return "hello"; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint5.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint5.java deleted file mode 100644 index b60a376b7b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint5.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingEndpoint5.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import jakarta.xml.ws.WebServiceException; - -@jakarta.jws.WebService(name = "AddressingEndpoint5", targetNamespace = "http://rpclitservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -public interface AddressingEndpoint5 { - - public void address1(String s); - - public String address2(); - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint5Impl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint5Impl.java deleted file mode 100644 index acb28791d8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint5Impl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingEndpoint5Impl.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.AddressingFeature; - -@WebService(portName = "AddressingEndpoint5Port", serviceName = "AddressingService5", targetNamespace = "http://rpclitservice.org/wsdl", endpointInterface = "com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations.AddressingEndpoint5") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = true, required = true, responses = AddressingFeature.Responses.NON_ANONYMOUS) -public class AddressingEndpoint5Impl implements AddressingEndpoint5 { - - public void address1(String s) { - } - - public String address2() { - return "hello"; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint6.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint6.java deleted file mode 100644 index 79fcf4bebf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint6.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingEndpoint6.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import jakarta.xml.ws.WebServiceException; - -@jakarta.jws.WebService(name = "AddressingEndpoint6", targetNamespace = "http://rpclitservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -public interface AddressingEndpoint6 { - - public void address1(String s); - - public String address2(); - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint6Impl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint6Impl.java deleted file mode 100644 index 0d8f01afee..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpoint6Impl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingEndpoint6Impl.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.AddressingFeature; - -@WebService(portName = "AddressingEndpoint6Port", serviceName = "AddressingService6", targetNamespace = "http://rpclitservice.org/wsdl", endpointInterface = "com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations.AddressingEndpoint6") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = true, required = true, responses = AddressingFeature.Responses.ALL) -public class AddressingEndpoint6Impl implements AddressingEndpoint6 { - - public void address1(String s) { - } - - public String address2() { - return "hello"; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpointImpl.java deleted file mode 100644 index cbe898ae9f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/AddressingEndpointImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingEndpointImpl.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.Addressing; - -@WebService(portName = "AddressingEndpointPort", serviceName = "AddressingService", targetNamespace = "http://rpclitservice.org/wsdl", endpointInterface = "com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations.AddressingEndpoint") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = true, required = true) -public class AddressingEndpointImpl implements AddressingEndpoint { - - public void address1(String s) { - } - - public String address2() { - return "hello"; - } - - public String address3(String s) throws MyFault1 { - throw new MyFault1("MyFault1"); - } - - public String address4() throws MyFault1 { - throw new MyFault1("MyFault1"); - } - - public String address5(String s) throws MyFault1 { - throw new MyFault1("MyFault1"); - } - - public void address6(String s) throws MyFault1 { - } - - public String address7() throws MyFault1 { - return "hello"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/Client.java deleted file mode 100644 index 86e52ce2e5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/Client.java +++ /dev/null @@ -1,1917 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import com.sun.ts.lib.util.*; - -import java.util.*; - -import org.w3c.dom.Attr; -import org.w3c.dom.Node; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import com.sun.ts.tests.jaxws.sharedclients.DescriptionClient; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.tests.jaxws.wsi.j2w.NamespaceAttributeVerifier; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants, SchemaConstants { - /* - * The client. - */ - private DescriptionClient client; - - private DescriptionClient client2; - - private DescriptionClient client3; - - private DescriptionClient client4; - - private DescriptionClient client5; - - private DescriptionClient client6; - - /* - * The document. - */ - private Document document; - - private static final int PARAM_IN = 0; - - private static final int PARAM_OUT = 1; - - private static final int PARAM_INOUT = 2; - - /** - * The generated WSDL file. - */ - private static final String WSDLLOC_URL = "j2wrlwithannotations.wsdlloc.1"; - - private static final String WSDLLOC_URL2 = "j2wrlwithannotations.wsdlloc.2"; - - private static final String WSDLLOC_URL3 = "j2wrlwithannotations.wsdlloc.3"; - - private static final String WSDLLOC_URL4 = "j2wrlwithannotations.wsdlloc.4"; - - private static final String WSDLLOC_URL5 = "j2wrlwithannotations.wsdlloc.5"; - - private static final String WSDLLOC_URL6 = "j2wrlwithannotations.wsdlloc.6"; - - private static final String TSHOME = "ts.home"; - - private String baseURL, wsdlFile, wsdlFile2, wsdlFile3, wsdlFile4, wsdlFile5, - wsdlFile6; - - private String tshome = null; - - private String wsdlFileUrl = null, wsdlFileUrl2 = null, wsdlFileUrl3 = null, - wsdlFileUrl4 = null, wsdlFileUrl5 = null, wsdlFileUrl6 = null; - - private static final String EXPECTED_TARGETNAMESPACE = "http://rpclitservice.org/wsdl"; - - private static final String EXPECTED_PORTTYPE_NAME = "MYJ2WRLSharedEndpoint"; - - private static final String EXPECTED_PORT_NAME = "J2WRLSharedEndpointPort"; - - private static final String EXPECTED_SERVICE_NAME = "J2WRLSharedService"; - - private static final String EXPECTED_ADDRESSING_PORTTYPE_NAME = "AddressingEndpoint"; - - private static final String ONEWAY_METHOD = "oneWayOperation"; - - private static final String ONEWAY_METHOD_PARAMS = "oneWayOperationWithParams"; - - private static final String TWOWAY_METHOD_WITH_FAULTS = "operationWithHeaderAndHeaderFaultAndFault"; - - private static final String FAULT = "MyFault"; - - private static final String HEADERFAULT = "ConfigHeaderFault"; - - private static final String PARAMETER_RESULT_NAMING_METHOD = "stringOperation"; - - private static final String INPUT_PART_NAME = "ivalue0"; - - private static final String OUTPUT_PART_NAME = "rvalue"; - - private static final String THREE_INPUT_PART_METHOD = "oneTwoThree"; - - private static final int THREE_INPUT_PART_COUNT = 3; - - private static final String[] EXPECTED_OPERATION_NAMES = { - "arrayOperationFromClient", "getBean", "arrayOperation", - "stringOperation", "oneTwoThree", "holderMethodDefault", - "holderMethodInOut", "holderMethodOut", "helloWorld", "helloWorld2", - "oneWayOperation", "oneWayOperationWithParams", - "operationWithHeaderAndHeaderFaultAndFault", "hello", "bye", }; - - private static final int[][] EXPECTED_PART_COUNTS = { { 1, 1, 0 }, // arrayOperationFromClient - { 0, 1, 0 }, // getBean - { 0, 1, 0 }, // arrayOperation - { 1, 1, 0 }, // stringOperation - { 3, 1, 0 }, // oneTwoThree - { 1, 2, 0 }, // holderMethodDefault - { 1, 2, 0 }, // holderMethodInOut - { 0, 2, 0 }, // holderMethodOut - { 0, 1, 0 }, // helloWorld - { 1, 1, 0 }, // helloWorld2 - { 0, 0, 0 }, // oneWayOperation - { 3, 0, 0 }, // oneWayOperationWithParams - { 1, 0, 3 }, // operationWithHeaderAndHeaderFaultAndFault - { 1, 1, 0 }, // hello - { 1, 1, 0 }, // bye - }; - - private static final String[][] EXPECTED_TYPE_ELEMENT_MAPPINGS = { - { "stringArray", "string", "", "", "" }, // arrayOperationFromClient - { "", "j2WRLSharedBean", "", "", "" }, // getBean - { "", "stringArray", "", "", "" }, // arrayOperation - { "string", "string", "", "", "" }, // stringOperation - { "int", "long", "double", "string", "" }, // oneTwoThree - { "string", "string", "string", "", "" }, // holderMethodDefault - { "string", "string", "string", "", "" }, // holderMethodInOut - { "string", "string", "", "", "" }, // holderMethodOut - { "", "string", "", "", "" }, // helloWorld - { "string", "string", "", "", "" }, // helloWorld2 - { "", "", "", "", "" }, // oneWayOperation - { "int", "long", "double", "", "" }, // oneWayOperationWithParams - { "ConfigHeader", "ConfigHeaderFault", "MyFault", "MyOtherFault", "", - "" }, // operationWithHeaderAndHeaderFaultAndFault - { "string", "string", "", "", "" }, // hello - { "string", "string", "", "", "" }, // bye - }; - - private String testName = null; - - private boolean debug = false; - - private Hashtable ht2 = null; - - // private methods here - private boolean VerifyTypeElementMappings(Element[] iparts, Element[] oparts, - Element[] fparts, String opname) throws Fault { - boolean ok = true; - - if (!PartCountsOk(iparts, oparts, fparts, opname)) - ok = false; - if (!TypesElementsOk(iparts, oparts, fparts, opname)) - ok = false; - - return ok; - } - - private boolean PartCountsOk(Element[] iparts, Element[] oparts, - Element[] fparts, String opname) { - boolean ok = true; - int index, icnt, ocnt, fcnt; - - TestUtil.logMsg("Verify part counts for operation: " + opname); - index = GetIndex(opname); - if (index == -1) { - TestUtil.logErr("Unexpected operation name: " + opname); - ok = false; - } else { - icnt = EXPECTED_PART_COUNTS[index][0]; - ocnt = EXPECTED_PART_COUNTS[index][1]; - fcnt = EXPECTED_PART_COUNTS[index][2]; - if ((iparts == null && icnt != 0) - || (iparts != null && iparts.length != icnt)) { - TestUtil.logErr("Incorrect number of input parts"); - ok = false; - } - if ((oparts == null && ocnt != 0) - || (oparts != null && oparts.length != ocnt)) { - TestUtil.logErr("Incorrect number of output parts"); - ok = false; - } - if ((fparts == null && fcnt != 0) - || (fparts != null && fparts.length != fcnt)) { - TestUtil.logErr("Incorrect number of fault parts"); - ok = false; - } - } - return ok; - } - - private boolean TypesElementsOk(Element[] iparts, Element[] oparts, - Element[] fparts, String opname) { - boolean ok = true; - int index; - - TestUtil.logMsg("Verify types for operation: " + opname); - index = GetIndex(opname); - if (index == -1) { - TestUtil.logErr("Unexpected operation name: " + opname); - ok = false; - } else { - ArrayList alist1 = new ArrayList(); - ArrayList alist2 = new ArrayList(); - String expectedtypes[] = null; - String types[] = null; - String str = null; - for (int i = 0; i < 5; i++) { - if (!EXPECTED_TYPE_ELEMENT_MAPPINGS[index][i].equals("")) - alist1.add(EXPECTED_TYPE_ELEMENT_MAPPINGS[index][i]); - } - if (alist1.size() > 0) - expectedtypes = (String[]) alist1.toArray(new String[alist1.size()]); - if (iparts != null) { - for (int i = 0; i < iparts.length; i++) { - if (opname.equals(EXPECTED_OPERATION_NAMES[12])) - str = iparts[i].getAttribute(XSD_ELEMENT_ATTR); - else - str = iparts[i].getAttribute(XSD_TYPE_ATTR); - TestUtil.logMsg("type=" + str); - alist2.add(str.substring(str.indexOf(":") + 1)); - } - } - if (oparts != null) { - for (int i = 0; i < oparts.length; i++) { - if (opname.equals(EXPECTED_OPERATION_NAMES[12])) - str = oparts[i].getAttribute(XSD_ELEMENT_ATTR); - else - str = oparts[i].getAttribute(XSD_TYPE_ATTR); - TestUtil.logMsg("type=" + str); - alist2.add(str.substring(str.indexOf(":") + 1)); - } - } - if (fparts != null) { - for (int i = 0; i < fparts.length; i++) { - str = fparts[i].getAttribute(XSD_ELEMENT_ATTR); - alist2.add(str.substring(str.indexOf(":") + 1)); - TestUtil.logMsg("type=" + str); - } - } - if (alist2.size() > 0) - types = (String[]) alist2.toArray(new String[alist2.size()]); - if (!CompareTypesElementsOk(expectedtypes, types, opname)) - ok = false; - } - - return ok; - } - - private int GetIndex(String opname) { - for (int i = 0; i < EXPECTED_OPERATION_NAMES.length; i++) { - if (opname.equals(EXPECTED_OPERATION_NAMES[i])) - return i; - } - return -1; - } - - private boolean CompareTypesElementsOk(String[] expectedtypes, String[] types, - String opname) { - boolean ok = true; - boolean found = false; - - if (expectedtypes == null && types == null) { - ; - } else if (expectedtypes == null && types != null) { - TestUtil.logErr( - "Incorrect number of types: got " + types.length + ", expected none"); - ok = false; - } else if (expectedtypes != null && types == null) { - TestUtil.logErr("Incorrect number of types: got none" + ", expected " - + expectedtypes.length); - ok = false; - } else if (expectedtypes != null && types.length != expectedtypes.length) { - TestUtil.logErr("Incorrect number of types: got " + types.length - + ", expected " + expectedtypes.length); - ok = false; - } else { - for (int i = 0; i < types.length; i++) { - for (int j = 0; j < types.length; j++) { - if (types[i].equals(expectedtypes[j])) - found = true; - } - if (!found) - ok = false; - else - found = false; - } - StringBuilder got = new StringBuilder("[ "); - StringBuilder exp = new StringBuilder("[ "); - for (int i = 0; i < types.length; i++) { - got.append(types[i]).append(" "); - exp.append(expectedtypes[i]).append(" "); - } - got.append("]"); - exp.append("]"); - if (!ok) - TestUtil.logErr("Incorrect types: got " + got + ", expected " + exp); - else - TestUtil.logMsg("Types are correct: " + got); - } - return ok; - } - - private boolean findName(String[] names, String name) { - for (int i = 0; i < names.length; i++) { - if (names[i].equals(name)) - return true; - } - return false; - } - - private boolean verifyClassification(Document document, Element operation, - String partName, int mode) { - - // Get input message name - String imessageName = DescriptionUtils.getInputMessageName(operation); - // Get part names for message name - String[] ipartNames = DescriptionUtils.getPartNames(document, imessageName); - - // If partName is not known take it as first part name - if (partName.equals("")) - partName = ipartNames[0]; - - // Get output message name - String omessageName = DescriptionUtils.getOutputMessageName(operation); - // Get part names for message name - String[] opartNames = DescriptionUtils.getPartNames(document, omessageName); - if (mode == PARAM_INOUT) { - TestUtil - .logMsg("Verify part " + partName + " is in both input and output"); - if (findName(ipartNames, partName) && findName(opartNames, partName)) - TestUtil.logMsg( - "verify passed: partname in both input and output message"); - else { - TestUtil.logErr( - "verify failed: partname not in both input and output message"); - return false; - } - } else if (mode == PARAM_OUT) { - TestUtil.logMsg("Verify part " + partName + " is in output only"); - if (!findName(ipartNames, partName) && findName(opartNames, partName)) - TestUtil.logMsg("verify passed: partname in output message"); - else { - TestUtil.logErr("verify failed: partname not in output message"); - return false; - } - } - return true; - - } - - private boolean ProcessWsdlDocument(Document document) throws Fault { - boolean pass = true; - - // Process wsdl elements (imported wsdl's) - Document[] wsdlDocs = DescriptionUtils.getWsdlDocuments(document, - tshome + baseURL); - if (wsdlDocs != null) { - for (int i = 0; i < wsdlDocs.length; i++) { - TestUtil.logMsg("Process imported wsdl file: " - + wsdlDocs[i].getDocumentElement().getAttribute("WsdlFile")); - wsdlDocs[i].getDocumentElement().removeAttribute("WsdlFile"); - pass = ProcessWsdlDocument(wsdlDocs[i]); - } - } - - // Process wsdl element (If none then we are done) - Element types = DescriptionUtils.getTypes(document); - if (types == null) - return pass; - - // Verify namespaceURI on wsdl elements if any - Element[] schemas = DescriptionUtils.getChildElements(types, null, - WSDL_SCHEMA_LOCAL_NAME); - TestUtil.logMsg("Verify namespaceURI on wsdl elements"); - if (schemas != null) { - for (int i = 0; i < schemas.length; i++) { - String namespaceURI = schemas[i].getNamespaceURI(); - if (!namespaceURI.equals(XSD_NAMESPACE_URI)) { - TestUtil - .logErr("Encountered 'schema' element with invalid namespaceURI '" - + namespaceURI); - pass = false; - } - } - } - - // Verify schema element types defined in wsdl element if any - NodeList list = types.getElementsByTagNameNS(XSD_NAMESPACE_URI, - XSD_ELEMENT_LOCAL_NAME); - TestUtil - .logMsg("Verify schema element types defined in wsdl element"); - if (list.getLength() != 0) { - if (!VerifyElementTypes(list)) - pass = false; - } - - // Process schema elements (imported schema's) - Document[] schemaDocs = DescriptionUtils.getSchemaDocuments(document, - tshome + baseURL); - if (schemaDocs != null) { - for (int i = 0; i < schemaDocs.length; i++) { - TestUtil.logMsg("Process imported schema file: " - + schemaDocs[i].getDocumentElement().getAttribute("SchemaFile")); - schemaDocs[i].getDocumentElement().removeAttribute("SchemaFile"); - pass = ProcessSchemaDocument(schemaDocs[i]); - } - } - - return pass; - } - - private boolean ProcessSchemaDocument(Document document) throws Fault { - boolean pass = true; - - // Process schema elements (imported schema's) - Document[] schemaDocs = DescriptionUtils.getSchemaDocuments(document, - tshome + baseURL); - if (schemaDocs != null) { - for (int i = 0; i < schemaDocs.length; i++) { - TestUtil.logMsg("Process imported schema file: " - + schemaDocs[i].getDocumentElement().getAttribute("SchemaFile")); - schemaDocs[i].getDocumentElement().removeAttribute("SchemaFile"); - pass = ProcessSchemaDocument(schemaDocs[i]); - } - } - - // Verify schema element types defined in imported schema if any - TestUtil.logMsg("Verify schema element types defined in imported schema"); - ht2 = new Hashtable(); - String[] s = DescriptionUtils.getAllPrefixAndNamespace(document); - for (int i = 0; i < s.length; i++) { - String prefix = s[i].substring(0, s[i].indexOf(":")); - String namespace = s[i].substring(s[i].indexOf(":") + 1, s[i].length()); - ht2.put(prefix, namespace); - } - NodeList list = document.getDocumentElement() - .getElementsByTagNameNS(XSD_NAMESPACE_URI, XSD_ELEMENT_LOCAL_NAME); - if (!VerifyElementTypes(list)) - pass = false; - - return pass; - } - - private boolean VerifyElementTypes(NodeList list) { - boolean pass = true; - for (int j = 0; j < list.getLength(); j++) { - boolean ok = false; - Element element = (Element) list.item(j); - String type = element.getAttribute(XSD_TYPE_ATTR); - String name = element.getAttribute(XSD_NAME_ATTR); - String prefix = element.getPrefix(); - String uri = element.getNamespaceURI(); - Hashtable ht = new Hashtable(); - ht.put(prefix, uri); - if (type.contains(":")) { - prefix = type.substring(0, type.indexOf(":")); - Attr attributes[] = DescriptionUtils.getElementAttributes(element); - for (int k = 0; k < attributes.length; k++) { - String aname = attributes[k].getName(); - String avalue = attributes[k].getValue(); - if (aname.startsWith("xmlns:")) { - String aprefix = aname.substring(6, aname.length()); - ht.put(aprefix, avalue); - if (prefix.equals(aprefix)) - uri = avalue; - } - } - } - // Verify element type and prefix has associated (prefix,namespace) in - // hashtable - TestUtil.logMsg("Verify 'element' name=" + name + " type=" + type - + " prefix=" + prefix); - // Check hashtable prefix's of current element - Enumeration e = ht.keys(); - while (e.hasMoreElements()) { - String cprefix = (String) e.nextElement(); - if (prefix.equals(cprefix)) { - ok = true; - break; - } - } - // Check hashtable prefix's of document root element - if (!ok) { - e = ht2.keys(); - while (e.hasMoreElements()) { - String cprefix = (String) e.nextElement(); - if (prefix.equals(cprefix)) { - ok = true; - break; - } - } - } - if (!ok) { - TestUtil.logErr( - "Encountered 'element' " + name + " with invalid prefix " + prefix); - pass = false; - } - } - return pass; - } - - /* - * Test entry point. - * - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: ts.home; - */ - public void setup(String[] args, Properties properties) throws Fault { - tshome = properties.getProperty(TSHOME); - try { - wsdlFile = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - } catch (Exception e) { - throw new Fault("Failed getting wsdl prop", e); - } - baseURL = wsdlFile.substring(0, wsdlFile.lastIndexOf("/") + 1); - wsdlFileUrl = "file:" + tshome + wsdlFile; - TestUtil.logMsg("wsdlFileUrl=" + wsdlFileUrl); - client = new DescriptionClient(); - client.setURL(wsdlFileUrl); - try { - wsdlFile2 = JAXWS_Util.getURLFromProp(WSDLLOC_URL2); - } catch (Exception e) { - throw new Fault("Failed getting wsdl prop", e); - } - baseURL = wsdlFile2.substring(0, wsdlFile2.lastIndexOf("/") + 1); - wsdlFileUrl2 = "file:" + tshome + wsdlFile2; - TestUtil.logMsg("wsdlFileUrl2=" + wsdlFileUrl2); - client2 = new DescriptionClient(); - client2.setURL(wsdlFileUrl2); - try { - wsdlFile3 = JAXWS_Util.getURLFromProp(WSDLLOC_URL3); - } catch (Exception e) { - throw new Fault("Failed getting wsdl prop", e); - } - baseURL = wsdlFile3.substring(0, wsdlFile3.lastIndexOf("/") + 1); - wsdlFileUrl3 = "file:" + tshome + wsdlFile3; - TestUtil.logMsg("wsdlFileUrl3=" + wsdlFileUrl3); - client3 = new DescriptionClient(); - client3.setURL(wsdlFileUrl3); - try { - wsdlFile4 = JAXWS_Util.getURLFromProp(WSDLLOC_URL4); - } catch (Exception e) { - throw new Fault("Failed getting wsdl prop", e); - } - baseURL = wsdlFile4.substring(0, wsdlFile4.lastIndexOf("/") + 1); - wsdlFileUrl4 = "file:" + tshome + wsdlFile4; - TestUtil.logMsg("wsdlFileUrl4=" + wsdlFileUrl4); - client4 = new DescriptionClient(); - client4.setURL(wsdlFileUrl4); - try { - wsdlFile5 = JAXWS_Util.getURLFromProp(WSDLLOC_URL5); - } catch (Exception e) { - throw new Fault("Failed getting wsdl prop", e); - } - baseURL = wsdlFile5.substring(0, wsdlFile5.lastIndexOf("/") + 1); - wsdlFileUrl5 = "file:" + tshome + wsdlFile5; - TestUtil.logMsg("wsdlFileUrl5=" + wsdlFileUrl5); - client5 = new DescriptionClient(); - client5.setURL(wsdlFileUrl5); - try { - wsdlFile6 = JAXWS_Util.getURLFromProp(WSDLLOC_URL6); - } catch (Exception e) { - throw new Fault("Failed getting wsdl prop", e); - } - baseURL = wsdlFile6.substring(0, wsdlFile6.lastIndexOf("/") + 1); - wsdlFileUrl6 = "file:" + tshome + wsdlFile6; - TestUtil.logMsg("wsdlFileUrl6=" + wsdlFileUrl6); - client6 = new DescriptionClient(); - client6.setURL(wsdlFileUrl6); - TestUtil.logMsg("setup ok"); - } - - public void cleanup() { - TestUtil.logMsg("cleanup"); - } - - /* - * @testName: VerifyTargetNamespaceWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3013; JAXWS:SPEC:3019; JAXWS:SPEC:3027; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify that the targetNamespace in the generated WSDL - * matches the targetNamespace as specified in the jakarta.jws.WebService - * annotation. (Java to WSDL 1.1 Mapping). Conformance requirement done: - - * Package name mapping - * - */ - public void VerifyTargetNamespaceWithAnnotation() throws Fault { - TestUtil.logMsg("VerifyTargetNamespaceWithAnnotation"); - boolean pass = true; - - try { - String targetNamespace = DescriptionUtils - .getTargetNamespaceAttr(client.getDocument()); - TestUtil - .logMsg("Verify that targetNamespace is correct in generated WSDL"); - if (!targetNamespace.equals(EXPECTED_TARGETNAMESPACE)) { - TestUtil.logErr("TargetNamespace is incorrect, expected: " - + EXPECTED_TARGETNAMESPACE + ", got: " + targetNamespace); - pass = false; - } else - TestUtil.logMsg("TargetNamespace is correct: " + targetNamespace); - } catch (Exception e) { - TestUtil.logErr("Caught exception:" + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("VerifyTargetNamespaceWithAnnotation failed"); - } - - /* - * @testName: VerifySOAPElementNamespaceUseAttributeWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3013; JAXWS:SPEC:3019; JAXWS:SPEC:3027; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify the namespace and use attributes for all SOAP - * Elements in the generated WSDL (Java to WSDL 1.1 Mapping and BP1.1). - * Conformance requirement done: - verify use attribute of literal for all - * SOAP elements - verify namespace attribute on all soap:body elements - * - * - */ - public void VerifySOAPElementNamespaceUseAttributeWithAnnotation() - throws Fault { - TestUtil.logMsg("VerifySOAPElementNamespaceUseAttributeWithAnnotation"); - boolean pass = true; - - Document document = client.getDocument(); - TestUtil.logMsg( - "Verify that namespace and use attribute does exist on soap:body elements"); - NamespaceAttributeVerifier verifier = new NamespaceAttributeVerifier( - document, 2717); - verifier.verify(); - TestUtil.logMsg( - "Verify that namespace attribute does not exist for soap:fault, " - + "soap:header, soap:headerfault elements"); - verifier = new NamespaceAttributeVerifier(document, 2726); - verifier.verify(); - if (!pass) - throw new Fault( - "VerifySOAPElementNamespaceUseAttributeWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifySOAPBindingTransportStyleAttributeWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3013; JAXWS:SPEC:3019; JAXWS:SPEC:3027; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:3041; JAXWS:SPEC:3042; - * JAXWS:SPEC:7013; - * - * @test_Strategy: Verify the soap:binding transport and style attributes in - * the generated WSDL. (Java to WSDL 1.1 Mapping and BP1.1). Conformance - * requirement done: - SOAP binding support - SOAP binding style required - - * SOAP binding transport required - * - * - */ - public void VerifySOAPBindingTransportStyleAttributeWithAnnotation() - throws Fault { - TestUtil.logMsg("VerifySOAPBindingTransportStyleAttributeWithAnnotation"); - boolean pass = true; - - Document document = client.getDocument(); - TestUtil.logMsg("Verify soap:binding transport and style attribute"); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - Element soapBinding = DescriptionUtils.getChildElement(bindings[i], - SOAP_NAMESPACE_URI, SOAP_BINDING_LOCAL_NAME); - if (soapBinding == null) { - TestUtil.logErr("soap:binding is null unexpected"); - pass = false; - } else { - String style = soapBinding.getAttribute(SOAP_STYLE_ATTR); - if (!style.equals(SOAP_RPC)) { - TestUtil.logErr("soap:binding style attribute incorrect, expected: " - + SOAP_RPC + ", got: " + style); - pass = false; - } else - TestUtil.logMsg("soap:binding style attribute is correct: " + style); - String transport = soapBinding.getAttribute(SOAP_TRANSPORT_ATTR); - if (!transport.equals(SOAP_TRANSPORT)) { - TestUtil - .logErr("soap:binding transport attribute incorrect, expected: " - + SOAP_TRANSPORT + ", got: " + transport); - pass = false; - } else - TestUtil.logMsg( - "soap:binding transport attribute is correct: " + transport); - } - } - if (!pass) - throw new Fault( - "VerifySOAPBindingTransportStyleAttributeWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyServiceNameWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3037; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify the wsdl:service element name is correct in the - * generated WSDL. Conformance requirement done: - service naming - * - * - */ - public void VerifyServiceNameWithAnnotation() throws Fault { - TestUtil.logMsg("VerifyServiceNameWithAnnotation"); - boolean pass = true; - - TestUtil.logMsg( - "Checking for service name verification of: " + EXPECTED_SERVICE_NAME); - pass = DescriptionUtils.isServiceNameAttr(client.getDocument(), - EXPECTED_SERVICE_NAME); - if (!pass) - throw new Fault("VerifyServiceNameWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyPortTypeNameWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3013; JAXWS:SPEC:3019; JAXWS:SPEC:3027; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify the wsdl:portType name is correct in the generated - * WSDL. Conformance requirement done: - portType naming - * - * - */ - public void VerifyPortTypeNameWithAnnotation() throws Fault { - TestUtil.logMsg("VerifyPortTypeNameWithAnnotation"); - boolean pass = true; - - TestUtil.logMsg("Checking for portType name verification of: " - + EXPECTED_PORTTYPE_NAME); - pass = DescriptionUtils.isPortTypeNameAttr(client.getDocument(), - EXPECTED_PORTTYPE_NAME); - if (!pass) - throw new Fault("VerifyPortTypeNameWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyPortNameWithAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify the wsdl:port name is correct in the generated WSDL. - * Conformance requirement done: - port naming - * - * - */ - public void VerifyPortNameWithAnnotation() throws Fault { - TestUtil.logMsg("VerifyPortNameWithAnnotation"); - boolean pass = true; - - TestUtil.logMsg( - "Checking for port name verification of: " + EXPECTED_PORT_NAME); - pass = DescriptionUtils.isPortNameAttr(client.getDocument(), - EXPECTED_PORT_NAME); - if (!pass) - throw new Fault("VerifyPortNameWithAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyOperationNames - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3010; JAXWS:SPEC:3013; JAXWS:SPEC:3019; JAXWS:SPEC:3027; - * JAXWS:SPEC:3033; JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:3003; - * JAXWS:SPEC:7013; - * - * @test_Strategy: Verify wsdl:portType operation names are correct in the - * generated WSDL. Verify all public method mapping to wsdl:operation - * elements. Conformance requirement done: - Inheritance flattening - - * Operation naming - Method name diambiguation - * - * - */ - public void VerifyOperationNames() throws Fault { - TestUtil.logMsg("VerifyOperationNames"); - boolean pass = true; - - TestUtil.logMsg( - "Checking for operation names for portType: " + EXPECTED_PORTTYPE_NAME); - String opNames[] = DescriptionUtils.getPortTypeOperationNames( - client.getDocument(), EXPECTED_PORTTYPE_NAME); - if (opNames.length == EXPECTED_OPERATION_NAMES.length) - TestUtil.logMsg("operation name count is as expected: " - + EXPECTED_OPERATION_NAMES.length); - else { - pass = false; - TestUtil.logErr("operation count expected: " - + EXPECTED_OPERATION_NAMES.length + ", received: " + opNames.length); - } - int cnt = 0; - for (int i = 0; i < opNames.length; i++) { - boolean found = false; - for (int j = 0; j < EXPECTED_OPERATION_NAMES.length; j++) { - if (opNames[i].equals(EXPECTED_OPERATION_NAMES[j])) { - found = true; - cnt++; - TestUtil.logMsg("Matched operation name ... " + opNames[i]); - break; - } - } - if (!found) { - TestUtil.logErr("UnMatched operation name: " + opNames[i]); - pass = false; - } - } - if (cnt == EXPECTED_OPERATION_NAMES.length) - TestUtil.logMsg("All operation names matched expected ..."); - - if (!pass) - throw new Fault("VerifyOperationNames failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyOneWayAndTwoWayOperations - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3011; JAXWS:SPEC:3013; JAXWS:SPEC:3019; JAXWS:SPEC:3027; - * JAXWS:SPEC:3033; JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:3014; - * JAXWS:SPEC:7013; - * - * @test_Strategy: Verify operations are correctly identifed as OneWay or - * TwoWay. Conformance requirement done: - One-way mapping - Two-way mapping - - * Two-way mapping with faults - Method and parameters where expected in both - * wsdl:portType and wsdl:binding - * - * - */ - public void VerifyOneWayAndTwoWayOperations() throws Fault { - TestUtil.logMsg("VerifyOneWayAndTwoWayOperations"); - boolean pass = true; - - TestUtil.logMsg( - "Checking for operation names for portType: " + EXPECTED_PORTTYPE_NAME); - Element operations[] = DescriptionUtils.getPortTypeOperationNameElements( - client.getDocument(), EXPECTED_PORTTYPE_NAME); - for (int i = 0; i < operations.length; i++) { - String name = operations[i].getAttribute(WSDL_NAME_ATTR); - Element e = DescriptionUtils - .getBindingOperationNameElement(client.getDocument(), name); - if (name.equals(ONEWAY_METHOD) || name.equals(ONEWAY_METHOD_PARAMS)) { - TestUtil - .logMsg("Checking for one way operation for operation: " + name); - TestUtil.logMsg("verify in portType operation ..."); - if (DescriptionUtils.isOneWay(operations[i])) - TestUtil.logMsg("is One way"); - else { - TestUtil.logErr("is not One way"); - pass = false; - } - TestUtil.logMsg("verify in binding operation ..."); - if (DescriptionUtils.isOneWay(e)) - TestUtil.logMsg("is One way"); - else { - TestUtil.logErr("is not One way"); - pass = false; - } - } else { - TestUtil - .logMsg("Checking for two way operation for operation: " + name); - TestUtil.logMsg("verify in portType operation ..."); - if (DescriptionUtils.isTwoWay(operations[i])) - TestUtil.logMsg("is Two way"); - else { - TestUtil.logErr("is not Two way"); - pass = false; - } - TestUtil.logMsg("verify in binding operation ..."); - if (DescriptionUtils.isTwoWay(e)) - TestUtil.logMsg("is Two way"); - else { - TestUtil.logErr("is not Two way"); - pass = false; - } - if (name.equals(TWOWAY_METHOD_WITH_FAULTS)) { - TestUtil.logMsg("Checking for faults for operation: " + name); - TestUtil.logMsg("Expected faults are: " + FAULT + "," + HEADERFAULT); - TestUtil.logMsg("verify in portType operation ..."); - if (DescriptionUtils.hasFault(operations[i], FAULT) - && DescriptionUtils.hasFault(operations[i], HEADERFAULT)) - TestUtil.logMsg("fault match"); - else { - TestUtil.logErr("fault mismatch, did not get expected faults: " - + FAULT + "," + HEADERFAULT); - pass = false; - } - TestUtil.logMsg("verify in binding operation ..."); - if (DescriptionUtils.hasFault(e, FAULT) - && DescriptionUtils.hasFault(e, HEADERFAULT)) - TestUtil.logMsg("fault match"); - else { - TestUtil.logErr("fault mismatch, did not get expected faults: " - + FAULT + "," + HEADERFAULT); - pass = false; - } - } - } - } - if (!pass) - throw new Fault("VerifyOneWayAndTwoWayOperations failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyParameterAndResultNaming - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3013; JAXWS:SPEC:3019; JAXWS:SPEC:3027; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:3017; JAXWS:SPEC:3018; - * JAXWS:SPEC:7013; - * - * @test_Strategy: Verify use of annotations to name parameters and results. - * Conformance requirement done: - Parameter naming - Result naming - * - * - */ - public void VerifyParameterAndResultNaming() throws Fault { - TestUtil.logMsg("VerifyParameterAndResultNaming"); - boolean pass = true; - - TestUtil - .logMsg("Checking for operation name " + PARAMETER_RESULT_NAMING_METHOD - + " in portType " + EXPECTED_PORTTYPE_NAME); - Element operation = DescriptionUtils.getPortTypeOperationNameElement( - client.getDocument(), EXPECTED_PORTTYPE_NAME, - PARAMETER_RESULT_NAMING_METHOD); - Element input = DescriptionUtils.getChildElement(operation, - WSDL_NAMESPACE_URI, WSDL_INPUT_LOCAL_NAME); - Element output = DescriptionUtils.getChildElement(operation, - WSDL_NAMESPACE_URI, WSDL_OUTPUT_LOCAL_NAME); - String imsg = input.getAttribute(WSDL_MESSAGE_ATTR); - String omsg = output.getAttribute(WSDL_MESSAGE_ATTR); - String imessage = imsg.substring(imsg.indexOf(":") + 1); - String omessage = omsg.substring(omsg.indexOf(":") + 1); - TestUtil.logMsg("input message name is " + imessage); - TestUtil.logMsg("output message name is " + omessage); - String ipart = DescriptionUtils.getPartName(client.getDocument(), imessage); - String opart = DescriptionUtils.getPartName(client.getDocument(), omessage); - - // Check that both annotated input and output arguments are correctly named - // in wsdl. - if (ipart.equals(INPUT_PART_NAME)) - TestUtil.logMsg("Parameter naming passed, expected: " + INPUT_PART_NAME - + ", received: " + ipart); - else { - TestUtil.logErr("Parameter naming failed, expected: " + INPUT_PART_NAME - + ", received: " + ipart); - pass = false; - } - - if (opart.equals(OUTPUT_PART_NAME)) - TestUtil.logMsg("Result naming passed, expected: " + OUTPUT_PART_NAME - + ", received: " + opart); - else { - TestUtil.logErr("Result naming failed, expected: " + OUTPUT_PART_NAME - + ", received: " + opart); - pass = false; - } - - if (!pass) - throw new Fault("VerifyParameterAndResultNaming failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyWsdlMessagePartAndAttrStyle - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3013; JAXWS:SPEC:3019; JAXWS:SPEC:3027; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify each message has zero or more wsdl:part child - * elements that refer via a type attribute to a named type declaration. - * Conformance requirement done: - Zero or more wsdl:part child elements with - * type attribute, one per method parameter and for a non-void return value. - * - */ - public void VerifyWsdlMessagePartAndAttrStyle() throws Fault { - TestUtil.logMsg("VerifyWsdlMessagePartAndAttrStyle"); - boolean pass = true; - - TestUtil - .logMsg("Getting all input and output messages for portType operations" - + " in portType " + EXPECTED_PORTTYPE_NAME); - String imessages[] = DescriptionUtils - .getInputMessageNames(client.getDocument(), EXPECTED_PORTTYPE_NAME); - Arrays.sort(imessages); - for (int i = 0; i < imessages.length; i++) - TestUtil.logMsg("input message: " + imessages[i]); - String omessages[] = DescriptionUtils - .getOutputMessageNames(client.getDocument(), EXPECTED_PORTTYPE_NAME); - Arrays.sort(omessages); - for (int i = 0; i < omessages.length; i++) - TestUtil.logMsg("output message: " + omessages[i]); - - // Header parts are not checked but filtered out - String headerParts[] = DescriptionUtils - .getSoapHeaderElementsPartAttr(client.getDocument()); - for (int i = 0; i < headerParts.length; i++) - TestUtil.logMsg("part=" + headerParts[i]); - - Element messages[] = DescriptionUtils.getMessages(client.getDocument()); - for (int i = 0; i < messages.length; i++) { - String messageName = messages[i].getAttribute(WSDL_NAME_ATTR); - TestUtil.logMsg("Checking message: " + messageName); - if (Arrays.binarySearch(imessages, messageName) >= 0 - || Arrays.binarySearch(omessages, messageName) >= 0) { - Element[] parts = DescriptionUtils.getChildElements(messages[i], - WSDL_NAMESPACE_URI, WSDL_PART_LOCAL_NAME); - if (parts.length == 0) { - TestUtil.logMsg(" no parts exist for message " + messageName); - continue; - } else - TestUtil.logMsg( - " check that type attribute exists for all its message parts ..."); - int partCnt = 0; - for (int j = 0; j < parts.length; j++) { - String part = parts[j].getAttribute(WSDL_NAME_ATTR); - String element = parts[j].getAttribute(WSDL_ELEMENT_ATTR); - String type = parts[j].getAttribute(WSDL_TYPE_ATTR); - TestUtil.logMsg( - " part=" + part + ", element=" + element + ", type=" + type); - boolean isHeader = false; - for (int k = 0; k < headerParts.length; k++) { - if (part.equals(headerParts[k])) { - isHeader = true; - TestUtil.logMsg(" skipping, this part is a header"); - break; - } else - partCnt++; - } - if (isHeader) - continue; // Skip header parts - if (type == null || type.equals("")) { - TestUtil.logErr(" no type attribute for this part"); - pass = false; - } - if (element != null && !element.equals("")) { - TestUtil.logErr(" a element attribute exists for this part"); - pass = false; - } - } - TestUtil.logMsg("message: " + messageName + ", parts: " + partCnt); - if (messageName.equals(THREE_INPUT_PART_METHOD)) { - if (partCnt == THREE_INPUT_PART_COUNT) - TestUtil.logMsg("Verification of multiple parts method " - + THREE_INPUT_PART_METHOD + " indeed has " - + THREE_INPUT_PART_COUNT + " for part count"); - else { - TestUtil.logErr("Verification of multiple parts method " - + THREE_INPUT_PART_METHOD + " failed, expected part count of " - + THREE_INPUT_PART_COUNT + ", received part count of " - + partCnt); - } - } - } else - TestUtil.logMsg("Skipping message parts checking ..."); - } - - if (!pass) - throw new Fault("VerifyWsdlMessagePartAndAttrStyle failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifySchemaNamespacesImportsElementsTypes - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3013; JAXWS:SPEC:3019; JAXWS:SPEC:3027; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify schema namespaces, schema imports, schema elements, - * schema types. - * - */ - public void VerifySchemaNamespacesImportsElementsTypes() throws Fault { - TestUtil.logMsg("VerifySchemaNamespacesImportsElementsTypes"); - boolean pass = true; - - pass = ProcessWsdlDocument(client.getDocument()); - if (!pass) - throw new Fault("VerifySchemaNamespacesImportsElementsTypes failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyParameterClassificationForHolders - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3013; JAXWS:SPEC:3016; JAXWS:SPEC:3019; JAXWS:SPEC:3027; - * JAXWS:SPEC:3033; JAXWS:SPEC:3034; JAXWS:SPEC:3035; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify correct classification for holder parameters - * - * Conformance Requirement: - Parameter classification - * - */ - public void VerifyParameterClassificationForHolders() throws Fault { - TestUtil.logMsg("VerifyParameterClassificationForHolders"); - boolean pass = true; - - Document document = client.getDocument(); - - Element holderMethodDefault = DescriptionUtils - .getPortTypeOperationNameElement(document, EXPECTED_PORTTYPE_NAME, - "holderMethodDefault"); - - Element holderMethodInOut = DescriptionUtils - .getPortTypeOperationNameElement(document, EXPECTED_PORTTYPE_NAME, - "holderMethodInOut"); - - Element holderMethodOut = DescriptionUtils.getPortTypeOperationNameElement( - document, EXPECTED_PORTTYPE_NAME, "holderMethodOut"); - - pass = verifyClassification(document, holderMethodDefault, "", PARAM_INOUT) - && verifyClassification(document, holderMethodInOut, "varStringInOut", - PARAM_INOUT) - && verifyClassification(document, holderMethodOut, "varStringOut", - PARAM_OUT); - - if (!pass) - throw new Fault("VerifyParameterClassificationForHolders failed"); - else - TestUtil.logMsg("Verification passed"); - - } - - /* - * @testName: VerifyInputOutputReturnAndFaultTypeElementMappings - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3035; JAXWS:SPEC:3013; JAXWS:SPEC:3019; JAXWS:SPEC:3027; - * JAXWS:SPEC:3033; JAXWS:SPEC:3034; JAXWS:SPEC:3058; JAXWS:SPEC:3028; - * JAXWS:SPEC:3029; JAXWS:SPEC:3030; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify that the Java types for all in, out, in/out - * parameter's and return value's are mapped to named XML Schema types using - * the mapping defined in JAXB. Conformance requirement done: - Each method - * parameter and return type is mapped to a valid XML schema type - * - * - */ - public void VerifyInputOutputReturnAndFaultTypeElementMappings() - throws Fault { - TestUtil.logMsg("VerifyInputOutputReturnAndFaultTypeElementMappings"); - boolean pass = true; - - TestUtil.logMsg( - "Get all operation elements for portType: " + EXPECTED_PORTTYPE_NAME); - Element operations[] = DescriptionUtils.getPortTypeOperationNameElements( - client.getDocument(), EXPECTED_PORTTYPE_NAME); - for (int i = 0; i < operations.length; i++) { - String opname = operations[i].getAttribute(WSDL_NAME_ATTR); - Element input = DescriptionUtils.getChildElement(operations[i], - WSDL_NAMESPACE_URI, WSDL_INPUT_LOCAL_NAME); - Element output = DescriptionUtils.getChildElement(operations[i], - WSDL_NAMESPACE_URI, WSDL_OUTPUT_LOCAL_NAME); - Element fault[] = DescriptionUtils.getChildElements(operations[i], - WSDL_NAMESPACE_URI, WSDL_FAULT_LOCAL_NAME); - String imsg = null; - String omsg = null; - String fmsg[] = null; - String imsgstr = null; - String omsgstr = null; - String fmsgstr[] = null; - ArrayList alist1 = new ArrayList(); - ArrayList alist2 = new ArrayList(); - if (input != null) { - imsg = input.getAttribute(WSDL_MESSAGE_ATTR); - imsgstr = imsg.substring(imsg.indexOf(":") + 1); - } - if (output != null) { - omsg = output.getAttribute(WSDL_MESSAGE_ATTR); - omsgstr = omsg.substring(omsg.indexOf(":") + 1); - } - if (fault != null) { - for (int k = 0; k < fault.length; k++) { - String str1 = fault[k].getAttribute(WSDL_MESSAGE_ATTR); - alist1.add(str1); - String str2 = str1.substring(str1.indexOf(":") + 1); - alist2.add(str2); - } - if (alist1.size() > 0) - fmsg = (String[]) alist1.toArray(new String[alist1.size()]); - if (alist2.size() > 0) - fmsgstr = (String[]) alist2.toArray(new String[alist2.size()]); - } - TestUtil.logMsg("operation name is " + opname); - TestUtil.logMsg("input message name is " + imsgstr); - TestUtil.logMsg("output message name is " + omsgstr); - if (fmsgstr == null) - TestUtil.logMsg("fault message name is null"); - else { - for (int k = 0; k < fmsgstr.length; k++) - TestUtil.logMsg("fault message name is " + fmsgstr[k]); - } - Element[] iparts = null; - Element[] oparts = null; - Element[] fparts = null; - if (imsgstr != null) { - iparts = DescriptionUtils.getPartElements(client.getDocument(), - imsgstr); - } - if (omsgstr != null) { - oparts = DescriptionUtils.getPartElements(client.getDocument(), - omsgstr); - } - if (fmsgstr != null) { - Element[] parts = null; - ArrayList alist = new ArrayList(); - for (int k = 0; k < fmsgstr.length; k++) { - parts = DescriptionUtils.getPartElements(client.getDocument(), - fmsgstr[k]); - if (parts != null) { - for (int l = 0; l < parts.length; l++) - alist.add(parts[l]); - } - } - if (alist.size() > 0) - fparts = (Element[]) alist.toArray(new Element[alist.size()]); - } - if (!VerifyTypeElementMappings(iparts, oparts, fparts, opname)) - pass = false; - } - if (!pass) - throw new Fault( - "VerifyInputOutputReturnAndFaultTypeElementMappings failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: ActionFaultActionAndAddressingAnnotationsTest - * - * @assertion_ids: JAXWS:JAVADOC:130; JAXWS:JAVADOC:131; JAXWS:JAVADOC:132; - * JAXWS:JAVADOC:144; JAXWS:SPEC:3043; JAXWS:SPEC:3044; JAXWS:SPEC:3045; - * JAXWS:SPEC:3049; JAXWS:SPEC:3050; JAXWS:SPEC:3051; JAXWS:SPEC:3055; - * JAXWS:SPEC:3059; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations. Verify wsam:Addressing extension element is generated for - * Addressing(enabled=true). Verify that wsp:Optional element is not generated - * for Addressing(required=true). Verify the Action and FaultAction - * annotations are correct in the generated WSDL. - */ - public void ActionFaultActionAndAddressingAnnotationsTest() throws Fault { - TestUtil.logTrace("ActionFaultActionAndAddressingAnnotationsTest"); - boolean pass = true; - - if (!VerifyBindingHasAddressing()) { - pass = false; - TestUtil.logErr("VerifyBindingHasAddressing - FAILED"); - } else { - TestUtil.logMsg("VerifyBindingHasAddressing - PASSED"); - } - if (!VerifyActionFaultAction()) { - pass = false; - TestUtil.logErr("VerifyActionFaultAction - FAILED"); - } else { - TestUtil.logMsg("VerifyActionFaultAction - PASSED"); - } - - if (!pass) - throw new Fault("ActionFaultActionAndAddressingAnnotationsTest failed"); - } - - /* - * @testName: AddressingNotEnabledAnnotationTest - * - * @assertion_ids: JAXWS:SPEC:3048; - * - * @test_Strategy: Generate wsdl from classes and verify wsam:Addressing - * Extension element is not generated for Addressing(enabled=false) annotation - * on 3Impl.java Verify the Addressing annotation is correct in the generated - * WSDL. - */ - public void AddressingNotEnabledAnnotationTest() throws Fault { - TestUtil.logTrace("AddressingNotEnabledAnnotationTest"); - boolean pass = true; - if (VerifyBindingHasNoAddressing()) { - TestUtil.logMsg("VerifyBindingHasNoAddressing - PASSED"); - } else { - pass = false; - TestUtil.logErr("VerifyBindingHasNoAddressing - FAILED"); - } - - if (!pass) { - throw new Fault("AddressingNotEnabledAnnotationTest failed"); - } - } - - /* - * @testName: VerifyAnonymousResponsesAddressingElementTest - * - * @assertion_ids: JAXWS:SPEC:3047; JAXWS:SPEC:3059; JAXWS:JAVADOC:228; - * JAXWS:SPEC:3055; - * - * @test_Strategy: Generate wsdl from classes and verify - * wsam:AnonymousResponses element is generated for - * Addressing(enabled=true,required=true,responses= - * AddressingFeature.ANONYMOUS). Verify the Addressing annotation is correct - * in the generated WSDL. - */ - public void VerifyAnonymousResponsesAddressingElementTest() throws Fault { - TestUtil.logTrace("VerifyAnonymousResponsesAddressingElementTest"); - boolean pass = true; - - testName = "VerifyAnonymousResponsesAddressingElementTest"; - if (!VerifyBindingHasAnonymousResponses()) { - pass = false; - TestUtil.logErr("VerifyBindingHasAnonymousResponses - FAILED"); - } else { - TestUtil.logMsg("VerifyBindingHasAnonymousResponses - PASSED"); - } - - if (!pass) { - throw new Fault("VerifyAnonymousResponsesAddressingElementTest failed"); - } - } - - /* - * @testName: VerifyNonAnonymousResponsesAddressingElementTest - * - * @assertion_ids: JAXWS:SPEC:3047; JAXWS:SPEC:3059; JAXWS:JAVADOC:228; - * JAXWS:SPEC:3055; - * - * @test_Strategy: Generate wsdl from classes and verify - * wsam:NonAnonymousResponses element is generated for - * Addressing(enabled=true,required=true,responses= - * AddressingFeature.NON_ANONYMOUS). Verify the Addressing annotation is - * correct in the generated WSDL. - */ - public void VerifyNonAnonymousResponsesAddressingElementTest() throws Fault { - TestUtil.logTrace("VerifyNonAnonymousResponsesAddressingElementTest"); - boolean pass = true; - - testName = "VerifyNonAnonymousResponsesAddressingElementTest"; - if (!VerifyBindingHasNonAnonymousResponses()) { - pass = false; - TestUtil.logErr("VerifyBindingHasNonAnonymousResponses - FAILED"); - } else { - TestUtil.logMsg("VerifyBindingHasNonAnonymousResponses - PASSED"); - } - - if (!pass) { - throw new Fault( - "VerifyNonAnonymousResponsesAddressingElementTest failed"); - } - } - - /* - * @testName: VerifyAllResponsesAddressingElementsTest - * - * @assertion_ids: JAXWS:SPEC:3047; JAXWS:SPEC:3059; JAXWS:JAVADOC:228; - * JAXWS:SPEC:3055; - * - * @test_Strategy: Generate wsdl from classes and verify - * wsam:AnonymousResponses and wsam:NonAnonymousResponses elements are - * generated for Addressing( - * enabled=true,required=true,responses=AddressingFeature.ALL). Verify the - * Addressing annotation is correct in the generated WSDL. - */ - public void VerifyAllResponsesAddressingElementsTest() throws Fault { - TestUtil.logTrace("VerifyAllResponsesAddressingElementsTest"); - boolean pass = true; - boolean hasAnonymousResponsesElement = false; - boolean hasNonAnonymousResponsesElement = false; - - testName = "VerifyAllResponsesAddressingElementsTest"; - if (VerifyBindingHasAnonymousResponses()) - hasAnonymousResponsesElement = true; - - if (VerifyBindingHasNonAnonymousResponses()) - hasNonAnonymousResponsesElement = true; - - if (hasAnonymousResponsesElement && hasNonAnonymousResponsesElement) - TestUtil.logMsg("VerifyAllResponsesAddressingElementsTest - PASSED"); - else if (!hasAnonymousResponsesElement && !hasNonAnonymousResponsesElement) - TestUtil.logMsg("VerifyAllResponsesAddressingElementsTest - PASSED"); - else { - TestUtil.logErr("VerifyAllResponsesAddressingElementsTest - FAILED"); - pass = false; - } - - if (!pass) { - throw new Fault("VerifyAllResponsesAddressingElementsTest failed"); - } - } - - private boolean VerifyBindingHasAddressing() throws Fault { - TestUtil.logMsg("VerifyBindingHasAddressing"); - boolean pass = false; - boolean debug = true; - - Element[] bindings = DescriptionUtils.getBindings(client2.getDocument()); - TestUtil.logMsg( - "Find wsam:Addressing policys via [wsp:Policy] or [wsp:PolicyReference] tags"); - NodeList policyrefs = bindings[0].getElementsByTagNameNS(WSP_NAMESPACE_URI, - WSP_POLICYREFERENCE_LOCAL_NAME); - Element[] policys = DescriptionUtils.getChildElements(client2.getDocument(), - WSP_NAMESPACE_URI, WSP_POLICY_LOCAL_NAME); - Element[] bpolicys = DescriptionUtils.getChildElements(bindings[0], - WSP_NAMESPACE_URI, WSP_POLICY_LOCAL_NAME); - if (policyrefs.getLength() == 0 && policys.length == 0 - && bpolicys.length == 0) { - TestUtil.logErr("No wsam:Addressing policy element was found on binding"); - return false; - } - TestUtil.logMsg( - "Search for wsa:Addressing policy element via wsp:PolicyReference tag on binding"); - for (int i = 0; i < policyrefs.getLength(); i++) { - Element element = (Element) policyrefs.item(i); - String uri = element.getAttribute("URI"); - for (int j = 0; j < policys.length; j++) { - NamedNodeMap map = policys[j].getAttributes(); - for (int k = 0; k < map.getLength(); k++) { - Node node = map.item(k); - String nodeValue = "#" + node.getNodeValue(); - if (uri.equals(nodeValue)) { - NodeList list = policys[j].getElementsByTagNameNS( - WSAM_NAMESPACE_URI, WSAM_ADDRESSING_LOCAL_NAME); - Element addressing = (Element) list.item(0); - if (addressing != null) { - TestUtil.logMsg("Found wsa:Addressing policy element"); - if (debug) - XMLUtils.xmlDumpDOMNodes(addressing); - pass = true; - NamedNodeMap map2 = addressing.getAttributes(); - for (int m = 0; m < map2.getLength(); m++) { - Node node2 = map2.item(m); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR)) - TestUtil.logMsg( - "Found wsp:Optional attribute. It should be false."); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR) - && !node2.getNodeValue().equals("false")) { - TestUtil.logErr( - "wsp:Optional attribute should not exist or should be false"); - pass = false; - break; - } - } - break; - } - } - } - if (!pass) - break; - } - } - if (!pass) { - TestUtil.logMsg( - "Search for wsa:Addressing policy element via explicit wsp:Policy tag on binding"); - Element addressing = DescriptionUtils.getChildElement(bindings[0], - WSAM_NAMESPACE_URI, WSAM_ADDRESSING_LOCAL_NAME); - if (addressing == null) { - TestUtil - .logErr("No wsam:Addressing policy element was found on binding"); - pass = false; - } else { - TestUtil.logMsg("Found wsa:Addressing policy element"); - if (debug) - XMLUtils.xmlDumpDOMNodes(addressing); - pass = true; - NamedNodeMap map2 = addressing.getAttributes(); - for (int m = 0; m < map2.getLength(); m++) { - Node node2 = map2.item(m); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR)) - TestUtil - .logMsg("Found wsp:Optional attribute. It should be false."); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR) - && !node2.getNodeValue().equals("false")) { - TestUtil.logErr( - "wsp:Optional attribute should not exist or should be false"); - pass = false; - break; - } - } - } - } - return pass; - } - - private boolean VerifyBindingHasAnonymousResponses() throws Fault { - return VerifyBindingHasAnonymousOrNonAnonymousResponses( - WSAM_ANONYMOUS_RESPONSES_LOCAL_NAME); - } - - private boolean VerifyBindingHasNonAnonymousResponses() throws Fault { - return VerifyBindingHasAnonymousOrNonAnonymousResponses( - WSAM_NONANONYMOUS_RESPONSES_LOCAL_NAME); - } - - private boolean VerifyBindingHasAnonymousOrNonAnonymousResponses( - String responseType) throws Fault { - TestUtil.logMsg("VerifyBindingHasAnonymousOrNonAnonymousResponses"); - boolean pass = false; - boolean debug = true; - - Element[] bindings; - if (testName.equals("VerifyAnonymousResponsesAddressingElementTest")) - bindings = DescriptionUtils.getBindings(client4.getDocument()); - else if (testName - .equals("VerifyNonAnonymousResponsesAddressingElementTest")) - bindings = DescriptionUtils.getBindings(client5.getDocument()); - else - bindings = DescriptionUtils.getBindings(client6.getDocument()); - TestUtil.logMsg( - "Find wsam:Addressing policys via [wsp:Policy] or [wsp:PolicyReference] tags"); - NodeList policyrefs = bindings[0].getElementsByTagNameNS(WSP_NAMESPACE_URI, - WSP_POLICYREFERENCE_LOCAL_NAME); - Element[] bpolicys = DescriptionUtils.getChildElements(bindings[0], - WSP_NAMESPACE_URI, WSP_POLICY_LOCAL_NAME); - Element[] policys; - if (testName.equals("VerifyAnonymousResponsesAddressingElementTest")) - policys = DescriptionUtils.getChildElements(client4.getDocument(), - WSP_NAMESPACE_URI, WSP_POLICY_LOCAL_NAME); - else if (testName - .equals("VerifyNonAnonymousResponsesAddressingElementTest")) - policys = DescriptionUtils.getChildElements(client5.getDocument(), - WSP_NAMESPACE_URI, WSP_POLICY_LOCAL_NAME); - else - policys = DescriptionUtils.getChildElements(client6.getDocument(), - WSP_NAMESPACE_URI, WSP_POLICY_LOCAL_NAME); - if (policyrefs.getLength() == 0 && policys.length == 0 - && bpolicys.length == 0) { - TestUtil.logErr("No wsam:Addressing policy element was found on binding"); - return false; - } - TestUtil.logMsg( - "Search for wsa:Addressing policy element via wsp:PolicyReference tag on binding"); - for (int i = 0; i < policyrefs.getLength(); i++) { - Element element = (Element) policyrefs.item(i); - String uri = element.getAttribute("URI"); - for (int j = 0; j < policys.length; j++) { - NamedNodeMap map = policys[j].getAttributes(); - Node node; - String nodeValue; - for (int k = 0; k < map.getLength(); k++) { - node = map.item(k); - nodeValue = "#" + node.getNodeValue(); - if (uri.equals(nodeValue)) { - NodeList list = policys[j].getElementsByTagNameNS( - WSAM_NAMESPACE_URI, WSAM_ADDRESSING_LOCAL_NAME); - Element addressing = (Element) list.item(0); - if (addressing != null) { - TestUtil.logMsg("Found wsa:Addressing policy element"); - if (debug) - XMLUtils.xmlDumpDOMNodes(addressing); - NamedNodeMap map2 = addressing.getAttributes(); - Node node2; - for (int m = 0; m < map2.getLength(); m++) { - node2 = map2.item(m); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR)) - TestUtil.logMsg( - "Found wsp:Optional attribute. It should be false."); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR) - && !node2.getNodeValue().equals("false")) { - TestUtil.logErr( - "wsp:Optional attribute should not exist or should be false"); - pass = false; - break; - } - } - if (!pass) { - list = policys[j].getElementsByTagNameNS(WSAM_NAMESPACE_URI, - responseType); - Element anonymousOrNonanonymous = (Element) list.item(0); - if (anonymousOrNonanonymous != null) { - if (responseType.equals(WSAM_ANONYMOUS_RESPONSES_LOCAL_NAME)) - TestUtil.logMsg("Found wsa:Anonymous policy element"); - else - TestUtil.logMsg("Found wsa:NonAnonymous policy element"); - pass = true; - map2 = anonymousOrNonanonymous.getAttributes(); - for (int m = 0; m < map2.getLength(); m++) { - node2 = map2.item(m); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR)) - TestUtil.logMsg( - "Found wsp:Optional attribute. It should be false."); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR) - && !node2.getNodeValue().equals("false")) { - TestUtil.logErr( - "wsp:Optional attribute should not exist or should be false"); - pass = false; - break; - } - } - } else if (testName - .equals("VerifyAllResponsesAddressingElementsTest")) - pass = true; - } - } - } - } - if (!pass) - break; - } - } - if (!pass) { - TestUtil.logMsg( - "Search for wsa:Addressing policy element via explicit wsp:Policy tag on binding"); - Element addressing = DescriptionUtils.getChildElement(bindings[0], - WSAM_NAMESPACE_URI, WSAM_ADDRESSING_LOCAL_NAME); - if (addressing == null) { - TestUtil - .logErr("No wsam:Addressing policy element was found on binding"); - pass = false; - } else { - TestUtil.logMsg("Found wsa:Addressing policy element"); - if (debug) - XMLUtils.xmlDumpDOMNodes(addressing); - NamedNodeMap map2 = addressing.getAttributes(); - Node node2; - for (int m = 0; m < map2.getLength(); m++) { - node2 = map2.item(m); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR)) - TestUtil - .logMsg("Found wsp:Optional attribute. It should be false."); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR) - && !node2.getNodeValue().equals("false")) { - TestUtil.logErr( - "wsp:Optional attribute should not exist or should be false"); - pass = false; - break; - } - } - } - if (!pass) { - Element anonymousOrNonanonymous; - if (responseType.equals(WSAM_ANONYMOUS_RESPONSES_LOCAL_NAME)) - anonymousOrNonanonymous = DescriptionUtils.getChildElement( - bindings[0], WSAM_NAMESPACE_URI, - WSAM_ANONYMOUS_RESPONSES_LOCAL_NAME); - else - anonymousOrNonanonymous = DescriptionUtils.getChildElement( - bindings[0], WSAM_NAMESPACE_URI, - WSAM_NONANONYMOUS_RESPONSES_LOCAL_NAME); - if (anonymousOrNonanonymous != null) { - if (responseType.equals(WSAM_ANONYMOUS_RESPONSES_LOCAL_NAME)) - TestUtil.logMsg("Found wsa:Anonymous policy element"); - else - TestUtil.logMsg("Found wsa:NonAnonymous policy element"); - pass = true; - TestUtil.logMsg("See if wsp:Optional attribute exists"); - NamedNodeMap map2 = anonymousOrNonanonymous.getAttributes(); - Node node2; - for (int m = 0; m < map2.getLength(); m++) { - node2 = map2.item(m); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR)) - TestUtil - .logMsg("Found wsp:Optional attribute. It should be false."); - if (node2.getNodeName().equals(WSP_OPTIONAL_ATTR) - && !node2.getNodeValue().equals("false")) { - TestUtil.logErr( - "wsp:Optional attribute should not exist or should be false"); - pass = false; - break; - } - } - } else if (testName.equals("VerifyAllResponsesAddressingElementsTest")) - pass = true; - } - } - return pass; - } - - private boolean VerifyBindingHasNoAddressing() throws Fault { - TestUtil.logMsg("VerifyBindingHasNoAddressing"); - boolean pass = false; - - TestUtil.logMsg("Make sure wsa:Addressing policy assertion does not exist"); - Element[] bindings = DescriptionUtils.getBindings(client3.getDocument()); - NodeList policyrefs = bindings[0].getElementsByTagNameNS(WSP_NAMESPACE_URI, - WSP_POLICYREFERENCE_LOCAL_NAME); - Element[] policys = DescriptionUtils.getChildElements(bindings[0], - WSP_NAMESPACE_URI, WSP_POLICY_LOCAL_NAME); - if (policyrefs.getLength() == 0 && policys.length == 0) { - return true; - } - for (int i = 0; i < policyrefs.getLength(); i++) { - Element element = (Element) policyrefs.item(i); - String uri = element.getAttribute("URI"); - for (int j = 0; j < policys.length; j++) { - NamedNodeMap map = policys[j].getAttributes(); - for (int k = 0; k < map.getLength(); k++) { - Node node = map.item(k); - String nodeValue = "#" + node.getNodeValue(); - if (uri.equals(nodeValue)) { - NodeList list = policys[j].getElementsByTagNameNS( - WSAM_NAMESPACE_URI, WSAM_ADDRESSING_LOCAL_NAME); - Element addressing = (Element) list.item(0); - if (addressing == null) - pass = true; - else { - TestUtil.logErr( - "wsam:Addressing Extension Element exists on binding"); - pass = false; - break; - } - } - } - if (!pass) - break; - } - } - if (!pass) { - Element addressing = DescriptionUtils.getChildElement(bindings[0], - WSAM_NAMESPACE_URI, WSAM_ADDRESSING_LOCAL_NAME); - if (addressing == null) - pass = true; - else { - TestUtil.logErr( - "wsam:Addressing Extension Element must not exist on binding"); - pass = false; - } - } - return pass; - } - - private boolean VerifyActionFaultAction() throws Fault { - TestUtil.logMsg("VerifyActionFaultAction"); - boolean pass = true; - - TestUtil.logMsg("Checking for operation names for portType: " - + EXPECTED_ADDRESSING_PORTTYPE_NAME); - Element operations[] = DescriptionUtils.getPortTypeOperationNameElements( - client2.getDocument(), EXPECTED_ADDRESSING_PORTTYPE_NAME); - - for (int i = 0; i < operations.length; i++) { - String name = operations[i].getAttribute(WSDL_NAME_ATTR); - TestUtil.logMsg("Operation-> " + name); - - Element input = DescriptionUtils.getChildElement(operations[i], - WSDL_NAMESPACE_URI, WSDL_INPUT_LOCAL_NAME); - Element output = DescriptionUtils.getChildElement(operations[i], - WSDL_NAMESPACE_URI, WSDL_OUTPUT_LOCAL_NAME); - Element fault = DescriptionUtils.getChildElement(operations[i], - WSDL_NAMESPACE_URI, WSDL_FAULT_LOCAL_NAME); - - String iaction = "", oaction = "", faction = ""; - - if (input != null) - iaction = input.getAttributeNS(WSAM_NAMESPACE_URI, - WSAM_ACTION_LOCAL_NAME); - if (output != null) - oaction = output.getAttributeNS(WSAM_NAMESPACE_URI, - WSAM_ACTION_LOCAL_NAME); - if (fault != null) - faction = fault.getAttributeNS(WSAM_NAMESPACE_URI, - WSAM_ACTION_LOCAL_NAME); - - TestUtil.logMsg("iaction=" + iaction); - TestUtil.logMsg("oaction=" + oaction); - TestUtil.logMsg("faction=" + faction); - - if (name.equals("address1")) { - if (iaction.equals("input1") && oaction.equals( - "http://rpclitservice.org/wsdl/AddressingEndpoint/address1Response") - && faction.equals("")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - } else if (name.equals("address2")) { - if (iaction.equals( - "http://rpclitservice.org/wsdl/AddressingEndpoint/address2Request") - && oaction.equals("output2") && faction.equals("")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - - } else if (name.equals("address3")) { - if (iaction.equals( - "http://rpclitservice.org/wsdl/AddressingEndpoint/address3Request") - && oaction.equals( - "http://rpclitservice.org/wsdl/AddressingEndpoint/address3Response") - && faction.equals("fault1")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - - } else if (name.equals("address4")) { - if (iaction.equals( - "http://rpclitservice.org/wsdl/AddressingEndpoint/address4Request") - && oaction.equals("output4") && faction.equals("fault1")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - - } else if (name.equals("address5")) { - if (iaction.equals("input5") && oaction.equals("output5") - && faction.equals("fault1")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - - } else if (name.equals("address6")) { - if (iaction.equals( - "http://rpclitservice.org/wsdl/AddressingEndpoint/address6Request") - && oaction.equals( - "http://rpclitservice.org/wsdl/AddressingEndpoint/address6Response") - && faction.equals( - "http://rpclitservice.org/wsdl/AddressingEndpoint/address6/Fault/MyFault1")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - - } else if (name.equals("address7")) { - if (iaction.equals( - "http://rpclitservice.org/wsdl/AddressingEndpoint/address7Request") - && oaction.equals( - "http://rpclitservice.org/wsdl/AddressingEndpoint/address7Response") - && faction.equals( - "http://rpclitservice.org/wsdl/AddressingEndpoint/address7/Fault/MyFault1")) - TestUtil.logMsg("verification PASSED for " + name); - else { - TestUtil.logErr("verification FAILED for " + name); - pass = false; - } - } - - } - return pass; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/ConfigHeader.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/ConfigHeader.java deleted file mode 100644 index ca6d721527..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/ConfigHeader.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -public class ConfigHeader { - - protected String message; - - protected String testName; - - protected boolean mustUnderstand; - - /** - * Gets the value of the message property. - */ - public String getMessage() { - return message; - } - - /** - * Sets the value of the message property. - */ - public void setMessage(String value) { - this.message = value; - } - - /** - * Gets the value of the testName property. - */ - public String getTestName() { - return testName; - } - - /** - * Sets the value of the testName property. - */ - public void setTestName(String value) { - this.testName = value; - } - - /** - * Gets the value of the mustUnderstand property. - */ - public boolean isMustUnderstand() { - return mustUnderstand; - } - - /** - * Sets the value of the mustUnderstand property. - */ - public void setMustUnderstand(boolean value) { - this.mustUnderstand = value; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/ConfigHeaderFault.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/ConfigHeaderFault.java deleted file mode 100644 index aaa3d1a8b4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/ConfigHeaderFault.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -public class ConfigHeaderFault extends Exception { - - public ConfigHeaderFault(String message) { - super(message); - } - - public ConfigHeaderFault(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/InheritedInterface.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/InheritedInterface.java deleted file mode 100644 index bc9a9170e4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/InheritedInterface.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -public interface InheritedInterface { - public String hello(String hello); - - public String bye(String bye); -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/J2WRLSharedBean.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/J2WRLSharedBean.java deleted file mode 100644 index b93204bfcc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/J2WRLSharedBean.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -public class J2WRLSharedBean { - - private int myInt; - - private String myString; - - public J2WRLSharedBean() { - } - - public J2WRLSharedBean(int i, String s) { - setMyInt(i); - setMyString(s); - } - - public int getMyInt() { - return myInt; - } - - public void setMyInt(int myInt) { - this.myInt = myInt; - } - - public String getMyString() { - return myString; - } - - public void setMyString(String myString) { - this.myString = myString; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/J2WRLSharedEndpoint.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/J2WRLSharedEndpoint.java deleted file mode 100644 index 60e48e43e3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/J2WRLSharedEndpoint.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -@jakarta.jws.WebService(name = "MYJ2WRLSharedEndpoint", targetNamespace = "http://rpclitservice.org/wsdl") -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC, use = jakarta.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = jakarta.jws.soap.SOAPBinding.ParameterStyle.WRAPPED) -public interface J2WRLSharedEndpoint extends InheritedInterface { - - public java.lang.String arrayOperationFromClient(java.lang.String[] arg0); - - public com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations.J2WRLSharedBean getBean(); - - public java.lang.String[] arrayOperation(); - - @jakarta.jws.WebMethod(operationName = "stringOperation") - @jakarta.jws.WebResult(name = "rvalue", targetNamespace = "http://rpclitservice.org/wsdl") - public java.lang.String stringOperation( - @jakarta.jws.WebParam(name = "ivalue0") java.lang.String ivalue0); - - // Holder method with annotations for parameters - public String holderMethodDefault( - jakarta.xml.ws.Holder varStringDefault); - - public String holderMethodInOut( - @jakarta.jws.WebParam(name = "varStringInOut", mode = jakarta.jws.WebParam.Mode.INOUT) jakarta.xml.ws.Holder varStringInOut); - - public String holderMethodOut( - @jakarta.jws.WebParam(name = "varStringOut", mode = jakarta.jws.WebParam.Mode.OUT) jakarta.xml.ws.Holder varStringOut); - - // A method with more than 1 input parts - public java.lang.String oneTwoThree(int one, long two, double three); - - // An overloaded method helloWorld - public java.lang.String helloWorld(); - - // Annotation to disambiguate name of overloaded method helloWorld - @jakarta.jws.WebMethod(operationName = "helloWorld2") - public java.lang.String helloWorld(String hello); - - @jakarta.jws.WebMethod - @jakarta.jws.Oneway - public void oneWayOperation(); - - @jakarta.jws.WebMethod - @jakarta.jws.Oneway - public void oneWayOperationWithParams(Integer i, Long l, Double d); - - @jakarta.jws.WebMethod - public void operationWithHeaderAndHeaderFaultAndFault( - @jakarta.jws.WebParam(name = "ConfigHeader", header = true, mode = jakarta.jws.WebParam.Mode.IN) ConfigHeader configheader) - throws ConfigHeaderFault, MyFault, MyOtherFault; -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/J2WRLSharedEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/J2WRLSharedEndpointImpl.java deleted file mode 100644 index da8d137911..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/J2WRLSharedEndpointImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.BindingType; - -import jakarta.jws.WebService; - -@WebService(portName = "J2WRLSharedEndpointPort", serviceName = "J2WRLSharedService", targetNamespace = "http://rpclitservice.org/wsdl", endpointInterface = "com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations.J2WRLSharedEndpoint") -@BindingType(value = jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING) -public class J2WRLSharedEndpointImpl implements J2WRLSharedEndpoint { - public String oneTwoThree(int one, long two, double three) { - return "" + one + ":" + two + ":" + three; - } - - public String holderMethodDefault( - jakarta.xml.ws.Holder varStringDefault) { - varStringDefault.value = "holderMethodDefault"; - return varStringDefault.value; - } - - public String holderMethodInOut( - jakarta.xml.ws.Holder varStringInOut) { - varStringInOut.value = "holderMethodInOut"; - return varStringInOut.value; - } - - public String holderMethodOut( - jakarta.xml.ws.Holder varStringOut) { - varStringOut.value = "holderMethodOut"; - return varStringOut.value; - } - - public String helloWorld() { - return "hello world"; - } - - public String helloWorld(String hello) { - return hello; - } - - public String stringOperation(String param) { - return param; - } - - public String[] arrayOperation() { - return new String[] { "one", "two", "three" }; - } - - public J2WRLSharedBean getBean() { - return new J2WRLSharedBean(5, "A String"); - } - - public String arrayOperationFromClient(String[] array) { - return "success"; - } - - public void oneWayOperation() { - } - - public void oneWayOperationWithParams(Integer i, Long l, Double d) { - } - - public void operationWithHeaderAndHeaderFaultAndFault( - ConfigHeader configheader) - throws ConfigHeaderFault, MyFault, MyOtherFault { - } - - public String hello(String hello) { - return hello; - } - - public String bye(String bye) { - return bye; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyFault.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyFault.java deleted file mode 100644 index c69104e992..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyFault.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -public class MyFault extends Exception { - - public MyFault(String message) { - super(message); - } - - public MyFault(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyFault1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyFault1.java deleted file mode 100644 index 8c19466d81..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyFault1.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -public class MyFault1 extends Exception { - - public MyFault1(String message) { - super(message); - } - - public MyFault1(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyFault2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyFault2.java deleted file mode 100644 index f1c1c19b4f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyFault2.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -public class MyFault2 extends Exception { - - public MyFault2(String message) { - super(message); - } - - public MyFault2(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyOtherFault.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyOtherFault.java deleted file mode 100644 index 4ea57b968e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyOtherFault.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -@jakarta.xml.ws.WebFault(name = "MyOtherFault", targetNamespace = "http://rpclitservice.org/wsdl", faultBean = "MyOtherFaultBean") -public class MyOtherFault extends Exception { - private MyOtherFaultBean faultInfo; - - public MyOtherFault(String message, MyOtherFaultBean faultInfo) { - super(message); - this.faultInfo = faultInfo; - } - - public MyOtherFault(String message, MyOtherFaultBean faultInfo, - Throwable cause) { - super(message, cause); - this.faultInfo = faultInfo; - } - - public MyOtherFaultBean getFaultInfo() { - return faultInfo; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyOtherFaultBean.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyOtherFaultBean.java deleted file mode 100644 index c0a5b374ff..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/MyOtherFaultBean.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withannotations; - -import jakarta.xml.bind.annotation.XmlRootElement; - -@XmlRootElement(name = "MyOtherFaultBean", namespace = "http://rpclitservice.org/wsdl") -public class MyOtherFaultBean { - protected String message; - - public String getMessage() { - return message; - } - - public void setMessage(String value) { - this.message = value; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/build.xml deleted file mode 100644 index e367b9178f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withannotations/build.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/Client.java deleted file mode 100644 index 55414403e2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/Client.java +++ /dev/null @@ -1,409 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withoutannotations; - -import com.sun.ts.lib.util.*; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import com.sun.ts.tests.jaxws.sharedclients.DescriptionClient; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.tests.jaxws.wsi.j2w.NamespaceAttributeVerifier; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /* - * The client. - */ - private DescriptionClient client; - - /* - * The document. - */ - private Document document; - - /** - * The generated WSDL file. - */ - private static final String WSDLLOC_URL = "j2wrlwithoutannotations.wsdlloc.1"; - - private static final String TSHOME = "ts.home"; - - private String wsdlFile; - - private String tshome = null; - - private String wsdlFileUrl = null; - - private static final String EXPECTED_TARGETNAMESPACE = "http://withoutannotations.literal.rpc.j2wmapping.mapping.jaxws.tests.ts.sun.com/"; - - private static final String EXPECTED_PORTTYPE_NAME = "J2WRLSharedEndpoint"; - - private static final String EXPECTED_PORT_NAME = "J2WRLSharedEndpointImplPort"; - - private static final String EXPECTED_SERVICE_NAME = "J2WRLSharedEndpointImplService"; - - private boolean debug = false; - - /* - * Test entry point. - * - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: ts.home; - */ - public void setup(String[] args, Properties properties) throws Fault { - tshome = properties.getProperty(TSHOME); - try { - wsdlFile = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - } catch (Exception e) { - throw new Fault("Failed getting wsdl prop", e); - } - wsdlFileUrl = "file:" + tshome + wsdlFile; - TestUtil.logMsg("wsdlFileUrl=" + wsdlFileUrl); - client = new DescriptionClient(); - client.setURL(wsdlFileUrl); - TestUtil.logMsg("setup ok"); - } - - public void cleanup() { - TestUtil.logMsg("cleanup"); - } - - /* - * @testName: VerifyTargetNamespaceWithoutAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3013; - * JAXWS:SPEC:3019; JAXWS:SPEC:3027; JAXWS:SPEC:3033; JAXWS:SPEC:3034; - * JAXWS:SPEC:3035; - * - * @test_Strategy: Verify that the targetNamespace in the generated WSDL is - * derived from the package name when no targetNamespace is specified in the - * jakarta.jws.WebService annotation. This is the default value case. (Java to - * WSDL 1.1 Mapping). Conformance requirement done: - Package name mapping - * - */ - public void VerifyTargetNamespaceWithoutAnnotation() throws Fault { - TestUtil.logMsg("VerifyTargetNamespaceWithoutAnnotation"); - boolean pass = true; - - try { - document = client.getDocument(); - String targetNamespace = document.getDocumentElement() - .getAttribute(WSDL_TARGETNAMESPACE_ATTR); - TestUtil - .logMsg("Verify that targetNamespace is correct in generated WSDL"); - if (!targetNamespace.equals(EXPECTED_TARGETNAMESPACE)) { - TestUtil.logErr("TargetNamespace is incorrect, expected: " - + EXPECTED_TARGETNAMESPACE + ", got: " + targetNamespace); - pass = false; - } else - TestUtil.logMsg("TargetNamespace is correct: " + targetNamespace); - } catch (Exception e) { - TestUtil.logErr("Caught exception:" + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("VerifyTargetNamespaceWithoutAnnotation failed"); - } - - /* - * @testName: VerifyOneWayOperationWithoutAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3011; - * JAXWS:SPEC:3013; JAXWS:SPEC:3019; JAXWS:SPEC:3027; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; - * - * @test_Strategy: Verify that the operation oneWayOperation in the generated - * WSDL is either mapped one way or two way when it is not specified as Oneway - * by using the jakarta.jws.Oneway annotation. The spec is vague in this regard - * so you must assume that the mapping could be one way or two way. (Java to - * WSDL 1.1 Mapping). Conformance requirement done: - One-way mapping or - * Two-way mapping - * - * - */ - public void VerifyOneWayOperationWithoutAnnotation() throws Fault { - TestUtil.logMsg("VerifyOneWayOperationWithoutAnnotation"); - boolean pass = true; - boolean foundOperation = false; - boolean foundInputElement = false; - boolean foundOutputElement = false; - String operationName = null; - - try { - document = client.getDocument(); - TestUtil.logMsg( - "Verify that operation=oneWayOperation is mapped to oneway in generated WSDL"); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - Element[] operations = DescriptionUtils.getChildElements(bindings[i], - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int j = 0; j < operations.length; j++) { - operationName = operations[j].getAttribute("name"); - if (operationName.equals("oneWayOperation")) { - if (debug) - DescriptionUtils.dumpDOMNodes(operations[j]); - foundOperation = true; - Element[] children = DescriptionUtils - .getChildElements(operations[j]); - TestUtil.logMsg( - "Verify that operation=oneWayOperation has an element"); - for (int k = 0; k < children.length; k++) { - String localName = children[k].getLocalName(); - if (localName.equals(WSDL_OUTPUT_LOCAL_NAME)) { - foundOutputElement = true; - } else if (localName.equals(WSDL_INPUT_LOCAL_NAME)) { - foundInputElement = true; - } else if (localName.equals(WSDL_FAULT_LOCAL_NAME)) { - TestUtil.logErr("Operation name: " + operationName - + " should not have a element"); - pass = false; - } else if (localName.equals(SOAP_HEADER_LOCAL_NAME)) { - TestUtil.logErr("Operation name: " + operationName - + " should not have a element"); - pass = false; - } else if (localName.equals(SOAP_HEADERFAULT_LOCAL_NAME)) { - TestUtil.logErr("Operation name: " + operationName - + " should not have a element"); - pass = false; - } - } - if (foundOperation) - break; - } - if (foundOperation) - break; - } - } - if (!foundOperation) { - TestUtil.logErr( - "Could not find operation=oneWayOperation in generated WSDL"); - pass = false; - } - if (!foundInputElement) { - TestUtil.logErr("Operation name: " + operationName - + " should have an element"); - pass = false; - } - if (pass) - TestUtil.logMsg( - "The operation=oneWayOperation in correctly mapped to oneway in generated WSDL"); - } catch (Exception e) { - TestUtil.logErr("Caught exception:" + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("VerifyOneWayOperationWithoutAnnotation failed"); - } - - /* - * @testName: VerifySOAPElementNamespaceUseAttributeWithoutAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3013; - * JAXWS:SPEC:3019; JAXWS:SPEC:3027; JAXWS:SPEC:3033; JAXWS:SPEC:3034; - * JAXWS:SPEC:3035; - * - * @test_Strategy: Verify the namespace and use attributes for all SOAP - * Elements in the generated WSDL (Java to WSDL 1.1 Mapping and BP1.1). - * Conformance requirement done: - verify use attribute of literal for all - * SOAP elements - verify namespace attribute on all soap:body elements - * - * - */ - public void VerifySOAPElementNamespaceUseAttributeWithoutAnnotation() - throws Fault { - TestUtil.logMsg("VerifySOAPElementNamespaceUseAttributeWithoutAnnotation"); - boolean pass = true; - - Document document = client.getDocument(); - TestUtil.logMsg( - "Verify that namespace and use attribute does exist on soap:body elements"); - NamespaceAttributeVerifier verifier = new NamespaceAttributeVerifier( - document, 2717); - verifier.verify(); - TestUtil.logMsg( - "Verify that namespace attribute does not exist for soap:fault, " - + "soap:header, soap:headerfault elements"); - verifier = new NamespaceAttributeVerifier(document, 2726); - verifier.verify(); - if (pass) - TestUtil.logMsg("Verification passed"); - if (!pass) - throw new Fault( - "VerifySOAPElementNamespaceUseAttributeWithoutAnnotation failed"); - } - - /* - * @testName: VerifySOAPBindingTransportStyleAttributeWithoutAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3013; - * JAXWS:SPEC:3019; JAXWS:SPEC:3027; JAXWS:SPEC:3033; JAXWS:SPEC:3034; - * JAXWS:SPEC:3035; JAXWS:SPEC:3041; JAXWS:SPEC:3042; - * - * @test_Strategy: Verify the soap:binding transport and style attributes in - * the generated WSDL. (Java to WSDL 1.1 Mapping and BP1.1). Conformance - * requirement done: - SOAP binding support - SOAP binding style required - - * SOAP binding transport required - * - * - */ - public void VerifySOAPBindingTransportStyleAttributeWithoutAnnotation() - throws Fault { - TestUtil - .logMsg("VerifySOAPBindingTransportStyleAttributeWithoutAnnotation"); - boolean pass = true; - - Document document = client.getDocument(); - TestUtil.logMsg("Verify soap:binding transport and style attribute"); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - if (debug) - DescriptionUtils.dumpDOMNodes(bindings[i]); - Element soapBinding = DescriptionUtils.getChildElement(bindings[i], - SOAP_NAMESPACE_URI, SOAP_BINDING_LOCAL_NAME); - if (soapBinding == null) { - TestUtil.logErr("soap:binding is null unexpected"); - pass = false; - } else { - String style = soapBinding.getAttribute(SOAP_STYLE_ATTR); - if (!style.equals(SOAP_RPC)) { - TestUtil.logErr("soap:binding style attribute incorrect, expected: " - + SOAP_RPC + ", got: " + style); - pass = false; - } - String transport = soapBinding.getAttribute(SOAP_TRANSPORT_ATTR); - if (!transport.equals(SOAP_TRANSPORT)) { - TestUtil - .logErr("soap:binding transport attribute incorrect, expected: " - + SOAP_TRANSPORT + ", got: " + transport); - pass = false; - } - } - } - if (pass) - TestUtil.logMsg("Verification passed"); - if (!pass) - throw new Fault( - "VerifySOAPBindingTransportStyleAttributeWithoutAnnotation failed"); - } - - /* - * @testName: VerifyPortTypeNameWithoutAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3013; - * JAXWS:SPEC:3019; JAXWS:SPEC:3027; JAXWS:SPEC:3033; JAXWS:SPEC:3034; - * JAXWS:SPEC:3035; - * - * @test_Strategy: Verify the wsdl:portType name is correct in the generated - * WSDL. Conformance requirement done: - portType naming - * - * - */ - public void VerifyPortTypeNameWithoutAnnotation() throws Fault { - TestUtil.logMsg("VerifyPortTypeNameWithoutAnnotation"); - boolean pass = true; - - TestUtil.logMsg("Checking for portType name verification of: " - + EXPECTED_PORTTYPE_NAME); - pass = DescriptionUtils.isPortTypeNameAttr(client.getDocument(), - EXPECTED_PORTTYPE_NAME); - if (!pass) - throw new Fault("VerifyPortTypeNameWithoutAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyServiceNameWithoutAnnotation - * - * @assertion_ids: JAXWS:SPEC:3037; - * - * @test_Strategy: Verify the wsdl:service name is correct in the generated - * WSDL. Conformance requirement done: - service naming - * - * - */ - public void VerifyServiceNameWithoutAnnotation() throws Fault { - TestUtil.logMsg("VerifyServiceNameWithoutAnnotation"); - boolean pass = true; - - TestUtil.logMsg( - "Checking for service name verification of: " + EXPECTED_SERVICE_NAME); - pass = DescriptionUtils.isServiceNameAttr(client.getDocument(), - EXPECTED_SERVICE_NAME); - if (!pass) - throw new Fault("VerifyServiceNameWithoutAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } - - /* - * @testName: VerifyPortNameWithoutAnnotation - * - * @assertion_ids: JAXWS:SPEC:3000; JAXWS:SPEC:3001; JAXWS:SPEC:3002; - * JAXWS:SPEC:3004; JAXWS:SPEC:3005; JAXWS:SPEC:3007; JAXWS:SPEC:3008; - * JAXWS:SPEC:3012; JAXWS:SPEC:3019; JAXWS:SPEC:3020; JAXWS:SPEC:3033; - * JAXWS:SPEC:3034; JAXWS:SPEC:3035; - * - * @test_Strategy: Verify the wsdl:port name is correct in the generated WSDL. - * Conformance requirement done: - port naming - * - * - */ - public void VerifyPortNameWithoutAnnotation() throws Fault { - TestUtil.logMsg("VerifyPortNameWithoutAnnotation"); - boolean pass = true; - - TestUtil.logMsg( - "Checking for port name verification of: " + EXPECTED_PORT_NAME); - pass = DescriptionUtils.isPortNameAttr(client.getDocument(), - EXPECTED_PORT_NAME); - if (!pass) - throw new Fault("VerifyPortNameWithoutAnnotation failed"); - else - TestUtil.logMsg("Verification passed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/J2WRLSharedBean.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/J2WRLSharedBean.java deleted file mode 100644 index 7726885cdc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/J2WRLSharedBean.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withoutannotations; - -public class J2WRLSharedBean { - - private int myInt; - - private String myString; - - public J2WRLSharedBean() { - } - - public J2WRLSharedBean(int i, String s) { - setMyInt(i); - setMyString(s); - } - - public int getMyInt() { - return myInt; - } - - public void setMyInt(int myInt) { - this.myInt = myInt; - } - - public String getMyString() { - return myString; - } - - public void setMyString(String myString) { - this.myString = myString; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/J2WRLSharedEndpoint.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/J2WRLSharedEndpoint.java deleted file mode 100644 index b6a2b106cc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/J2WRLSharedEndpoint.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withoutannotations; - -@jakarta.jws.WebService -@jakarta.jws.soap.SOAPBinding(style = jakarta.jws.soap.SOAPBinding.Style.RPC) -public interface J2WRLSharedEndpoint { - - public java.lang.String arrayOperationFromClient(java.lang.String[] arg0); - - public com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withoutannotations.J2WRLSharedBean getBean(); - - public java.lang.String[] arrayOperation(); - - public java.lang.String stringOperation(java.lang.String arg0); - - public java.lang.String helloWorld(); - - public void oneWayOperation(); -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/J2WRLSharedEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/J2WRLSharedEndpointImpl.java deleted file mode 100644 index a2f87519b8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/J2WRLSharedEndpointImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withoutannotations; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(endpointInterface = "com.sun.ts.tests.jaxws.mapping.j2wmapping.rpc.literal.withoutannotations.J2WRLSharedEndpoint") -public class J2WRLSharedEndpointImpl implements J2WRLSharedEndpoint { - public String helloWorld() { - return "hello world"; - } - - public String stringOperation(String param) { - return param; - } - - public String[] arrayOperation() { - return new String[] { "one", "two", "three" }; - } - - public J2WRLSharedBean getBean() { - return new J2WRLSharedBean(5, "A String"); - } - - public String arrayOperationFromClient(String[] array) { - return "success"; - } - - public void oneWayOperation() { - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/build.xml deleted file mode 100644 index 3596a512b9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/j2wmapping/rpc/literal/withoutannotations/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/build.xml deleted file mode 100644 index b20a59a8f2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/build.xml deleted file mode 100644 index 012d72ddad..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/AddressingAnnotations.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/AddressingAnnotations.wsdl deleted file mode 100644 index ddbea3078d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/AddressingAnnotations.wsdl +++ /dev/null @@ -1,444 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/Client.java deleted file mode 100644 index 396e1df44a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/Client.java +++ /dev/null @@ -1,634 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations; - -import com.sun.ts.lib.util.*; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import java.util.Properties; - -import com.sun.ts.tests.jaxws.common.AnnotationUtils; - -public class Client extends ServiceEETest { - /* - * Test entry point. - * - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /* - * @class.setup_props: ts.home; - */ - public void setup(String[] args, Properties properties) throws Fault { - TestUtil.logMsg("setup ok"); - } - - public void cleanup() { - TestUtil.logMsg("cleanup"); - } - - /* - * @testName: RequestWrapperAnnotationTest - * - * @assertion_ids: JAXWS:SPEC:7004; JAXWS:SPEC:7013; JAXWS:JAVADOC:39; - * JAXWS:JAVADOC:40; JAXWS:JAVADOC:41; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void RequestWrapperAnnotationTest() throws Fault { - TestUtil.logTrace("RequestWrapperAnnotationTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.W2JDLAnnotationsEndpoint"); - - TestUtil.logMsg("Processing class level annnotations"); - TestUtil.logTrace("========================"); - TestUtil.logTrace("testing WebService for the class"); - TestUtil.logTrace("------------------------"); - boolean result = AnnotationUtils.verifyRequestWrapperAnnotation(c, - "wrapperElement1", "WrapperElement1", - "http://w2jdlannotations.org/types", - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.WrapperElement1"); - if (result == false) { - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("RequestWrapperAnnotationTest failed", e); - } - - if (!pass) - throw new Fault("RequestWrapperAnnotationTest failed"); - } - - /* - * @testName: ResponseWrapperAnnotationTest - * - * @assertion_ids: JAXWS:SPEC:7005; JAXWS:SPEC:7013; JAXWS:JAVADOC:43; - * JAXWS:JAVADOC:44; JAXWS:JAVADOC:45; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void ResponseWrapperAnnotationTest() throws Fault { - TestUtil.logTrace("ResponseWrapperAnnotationTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.W2JDLAnnotationsEndpoint"); - - TestUtil.logMsg("Processing class level annnotations"); - TestUtil.logTrace("========================"); - TestUtil.logTrace("testing WebService for the class"); - TestUtil.logTrace("------------------------"); - boolean result = AnnotationUtils.verifyResponseWrapperAnnotation(c, - "wrapperElement1", "WrapperElement11", - "http://w2jdlannotations.org/types", - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.WrapperElement11"); - if (result == false) { - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("ResponseWrapperAnnotationTest failed", e); - } - - if (!pass) - throw new Fault("ResponseWrapperAnnotationTest failed"); - } - - /* - * @testName: WebServiceAnnotationTest - * - * @assertion_ids: JAXWS:SPEC:2011; JAXWS:SPEC:7011; JAXWS:SPEC:7013; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void WebServiceAnnotationTest() throws Fault { - TestUtil.logTrace("WebServiceAnnotationTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.W2JDLAnnotationsEndpoint", - false, this.getClass().getClassLoader()); - - TestUtil.logMsg("Processing class level annnotations"); - TestUtil.logTrace("========================"); - TestUtil.logTrace("testing WebService for the class"); - TestUtil.logTrace("------------------------"); - boolean result = AnnotationUtils.verifyWebServiceAnnotation(c, - "W2JDLAnnotationsEndpoint", "http://w2jdlannotations.org/wsdl", - "W2JDLAnnotations", "W2JDLAnnotations.wsdl", ""); - if (result == false) { - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebServiceAnnotationTest failed", e); - } - - if (!pass) - throw new Fault("WebServiceAnnotationTest failed"); - } - - /* - * @testName: SOAPBindingAnnotationTest - * - * @assertion_ids: JAXWS:SPEC:7011; JAXWS:SPEC:2019; JAXWS:SPEC:7013; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void SOAPBindingAnnotationTest() throws Fault { - TestUtil.logTrace("SOAPBindingAnnotationTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.W2JDLAnnotationsEndpoint", - false, this.getClass().getClassLoader()); - - boolean result = AnnotationUtils.verifySOAPBindingAnnotationPerMethod(c, - "wrapperElement1", "DOCUMENT", "LITERAL", "WRAPPED"); - if (result == false) { - pass = false; - } - - result = AnnotationUtils.verifySOAPBindingAnnotationPerMethod(c, - "helloOperation", "DOCUMENT", "LITERAL", "BARE"); - if (result == false) { - pass = false; - } - - result = AnnotationUtils.verifySOAPBindingAnnotationPerMethod(c, - "onewayOperation", "DOCUMENT", "LITERAL", "BARE"); - if (result == false) { - pass = false; - } - - result = AnnotationUtils.verifySOAPBindingAnnotationPerMethod(c, - "mode1Operation", "DOCUMENT", "LITERAL", "BARE"); - if (result == false) { - pass = false; - } - - result = AnnotationUtils.verifySOAPBindingAnnotationPerMethod(c, - "mode2Operation", "DOCUMENT", "LITERAL", "BARE"); - if (result == false) { - pass = false; - } - - result = AnnotationUtils.verifySOAPBindingAnnotationPerMethod(c, - "mode3Operation", "DOCUMENT", "LITERAL", "BARE"); - if (result == false) { - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("SOAPBindingAnnotationTest failed", e); - } - - if (!pass) - throw new Fault("SOAPBindingAnnotationTest failed"); - } - - /* - * @testName: HelloOperationAnnotationsTest - * - * @assertion_ids: JAXWS:SPEC:7009; JAXWS:SPEC:7011; JAXWS:SPEC:7013; - * JAXWS:SPEC:2020; JAXWS:SPEC:2021; JAXWS:SPEC:2015; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void HelloOperationAnnotationsTest() throws Fault { - TestUtil.logTrace("HelloOperationAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.W2JDLAnnotationsEndpoint", - false, this.getClass().getClassLoader()); - - boolean result = AnnotationUtils.verifyWebMethodAnnotation(c, - "helloOperation", "helloOperation", ""); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyWebResultAnnotation(c, "helloOperation", - "HelloStringElement", "http://w2jdlannotations.org/types"); - if (result == false) { - pass = false; - } - - result = AnnotationUtils.verifyWebParamAnnotation(c, 0, "helloOperation", - "HelloStringElement", "http://w2jdlannotations.org/types", "IN", - false); - if (result == false) { - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("HelloOperationAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("HelloOperationAnnotationsTest failed"); - } - - /* - * @testName: OnewayAnnotationsTest - * - * @assertion_ids: JAXWS:SPEC:7010; JAXWS:SPEC:7011; JAXWS:SPEC:2018; - * JAXWS:SPEC:7013; JAXWS:SPEC:2020; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void OnewayAnnotationsTest() throws Fault { - TestUtil.logTrace("OnewayAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.W2JDLAnnotationsEndpoint", - false, this.getClass().getClassLoader()); - - boolean result = AnnotationUtils.verifyOnewayAnnotation(c, - "onewayOperation"); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyWebParamAnnotation(c, 0, "onewayOperation", - "OneWayStringElement", "http://w2jdlannotations.org/types", "IN", - false); - if (result == false) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("OnewayAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("OnewayAnnotationsTest failed"); - } - - /* - * @testName: WebParamModesAnnotationsTest - * - * @assertion_ids: JAXWS:SPEC:7010; JAXWS:SPEC:7011; JAXWS:SPEC:2020; - * JAXWS:SPEC:7013; JAXWS:SPEC:2015; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void WebParamModesAnnotationsTest() throws Fault { - TestUtil.logTrace("WebParamModesAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.W2JDLAnnotationsEndpoint", - false, this.getClass().getClassLoader()); - TestUtil.logTrace("------------------------"); - TestUtil.logTrace("testing mode1Operation annotations"); - TestUtil.logTrace("------------------------"); - boolean result = AnnotationUtils.verifyWebMethodAnnotation(c, - "mode1Operation", "mode1Operation", ""); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyWebParamAnnotation(c, 0, "mode1Operation", - "Mode1StringElement", "http://w2jdlannotations.org/types", "IN", - false); - if (result == false) { - pass = false; - } - - TestUtil.logTrace("------------------------"); - TestUtil.logTrace("testing mode2Operation annotations"); - TestUtil.logTrace("------------------------"); - result = AnnotationUtils.verifyWebMethodAnnotation(c, "mode2Operation", - "mode2Operation", ""); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyWebParamAnnotation(c, 0, "mode2Operation", - "Mode2StringElement", "http://w2jdlannotations.org/types", "INOUT", - false); - if (result == false) { - pass = false; - } - - TestUtil.logTrace("------------------------"); - TestUtil.logTrace("testing mode3Operation annotations"); - TestUtil.logTrace("------------------------"); - result = AnnotationUtils.verifyWebMethodAnnotation(c, "mode3Operation", - "mode3Operation", ""); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyWebParamAnnotation(c, 0, "mode3Operation", - "Mode3StringElement", "http://w2jdlannotations.org/types", "OUT", - false); - if (result == false) { - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebParamModesAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("WebParamModesAnnotationsTest failed"); - } - - /* - * @testName: WebFaultAnnotationsTest - * - * @assertion_ids: JAXWS:SPEC:7003; JAXWS:SPEC:7013; JAXWS:JAVADOC:63; - * JAXWS:JAVADOC:64; JAXWS:JAVADOC:65; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void WebFaultAnnotationsTest() throws Fault { - TestUtil.logTrace("WebFaultAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.MyFault_Exception", - false, this.getClass().getClassLoader()); - boolean result = AnnotationUtils.verifyWebFaultAnnotation(c, "MyFault", - "http://w2jdlannotations.org/types", - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.MyFault"); - if (result == false) { - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebFaultAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("WebFaultAnnotationsTest failed"); - } - - /* - * @testName: WebServiceClientAnnotationsTest - * - * @assertion_ids: JAXWS:JAVADOC:66; JAXWS:JAVADOC:67; JAXWS:JAVADOC:68; - * JAXWS:SPEC:7013; JAXWS:SPEC:7006; JAXWS:SPEC:2063; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void WebServiceClientAnnotationsTest() throws Fault { - TestUtil.logTrace("WebServiceClientAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.W2JDLAnnotations", - false, this.getClass().getClassLoader()); - TestUtil.logMsg("Processing class level annnotations"); - TestUtil.logTrace("========================"); - TestUtil.logTrace("testing WebServiceClient for the class"); - TestUtil.logTrace("------------------------"); - boolean result = AnnotationUtils.verifyWebServiceClientAnnotation(c, - "W2JDLAnnotations", "http://w2jdlannotations.org/wsdl", - "W2JDLAnnotations.wsdl"); - if (result == false) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebServiceClientAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("WebServiceClientAnnotationsTest failed"); - } - - /* - * @testName: WebEndpointAnnotationsTest - * - * @assertion_ids: JAXWS:JAVADOC:62; JAXWS:SPEC:7007; JAXWS:SPEC:2065; - * JAXWS:SPEC:7013; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void WebEndpointAnnotationsTest() throws Fault { - TestUtil.logTrace("WebEndpointAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.W2JDLAnnotations", - false, this.getClass().getClassLoader()); - TestUtil.logMsg("Processing class level annnotations"); - TestUtil.logTrace("========================"); - TestUtil.logTrace("testing WebEndpoint for the class"); - TestUtil.logTrace("------------------------"); - boolean result = AnnotationUtils.verifyWebEndpointAnnotation(c, - "getW2JDLAnnotationsEndpointPort", "W2JDLAnnotationsEndpointPort"); - if (result == false) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebEndpointAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("WebEndpointAnnotationsTest failed"); - } - - /* - * @testName: HandlerChainAnnotationsTest - * - * @assertion_ids: JAXWS:SPEC:9008; JAXWS:SPEC:7013; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void HandlerChainAnnotationsTest() throws Fault { - TestUtil.logTrace("HandlerChainAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.W2JDLAnnotationsEndpoint", - false, this.getClass().getClassLoader()); - TestUtil.logMsg("Processing class level annnotations"); - TestUtil.logTrace("========================"); - TestUtil.logTrace("testing HandlerChain for the class"); - TestUtil.logTrace("------------------------"); - boolean result = AnnotationUtils.verifyHandlerChainAnnotation(c, null); - if (result == false) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("HandlerChainAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("HandlerChainAnnotationsTest failed"); - } - - /* - * @testName: ActionFaultActionAndAddressingAnnotationsTest - * - * @assertion_ids: JAXWS:JAVADOC:130; JAXWS:JAVADOC:131; JAXWS:JAVADOC:132; - * JAXWS:JAVADOC:144; WSAMD:SPEC:4003; WSAMD:SPEC:3000; WSAMD:SPEC:3000.1; - * JAXWS:SPEC:2075; JAXWS:SPEC:2077; JAXWS:SPEC:2078; JAXWS:SPEC:2079; - * JAXWS:SPEC:2080; JAXWS:SPEC:2081; JAXWS:SPEC:2082; JAXWS:SPEC:2083; - * WSAMD:SPEC:3001.5; WSAMD:SPEC:3001.8; JAXWS:SPEC:2089; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void ActionFaultActionAndAddressingAnnotationsTest() throws Fault { - TestUtil.logTrace("ActionFaultActionAndAddressingAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.AddressAnnotationsEndpoint1", - false, this.getClass().getClassLoader()); - String[][] faults = {}; - boolean result = AnnotationUtils.verifyActionFaultActionAnnotation(c, - "address1", true, "input1", null, faults); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address2", - true, null, "output2", faults); - if (result == false) { - pass = false; - } - String faults3[][] = { { - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.Myfault3AException", - "fault3a" }, - { "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.Myfault3BException", - "fault3b" } }; - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address3", - true, null, null, faults3); - if (result == false) { - pass = false; - } - c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.AddressAnnotationsEndpoint2", - false, this.getClass().getClassLoader()); - String faults4[][] = { { - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.Myfault4Exception", - "fault4" } }; - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address4", - true, null, "output4", faults4); - if (result == false) { - pass = false; - } - String faults5[][] = { { - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.Myfault5Exception", - "fault5" } }; - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address5", - true, "input5", "output5", faults5); - if (result == false) { - pass = false; - } - c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.AddressAnnotationsEndpoint3", - false, this.getClass().getClassLoader()); - String faults6[][] = {}; - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address6", - false, "", "", faults6); - if (result == false) { - pass = false; - } - String faults7[][] = {}; - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address7", - false, "", "", faults7); - if (result == false) { - pass = false; - } - c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.AddressAnnotationsEndpoint4", - false, this.getClass().getClassLoader()); - String faults8[][] = {}; - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address8", - true, "input8", null, faults8); - if (result == false) { - pass = false; - } - String faults9[][] = {}; - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address9", - true, null, "output9", faults9); - if (result == false) { - pass = false; - } - c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.AddressAnnotationsEndpoint5", - false, this.getClass().getClassLoader()); - String faults10[][] = {}; - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address10", - true, "input10", null, faults10); - if (result == false) { - pass = false; - } - String faults11[][] = {}; - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address11", - true, null, "output11", faults11); - if (result == false) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("ActionFaultActionAndAddressingAnnotationsTest failed", - e); - } - - if (!pass) - throw new Fault("ActionFaultActionAndAddressingAnnotationsTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/Handler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/Handler.java deleted file mode 100644 index 31918436d5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/Handler.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.soap.*; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.LogicalMessage; - -import jakarta.annotation.PreDestroy; -import jakarta.annotation.PostConstruct; - -public class Handler - implements jakarta.xml.ws.handler.LogicalHandler { - @PostConstruct - public void myInit() { - } - - @PreDestroy - public void myDestroy() { - } - - public boolean handleMessage(LogicalMessageContext context) { - return true; - } - - public void close(MessageContext context) { - } - - public boolean handleFault(LogicalMessageContext context) { - return true; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/W2JDLAnnotations.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/W2JDLAnnotations.wsdl deleted file mode 100644 index 98441f725b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/W2JDLAnnotations.wsdl +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/build.xml deleted file mode 100644 index 4a0751c5b1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/build.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/customfile.xml deleted file mode 100644 index e95f7def0c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/customfile.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - Handler - com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.annotations.Handler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/customfile2.xml deleted file mode 100644 index 39271f4bc4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/annotations/customfile2.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/build.xml deleted file mode 100644 index 3741cb1a71..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/Client.java deleted file mode 100644 index 140827cf72..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/Client.java +++ /dev/null @@ -1,754 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)Client.java 1.39 05/08/26 - */ - -package com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.customization; - -import com.sun.ts.lib.util.*; - -import java.lang.reflect.*; -import java.net.URL; -import javax.xml.namespace.QName; -import jakarta.xml.ws.WebServiceFeature; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import java.util.Properties; - -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.AnnotationUtils; - -public class Client extends ServiceEETest { - private static final String PKG = "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.customization."; - - // Expected mappings for wsdl:fault element mapping - private static final String EXPECTED_FAULT_WRAPPER = PKG + "W2JDLFault"; - - private static final String EXPECTED_FAULT_WRAPPER2 = PKG + "MyFault"; - - private static final String EXPECTED_FAULT_BEAN = PKG + "MyFaultReason"; - - // Expected mappings for wsdl:service and wsdl:port element mapping - private static final String EXPECTED_SERVICE_CLASS_NAME = "W2JDLCustomization"; - - private static final String EXPECTED_SERVICE = PKG + "W2JDLCustomization"; - - private static final String EXPECTED_ENDPOINT = PKG - + "W2JDLCustomizationEndpoint"; - - private static final String EXPECTED_SERVICE_INTERFACE = "jakarta.xml.ws.Service"; - - private static final String EXPECTED_SERVICE_EXCEPTION = "jakarta.xml.ws.WebServiceException"; - - private static final String EXPECTED_GET_PORTNAME_METHOD = "getW2JDLCustomizationEndpointPort"; - - // Used for soap:header binding test - private static final String EXPECTED_HEADER_TYPE = PKG + "MyHeader"; - - // Used for wrapper style tests - private static final String ENABLEWRAPPER_TRUE_METHOD = "wrapperElement1"; - - private static final String EXPECTED_ENABLEWRAPPER_TRUE_RETURN_TYPE = "java.lang.String"; - - private static final String EXPECTED_ENABLEWRAPPER_TRUE_PARAMETER_TYPE = "java.lang.String"; - - private static final String ENABLEWRAPPER_FALSE_METHOD = "wrapperElement2"; - - private static final String EXPECTED_ENABLEWRAPPER_FALSE_RETURN_TYPE = PKG - + "WrapperElement22"; - - private static final String EXPECTED_ENABLEWRAPPER_FALSE_PARAMETER_TYPE = PKG - + "WrapperElement2"; - - // Used for soap:header and soap:fault binding test - private static final String EXPECTED_HEADER2_TYPE = PKG + "ConfigHeader"; - - private static final String EXPECTED_FAULT1_EXCEPTION = PKG + "Fault1"; - - private static final String EXPECTED_FAULT2_EXCEPTION = PKG + "Fault2"; - - /* - * Test entry point. - * - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /* - * @class.setup_props: ts.home; - */ - public void setup(String[] args, Properties properties) throws Fault { - TestUtil.logMsg("setup ok"); - } - - public void cleanup() { - TestUtil.logMsg("cleanup"); - } - - /* - * @testName: PortTypeTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2006; JAXWS:SPEC:2010; JAXWS:SPEC:2041; - * JAXWS:SPEC:2007; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify wsdl:definitions and wsdl:portType mapping - */ - public void PortTypeTest() throws Fault { - TestUtil.logTrace("PortTypeTest"); - boolean pass = true; - try { - TestUtil.logMsg("Verify wsdl:portType mapping"); - Class.forName(EXPECTED_ENDPOINT, false, this.getClass().getClassLoader()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("PortTypeTest failed", e); - } - - if (!pass) - throw new Fault("PortTypeTest failed"); - } - - /* - * @testName: OperationTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2013; JAXWS:SPEC:2014; JAXWS:SPEC:2017; - * JAXWS:SPEC:2041; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify mapping of wsdl:operation - */ - public void OperationTest() throws Fault { - TestUtil.logTrace("OperationTest"); - boolean pass = true; - try { - TestUtil.logMsg("Verify wsdl:operation mapping"); - Class c = Class.forName(EXPECTED_ENDPOINT, false, - this.getClass().getClassLoader()); - String methodName = "helloOperation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "onewayOperation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "mode1Operation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "mode2Operation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "mode3Operation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - if (!pass) { - TestUtil.logErr("One ofthe operations does not exist in the SEI"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("OperationTest failed", e); - } - - if (!pass) - throw new Fault("OperationTest failed"); - } - - /* - * @testName: FaultTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2043; JAXWS:SPEC:2044; JAXWS:SPEC:2041; - * JAXWS:SPEC:8009; JAXWS:SPEC:2061; JAXWS:SPEC:2074; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify wsdl:fault element mapping - */ - public void FaultTest() throws Fault { - TestUtil.logTrace("FaultTest"); - boolean pass = true; - - TestUtil.logMsg("Verify wsdl:fault mapping"); - TestUtil.logMsg("Loading fault wrapper " + EXPECTED_FAULT_WRAPPER); - Class faultWrapper = null; - try { - faultWrapper = Class.forName(EXPECTED_FAULT_WRAPPER); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Check to ensure Wrapper Exception class is annotated using the WebFault - // annotation. - boolean found = AnnotationUtils.verifyWebFaultAnnotation(faultWrapper, - "MyFaultReason", "http://w2jdlcustomization/types", - EXPECTED_FAULT_BEAN); - if (!found) { - TestUtil.logErr( - "Wrapper Exception Class is not annotated with WebFault annotation - " - + EXPECTED_FAULT_WRAPPER); - pass = false; - } else - TestUtil.logMsg( - "Wrapper Exception Class is annotated with WebFault annotation - " - + EXPECTED_FAULT_WRAPPER); - - TestUtil.logMsg("Loading fault bean " + EXPECTED_FAULT_BEAN); - try { - Class.forName(EXPECTED_FAULT_BEAN); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - TestUtil.logMsg("Instantiate fault bean and call its methods ... " - + EXPECTED_FAULT_BEAN); - com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.customization.MyFaultReason mfr = new com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.customization.MyFaultReason(); - TestUtil.logMsg("setMessage to foo"); - mfr.setMessage("foo"); - TestUtil.logMsg("getMessage=" + mfr.getMessage()); - - TestUtil.logMsg("Instantiate fault wrapper exception constructor 1 ... " - + EXPECTED_FAULT_WRAPPER); - com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.customization.W2JDLFault mf = new com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.customization.W2JDLFault( - "myfault", mfr); - - TestUtil.logMsg("getFaultInfo from wrapper exception ... "); - mfr = mf.getFaultInfo(); - - TestUtil.logMsg("Instantiate fault wrapper exception constructor 2 ... " - + EXPECTED_FAULT_WRAPPER); - mf = new com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.customization.W2JDLFault( - "myfault", mfr, new Exception("foo")); - - // A generate endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - Class endpointClass = null; - try { - endpointClass = Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Fault Equivalence Test - try { - Method[] methods = endpointClass.getMethods(); - Method helloOp = null; - Method helloOp2 = null; - for (int i = 0; i < methods.length; i++) { - if (methods[i].getName().equals("helloOperation")) - helloOp = methods[i]; - if (methods[i].getName().equals("helloOperation2")) - helloOp2 = methods[i]; - } - - found = false; - Class exceptions[] = helloOp.getExceptionTypes(); - for (int i = 0; i < exceptions.length; i++) { - String name = exceptions[i].getName(); - TestUtil.logMsg("exceptions[" + i + "]=" + name); - if (name.equals(EXPECTED_FAULT_WRAPPER)) - found = true; - } - if (!found) { - TestUtil.logErr("helloOperation does not declare throws of exception " - + EXPECTED_FAULT_WRAPPER); - pass = false; - } else - TestUtil.logMsg("helloOperation does declare throws of exception " - + EXPECTED_FAULT_WRAPPER); - - found = false; - exceptions = helloOp2.getExceptionTypes(); - for (int i = 0; i < exceptions.length; i++) { - String name = exceptions[i].getName(); - TestUtil.logMsg("exceptions[" + i + "]=" + name); - if (name.equals(EXPECTED_FAULT_WRAPPER2)) - found = true; - } - if (!found) { - TestUtil.logErr("helloOperation2 does not declare throws of exception " - + EXPECTED_FAULT_WRAPPER2); - pass = false; - } else - TestUtil.logMsg("helloOperation2 does declare throws of exception " - + EXPECTED_FAULT_WRAPPER2); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - } - - if (!pass) - throw new Fault("FaultTest failed"); - } - - /* - * @testName: ServiceAndPortTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2054; JAXWS:SPEC:2055; JAXWS:SPEC:2056; - * JAXWS:SPEC:2041; JAXWS:SPEC:2045; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify wsdl:service and wsdl:port element mapping - */ - public void ServiceAndPortTest() throws Fault { - TestUtil.logTrace("ServiceAndPortTest"); - boolean pass = true; - - TestUtil.logMsg("Verify wsdl:service and wsdl:port mapping"); - // A generate service interface must be created from wsdl:service name - TestUtil.logMsg("Loading service interface " + EXPECTED_SERVICE); - Class serviceClass = null; - try { - serviceClass = Class.forName(EXPECTED_SERVICE); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // A generate endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - try { - Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Service Class Interface MUST extend Service interface - boolean found = false; - if (serviceClass != null) { - String name = serviceClass.getSuperclass().getName(); - if (name.equals(EXPECTED_SERVICE_INTERFACE)) { - found = true; - } - if (!found) { - TestUtil.logErr("Service Class Interface " + name + " does not extend " - + EXPECTED_SERVICE_INTERFACE); - pass = false; - } else - TestUtil.logMsg("Service Class Interface " + name + " does extend " - + EXPECTED_SERVICE_INTERFACE); - } - - // Service Class Interface MUST have a getPortName() method based on - // wsd:port name - found = false; - Method m = null; - if (serviceClass != null) { - try { - m = serviceClass.getDeclaredMethod(EXPECTED_GET_PORTNAME_METHOD, - (Class[]) null); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - pass = false; - } - // getPortName() method MUST return Endpoint Interface Type - if (m != null) { - TestUtil.logMsg("Service Class Interface " + serviceClass.getName() - + " does have port method " + EXPECTED_GET_PORTNAME_METHOD); - Class returnType = m.getReturnType(); - found = false; - if (returnType != null) { - String name = returnType.getName(); - TestUtil.logMsg("returnType=" + name); - if (name.equals(EXPECTED_ENDPOINT)) - found = true; - } - if (!found) { - TestUtil.logErr("Service Port Method " + EXPECTED_GET_PORTNAME_METHOD - + " does not return type as " + EXPECTED_ENDPOINT); - pass = false; - } else - TestUtil.logMsg("Service Port Method " + EXPECTED_GET_PORTNAME_METHOD - + " does return type as " + EXPECTED_ENDPOINT); - } else { - TestUtil.logErr("Service Class Interface " + serviceClass.getName() - + " does not have port method " + EXPECTED_GET_PORTNAME_METHOD); - pass = false; - } - } - - if (!pass) - throw new Fault("ServiceAndPortTest failed"); - } - - /* - * @testName: ServiceConstructorsTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2054; JAXWS:SPEC:2055; JAXWS:SPEC:2056; - * JAXWS:SPEC:2041; JAXWS:SPEC:2045; JAXWS:SPEC:7013; JAXWS:SPEC:4032; - * - * @test_Strategy: Verify that all expected constructors exist on service - * interface - */ - public void ServiceConstructorsTest() throws Fault { - TestUtil.logTrace("ServiceConstructorsTest"); - boolean pass = true; - - TestUtil.logMsg( - "Verify that all expected constructors exist on service interface"); - TestUtil.logMsg("Loading service interface class: " + EXPECTED_SERVICE); - Class serviceClass = null; - try { - serviceClass = Class.forName(EXPECTED_SERVICE); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - if (serviceClass != null) { - try { - TestUtil.logMsg( - "Verify constructor: " + EXPECTED_SERVICE_CLASS_NAME + "()"); - Constructor ctr = serviceClass.getConstructor(); - } catch (Exception e) { - TestUtil.logErr("Constructor does not exist"); - pass = false; - } - try { - TestUtil.logMsg("Verify constructor: " + EXPECTED_SERVICE_CLASS_NAME - + "(WebServiceFeature... features)"); - Constructor ctr = serviceClass - .getConstructor(WebServiceFeature[].class); - } catch (Exception e) { - TestUtil.logErr("Constructor does not exist"); - pass = false; - } - try { - TestUtil.logMsg("Verify constructor: " + EXPECTED_SERVICE_CLASS_NAME - + "(URL wsdlLocation)"); - Constructor ctr = serviceClass.getConstructor(URL.class); - } catch (Exception e) { - TestUtil.logErr("Constructor does not exist"); - pass = false; - } - try { - TestUtil.logMsg("Verify constructor: " + EXPECTED_SERVICE_CLASS_NAME - + "(URL wsdlLocation, WebServiceFeature... features)"); - Constructor ctr = serviceClass.getConstructor(URL.class, - WebServiceFeature[].class); - } catch (Exception e) { - TestUtil.logErr("Constructor does not exist"); - pass = false; - } - try { - TestUtil.logMsg("Verify constructor: " + EXPECTED_SERVICE_CLASS_NAME - + "(URL wsdlLocation, QName serviceName)"); - Constructor ctr = serviceClass.getConstructor(URL.class, QName.class); - } catch (Exception e) { - TestUtil.logErr("Constructor does not exist"); - pass = false; - } - try { - TestUtil.logMsg("Verify constructor: " + EXPECTED_SERVICE_CLASS_NAME - + "(URL wsdlLocation, QName serviceName, WebServiceFeature... features)"); - Constructor ctr = serviceClass.getConstructor(URL.class, QName.class, - WebServiceFeature[].class); - } catch (Exception e) { - TestUtil.logErr("Constructor does not exist"); - pass = false; - } - } - - if (!pass) - throw new Fault("ServiceConstructorsTest failed"); - } - - /* - * @testName: HeaderTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2041; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify soap:header (Header Binding Extension) - */ - public void HeaderTest() throws Fault { - TestUtil.logTrace("HeaderTest"); - boolean pass = true; - - TestUtil.logMsg("Verify soap:header (Header Binding Extension)"); - // A generate endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - try { - Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // The Header generated type - TestUtil.logMsg("Loading header type " + EXPECTED_HEADER_TYPE); - try { - Class.forName(EXPECTED_HEADER_TYPE); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - if (!pass) - throw new Fault("HeaderTest failed"); - } - - /* - * @testName: SoapHeaderAndFaultTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2041; JAXWS:SPEC:8011; JAXWS:SPEC:2074; - * JAXWS:SPEC:7013; - * - * @test_Strategy: Verify soap:header and soap:fault mappings - */ - public void SoapHeaderAndFaultTest() throws Fault { - TestUtil.logTrace("SoapHeaderAndFaultTest"); - boolean pass = true; - - TestUtil.logMsg("Verify soap:header and soap:fault mappings"); - // The generated endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - Class endpointClass = null; - try { - endpointClass = Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // The generated Header type - TestUtil.logMsg("Loading header type " + EXPECTED_HEADER2_TYPE); - try { - Class.forName(EXPECTED_HEADER2_TYPE); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Customization via jaxws:enableAdditionalSOAPHeaderMapping means a header - // type - // as parameter to this method. Customization via jaxws:bindings in wsdl to - // override - // the generated header fault exception class name. - try { - Method theMethod = null; - Method[] methods = endpointClass.getMethods(); - for (int i = 0; i < methods.length; i++) { - if (methods[i].getName().equals("operationWithHeaderAndFaults")) { - theMethod = methods[i]; - break; - } - } - if (theMethod != null) { - boolean found = false; - Class parameters[] = theMethod.getParameterTypes(); - TestUtil.logMsg( - "Verify the jaxws:enableAdditionalSOAPHeaderMapping customization"); - TestUtil.logMsg( - "Verify that the soap:header is mapped to a parameter of the operation"); - for (int i = 0; i < parameters.length; i++) { - String name = parameters[i].getName(); - TestUtil.logMsg("parameters[" + i + "]=" + name); - if (name.equals(EXPECTED_HEADER2_TYPE)) - found = true; - } - if (!found) { - TestUtil.logErr( - "operationWithHeaderAndFaults does not declare a header as parameter for type " - + EXPECTED_HEADER2_TYPE); - pass = false; - } else { - TestUtil.logMsg( - "operationWithHeaderAndHeaderFaultsAndFaults does declare a header as parameter for type " - + EXPECTED_HEADER2_TYPE); - } - - Class[] exceptions = theMethod.getExceptionTypes(); - boolean exception1 = false; - boolean exception2 = false; - TestUtil.logMsg( - "Verify the jaxws:bindings customization (override generate soap:headerfault and soap:fault exception name)"); - TestUtil.logMsg( - "Verify that each soap:headerfault is mapped to the expected exception name"); - TestUtil.logMsg( - "Verify that each soap:fault is mapped to the expected exception name"); - for (int j = 0; j < exceptions.length; j++) { - String exceptName = exceptions[j].getName(); - TestUtil.logMsg("exception[" + j + "]=" + exceptName); - if (exceptName.equals(EXPECTED_FAULT1_EXCEPTION)) { - exception1 = true; - } else if (exceptName.equals(EXPECTED_FAULT2_EXCEPTION)) { - exception2 = true; - } - } - if (!exception1) { - TestUtil.logErr("The method: " + theMethod.getName() - + " did not declare exception\n" + EXPECTED_FAULT1_EXCEPTION); - pass = false; - } - if (!exception2) { - TestUtil.logErr("The method: " + theMethod.getName() - + " did not declare exception\n" + EXPECTED_FAULT2_EXCEPTION); - pass = false; - } - } else { - TestUtil - .logErr("The method: operationWithHeaderAndFaults was not found\n"); - } - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - } - - if (!pass) - throw new Fault("SoapHeaderAndFaultTest failed"); - } - - /* - * @testName: WrapperStyleTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2024; JAXWS:SPEC:2025; JAXWS:SPEC:2027; JAXWS:SPEC:2041; - * JAXWS:SPEC:2072; JAXWS:SPEC:2073; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify Wrapper Style mapping - */ - public void WrapperStyleTest() throws Fault { - TestUtil.logTrace("WrapperStyleTest"); - boolean pass = true; - try { - Class c = Class.forName(EXPECTED_ENDPOINT, false, - this.getClass().getClassLoader()); - Class returnType = JAXWS_Util.getMethodReturnType(c, - ENABLEWRAPPER_TRUE_METHOD); - if (returnType != null) { - String sReturnType = returnType.getName(); - if (!sReturnType.equals(EXPECTED_ENABLEWRAPPER_TRUE_RETURN_TYPE)) { - TestUtil.logErr("The return type for method: " - + ENABLEWRAPPER_TRUE_METHOD + " was wrong"); - TestUtil - .logErr("expected=" + EXPECTED_ENABLEWRAPPER_TRUE_RETURN_TYPE); - TestUtil.logErr("actual=" + sReturnType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + ENABLEWRAPPER_TRUE_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT); - pass = false; - } - Class parameterType = JAXWS_Util.getMethodParameterType(c, - ENABLEWRAPPER_TRUE_METHOD, 0); - if (parameterType != null) { - String sParameterType = parameterType.getName(); - if (!sParameterType - .equals(EXPECTED_ENABLEWRAPPER_TRUE_PARAMETER_TYPE)) { - TestUtil.logErr("The parameter type for method: " - + ENABLEWRAPPER_TRUE_METHOD + " was wrong"); - TestUtil - .logErr("expected=" + EXPECTED_ENABLEWRAPPER_TRUE_PARAMETER_TYPE); - TestUtil.logErr("actual=" + sParameterType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + ENABLEWRAPPER_TRUE_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT - + " or the specified parameter did not exist"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WrapperStyleTest failed", e); - } - - if (!pass) - throw new Fault("WrapperStyleTest failed"); - } - - /* - * @testName: NonWrapperStyleTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2024; JAXWS:SPEC:2025; JAXWS:SPEC:2026; JAXWS:SPEC:2022; - * JAXWS:SPEC:2041; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify NonWrapper Style mapping - */ - public void NonWrapperStyleTest() throws Fault { - TestUtil.logTrace("NonWrapperStyleTest"); - boolean pass = true; - try { - Class c = Class.forName(EXPECTED_ENDPOINT, false, - this.getClass().getClassLoader()); - Class returnType = JAXWS_Util.getMethodReturnType(c, - ENABLEWRAPPER_FALSE_METHOD); - if (returnType != null) { - String sReturnType = returnType.getName(); - if (!sReturnType.equals(EXPECTED_ENABLEWRAPPER_FALSE_RETURN_TYPE)) { - TestUtil.logErr("The return type for method: " - + ENABLEWRAPPER_FALSE_METHOD + " was wrong"); - TestUtil - .logErr("expected=" + EXPECTED_ENABLEWRAPPER_FALSE_RETURN_TYPE); - TestUtil.logErr("actual=" + sReturnType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + ENABLEWRAPPER_FALSE_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT); - pass = false; - } - Class parameterType = JAXWS_Util.getMethodParameterType(c, - ENABLEWRAPPER_FALSE_METHOD, 0); - if (parameterType != null) { - String sParameterType = parameterType.getName(); - if (!sParameterType - .equals(EXPECTED_ENABLEWRAPPER_FALSE_PARAMETER_TYPE)) { - TestUtil.logErr("The parameter type for method: " - + ENABLEWRAPPER_FALSE_METHOD + " was wrong"); - TestUtil.logErr( - "expected=" + EXPECTED_ENABLEWRAPPER_FALSE_PARAMETER_TYPE); - TestUtil.logErr("actual=" + sParameterType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + ENABLEWRAPPER_FALSE_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT - + " or the specified parameter did not exist"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("NonWrapperStyleTest failed", e); - } - - if (!pass) - throw new Fault("NonWrapperStyleTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/W2JDLCustomization.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/W2JDLCustomization.wsdl deleted file mode 100644 index a659ccd4c7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/W2JDLCustomization.wsdl +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/W2JDLCustomization.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/W2JDLCustomization.xsd deleted file mode 100644 index 513d1d717d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/W2JDLCustomization.xsd +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/build.xml deleted file mode 100644 index e06d7f2916..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/customfile.xml deleted file mode 100644 index e8e009f322..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/customfile.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/customfile2.xml deleted file mode 100644 index a424434f0a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/customization/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/Client.java deleted file mode 100644 index 2b335e5012..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/Client.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 56875 2009-02-23 21:04:59Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.eprsubtypes; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import java.util.Properties; -import java.lang.reflect.Method; - -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import jakarta.xml.ws.Holder; - -public class Client extends ServiceEETest { - - private static final String EXPECTED_SEI_CLASS = "com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.eprsubtypes.Hello"; - - /* - * Test entry point. - * - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /* - * @class.setup_props: ts.home; - */ - public void setup(String[] args, Properties properties) throws Fault { - TestUtil.logMsg("setup ok"); - } - - public void cleanup() { - TestUtil.logMsg("cleanup"); - } - - /* - * @testName: VerifyEPRSubTypesTest1 - * - * @assertion_ids: JAXWS:SPEC:2086; - * - * @test_Strategy: Generate classes from a wsdl/xsd that contain - * wsa:EndpointReference types and verify that JAXB correctly maps all - * wsa:EndpointReference types to W3CEndpointReference. Verify that the hello - * method on the generated sei class has the correct signatures for return - * type and method parameters. They should all be of type - * W3CEndpointReference. Any schema element of the type wsa:EndpointReference - * or its subtypes MUST be mapped to - * jakarta.xml.ws.wsaddressing.W3CEndpointReferencedefault. - */ - public void VerifyEPRSubTypesTest1() throws Fault { - TestUtil.logTrace("VerifyEPRSubTypesTest1"); - boolean pass = true; - try { - TestUtil.logMsg("Load class: " + EXPECTED_SEI_CLASS); - Class seiClass = Class.forName(EXPECTED_SEI_CLASS); - TestUtil.logMsg("seiClass=" + seiClass); - TestUtil.logMsg( - "Verify that the hello method parameters map to W3CEndpointReference"); - Method m; - try { - Holder eprHolder = new Holder(); - Class eprHolderClass = eprHolder.getClass(); - m = seiClass.getDeclaredMethod("hello", W3CEndpointReference.class, - W3CEndpointReference.class, W3CEndpointReference.class, - eprHolderClass, eprHolderClass, eprHolderClass); - } catch (Exception e) { - TestUtil.logErr( - "The hello method parameters do not map to W3CEndpointReference"); - TestUtil.logErr("Caught exception: " + e.getMessage()); - throw new Fault("VerifyEPRSubTypesTest1 failed", e); - } - TestUtil.logMsg("Verify that hello method return type maps to void"); - Class retType = m.getReturnType(); - TestUtil.logMsg("retType=" + retType); - if (!retType.equals(void.class)) { - TestUtil.logErr("The hello method return does not map to void"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - throw new Fault("VerifyEPRSubTypesTest1 failed", e); - } - - if (!pass) - throw new Fault("VerifyEPRSubTypesTest1 failed"); - } - - /* - * @testName: VerifyEPRSubTypesTest2 - * - * @assertion_ids: JAXWS:SPEC:2086; - * - * @test_Strategy: Generate classes from a wsdl/xsd that contain - * wsa:EndpointReference types and verify that JAXB correctly maps all - * wsa:EndpointReference types to W3CEndpointReference. Verify that the hello2 - * method on the generated sei class has the correct signatures for return - * type and method parameters. They should all be of type - * W3CEndpointReference. Any schema element of the type wsa:EndpointReference - * or its subtypes MUST be mapped to - * jakarta.xml.ws.wsaddressing.W3CEndpointReferencedefault. - */ - public void VerifyEPRSubTypesTest2() throws Fault { - TestUtil.logTrace("VerifyEPRSubTypesTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Load class: " + EXPECTED_SEI_CLASS); - Class seiClass = Class.forName(EXPECTED_SEI_CLASS); - TestUtil.logMsg("seiClass=" + seiClass); - TestUtil.logMsg( - "Verify that the hello2 method parameters map to W3CEndpointReference"); - Method m; - try { - Holder eprHolder = new Holder(); - Class eprHolderClass = eprHolder.getClass(); - m = seiClass.getDeclaredMethod("hello2", eprHolderClass, eprHolderClass, - eprHolderClass); - } catch (Exception e) { - TestUtil.logErr( - "The hello2 method parameters do not map to W3CEndpointReference"); - TestUtil.logErr("Caught exception: " + e.getMessage()); - throw new Fault("VerifyEPRSubTypesTest2 failed", e); - } - TestUtil.logMsg("Verify that hello2 method return type maps to void"); - Class retType = m.getReturnType(); - TestUtil.logMsg("retType=" + retType); - if (!retType.equals(void.class)) { - TestUtil.logErr("The hello2 method return does not map to void"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - throw new Fault("VerifyEPRSubTypesTest2 failed", e); - } - - if (!pass) - throw new Fault("VerifyEPRSubTypesTest2 failed"); - } - - /* - * @testName: VerifyEPRSubTypesTest3 - * - * @assertion_ids: JAXWS:SPEC:2086; - * - * @test_Strategy: Generate classes from a wsdl/xsd that contain - * wsa:EndpointReference types and verify that JAXB correctly maps all - * wsa:EndpointReference types to W3CEndpointReference. Verify that the hello3 - * method on the generated sei class has the correct signatures for return - * type and method parameters. They should all be of type - * W3CEndpointReference. Any schema element of the type wsa:EndpointReference - * or its subtypes MUST be mapped to - * jakarta.xml.ws.wsaddressing.W3CEndpointReferencedefault. - */ - public void VerifyEPRSubTypesTest3() throws Fault { - TestUtil.logTrace("VerifyEPRSubTypesTest3"); - boolean pass = true; - try { - TestUtil.logMsg("Load class: " + EXPECTED_SEI_CLASS); - Class seiClass = Class.forName(EXPECTED_SEI_CLASS); - TestUtil.logMsg("seiClass=" + seiClass); - TestUtil.logMsg( - "Verify that the hello3 method parameters map to W3CEndpointReference"); - Method m; - try { - m = seiClass.getDeclaredMethod("hello3", W3CEndpointReference.class); - } catch (Exception e) { - TestUtil.logErr( - "The hello3 method parameters do not map to W3CEndpointReference"); - TestUtil.logErr("Caught exception: " + e.getMessage()); - throw new Fault("VerifyEPRSubTypesTest3 failed", e); - } - TestUtil.logMsg("Verify that hello3 method return type maps to void"); - Class retType = m.getReturnType(); - TestUtil.logMsg("retType=" + retType); - if (!retType.equals(W3CEndpointReference.class)) { - TestUtil.logErr( - "The hello3 method return does not map to W3CEndpointReference"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - throw new Fault("VerifyEPRSubTypesTest3 failed", e); - } - - if (!pass) - throw new Fault("VerifyEPRSubTypesTest3 failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/W2JDLEPRSubTypes.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/W2JDLEPRSubTypes.wsdl deleted file mode 100644 index 4e51d11d6c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/W2JDLEPRSubTypes.wsdl +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/W2JDLEPRSubTypes.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/W2JDLEPRSubTypes.xsd deleted file mode 100644 index ac3530a3ed..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/W2JDLEPRSubTypes.xsd +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/build.xml deleted file mode 100644 index 137ddf7dc2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/customfile.xml deleted file mode 100644 index 6c7890ad3c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/customfile.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/noncustomization/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/noncustomization/Client.java deleted file mode 100644 index 2fe7d30778..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/noncustomization/Client.java +++ /dev/null @@ -1,710 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.w2jmapping.document.literal.noncustomization; - -import com.sun.ts.lib.util.*; - -import java.lang.reflect.*; -import java.net.URL; -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import java.util.Properties; - -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.AnnotationUtils; - -public class Client extends ServiceEETest { - private static final String WSDL_PKG = "w2jdlnoncustomization.wsdl."; - - private static final String TYPES_PKG = "w2jdlnoncustomization.types."; - - // Expected mappings for wsdl:fault element mapping - private static final String EXPECTED_FAULT_WRAPPER = WSDL_PKG + "MyFault"; - - private static final String EXPECTED_FAULT_BEAN = TYPES_PKG + "MyFaultReason"; - - // Expected mappings for wsdl:service and wsdl:port element mapping - private static final String EXPECTED_SERVICE = WSDL_PKG - + "W2JDLNoncustomization"; - - private static final String EXPECTED_ENDPOINT = WSDL_PKG - + "W2JDLNoncustomizationEndpoint"; - - private static final String EXPECTED_SERVICE_INTERFACE = "jakarta.xml.ws.Service"; - - private static final String EXPECTED_SERVICE_EXCEPTION = "jakarta.xml.ws.WebServiceException"; - - private static final String EXPECTED_GET_PORTNAME_METHOD = "getW2JDLNoncustomizationEndpointPort"; - - // Used for soap:header binding test - private static final String EXPECTED_HEADER_TYPE = TYPES_PKG + "MyHeader"; - - // Used for wrapper style tests - private static final String WRAPPER_METHOD = "wrapperElement1"; - - private static final String EXPECTED_WRAPPER_RETURN_TYPE = "java.lang.String"; - - private static final String EXPECTED_WRAPPER_PARAMETER_TYPE = "java.lang.String"; - - private static final String NONWRAPPER_METHOD = "nonWrapperElement2"; - - private static final String EXPECTED_NONWRAPPER_RETURN_TYPE = "w2jdlnoncustomization.types.NWrapperElement22"; - - private static final String EXPECTED_NONWRAPPER_PARAMETER_TYPE = "w2jdlnoncustomization.types.NWrapperElement2"; - - // Used for soap:header and soap:fault binding test - private static final String EXPECTED_HEADER2_TYPE = TYPES_PKG - + "ConfigHeader"; - - private static final String EXPECTED_FAULT1_EXCEPTION = WSDL_PKG + "AFault1"; - - private static final String EXPECTED_FAULT2_EXCEPTION = WSDL_PKG + "AFault2"; - - /* - * Test entry point. - * - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /* - * @class.setup_props: ts.home; - */ - public void setup(String[] args, Properties properties) throws Fault { - TestUtil.logMsg("setup ok"); - } - - public void cleanup() { - TestUtil.logMsg("cleanup"); - } - - /* - * @testName: PortTypeTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2005; JAXWS:SPEC:2009; JAXWS:SPEC:2040; - * JAXWS:SPEC:7013; - * - * @test_Strategy: Verify mapping of wsdl:portType - */ - public void PortTypeTest() throws Fault { - TestUtil.logTrace("PortTypeTest"); - boolean pass = true; - try { - TestUtil.logMsg("Verify wsdl:portType mapping"); - Class.forName(EXPECTED_ENDPOINT, false, this.getClass().getClassLoader()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("PortTypeTest failed", e); - } - - if (!pass) - throw new Fault("PortTypeTest failed"); - } - - /* - * @testName: OperationTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2013; JAXWS:SPEC:2018; JAXWS:SPEC:2017; - * JAXWS:SPEC:2040; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify mapping of wsdl:operation - */ - public void OperationTest() throws Fault { - TestUtil.logTrace("OperationTest"); - boolean pass = true; - try { - TestUtil.logMsg("Verify wsdl:operation mapping"); - Class c = Class.forName(EXPECTED_ENDPOINT, false, - this.getClass().getClassLoader()); - String methodName = "helloOperation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "onewayOperation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "mode1Operation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "mode2Operation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "mode3Operation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - if (!pass) { - TestUtil.logErr("One ofthe operations does not exist in the SEI"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("OperationTest failed", e); - } - - if (!pass) - throw new Fault("OperationTest failed"); - } - - /* - * @testName: FaultTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2043; JAXWS:SPEC:2044; JAXWS:SPEC:2040; - * JAXWS:SPEC:7013; JAXWS:SPEC:2074; - * - * @test_Strategy: Verify wsdl:fault element mapping - */ - public void FaultTest() throws Fault { - TestUtil.logTrace("FaultTest"); - boolean pass = true; - - TestUtil.logMsg("Verify wsdl:fault mapping"); - TestUtil.logMsg("Loading fault wrapper " + EXPECTED_FAULT_WRAPPER); - Class faultWrapper = null; - try { - faultWrapper = Class.forName(EXPECTED_FAULT_WRAPPER); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Check to ensure Wrapper Exception class is annotated using the WebFault - // annotation. - boolean found = AnnotationUtils.verifyWebFaultAnnotation(faultWrapper, - "MyFaultReason", "http://w2jdlnoncustomization/types", - EXPECTED_FAULT_BEAN); - if (!found) { - TestUtil.logErr( - "Wrapper Exception Class is not annotated with WebFault annotation - " - + EXPECTED_FAULT_WRAPPER); - pass = false; - } else - TestUtil.logMsg( - "Wrapper Exception Class is annotated with WebFault annotation - " - + EXPECTED_FAULT_WRAPPER); - - TestUtil.logMsg("Loading fault bean " + EXPECTED_FAULT_BEAN); - try { - Class.forName(EXPECTED_FAULT_BEAN); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - TestUtil.logMsg("Instantiate fault bean and call its methods ... " - + EXPECTED_FAULT_BEAN); - w2jdlnoncustomization.types.MyFaultReason mfr = new w2jdlnoncustomization.types.MyFaultReason(); - TestUtil.logMsg("setMessage to foo"); - mfr.setMessage("foo"); - TestUtil.logMsg("getMessage=" + mfr.getMessage()); - - TestUtil.logMsg("Instantiate fault wrapper exception constructor 1 ... " - + EXPECTED_FAULT_WRAPPER); - w2jdlnoncustomization.wsdl.MyFault mf = new w2jdlnoncustomization.wsdl.MyFault( - "myfault", mfr); - - TestUtil.logMsg("getFaultInfo from wrapper exception ... "); - mfr = mf.getFaultInfo(); - - TestUtil.logMsg("Instantiate fault wrapper exception constructor 2 ... " - + EXPECTED_FAULT_WRAPPER); - mf = new w2jdlnoncustomization.wsdl.MyFault("myfault", mfr, - new Exception("foo")); - TestUtil.logMsg("mf=" + mf); - - // A generate endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - Class endpointClass = null; - try { - endpointClass = Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Fault Equivalence Test - try { - Method[] methods = endpointClass.getMethods(); - Method helloOp = null; - Method helloOp2 = null; - for (int i = 0; i < methods.length; i++) { - if (methods[i].getName().equals("helloOperation")) - helloOp = methods[i]; - if (methods[i].getName().equals("helloOperation2")) - helloOp2 = methods[i]; - } - - found = false; - Class exceptions[] = helloOp.getExceptionTypes(); - for (int i = 0; i < exceptions.length; i++) { - String name = exceptions[i].getName(); - TestUtil.logMsg("exceptions[" + i + "]=" + name); - if (name.equals(EXPECTED_FAULT_WRAPPER)) - found = true; - } - if (!found) { - TestUtil.logErr("helloOperation does not declare throws of exception " - + EXPECTED_FAULT_WRAPPER); - pass = false; - } else - TestUtil.logMsg("helloOperation does declare throws of exception " - + EXPECTED_FAULT_WRAPPER); - - found = false; - exceptions = helloOp2.getExceptionTypes(); - for (int i = 0; i < exceptions.length; i++) { - String name = exceptions[i].getName(); - TestUtil.logMsg("exceptions[" + i + "]=" + name); - if (name.equals(EXPECTED_FAULT_WRAPPER)) - found = true; - } - if (!found) { - TestUtil.logErr("helloOperation2 does not declare throws of exception " - + EXPECTED_FAULT_WRAPPER); - pass = false; - } else - TestUtil.logMsg("helloOperation2 does declare throws of exception " - + EXPECTED_FAULT_WRAPPER); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - } - - if (!pass) - throw new Fault("FaultTest failed"); - } - - /* - * @testName: ServiceAndPortTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2055; JAXWS:SPEC:2040; JAXWS:SPEC:2056; - * JAXWS:SPEC:2069; JAXWS:SPEC:2070; JAXWS:SPEC:2071; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify wsdl:service and wsdl:port element mapping - */ - public void ServiceAndPortTest() throws Fault { - TestUtil.logTrace("ServiceAndPortTest"); - boolean pass = true; - - TestUtil.logMsg("Verify wsdl:service and wsdl:port mapping"); - // A generate service interface must be created from wsdl:service name - TestUtil.logMsg("Loading service interface " + EXPECTED_SERVICE); - Class serviceClass = null; - try { - serviceClass = Class.forName(EXPECTED_SERVICE); - TestUtil.logMsg("serviceClass=" + serviceClass); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // A generate endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - try { - Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Service Class Interface MUST extend Service interface - boolean found = false; - if (serviceClass != null) { - String name = serviceClass.getSuperclass().getName(); - if (name.equals(EXPECTED_SERVICE_INTERFACE)) { - found = true; - } - if (!found) { - TestUtil.logErr("Service Class Interface " + name + " does not extend " - + EXPECTED_SERVICE_INTERFACE); - pass = false; - } else - TestUtil.logMsg("Service Class Interface " + name + " does extend " - + EXPECTED_SERVICE_INTERFACE); - - } - - // Service Class Interface MUST have a getPortName() method based on - // wsd:port name - found = false; - Method m = null; - if (serviceClass != null) { - try { - m = serviceClass.getDeclaredMethod(EXPECTED_GET_PORTNAME_METHOD, - (Class[]) null); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - pass = false; - } - - // getPortName() method MUST return Endpoint Interface Type - if (m != null) { - TestUtil.logMsg("Service Class Interface " + serviceClass.getName() - + " does have port method " + EXPECTED_GET_PORTNAME_METHOD); - Class returnType = m.getReturnType(); - found = false; - if (returnType != null) { - String name = returnType.getName(); - TestUtil.logMsg("returnType=" + name); - if (name.equals(EXPECTED_ENDPOINT)) - found = true; - } - if (!found) { - TestUtil.logErr("Service Port Method " + EXPECTED_GET_PORTNAME_METHOD - + " does not return type as " + EXPECTED_ENDPOINT); - pass = false; - } else - TestUtil.logMsg("Service Port Method " + EXPECTED_GET_PORTNAME_METHOD - + " does return type as " + EXPECTED_ENDPOINT); - } else { - TestUtil.logErr("Service Class Interface " + serviceClass.getName() - + " does not have port method " + EXPECTED_GET_PORTNAME_METHOD); - pass = false; - } - - // Service must have 2 constructors - Constructor ctr1, ctr2; - try { - ctr1 = serviceClass.getConstructor(); - TestUtil.logMsg("constructor1=" + ctr1); - if (ctr1 == null) { - TestUtil.logErr("Default constructor non-existant"); - pass = false; - } - ctr2 = serviceClass.getConstructor(URL.class, QName.class); - TestUtil.logMsg("constructor2=" + ctr2); - if (ctr2 == null) { - TestUtil.logErr("2 arg constructor non-existant"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault("ServiceAndPortTest failed"); - } - - /* - * @testName: HeaderTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2040; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify soap:header (Header Binding Extension) - */ - public void HeaderTest() throws Fault { - TestUtil.logTrace("HeaderTest"); - boolean pass = true; - - TestUtil.logMsg("Verify soap:header (Header Binding Extension)"); - // A generate endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - Class endpointClass = null; - try { - endpointClass = Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // The Header generated type - TestUtil.logMsg("Loading header type " + EXPECTED_HEADER_TYPE); - Class headerClass = null; - try { - headerClass = Class.forName(EXPECTED_HEADER_TYPE); - TestUtil.logMsg("headerClass=" + headerClass); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // no header type as parameter to this method. - try { - Method helloOp = endpointClass.getMethod("helloOperation", - new Class[] { w2jdlnoncustomization.types.HelloStringElement.class }); - - boolean found = false; - Class parameters[] = helloOp.getParameterTypes(); - for (int i = 0; i < parameters.length; i++) { - String name = parameters[i].getName(); - TestUtil.logMsg("parameters[" + i + "]=" + name); - if (name.equals(EXPECTED_HEADER_TYPE)) - found = true; - } - if (!found) { - TestUtil.logMsg( - "helloOperation does not declare a header as parameter as expected for type " - + EXPECTED_HEADER_TYPE); - } else { - TestUtil.logErr( - "helloOperation does declare a header as parameter - unexpected for type " - + EXPECTED_HEADER_TYPE); - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - } - - if (!pass) - throw new Fault("HeaderTest failed"); - } - - /* - * @testName: SoapHeaderAndFaultTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2040; JAXWS:SPEC:7013; JAXWS:SPEC:2074; - * - * @test_Strategy: Verify soap:header and soap:fault mappings - */ - public void SoapHeaderAndFaultTest() throws Fault { - TestUtil.logTrace("SoapHeaderAndFaultTest"); - boolean pass = true; - - TestUtil.logMsg("Verify soap:header and soap:fault mappings"); - // The generated endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - Class endpointClass = null; - try { - endpointClass = Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // The generated Header type - TestUtil.logMsg("Loading header type " + EXPECTED_HEADER2_TYPE); - Class headerClass = null; - try { - headerClass = Class.forName(EXPECTED_HEADER2_TYPE); - TestUtil.logMsg("headerClass=" + headerClass); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Not mappings customization via jaxws:enableAdditionalSOAPHeaderMapping - // means no header type - // as parameter to this method. - try { - Method theMethod = null; - Method[] methods = endpointClass.getMethods(); - for (int i = 0; i < methods.length; i++) { - if (methods[i].getName().equals("operationWithHeaderAndFaults")) { - theMethod = methods[i]; - break; - } - } - - if (theMethod != null) { - boolean found = false; - Class parameters[] = theMethod.getParameterTypes(); - TestUtil.logMsg( - "Verify that the soap:header is mapped to a parameter of the operation"); - for (int i = 0; i < parameters.length; i++) { - String name = parameters[i].getName(); - TestUtil.logMsg("parameters[" + i + "]=" + name); - if (name.equals(EXPECTED_HEADER2_TYPE)) - found = true; - } - if (!found) { - TestUtil.logErr( - "operationWithHeaderAndFaults does not declare a header as parameter for type " - + EXPECTED_HEADER2_TYPE); - pass = false; - } else { - TestUtil.logMsg( - "operationWithHeaderAndFaults does declare a header as parameter for type " - + EXPECTED_HEADER2_TYPE); - } - - Class[] exceptions = theMethod.getExceptionTypes(); - boolean exception1 = false; - boolean exception2 = false; - TestUtil.logMsg( - "Verify that each soap:fault is mapped to the expected exception name"); - for (int j = 0; j < exceptions.length; j++) { - String exceptName = exceptions[j].getName(); - TestUtil.logMsg("exception[" + j + "]=" + exceptName); - if (exceptName.equals(EXPECTED_FAULT1_EXCEPTION)) { - exception1 = true; - } else if (exceptName.equals(EXPECTED_FAULT2_EXCEPTION)) { - exception2 = true; - } - } - if (!exception1) { - TestUtil.logErr("The method: " + theMethod.getName() - + " did not declare exception\n" + EXPECTED_FAULT1_EXCEPTION); - pass = false; - } - if (!exception2) { - TestUtil.logErr("The method: " + theMethod.getName() - + " did not declare exception\n" + EXPECTED_FAULT2_EXCEPTION); - pass = false; - } - } else { - TestUtil.logErr("operationWithHeaderAndFaults was not found!"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - } - - if (!pass) - throw new Fault("SoapHeaderAndFaultTest failed"); - } - - /* - * @testName: WrapperStyleTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2024; JAXWS:SPEC:2025; JAXWS:SPEC:2027; JAXWS:SPEC:2040; - * JAXWS:SPEC:2072; JAXWS:SPEC:2073; JAXWS:SPEC:7013; - * - * @test_Strategy: Verify Wrapper Style mapping - */ - public void WrapperStyleTest() throws Fault { - TestUtil.logTrace("WrapperStyleTest"); - boolean pass = true; - try { - Class c = Class.forName(EXPECTED_ENDPOINT, false, - this.getClass().getClassLoader()); - Class returnType = JAXWS_Util.getMethodReturnType(c, WRAPPER_METHOD); - if (returnType != null) { - String sReturnType = returnType.getName(); - if (!sReturnType.equals(EXPECTED_WRAPPER_RETURN_TYPE)) { - TestUtil.logErr( - "The return type for method: " + WRAPPER_METHOD + " was wrong"); - TestUtil.logErr("expected=" + EXPECTED_WRAPPER_RETURN_TYPE); - TestUtil.logErr("actual=" + sReturnType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + WRAPPER_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT); - pass = false; - } - Class parameterType = JAXWS_Util.getMethodParameterType(c, WRAPPER_METHOD, - 0); - if (parameterType != null) { - String sParameterType = parameterType.getName(); - if (!sParameterType.equals(EXPECTED_WRAPPER_PARAMETER_TYPE)) { - TestUtil.logErr("The parameter type for method: " + WRAPPER_METHOD - + " was wrong"); - TestUtil.logErr("expected=" + EXPECTED_WRAPPER_PARAMETER_TYPE); - TestUtil.logErr("actual=" + sParameterType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + WRAPPER_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT - + " or the specified parameter did not exist"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WrapperStyleTest failed", e); - } - - if (!pass) - throw new Fault("WrapperStyleTest failed"); - } - - /* - * @testName: NonWrapperStyleTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2024; JAXWS:SPEC:2025; JAXWS:SPEC:2027; JAXWS:SPEC:2040; - * JAXWS:SPEC:7013; - * - * @test_Strategy: Verify NonWrapper Style mapping - */ - public void NonWrapperStyleTest() throws Fault { - TestUtil.logTrace("NonWrapperStyleTest"); - boolean pass = true; - try { - Class c = Class.forName(EXPECTED_ENDPOINT, false, - this.getClass().getClassLoader()); - Class returnType = JAXWS_Util.getMethodReturnType(c, NONWRAPPER_METHOD); - if (returnType != null) { - String sReturnType = returnType.getName(); - if (!sReturnType.equals(EXPECTED_NONWRAPPER_RETURN_TYPE)) { - TestUtil.logErr("The return type for method: " + NONWRAPPER_METHOD - + " was wrong"); - TestUtil.logErr("expected=" + EXPECTED_NONWRAPPER_RETURN_TYPE); - TestUtil.logErr("actual=" + sReturnType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + NONWRAPPER_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT); - pass = false; - } - Class parameterType = JAXWS_Util.getMethodParameterType(c, - NONWRAPPER_METHOD, 0); - if (parameterType != null) { - String sParameterType = parameterType.getName(); - if (!sParameterType.equals(EXPECTED_NONWRAPPER_PARAMETER_TYPE)) { - TestUtil.logErr("The parameter type for method: " + NONWRAPPER_METHOD - + " was wrong"); - TestUtil.logErr("expected=" + EXPECTED_NONWRAPPER_PARAMETER_TYPE); - TestUtil.logErr("actual=" + sParameterType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + NONWRAPPER_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT - + " or the specified parameter did not exist"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("NonWrapperStyleTest failed", e); - } - - if (!pass) - throw new Fault("NonWrapperStyleTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/noncustomization/W2JDLNoncustomization.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/noncustomization/W2JDLNoncustomization.wsdl deleted file mode 100644 index 336136c564..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/noncustomization/W2JDLNoncustomization.wsdl +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/noncustomization/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/noncustomization/build.xml deleted file mode 100644 index 7a2a8faac9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/noncustomization/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/build.xml deleted file mode 100644 index 0f5bd310c2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/AddressingAnnotations.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/AddressingAnnotations.wsdl deleted file mode 100644 index 29f991046b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/AddressingAnnotations.wsdl +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/Client.java deleted file mode 100644 index ef3d0f9824..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/Client.java +++ /dev/null @@ -1,480 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations; - -import com.sun.ts.lib.util.*; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import java.util.Properties; - -import com.sun.ts.tests.jaxws.common.AnnotationUtils; - -public class Client extends ServiceEETest { - /* - * Test entry point. - * - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /* - * @class.setup_props: ts.home; - */ - public void setup(String[] args, Properties properties) throws Fault { - TestUtil.logMsg("setup ok"); - } - - public void cleanup() { - TestUtil.logMsg("cleanup"); - } - - /* - * @testName: WebServiceAnnotationTest - * - * @assertion_ids: JAXWS:SPEC:2011; JAXWS:SPEC:7011; JAXWS:SPEC:7013; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void WebServiceAnnotationTest() throws Fault { - TestUtil.logTrace("WebServiceAnnotationTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.W2JRLAnnotationsEndpoint", - false, this.getClass().getClassLoader()); - - TestUtil.logMsg("Processing class level annnotations"); - TestUtil.logTrace("========================"); - TestUtil.logTrace("testing WebService for the class"); - TestUtil.logTrace("------------------------"); - boolean result = AnnotationUtils.verifyWebServiceAnnotation(c, - "W2JRLAnnotationsEndpoint", "http://w2jrlannotations.org/wsdl", - "W2JRLAnnotations", "W2JRLAnnotations.wsdl", ""); - if (result == false) { - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebServiceAnnotationTest failed", e); - } - - if (!pass) - throw new Fault("WebServiceAnnotationTest failed"); - } - - /* - * @testName: ClassLevelSOAPBindingAnnotationTest - * - * @assertion_ids: JAXWS:SPEC:7011; JAXWS:SPEC:2019; JAXWS:SPEC:7013; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void ClassLevelSOAPBindingAnnotationTest() throws Fault { - TestUtil.logTrace("ClassLevelSOAPBindingAnnotationTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.W2JRLAnnotationsEndpoint", - false, this.getClass().getClassLoader()); - - boolean result = AnnotationUtils.verifySOAPBindingAnnotation(c, "RPC", - "LITERAL", "WRAPPED"); - if (result == false) { - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("ClassLevelSOAPBindingAnnotationTest failed", e); - } - - if (!pass) - throw new Fault("ClassLevelSOAPBindingAnnotationTest failed"); - } - - /* - * @testName: HelloOperationAnnotationsTest - * - * @assertion_ids: JAXWS:SPEC:7009; JAXWS:SPEC:7011; JAXWS:SPEC:7013; - * JAXWS:SPEC:2020; JAXWS:SPEC:2021; JAXWS:SPEC:2015; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void HelloOperationAnnotationsTest() throws Fault { - TestUtil.logTrace("HelloOperationAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.W2JRLAnnotationsEndpoint", - false, this.getClass().getClassLoader()); - - boolean result = AnnotationUtils.verifyWebMethodAnnotation(c, - "helloOperation", "helloOperation", ""); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyWebResultAnnotation(c, "helloOperation", - "result", "http://w2jrlannotations.org/wsdl"); - if (result == false) { - pass = false; - } - - result = AnnotationUtils.verifyWebParamAnnotation(c, 0, "helloOperation", - "parameter", "http://w2jrlannotations.org/wsdl", "IN", false); - if (result == false) { - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("HelloOperationAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("HelloOperationAnnotationsTest failed"); - } - - /* - * @testName: OnewayAnnotationsTest - * - * @assertion_ids: JAXWS:SPEC:7010; JAXWS:SPEC:7011; JAXWS:SPEC:2018; - * JAXWS:SPEC:7013; JAXWS:SPEC:2020; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void OnewayAnnotationsTest() throws Fault { - TestUtil.logTrace("OnewayAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.W2JRLAnnotationsEndpoint", - false, this.getClass().getClassLoader()); - - boolean result = AnnotationUtils.verifyOnewayAnnotation(c, - "onewayOperation"); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyWebParamAnnotation(c, 0, "onewayOperation", - "varString", "http://w2jrlannotations.org/wsdl", "IN", false); - if (result == false) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("OnewayAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("OnewayAnnotationsTest failed"); - } - - /* - * @testName: WebParamModesAnnotationsTest - * - * @assertion_ids: JAXWS:SPEC:7010; JAXWS:SPEC:7011; JAXWS:SPEC:2020; - * JAXWS:SPEC:7013; JAXWS:SPEC:2015; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void WebParamModesAnnotationsTest() throws Fault { - TestUtil.logTrace("WebParamModesAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.W2JRLAnnotationsEndpoint", - false, this.getClass().getClassLoader()); - boolean result = AnnotationUtils.verifyWebMethodAnnotation(c, - "mode1Operation", "mode1Operation", ""); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyWebParamAnnotation(c, 0, "mode1Operation", - "varString", "http://w2jrlannotations.org/wsdl", "IN", false); - if (result == false) { - pass = false; - } - - TestUtil.logTrace("------------------------"); - TestUtil.logTrace("testing mode2Operation annotations"); - TestUtil.logTrace("------------------------"); - result = AnnotationUtils.verifyWebMethodAnnotation(c, "mode2Operation", - "mode2Operation", ""); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyWebParamAnnotation(c, 0, "mode2Operation", - "varString", "http://w2jrlannotations.org/wsdl", "INOUT", false); - if (result == false) { - pass = false; - } - - TestUtil.logTrace("------------------------"); - TestUtil.logTrace("testing mode3Operation annotations"); - TestUtil.logTrace("------------------------"); - result = AnnotationUtils.verifyWebMethodAnnotation(c, "mode3Operation", - "mode3Operation", ""); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyWebParamAnnotation(c, 0, "mode3Operation", - "varString", "http://w2jrlannotations.org/wsdl", "OUT", false); - if (result == false) { - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebParamModesAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("WebParamModesAnnotationsTest failed"); - } - - /* - * @testName: WebFaultAnnotationsTest - * - * @assertion_ids: JAXWS:SPEC:7003; JAXWS:SPEC:7013; JAXWS:JAVADOC:63; - * JAXWS:JAVADOC:64; JAXWS:JAVADOC:65; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void WebFaultAnnotationsTest() throws Fault { - TestUtil.logTrace("WebFaultAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.MyFault_Exception", - false, this.getClass().getClassLoader()); - boolean result = AnnotationUtils.verifyWebFaultAnnotation(c, "MyFault", - "http://w2jrlannotations.org/wsdl", - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.MyFault"); - if (result == false) { - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebFaultAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("WebFaultAnnotationsTest failed"); - } - - /* - * @testName: WebServiceClientAnnotationsTest - * - * @assertion_ids: JAXWS:JAVADOC:66; JAXWS:JAVADOC:67; JAXWS:JAVADOC:68; - * JAXWS:SPEC:7013; JAXWS:SPEC:7006; JAXWS:SPEC:2063; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void WebServiceClientAnnotationsTest() throws Fault { - TestUtil.logTrace("WebServiceClientAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.W2JRLAnnotations", - false, this.getClass().getClassLoader()); - TestUtil.logMsg("Processing class level annnotations"); - TestUtil.logTrace("========================"); - TestUtil.logTrace("testing WebServiceClient for the class"); - TestUtil.logTrace("------------------------"); - boolean result = AnnotationUtils.verifyWebServiceClientAnnotation(c, - "W2JRLAnnotations", "http://w2jrlannotations.org/wsdl", - "W2JRLAnnotations.wsdl"); - if (result == false) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebServiceClientAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("WebServiceClientAnnotationsTest failed"); - } - - /* - * @testName: WebEndpointAnnotationsTest - * - * @assertion_ids: JAXWS:JAVADOC:62; JAXWS:SPEC:7007; JAXWS:SPEC:7013; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void WebEndpointAnnotationsTest() throws Fault { - TestUtil.logTrace("WebEndpointAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.W2JRLAnnotations", - false, this.getClass().getClassLoader()); - TestUtil.logMsg("Processing class level annnotations"); - TestUtil.logTrace("========================"); - TestUtil.logTrace("testing WebEndpoint for the class"); - TestUtil.logTrace("------------------------"); - boolean result = AnnotationUtils.verifyWebEndpointAnnotation(c, - "getW2JRLAnnotationsEndpointPort", "W2JRLAnnotationsEndpointPort"); - if (result == false) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WebEndpointAnnotationsTest failed", e); - } - - if (!pass) - throw new Fault("WebEndpointAnnotationsTest failed"); - } - - /* - * @testName: ActionFaultActionAndAddressingAnnotationsTest - * - * @assertion_ids: JAXWS:JAVADOC:130; JAXWS:JAVADOC:131; JAXWS:JAVADOC:132; - * JAXWS:JAVADOC:144; WSAMD:SPEC:4003; WSAMD:SPEC:3000; WSAMD:SPEC:3000.1; - * JAXWS:SPEC:2075; JAXWS:SPEC:2077; JAXWS:SPEC:2078; JAXWS:SPEC:2079; - * JAXWS:SPEC:2080; JAXWS:SPEC:2081; JAXWS:SPEC:2082; JAXWS:SPEC:2083; - * WSAMD:SPEC:3001.5; WSAMD:SPEC:3001.8; JAXWS:SPEC:2089; - * - * @test_Strategy: Generate classes from a wsdl and verify existence of - * annotations - */ - public void ActionFaultActionAndAddressingAnnotationsTest() throws Fault { - TestUtil.logTrace("ActionFaultActionAndAddressingAnnotationsTest"); - boolean pass = true; - try { - Class c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.AddressAnnotationsEndpoint1", - false, this.getClass().getClassLoader()); - String[][] faults = {}; - boolean result = AnnotationUtils.verifyActionFaultActionAnnotation(c, - "address1", true, "input1", null, faults); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address2", - true, null, "output2", faults); - if (result == false) { - pass = false; - } - String faults3[][] = { { - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.Myfault3A", - "fault3a" }, - { "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.Myfault3B", - "fault3b" } }; - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address3", - true, null, null, faults3); - if (result == false) { - pass = false; - } - c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.AddressAnnotationsEndpoint2", - false, this.getClass().getClassLoader()); - String faults4[][] = { { - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.Myfault4", - "fault4" } }; - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address4", - true, null, "output4", faults4); - if (result == false) { - pass = false; - } - String faults5[][] = { { - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.Myfault5", - "fault5" } }; - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address5", - true, "input5", "output5", faults5); - if (result == false) { - pass = false; - } - c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.AddressAnnotationsEndpoint3", - false, this.getClass().getClassLoader()); - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address6", - false, "", "", null); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address7", - false, "", "", null); - if (result == false) { - pass = false; - } - c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.AddressAnnotationsEndpoint4", - false, this.getClass().getClassLoader()); - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address8", - false, "", "", null); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address9", - false, "", "", null); - if (result == false) { - pass = false; - } - c = Class.forName( - "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.annotations.AddressAnnotationsEndpoint5", - false, this.getClass().getClassLoader()); - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address10", - false, "", "", null); - if (result == false) { - pass = false; - } - result = AnnotationUtils.verifyActionFaultActionAnnotation(c, "address11", - false, "", "", null); - if (result == false) { - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("ActionFaultActionAndAddressingAnnotationsTest failed", - e); - } - - if (!pass) - throw new Fault("ActionFaultActionAndAddressingAnnotationsTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/W2JRLAnnotations.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/W2JRLAnnotations.wsdl deleted file mode 100644 index d595bfe587..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/W2JRLAnnotations.wsdl +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/build.xml deleted file mode 100644 index cf293010e8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/build.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/customfile.xml deleted file mode 100644 index 37fec67c24..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/customfile2.xml deleted file mode 100644 index 5e46ebcb5d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/annotations/customfile2.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/build.xml deleted file mode 100644 index 3cb7ec1ecb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/Client.java deleted file mode 100644 index 9383333d55..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/Client.java +++ /dev/null @@ -1,669 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.customization; - -import com.sun.ts.lib.util.*; - -import java.lang.reflect.*; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import java.util.Properties; - -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.AnnotationUtils; - -public class Client extends ServiceEETest { - private static final String PKG = "com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.customization."; - - // Expected mappings for wsdl:fault element mapping - private static final String EXPECTED_FAULT_WRAPPER = PKG + "W2JRLFault"; - - private static final String EXPECTED_FAULT_WRAPPER2 = PKG + "MyFault"; - - private static final String EXPECTED_FAULT_BEAN = PKG + "MyFaultReason"; - - // Expected mappings for wsdl:service and wsdl:port element mapping - private static final String EXPECTED_SERVICE = PKG + "W2JRLCustomization"; - - private static final String EXPECTED_ENDPOINT = PKG - + "W2JRLCustomizationEndpoint"; - - private static final String EXPECTED_SERVICE_INTERFACE = "jakarta.xml.ws.Service"; - - private static final String EXPECTED_SERVICE_EXCEPTION = "jakarta.xml.ws.WebServiceException"; - - private static final String EXPECTED_GET_PORTNAME_METHOD = "getW2JRLCustomizationEndpointPort"; - - // Used for soap:header binding test - private static final String EXPECTED_HEADER_TYPE = PKG + "MyHeader"; - - // Used for wrapper style tests - private static final String ENABLEWRAPPER_TRUE_METHOD = "wrapperElement1"; - - private static final String EXPECTED_ENABLEWRAPPER_TRUE_RETURN_TYPE = PKG - + "WrapperElement11"; - - private static final String EXPECTED_ENABLEWRAPPER_TRUE_PARAMETER_TYPE = PKG - + "WrapperElement1"; - - private static final String ENABLEWRAPPER_FALSE_METHOD = "wrapperElement2"; - - private static final String EXPECTED_ENABLEWRAPPER_FALSE_RETURN_TYPE = PKG - + "WrapperElement22"; - - private static final String EXPECTED_ENABLEWRAPPER_FALSE_PARAMETER_TYPE = PKG - + "WrapperElement2"; - - // Used for soap:header and soap:fault binding test - private static final String EXPECTED_HEADER2_TYPE = PKG + "ConfigHeader"; - - private static final String EXPECTED_FAULT1_EXCEPTION = PKG + "Fault1"; - - private static final String EXPECTED_FAULT2_EXCEPTION = PKG + "Fault2"; - - /* - * Test entry point. - * - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /* - * @class.setup_props: ts.home; - */ - public void setup(String[] args, Properties properties) throws Fault { - TestUtil.logMsg("setup ok"); - } - - public void cleanup() { - TestUtil.logMsg("cleanup"); - } - - /* - * @testName: PortTypeTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2005; JAXWS:SPEC:2010; JAXWS:SPEC:2041; - * - * @test_Strategy: Verify wsdl:definitions and wsdl:portType mapping - */ - public void PortTypeTest() throws Fault { - TestUtil.logTrace("PortTypeTest"); - boolean pass = true; - try { - TestUtil.logMsg("Verify wsdl:portType mapping"); - Class.forName(EXPECTED_ENDPOINT, false, this.getClass().getClassLoader()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("PortTypeTest failed", e); - } - - if (!pass) - throw new Fault("PortTypeTest failed"); - } - - /* - * @testName: OperationTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2013; JAXWS:SPEC:2014; JAXWS:SPEC:2018; - * JAXWS:SPEC:2017; JAXWS:SPEC:2041; - * - * @test_Strategy: Verify mapping of wsdl:operation - */ - public void OperationTest() throws Fault { - TestUtil.logTrace("OperationTest"); - boolean pass = true; - try { - TestUtil.logMsg("Verify wsdl:operation mapping"); - Class c = Class.forName(EXPECTED_ENDPOINT, false, - this.getClass().getClassLoader()); - String methodName = "helloOperation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "onewayOperation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "mode1Operation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "mode2Operation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "mode3Operation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - if (!pass) { - TestUtil.logErr("One ofthe operations does not exist in the SEI"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("OperationTest failed", e); - } - - if (!pass) - throw new Fault("OperationTest failed"); - } - - /* - * @testName: FaultTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2043; JAXWS:SPEC:2044; JAXWS:SPEC:2041; - * JAXWS:SPEC:2061; - * - * @test_Strategy: Verify wsdl:fault element mapping - */ - public void FaultTest() throws Fault { - TestUtil.logTrace("FaultTest"); - boolean pass = true; - - TestUtil.logMsg("Verify wsdl:fault mapping"); - TestUtil.logMsg("Loading fault wrapper " + EXPECTED_FAULT_WRAPPER); - Class faultWrapper = null; - try { - faultWrapper = Class.forName(EXPECTED_FAULT_WRAPPER); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Check to ensure Wrapper Exception class is annotated using the WebFault - // annotation. - boolean found = AnnotationUtils.verifyWebFaultAnnotation(faultWrapper, - "MyFaultReason", "http://w2jrlcustomization/types", - EXPECTED_FAULT_BEAN); - if (!found) { - TestUtil.logErr( - "Wrapper Exception Class is not annotated with WebFault annotation - " - + EXPECTED_FAULT_WRAPPER); - pass = false; - } else - TestUtil.logMsg( - "Wrapper Exception Class is annotated with WebFault annotation - " - + EXPECTED_FAULT_WRAPPER); - - TestUtil.logMsg("Loading fault bean " + EXPECTED_FAULT_BEAN); - try { - Class.forName(EXPECTED_FAULT_BEAN); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - TestUtil.logMsg("Instantiate fault bean and call its methods ... " - + EXPECTED_FAULT_BEAN); - com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.customization.MyFaultReason mfr = new com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.customization.MyFaultReason(); - TestUtil.logMsg("setMessage to foo"); - mfr.setMessage("foo"); - TestUtil.logMsg("getMessage=" + mfr.getMessage()); - - TestUtil.logMsg("Instantiate fault wrapper exception constructor 1 ... " - + EXPECTED_FAULT_WRAPPER); - com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.customization.W2JRLFault mf = new com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.customization.W2JRLFault( - "myfault", mfr); - - TestUtil.logMsg("getFaultInfo from wrapper exception ... "); - mfr = mf.getFaultInfo(); - TestUtil.logMsg("mfr=" + mfr); - - TestUtil.logMsg("Instantiate fault wrapper exception constructor 2 ... " - + EXPECTED_FAULT_WRAPPER); - mf = new com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.customization.W2JRLFault( - "myfault", mfr, new Exception("foo")); - TestUtil.logMsg("mf=" + mf); - - // A generate endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - Class endpointClass = null; - try { - endpointClass = Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Fault Equivalence Test - try { - Method[] methods = endpointClass.getMethods(); - Method helloOp = null; - Method helloOp2 = null; - for (int i = 0; i < methods.length; i++) { - if (methods[i].getName().equals("helloOperation")) - helloOp = methods[i]; - if (methods[i].getName().equals("helloOperation2")) - helloOp2 = methods[i]; - } - - found = false; - Class exceptions[] = helloOp.getExceptionTypes(); - for (int i = 0; i < exceptions.length; i++) { - String name = exceptions[i].getName(); - TestUtil.logMsg("exceptions[" + i + "]=" + name); - if (name.equals(EXPECTED_FAULT_WRAPPER)) - found = true; - } - if (!found) { - TestUtil.logErr("helloOperation does not declare throws of exception " - + EXPECTED_FAULT_WRAPPER); - pass = false; - } else - TestUtil.logMsg("helloOperation does declare throws of exception " - + EXPECTED_FAULT_WRAPPER); - - found = false; - exceptions = helloOp2.getExceptionTypes(); - for (int i = 0; i < exceptions.length; i++) { - String name = exceptions[i].getName(); - TestUtil.logMsg("exceptions[" + i + "]=" + name); - if (name.equals(EXPECTED_FAULT_WRAPPER2)) - found = true; - } - if (!found) { - TestUtil.logErr("helloOperation2 does not declare throws of exception " - + EXPECTED_FAULT_WRAPPER2); - pass = false; - } else - TestUtil.logMsg("helloOperation2 does declare throws of exception " - + EXPECTED_FAULT_WRAPPER2); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - } - - if (!pass) - throw new Fault("FaultTest failed"); - } - - /* - * @testName: ServiceAndPortTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2054; JAXWS:SPEC:2055; JAXWS:SPEC:2056; - * JAXWS:SPEC:2041; JAXWS:SPEC:2045; - * - * @test_Strategy: Verify wsdl:service and wsdl:port element mapping - */ - public void ServiceAndPortTest() throws Fault { - TestUtil.logTrace("ServiceAndPortTest"); - boolean pass = true; - - TestUtil.logMsg("Verify wsdl:service and wsdl:port mapping"); - // A generate service interface must be created from wsdl:service name - TestUtil.logMsg("Loading service interface " + EXPECTED_SERVICE); - Class serviceClass = null; - try { - serviceClass = Class.forName(EXPECTED_SERVICE); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // A generate endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - try { - Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Service Class Interface MUST extend Service interface - boolean found = false; - if (serviceClass != null) { - String name = serviceClass.getSuperclass().getName(); - if (name.equals(EXPECTED_SERVICE_INTERFACE)) { - found = true; - } - if (!found) { - TestUtil.logErr("Service Class Interface " + name + " does not extend " - + EXPECTED_SERVICE_INTERFACE); - pass = false; - } else - TestUtil.logMsg("Service Class Interface " + name + " does extend " - + EXPECTED_SERVICE_INTERFACE); - - } - - // Service Class Interface MUST have a getPortName() method based on - // wsd:port name - found = false; - Method m = null; - if (serviceClass != null) { - try { - m = serviceClass.getDeclaredMethod(EXPECTED_GET_PORTNAME_METHOD, - (Class[]) null); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - pass = false; - } - - // getPortName() method MUST return Endpoint Interface Type - if (m != null) { - TestUtil.logMsg("Service Class Interface " + serviceClass.getName() - + " does have port method " + EXPECTED_GET_PORTNAME_METHOD); - Class returnType = m.getReturnType(); - found = false; - if (returnType != null) { - String name = returnType.getName(); - TestUtil.logMsg("returnType=" + name); - if (name.equals(EXPECTED_ENDPOINT)) - found = true; - } - if (!found) { - TestUtil.logErr("Service Port Method " + EXPECTED_GET_PORTNAME_METHOD - + " does not return type as " + EXPECTED_ENDPOINT); - pass = false; - } else - TestUtil.logMsg("Service Port Method " + EXPECTED_GET_PORTNAME_METHOD - + " does return type as " + EXPECTED_ENDPOINT); - } else { - TestUtil.logErr("Service Class Interface " + serviceClass.getName() - + " does not have port method " + EXPECTED_GET_PORTNAME_METHOD); - pass = false; - } - } - - if (!pass) - throw new Fault("ServiceAndPortTest failed"); - } - - /* - * @testName: HeaderTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2041; - * - * @test_Strategy: Verify soap:header (Header Binding Extension) - */ - public void HeaderTest() throws Fault { - TestUtil.logTrace("HeaderTest"); - boolean pass = true; - - TestUtil.logMsg("Verify soap:header (Header Binding Extension)"); - // A generate endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - try { - Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // The Header generated type - TestUtil.logMsg("Loading header type " + EXPECTED_HEADER_TYPE); - Class headerClass = null; - try { - headerClass = Class.forName(EXPECTED_HEADER_TYPE); - TestUtil.logMsg("headerClass=" + headerClass); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - if (!pass) - throw new Fault("HeaderTest failed"); - } - - /* - * @testName: SoapHeaderAndFaultTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2041; - * - * @test_Strategy: Verify soap:fault/soap:header mappings - */ - public void SoapHeaderAndFaultTest() throws Fault { - TestUtil.logTrace("SoapHeaderAndFaultTest"); - boolean pass = true; - - // The generated endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - Class endpointClass = null; - try { - endpointClass = Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // The generated Header type - TestUtil.logMsg("Loading header type " + EXPECTED_HEADER2_TYPE); - Class headerClass = null; - try { - headerClass = Class.forName(EXPECTED_HEADER2_TYPE); - TestUtil.logMsg("headerClass=" + headerClass); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Customization via jaxws:enableAdditionalSOAPHeaderMapping means a header - // type - // as parameter to this method. Customization via jaxws:bindings in wsdl to - // override - // the generated header fault exception class name. - try { - Method theMethod = null; - Method[] methods = endpointClass.getMethods(); - for (int i = 0; i < methods.length; i++) { - if (methods[i].getName().equals("operationWithHeaderAndFaults")) { - theMethod = methods[i]; - break; - } - } - - if (theMethod != null) { - - boolean found = false; - Class parameters[] = theMethod.getParameterTypes(); - TestUtil.logMsg( - "Verify the jaxws:enableAdditionalSOAPHeaderMapping customization"); - TestUtil.logMsg( - "Verify that the soap:header is mapped to a parameter of the operation"); - for (int i = 0; i < parameters.length; i++) { - String name = parameters[i].getName(); - TestUtil.logMsg("parameters[" + i + "]=" + name); - if (name.equals(EXPECTED_HEADER2_TYPE)) - found = true; - } - if (!found) { - TestUtil.logErr( - "operationWithHeaderAndFaults does not declare a header as parameter for type " - + EXPECTED_HEADER2_TYPE); - pass = false; - } else { - TestUtil.logMsg( - "operationWithHeaderAndFaults does declare a header as parameter for type " - + EXPECTED_HEADER2_TYPE); - } - - Class[] exceptions = theMethod.getExceptionTypes(); - boolean exception1 = false; - boolean exception2 = false; - TestUtil.logMsg( - "Verify that each soap:fault is mapped to the expected exception name"); - for (int j = 0; j < exceptions.length; j++) { - String exceptName = exceptions[j].getName(); - TestUtil.logMsg("exception[" + j + "]=" + exceptName); - if (exceptName.equals(EXPECTED_FAULT1_EXCEPTION)) { - exception1 = true; - } else if (exceptName.equals(EXPECTED_FAULT2_EXCEPTION)) { - exception2 = true; - } - } - if (!exception1) { - TestUtil.logErr("The method: " + theMethod.getName() - + " did not declare exception\n" + EXPECTED_FAULT1_EXCEPTION); - pass = false; - } - if (!exception2) { - TestUtil.logErr("The method: " + theMethod.getName() - + " did not declare exception\n" + EXPECTED_FAULT2_EXCEPTION); - pass = false; - } - } else { - TestUtil.logErr("operationWithHeaderAndFaults was not found!"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - } - - if (!pass) - throw new Fault("SoapHeaderAndFaultTest failed"); - } - - /* - * @testName: EnableWrapperStyleTrueTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2024; JAXWS:SPEC:2025; JAXWS:SPEC:2027; JAXWS:SPEC:2041; - * - * @test_Strategy: Verify that each message results in a parameter - */ - public void EnableWrapperStyleTrueTest() throws Fault { - TestUtil.logTrace("EnableWrapperStyleTrueTest"); - boolean pass = true; - try { - Class c = Class.forName(EXPECTED_ENDPOINT, false, - this.getClass().getClassLoader()); - Class returnType = JAXWS_Util.getMethodReturnType(c, - ENABLEWRAPPER_TRUE_METHOD); - if (returnType != null) { - String sReturnType = returnType.getName(); - if (!sReturnType.equals(EXPECTED_ENABLEWRAPPER_TRUE_RETURN_TYPE)) { - TestUtil.logErr("The return type for method: " - + ENABLEWRAPPER_TRUE_METHOD + " was wrong"); - TestUtil - .logErr("expected=" + EXPECTED_ENABLEWRAPPER_TRUE_RETURN_TYPE); - TestUtil.logErr("actual=" + sReturnType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + ENABLEWRAPPER_TRUE_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT); - pass = false; - } - Class parameterType = JAXWS_Util.getMethodParameterType(c, - ENABLEWRAPPER_TRUE_METHOD, 0); - if (parameterType != null) { - String sParameterType = parameterType.getName(); - if (!sParameterType - .equals(EXPECTED_ENABLEWRAPPER_TRUE_PARAMETER_TYPE)) { - TestUtil.logErr("The parameter type for method: " - + ENABLEWRAPPER_TRUE_METHOD + " was wrong"); - TestUtil - .logErr("expected=" + EXPECTED_ENABLEWRAPPER_TRUE_PARAMETER_TYPE); - TestUtil.logErr("actual=" + sParameterType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + ENABLEWRAPPER_TRUE_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT - + " or the specified parameter did not exist"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EnableWrapperStyleTrueTest failed", e); - } - - if (!pass) - throw new Fault("EnableWrapperStyleTrueTest failed"); - } - - /* - * @testName: EnableWrapperStyleFalseTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2024; JAXWS:SPEC:2025; JAXWS:SPEC:2027; JAXWS:SPEC:2041; - * - * @test_Strategy: Verify that each message results in a paramenter - */ - public void EnableWrapperStyleFalseTest() throws Fault { - TestUtil.logTrace("EnableWrapperStyleFalseTest"); - boolean pass = true; - try { - Class c = Class.forName(EXPECTED_ENDPOINT, false, - this.getClass().getClassLoader()); - Class returnType = JAXWS_Util.getMethodReturnType(c, - ENABLEWRAPPER_FALSE_METHOD); - if (returnType != null) { - String sReturnType = returnType.getName(); - if (!sReturnType.equals(EXPECTED_ENABLEWRAPPER_FALSE_RETURN_TYPE)) { - TestUtil.logErr("The return type for method: " - + ENABLEWRAPPER_FALSE_METHOD + " was wrong"); - TestUtil - .logErr("expected=" + EXPECTED_ENABLEWRAPPER_FALSE_RETURN_TYPE); - TestUtil.logErr("actual=" + sReturnType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + ENABLEWRAPPER_FALSE_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT); - pass = false; - } - Class parameterType = JAXWS_Util.getMethodParameterType(c, - ENABLEWRAPPER_FALSE_METHOD, 0); - if (parameterType != null) { - String sParameterType = parameterType.getName(); - if (!sParameterType - .equals(EXPECTED_ENABLEWRAPPER_FALSE_PARAMETER_TYPE)) { - TestUtil.logErr("The parameter type for method: " - + ENABLEWRAPPER_FALSE_METHOD + " was wrong"); - TestUtil.logErr( - "expected=" + EXPECTED_ENABLEWRAPPER_FALSE_PARAMETER_TYPE); - TestUtil.logErr("actual=" + sParameterType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + ENABLEWRAPPER_FALSE_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT - + " or the specified parameter did not exist"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EnableWrapperStyleFalseTest failed", e); - } - - if (!pass) - throw new Fault("EnableWrapperStyleFalseTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/W2JRLCustomization.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/W2JRLCustomization.wsdl deleted file mode 100644 index cbc458493d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/W2JRLCustomization.wsdl +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/build.xml deleted file mode 100644 index da439b7099..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/build.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/customfile.xml deleted file mode 100644 index 97a0cb4133..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/customization/customfile.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/noncustomization/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/noncustomization/Client.java deleted file mode 100644 index dccad7438b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/noncustomization/Client.java +++ /dev/null @@ -1,706 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.mapping.w2jmapping.rpc.literal.noncustomization; - -import com.sun.ts.lib.util.*; - -import java.lang.reflect.*; -import java.net.URL; -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import java.util.Properties; - -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.AnnotationUtils; - -public class Client extends ServiceEETest { - private static final String WSDL_PKG = "w2jrlnoncustomization.wsdl."; - - private static final String TYPES_PKG = "w2jrlnoncustomization.types."; - - // Expected mappings for wsdl:fault element mapping - private static final String EXPECTED_FAULT_WRAPPER = WSDL_PKG + "MyFault"; - - private static final String EXPECTED_FAULT_BEAN = TYPES_PKG + "MyFaultReason"; - - // Expected mappings for wsdl:service and wsdl:port element mapping - private static final String EXPECTED_SERVICE = WSDL_PKG - + "W2JRLNoncustomization"; - - private static final String EXPECTED_ENDPOINT = WSDL_PKG - + "W2JRLNoncustomizationEndpoint"; - - private static final String EXPECTED_SERVICE_INTERFACE = "jakarta.xml.ws.Service"; - - private static final String EXPECTED_SERVICE_EXCEPTION = "jakarta.xml.ws.WebServiceException"; - - private static final String EXPECTED_GET_PORTNAME_METHOD = "getW2JRLNoncustomizationEndpointPort"; - - // Used for soap:header binding test - private static final String EXPECTED_HEADER_TYPE = TYPES_PKG + "MyHeader"; - - // Used for wrapper style tests - private static final String WRAPPER_METHOD = "wrapperElement1"; - - private static final String EXPECTED_WRAPPER_RETURN_TYPE = "w2jrlnoncustomization.types.WrapperElement11"; - - private static final String EXPECTED_WRAPPER_PARAMETER_TYPE = "w2jrlnoncustomization.types.WrapperElement1"; - - private static final String NONWRAPPER_METHOD = "wrapperElement2"; - - private static final String EXPECTED_NONWRAPPER_RETURN_TYPE = "w2jrlnoncustomization.types.WrapperElement22"; - - private static final String EXPECTED_NONWRAPPER_PARAMETER_TYPE = "w2jrlnoncustomization.types.WrapperElement1"; - - // Used for soap:header and soap:fault binding test - private static final String EXPECTED_HEADER2_TYPE = TYPES_PKG - + "ConfigHeader"; - - private static final String EXPECTED_FAULT1_EXCEPTION = WSDL_PKG + "AFault1"; - - private static final String EXPECTED_FAULT2_EXCEPTION = WSDL_PKG + "AFault2"; - - /* - * Test entry point. - * - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /* - * @class.setup_props: ts.home; - */ - public void setup(String[] args, Properties properties) throws Fault { - TestUtil.logMsg("setup ok"); - } - - public void cleanup() { - TestUtil.logMsg("cleanup"); - } - - /* - * @testName: PortTypeTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2005; JAXWS:SPEC:2009; JAXWS:SPEC:2040; - * - * @test_Strategy: Verify mapping of wsdl:portType - */ - public void PortTypeTest() throws Fault { - TestUtil.logTrace("PortTypeTest"); - boolean pass = true; - try { - TestUtil.logMsg("Verify wsdl:portType mapping"); - Class.forName(EXPECTED_ENDPOINT, false, this.getClass().getClassLoader()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("PortTypeTest failed", e); - } - - if (!pass) - throw new Fault("PortTypeTest failed"); - } - - /* - * @testName: OperationTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2013; JAXWS:SPEC:2018; JAXWS:SPEC:2017; - * JAXWS:SPEC:2040; - * - * @test_Strategy: Verify mapping of wsdl:operation - */ - public void OperationTest() throws Fault { - TestUtil.logTrace("OperationTest"); - boolean pass = true; - try { - TestUtil.logMsg("Verify wsdl:operation mapping"); - Class c = Class.forName(EXPECTED_ENDPOINT, false, - this.getClass().getClassLoader()); - String methodName = "helloOperation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "onewayOperation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "mode1Operation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "mode2Operation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - methodName = "mode3Operation"; - if (!JAXWS_Util.doesMethodExist(c, methodName)) { - TestUtil.logErr("Method " + methodName + ", was not found"); - pass = false; - } - if (!pass) { - TestUtil.logErr("One ofthe operations does not exist in the SEI"); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("OperationTest failed", e); - } - - if (!pass) - throw new Fault("OperationTest failed"); - } - - /* - * @testName: FaultTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2043; JAXWS:SPEC:2044; JAXWS:SPEC:2040; - * - * @test_Strategy: Verify wsdl:fault element mapping - */ - public void FaultTest() throws Fault { - TestUtil.logTrace("FaultTest"); - boolean pass = true; - - TestUtil.logMsg("Verify wsdl:fault mapping"); - TestUtil.logMsg("Loading fault wrapper " + EXPECTED_FAULT_WRAPPER); - Class faultWrapper = null; - try { - faultWrapper = Class.forName(EXPECTED_FAULT_WRAPPER); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Check to ensure Wrapper Exception class is annotated using the WebFault - // annotation. - boolean found = AnnotationUtils.verifyWebFaultAnnotation(faultWrapper, - "MyFaultReason", "http://w2jrlnoncustomization/types", - EXPECTED_FAULT_BEAN); - if (!found) { - TestUtil.logErr( - "Wrapper Exception Class is not annotated with WebFault annotation - " - + EXPECTED_FAULT_WRAPPER); - pass = false; - } else - TestUtil.logMsg( - "Wrapper Exception Class is annotated with WebFault annotation - " - + EXPECTED_FAULT_WRAPPER); - - TestUtil.logMsg("Loading fault bean " + EXPECTED_FAULT_BEAN); - Class faultBean = null; - try { - faultBean = Class.forName(EXPECTED_FAULT_BEAN); - TestUtil.logMsg("faultBean=" + faultBean); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - TestUtil.logMsg("Instantiate fault bean and call its methods ... " - + EXPECTED_FAULT_BEAN); - w2jrlnoncustomization.types.MyFaultReason mfr = new w2jrlnoncustomization.types.MyFaultReason(); - TestUtil.logMsg("setMessage to foo"); - mfr.setMessage("foo"); - TestUtil.logMsg("getMessage=" + mfr.getMessage()); - - TestUtil.logMsg("Instantiate fault wrapper exception constructor 1 ... " - + EXPECTED_FAULT_WRAPPER); - w2jrlnoncustomization.wsdl.MyFault mf = new w2jrlnoncustomization.wsdl.MyFault( - "myfault", mfr); - - TestUtil.logMsg("getFaultInfo from wrapper exception ... "); - mfr = mf.getFaultInfo(); - - TestUtil.logMsg("Instantiate fault wrapper exception constructor 2 ... " - + EXPECTED_FAULT_WRAPPER); - mf = new w2jrlnoncustomization.wsdl.MyFault("myfault", mfr, - new Exception("foo")); - TestUtil.logMsg("mf=" + mf); - - // A generate endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - Class endpointClass = null; - try { - endpointClass = Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Fault Equivalence Test - try { - Method[] methods = endpointClass.getMethods(); - Method helloOp = null; - Method helloOp2 = null; - for (int i = 0; i < methods.length; i++) { - if (methods[i].getName().equals("helloOperation")) - helloOp = methods[i]; - if (methods[i].getName().equals("helloOperation2")) - helloOp2 = methods[i]; - } - - found = false; - Class exceptions[] = helloOp.getExceptionTypes(); - for (int i = 0; i < exceptions.length; i++) { - String name = exceptions[i].getName(); - TestUtil.logMsg("exceptions[" + i + "]=" + name); - if (name.equals(EXPECTED_FAULT_WRAPPER)) - found = true; - } - if (!found) { - TestUtil.logErr("helloOperation does not declare throws of exception " - + EXPECTED_FAULT_WRAPPER); - pass = false; - } else - TestUtil.logMsg("helloOperation does declare throws of exception " - + EXPECTED_FAULT_WRAPPER); - - found = false; - exceptions = helloOp2.getExceptionTypes(); - for (int i = 0; i < exceptions.length; i++) { - String name = exceptions[i].getName(); - TestUtil.logMsg("exceptions[" + i + "]=" + name); - if (name.equals(EXPECTED_FAULT_WRAPPER)) - found = true; - } - if (!found) { - TestUtil.logErr("helloOperation2 does not declare throws of exception " - + EXPECTED_FAULT_WRAPPER); - pass = false; - } else - TestUtil.logMsg("helloOperation2 does declare throws of exception " - + EXPECTED_FAULT_WRAPPER); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - } - - if (!pass) - throw new Fault("FaultTest failed"); - } - - /* - * @testName: ServiceAndPortTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2055; JAXWS:SPEC:2056; JAXWS:SPEC:2040; - * JAXWS:SPEC:2070; JAXWS:SPEC:2071; - * - * @test_Strategy: Verify wsdl:service and wsdl:port element mapping - */ - public void ServiceAndPortTest() throws Fault { - TestUtil.logTrace("ServiceAndPortTest"); - boolean pass = true; - - TestUtil.logMsg("Verify wsdl:service and wsdl:port mapping"); - // A generate service interface must be created from wsdl:service name - TestUtil.logMsg("Loading service interface " + EXPECTED_SERVICE); - Class serviceClass = null; - try { - serviceClass = Class.forName(EXPECTED_SERVICE); - TestUtil.logMsg("serviceClass=" + serviceClass); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // A generate endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - try { - Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // Service Class Interface MUST extend Service interface - boolean found = false; - if (serviceClass != null) { - String name = serviceClass.getSuperclass().getName(); - if (name.equals(EXPECTED_SERVICE_INTERFACE)) { - found = true; - } - if (!found) { - TestUtil.logErr("Service Class Interface " + name + " does not extend " - + EXPECTED_SERVICE_INTERFACE); - pass = false; - } else - TestUtil.logMsg("Service Class Interface " + name + " does extend " - + EXPECTED_SERVICE_INTERFACE); - - } - - // Service Class Interface MUST have a getPortName() method based on - // wsd:port name - found = false; - Method m = null; - if (serviceClass != null) { - try { - m = serviceClass.getDeclaredMethod(EXPECTED_GET_PORTNAME_METHOD, - (Class[]) null); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - pass = false; - } - - // getPortName() method MUST return Endpoint Interface Type - if (m != null) { - TestUtil.logMsg("Service Class Interface " + serviceClass.getName() - + " does have port method " + EXPECTED_GET_PORTNAME_METHOD); - Class returnType = m.getReturnType(); - found = false; - if (returnType != null) { - String name = returnType.getName(); - TestUtil.logMsg("returnType=" + name); - if (name.equals(EXPECTED_ENDPOINT)) - found = true; - } - if (!found) { - TestUtil.logErr("Service Port Method " + EXPECTED_GET_PORTNAME_METHOD - + " does not return type as " + EXPECTED_ENDPOINT); - pass = false; - } else - TestUtil.logMsg("Service Port Method " + EXPECTED_GET_PORTNAME_METHOD - + " does return type as " + EXPECTED_ENDPOINT); - } else { - TestUtil.logErr("Service Class Interface " + serviceClass.getName() - + " does not have port method " + EXPECTED_GET_PORTNAME_METHOD); - pass = false; - } - - // Service must have 2 constructors - Constructor ctr1, ctr2; - try { - ctr1 = serviceClass.getConstructor(); - TestUtil.logMsg("constructor1=" + ctr1); - if (ctr1 == null) { - TestUtil.logErr("Default constructor non-existant"); - pass = false; - } - ctr2 = serviceClass.getConstructor(URL.class, QName.class); - TestUtil.logMsg("constructor2=" + ctr2); - if (ctr2 == null) { - TestUtil.logErr("2 arg constructor non-existant"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - pass = false; - } - } - - if (!pass) - throw new Fault("ServiceAndPortTest failed"); - } - - /* - * @testName: HeaderTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2040; - * - * @test_Strategy: Verify soap:header (Header Binding Extension) - */ - public void HeaderTest() throws Fault { - TestUtil.logTrace("HeaderTest"); - boolean pass = true; - - TestUtil.logMsg("Verify soap:header (Header Binding Extension)"); - // A generate endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - Class endpointClass = null; - try { - endpointClass = Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // The Header generated type - TestUtil.logMsg("Loading header type " + EXPECTED_HEADER_TYPE); - try { - Class.forName(EXPECTED_HEADER_TYPE); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // no customization via jaxws:enableAdditionalSOAPHeaderMapping means no - // header type - // as parameter to this method. - try { - Method helloOp = endpointClass.getMethod("helloOperation", - new Class[] { w2jrlnoncustomization.types.StringElement.class }); - - boolean found = false; - Class parameters[] = helloOp.getParameterTypes(); - for (int i = 0; i < parameters.length; i++) { - String name = parameters[i].getName(); - TestUtil.logMsg("parameters[" + i + "]=" + name); - if (name.equals(EXPECTED_HEADER_TYPE)) - found = true; - } - if (!found) { - TestUtil.logMsg( - "helloOperation does not declare a header as parameter as expected for type " - + EXPECTED_HEADER_TYPE); - } else { - TestUtil.logErr( - "helloOperation does declare a header as parameter - unexpected for type " - + EXPECTED_HEADER_TYPE); - pass = false; - } - - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - } - - if (!pass) - throw new Fault("HeaderTest failed"); - } - - /* - * @testName: SoapHeaderAndFaultTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2004; JAXWS:SPEC:2040; - * - * @test_Strategy: Verify soap:headerfault (Header Fault Binding Extension) - */ - public void SoapHeaderAndFaultTest() throws Fault { - TestUtil.logTrace("SoapHeaderAndFaultTest"); - boolean pass = true; - - TestUtil.logMsg("Verify soap:header and soap:fault mappings"); - // The generated endpoint interface must be created from wsdl:portType name - TestUtil.logMsg("Loading endpoint interface " + EXPECTED_ENDPOINT); - Class endpointClass = null; - try { - endpointClass = Class.forName(EXPECTED_ENDPOINT); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // The generated Header type - TestUtil.logMsg("Loading header type " + EXPECTED_HEADER2_TYPE); - try { - Class.forName(EXPECTED_HEADER2_TYPE); - } catch (Exception e) { - TestUtil.logErr("Exception loading class: " + e); - pass = false; - } - - // No customization via jaxws:enableAdditionalSOAPHeaderMapping means no - // header type - // as parameter to this method. - try { - Method theMethod = null; - Method[] methods = endpointClass.getMethods(); - for (int i = 0; i < methods.length; i++) { - if (methods[i].getName().equals("operationWithHeaderAndFaults")) { - theMethod = methods[i]; - break; - } - } - - if (theMethod != null) { - boolean found = false; - Class parameters[] = theMethod.getParameterTypes(); - TestUtil.logMsg( - "Verify that the soap:header is mapped to a parameter of the operation"); - for (int i = 0; i < parameters.length; i++) { - String name = parameters[i].getName(); - TestUtil.logMsg("parameters[" + i + "]=" + name); - if (name.equals(EXPECTED_HEADER2_TYPE)) - found = true; - } - if (!found) { - TestUtil.logErr( - "operationWithHeaderAndFaults does not declare a header as parameter for type " - + EXPECTED_HEADER2_TYPE); - pass = false; - } else { - TestUtil.logMsg( - "operationWithHeaderAndFaults does declare a header as parameter for type " - + EXPECTED_HEADER2_TYPE); - } - - Class[] exceptions = theMethod.getExceptionTypes(); - boolean exception1 = false; - boolean exception2 = false; - TestUtil.logMsg( - "Verify that each soap:fault is mapped to the expected exception name"); - for (int j = 0; j < exceptions.length; j++) { - String exceptName = exceptions[j].getName(); - TestUtil.logMsg("exception[" + j + "]=" + exceptName); - if (exceptName.equals(EXPECTED_FAULT1_EXCEPTION)) { - exception1 = true; - } else if (exceptName.equals(EXPECTED_FAULT2_EXCEPTION)) { - exception2 = true; - } - } - if (!exception1) { - TestUtil.logErr("The method: " + theMethod.getName() - + " did not declare exception\n" + EXPECTED_FAULT1_EXCEPTION); - pass = false; - } - if (!exception2) { - TestUtil.logErr("The method: " + theMethod.getName() - + " did not declare exception\n" + EXPECTED_FAULT2_EXCEPTION); - pass = false; - } - } else { - TestUtil.logErr("operationWithHeaderAndFaults was not found!"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - } - - if (!pass) - throw new Fault("SoapHeaderAndFaultTest failed"); - } - - /* - * @testName: WrapperStyleTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2024; JAXWS:SPEC:2025; JAXWS:SPEC:2027; JAXWS:SPEC:2040; - * - * @test_Strategy: Verify that each message results in a paramenter - */ - public void WrapperStyleTest() throws Fault { - TestUtil.logTrace("WrapperStyleTest"); - boolean pass = true; - try { - Class c = Class.forName(EXPECTED_ENDPOINT, false, - this.getClass().getClassLoader()); - Class returnType = JAXWS_Util.getMethodReturnType(c, WRAPPER_METHOD); - if (returnType != null) { - String sReturnType = returnType.getName(); - if (!sReturnType.equals(EXPECTED_WRAPPER_RETURN_TYPE)) { - TestUtil.logErr( - "The return type for method: " + WRAPPER_METHOD + " was wrong"); - TestUtil.logErr("expected=" + EXPECTED_WRAPPER_RETURN_TYPE); - TestUtil.logErr("actual=" + sReturnType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + WRAPPER_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT); - pass = false; - } - Class parameterType = JAXWS_Util.getMethodParameterType(c, WRAPPER_METHOD, - 0); - if (parameterType != null) { - String sParameterType = parameterType.getName(); - if (!sParameterType.equals(EXPECTED_WRAPPER_PARAMETER_TYPE)) { - TestUtil.logErr("The parameter type for method: " + WRAPPER_METHOD - + " was wrong"); - TestUtil.logErr("expected=" + EXPECTED_WRAPPER_PARAMETER_TYPE); - TestUtil.logErr("actual=" + sParameterType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + WRAPPER_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT - + " or the specified parameter did not exist"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("WrapperStyleTest failed", e); - } - - if (!pass) - throw new Fault("WrapperStyleTest failed"); - } - - /* - * @testName: NonWrapperStyleTest - * - * @assertion_ids: JAXWS:SPEC:2001; JAXWS:SPEC:2002; JAXWS:SPEC:2003; - * JAXWS:SPEC:2024; JAXWS:SPEC:2025; JAXWS:SPEC:2027; JAXWS:SPEC:2040; - * - * @test_Strategy: Verify that each message results in a paramenter - */ - public void NonWrapperStyleTest() throws Fault { - TestUtil.logTrace("NonWrapperStyleTest"); - boolean pass = true; - try { - Class c = Class.forName(EXPECTED_ENDPOINT, false, - this.getClass().getClassLoader()); - Class returnType = JAXWS_Util.getMethodReturnType(c, NONWRAPPER_METHOD); - if (returnType != null) { - String sReturnType = returnType.getName(); - if (!sReturnType.equals(EXPECTED_NONWRAPPER_RETURN_TYPE)) { - TestUtil.logErr("The return type for method: " + NONWRAPPER_METHOD - + " was wrong"); - TestUtil.logErr("expected=" + EXPECTED_NONWRAPPER_RETURN_TYPE); - TestUtil.logErr("actual=" + sReturnType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + NONWRAPPER_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT); - pass = false; - } - Class parameterType = JAXWS_Util.getMethodParameterType(c, - NONWRAPPER_METHOD, 0); - if (parameterType != null) { - String sParameterType = parameterType.getName(); - if (!sParameterType.equals(EXPECTED_NONWRAPPER_PARAMETER_TYPE)) { - TestUtil.logErr("The parameter type for method: " + NONWRAPPER_METHOD - + " was wrong"); - TestUtil.logErr("expected=" + EXPECTED_NONWRAPPER_PARAMETER_TYPE); - TestUtil.logErr("actual=" + sParameterType); - pass = false; - } - } else { - TestUtil.logErr("The method: " + NONWRAPPER_METHOD - + " was not found for class:" + EXPECTED_ENDPOINT - + " or the specified parameter did not exist"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("NonWrapperStyleTest failed", e); - } - - if (!pass) - throw new Fault("NonWrapperStyleTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/noncustomization/W2JRLNoncustomization.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/noncustomization/W2JRLNoncustomization.wsdl deleted file mode 100644 index d87c41e907..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/noncustomization/W2JRLNoncustomization.wsdl +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/noncustomization/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/noncustomization/build.xml deleted file mode 100644 index 357d645b0c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/mapping/w2jmapping/rpc/literal/noncustomization/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/Client.java deleted file mode 100644 index 97e90db64f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/Client.java +++ /dev/null @@ -1,787 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java.se 51058 2006-02-11 20:00:31Z adf $ - */ - -package com.sun.ts.tests.jaxws.se.api.jakarta_xml_ws.Endpoint; - -import java.util.concurrent.*; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.sharedclients.HttpClient; - -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.nio.charset.Charset; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String ENDPOINTPUBLISHPROP = "http.server.supports.endpoint.publish"; - - private boolean endpointPublishSupport; - - // service and port info - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - // Endpoint info - private Endpoint endpoint = null; - - private static final Object IMPLEMENTOR = new com.sun.ts.tests.jaxws.se.api.jakarta_xml_ws.Endpoint.HelloImpl(); - - private static final String CONTEXTROOT = "/WSEndpoint"; - - private static final String URL_ALIAS = "/jaxws/Hello"; - - private String ts_home; - - private String sepChar = System.getProperty("file.separator"); - - private String testDir = "src" + sepChar + "com" + sepChar + "sun" + sepChar - + "ts" + sepChar + "tests" + sepChar + "jaxws" + sepChar + "se" + sepChar - + "api" + sepChar + "jakarta_xml_ws" + sepChar + "Endpoint"; - - private TSURL ctsurl = new TSURL(); - - private String url = null; - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // SE URL properties used by the test - private static final String SE_ENDPOINT_URL = "/WSEndpoint/jaxws/Hello"; - - private static final String SE_WSDLLOC_URL = "/WSEndpoint/jaxws/Hello?wsdl"; - - private URL wsdlurl = null; - - private int javaseServerPort; - - private String helloReq = "you"; - - private EndpointReference epr = null; - - private boolean makeHTTPRequest(String request, String url) throws Exception { - boolean pass = true; - TestUtil.logMsg("HTTP REQUEST: " + request); - HttpClient httpClient = new HttpClient(); - httpClient.setUrl(url); - InputStream response = httpClient - .makeRequest(getInputStreamForString(request)); - if (response != null) { - ByteArrayOutputStream baos = getInputStreamAsOutputStream(response); - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - TestUtil.logMsg("HTTP RESPONSE: " + baos.toString()); - if (baos.toString().indexOf("Hello, you") < 0) { - TestUtil.logErr( - "HTTP RESPONSE does not contain expected string -> Hello, you"); - pass = false; - } - } else { - TestUtil.logErr("HTTP RESPONSE no response returned"); - pass = false; - } - try { - int status = httpClient.getStatusCode(); - TestUtil.logMsg("HTTP STATUS CODE: " + status); - if (status != 200) { - TestUtil.logErr("HTTP STATUS CODE is not okay"); - pass = false; - } - } catch (Exception e) { - TestUtil - .logErr("unable to get HTTP STATUS CODE, exception occurred: " + e); - pass = false; - } - return pass; - } - - private ByteArrayInputStream getInputStreamForString(String request) - throws Exception { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - OutputStreamWriter osw; - osw = new OutputStreamWriter(bos, Charset.forName("UTF-8")); - osw.write(request); - osw.flush(); - ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); - return bis; - } - - private ByteArrayOutputStream getInputStreamAsOutputStream(InputStream is) - throws IOException { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - byte[] buffer = new byte[1024]; - int length; - do { - length = is.read(buffer); - if (length > 0) { - baos.write(buffer, 0, length); - } - } while (length > 0); - return baos; - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - url = ctsurl.getURLString(PROTOCOL, hostname, javaseServerPort, - SE_ENDPOINT_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, javaseServerPort, - SE_WSDLLOC_URL); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * http.server.supports.endpoint.publish; ts.home; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - endpointPublishSupport = Boolean - .parseBoolean(p.getProperty(ENDPOINTPUBLISHPROP)); - ts_home = p.getProperty("ts.home"); - TestUtil.logMsg("ts_home=" + ts_home); - javaseServerPort = JAXWS_Util.getFreePort(); - if (javaseServerPort <= 0) { - TestUtil.logErr("Free port not found."); - pass = false; - } - getTestURLs(); - endpoint = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, IMPLEMENTOR); - if (endpoint == null) - throw new Fault("setup failed, unable to create endpoint"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: createTest - * - * @assertion_ids: JAXWS:JAVADOC:12; JAXWS:JAVADOC:13; JAXWS:JAVADOC:115; - * - * @test_Strategy: - */ - public void createTest() throws Fault { - TestUtil.logTrace("createTest"); - boolean pass = true; - try { - Endpoint theEndpoint = Endpoint.create(IMPLEMENTOR); - TestUtil.logMsg("endpoint=" + theEndpoint); - if (theEndpoint == null) { - TestUtil.logErr("Endpoint.create returned null"); - pass = false; - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("createTest failed", e); - } - - if (!pass) - throw new Fault("createTest failed"); - } - - /* - * @testName: createTest2 - * - * @assertion_ids: JAXWS:JAVADOC:13; JAXWS:JAVADOC:14; JAXWS:JAVADOC:115; - * - * @test_Strategy: - */ - public void createTest2() throws Fault { - TestUtil.logTrace("createTest2"); - boolean pass = true; - try { - Endpoint theEndpoint = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, - IMPLEMENTOR); - TestUtil.logMsg("endpoint=" + theEndpoint); - if (theEndpoint == null) { - TestUtil.logErr("Endpoint.create returned null"); - pass = false; - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("createTest2 failed", e); - } - - if (!pass) - throw new Fault("createTest2 failed"); - } - - /* - * @testName: getBindingTest - * - * @assertion_ids: JAXWS:JAVADOC:15; - * - * @test_Strategy: - */ - public void getBindingTest() throws Fault { - TestUtil.logTrace("getBindingTest"); - boolean pass = true; - try { - Binding binding = endpoint.getBinding(); - TestUtil.logMsg("binding=" + binding); - if (binding == null) { - TestUtil.logErr("Endpoint.getBinding returned null"); - pass = false; - } - if (!(binding instanceof SOAPBinding)) { - TestUtil.logErr("binding is not an instance of SOAPBinding"); - pass = false; - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("getBindingTest failed", e); - } - - if (!pass) - throw new Fault("getBindingTest failed"); - } - - /* - * @testName: getImplementorTest - * - * @assertion_ids: JAXWS:JAVADOC:17; - * - * @test_Strategy: - */ - public void getImplementorTest() throws Fault { - TestUtil.logTrace("getImplementorTest"); - boolean pass = true; - try { - Object implementor = endpoint.getImplementor(); - TestUtil.logMsg("implementor=" + implementor); - if (implementor == null) { - TestUtil.logErr("Endpoint.getImplementor returned null"); - pass = false; - } - if (!(implementor instanceof com.sun.ts.tests.jaxws.se.api.jakarta_xml_ws.Endpoint.HelloImpl)) { - TestUtil.logErr("binding is not an instance of HelloImpl"); - pass = false; - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("getImplementorTest failed", e); - } - - if (!pass) - throw new Fault("getImplementorTest failed"); - } - - public void collectMetadata(File wsdlDirFile, List metadataFile) { - File[] files = wsdlDirFile.listFiles(); - if (files == null) { - TestUtil.logMsg("no metadata files to collect"); - return; - } - for (File file : files) { - if (file.isDirectory()) { - // collectMetadata(file, metadataFile); - continue; - } - if (file.getName().endsWith(".xsd") || file.getName().endsWith(".wsdl")) { - TestUtil.logMsg("collectMetadata: adding file " + file.getName()); - metadataFile.add(file); - } - } - } - - /* - * @testName: publishTest2 - * - * @assertion_ids: JAXWS:JAVADOC:21; JAXWS:JAVADOC:27; JAXWS:SPEC:5005; - * JAXWS:SPEC:5007; JAXWS:SPEC:5008; JAXWS:SPEC:5017; JAXWS:SPEC:5018; - * JAXWS:SPEC:5019; JAXWS:SPEC:5020; JAXWS:SPEC:5021; - * - * @test_Strategy: - */ - public void publishTest2() throws Fault { - TestUtil.logTrace("publishTest2"); - boolean pass = true; - try { - endpoint.publish(url); - if (modeProperty.equals("jakartaEE") || !endpointPublishSupport) { - TestUtil - .logErr("expected exception when endpoint publish not supported"); - pass = false; - } else if (modeProperty.equals("standalone") && endpointPublishSupport) { - TestUtil.logMsg("invoke hello operation of published endpoint"); - if (makeHTTPRequest(helloReq, url)) - TestUtil.logMsg("Successful invocation of published endpoint"); - else { - TestUtil.logErr("Unsuccessful invocation of published endpoint"); - pass = false; - } - endpoint.stop(); - } - } catch (Exception e) { - if (modeProperty.equals("standalone") && endpointPublishSupport) { - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (!pass) - throw new Fault("publishTest2 failed"); - } - - /* - * @testName: publishTest3 - * - * @assertion_ids: JAXWS:JAVADOC:22; JAXWS:JAVADOC:27; JAXWS:JAVADOC:114; - * JAXWS:SPEC:5004; JAXWS:SPEC:6002; JAXWS:SPEC:5005; JAXWS:SPEC:5007; - * JAXWS:SPEC:5008; JAXWS:SPEC:5017; JAXWS:SPEC:5018; JAXWS:SPEC:5019; - * JAXWS:SPEC:5020; JAXWS:SPEC:5021; - * - * @test_Strategy: - */ - public void publishTest3() throws Fault { - TestUtil.logTrace("publishTest3"); - boolean pass = true; - try { - endpoint = Endpoint.publish(url, IMPLEMENTOR); - if (modeProperty.equals("jakartaEE") || !endpointPublishSupport) { - TestUtil - .logErr("expected exception when endpoint publish not supported"); - pass = false; - } else if (modeProperty.equals("standalone") && endpointPublishSupport) { - TestUtil.logMsg("invoke hello operation of published endpoint"); - if (makeHTTPRequest(helloReq, url)) - TestUtil.logMsg("Successful invocation of published endpoint"); - else { - TestUtil.logErr("Unsuccessful invocation of published endpoint"); - pass = false; - } - endpoint.stop(); - } - } catch (Exception e) { - if (modeProperty.equals("standalone") && endpointPublishSupport) { - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (!pass) - throw new Fault("publishTest3 failed"); - } - - /* - * @testName: stopTest - * - * @assertion_ids: JAXWS:JAVADOC:21; JAXWS:JAVADOC:27; JAXWS:SPEC:5005; - * JAXWS:SPEC:5007; JAXWS:SPEC:5008; JAXWS:SPEC:5017; JAXWS:SPEC:5018; - * JAXWS:SPEC:5019; JAXWS:SPEC:5020; JAXWS:SPEC:5021; - * - * @test_Strategy: - */ - public void stopTest() throws Fault { - TestUtil.logTrace("stopTest"); - boolean pass = true; - try { - endpoint.publish(url); - if (modeProperty.equals("jakartaEE") || !endpointPublishSupport) { - TestUtil - .logErr("expected exception when endpoint publish not supported"); - pass = false; - } else if (modeProperty.equals("standalone") && endpointPublishSupport) { - TestUtil.logMsg("invoke hello operation of published endpoint"); - if (makeHTTPRequest(helloReq, url)) - TestUtil.logMsg("Successful invocation of published endpoint"); - else { - TestUtil.logErr("Unsuccessful invocation of published endpoint"); - pass = false; - } - endpoint.stop(); - TestUtil.logMsg( - "invoke hello operation of published endpoint that is stopped"); - if (makeHTTPRequest(helloReq, url)) { - TestUtil.logErr( - "Successful invocation of a stopped endpoint - unexpected "); - pass = false; - } else - TestUtil.logMsg( - "Unsuccessful invocation of a stopped endpoint - expected "); - } - } catch (Exception e) { - if (modeProperty.equals("standalone") && endpointPublishSupport) { - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (!pass) - throw new Fault("stopTest failed"); - } - - /* - * @testName: isPublishedTest - * - * @assertion_ids: JAXWS:JAVADOC:20; - * - * @test_Strategy: - */ - public void isPublishedTest() throws Fault { - TestUtil.logTrace("isPublishedTest"); - boolean pass = true; - try { - boolean isPub = endpoint.isPublished(); - if (isPub) { - TestUtil.logErr("Endpoint is published - unexpected"); - pass = false; - } else - TestUtil.logMsg("Endpoint is not published - expected"); - endpoint.publish(url); - if (modeProperty.equals("jakartaEE") || !endpointPublishSupport) { - TestUtil - .logErr("expected exception when endpoint publish not supported"); - pass = false; - } else if (modeProperty.equals("standalone") && endpointPublishSupport) { - isPub = endpoint.isPublished(); - if (!isPub) { - TestUtil.logErr("Endpoint is not published - unexpected"); - pass = false; - } else - TestUtil.logMsg("Endpoint is published - expected"); - } - } catch (Exception e) { - if (modeProperty.equals("standalone") && endpointPublishSupport) { - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (!pass) - throw new Fault("isPublishedTest failed"); - } - - /* - * @testName: GetSetPropertiesTest - * - * @assertion_ids: JAXWS:JAVADOC:19; JAXWS:JAVADOC:26; - * - * @test_Strategy: - */ - public void GetSetPropertiesTest() throws Fault { - TestUtil.logTrace("GetSetPropertiesTest"); - boolean pass = true; - try { - Map map = endpoint.getProperties(); - if (map == null) { - map = new HashMap(); - endpoint.setProperties(map); - } - map.put(Endpoint.WSDL_SERVICE, SERVICE_QNAME); - map.put(Endpoint.WSDL_PORT, PORT_QNAME); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("GetSetPropertiesTest failed", e); - } - - if (!pass) - throw new Fault("GetSetPropertiesTest failed"); - } - - /* - * @testName: GetSetExecutorTest - * - * @assertion_ids: JAXWS:JAVADOC:16; JAXWS:JAVADOC:24; JAXWS:SPEC:5011; - * JAXWS:SPEC:5012; - * - * @test_Strategy: - */ - public void GetSetExecutorTest() throws Fault { - TestUtil.logTrace("GetSetExecutorTest"); - boolean pass = true; - try { - Executor executor = endpoint.getExecutor(); - if (executor != null) { - TestUtil.logMsg("set same Executor"); - endpoint.setExecutor(executor); - } else { - ExecutorService appExecutorService = Executors.newFixedThreadPool(5); - endpoint.setExecutor(appExecutorService); - TestUtil.logMsg("set new Executor"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("GetSetExecutorTest failed", e); - } - - if (!pass) - throw new Fault("GetSetExecutorTest failed"); - } - - /* - * @testName: GetSetMetaDataTest - * - * @assertion_ids: JAXWS:JAVADOC:18; JAXWS:JAVADOC:25; JAXWS:SPEC:5010; - * JAXWS:SPEC:5011; - * - * @test_Strategy: - */ - public void GetSetMetaDataTest() throws Fault { - TestUtil.logTrace("GetSetMetaDataTest"); - boolean pass = true; - File metaGood = new File(ts_home + sepChar + testDir); - File metaBad = new File(ts_home + sepChar + testDir + sepChar - + "contentRoot" + sepChar + "mydocs"); - TestUtil.logMsg("metaGood=" + metaGood); - TestUtil.logMsg("metaBad=" + metaBad); - try { - TestUtil.logMsg("Testing GetSetMetaData using good MetaData"); - List metadata = endpoint.getMetadata(); - List metadataFile = new ArrayList(); - collectMetadata(metaGood, metadataFile); - if (metadataFile.size() > 0) { - metadata = new ArrayList(); - for (File file : metadataFile) { - Source source = new StreamSource(new FileInputStream(file)); - source.setSystemId(file.toURL().toExternalForm()); - metadata.add(source); - } - endpoint.setMetadata(metadata); - if (endpointPublishSupport) { - TestUtil.logMsg("Publishing endpoint to url: " + url); - endpoint.publish(url); - TestUtil.logMsg("Invoking published endpoint"); - if (makeHTTPRequest(helloReq, url)) - TestUtil.logMsg("Successful invocation of published endpoint"); - else { - TestUtil.logMsg("Unsuccessful invocation of published endpoint"); - pass = false; - } - TestUtil.logMsg("Stopping endpoint"); - endpoint.stop(); - } - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("GetSetMetaDataTest failed", e); - } - try { - TestUtil.logMsg("Testing GetSetMetaData using bad MetaData"); - List metadata = endpoint.getMetadata(); - List metadataFile = new ArrayList(); - collectMetadata(metaBad, metadataFile); - if (metadataFile.size() > 0) { - metadata = new ArrayList(); - for (File file : metadataFile) { - Source source = new StreamSource(new FileInputStream(file)); - source.setSystemId(file.toURL().toExternalForm()); - metadata.add(source); - } - endpoint.setMetadata(metadata); - if (endpointPublishSupport) { - try { - TestUtil.logMsg("Publishing endpoint to url: " + url); - endpoint.publish(url); - TestUtil.logMsg("Stopping endpoint"); - endpoint.stop(); - pass = false; - TestUtil.logErr("publishing should have failed with bad metadata"); - } catch (Exception e) { - TestUtil.logMsg("Got expected exception on bad metadata"); - } - } - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("GetSetMetaDataTest failed", e); - } - - if (!pass) - throw new Fault("GetSetMetaDataTest failed"); - } - - /* - * @testName: getEndpointReferenceParamsTest - * - * @assertion_ids: JAXWS:JAVADOC:137; - * - * @test_Strategy: - */ - public void getEndpointReferenceParamsTest() throws Fault { - TestUtil.logTrace("getEndpointReferenceParamsTest"); - boolean pass = true; - if (modeProperty.equals("jakartaEE")) { - TestUtil.logMsg("Not tested in jakartaEE platform"); - pass = false; - } - try { - endpoint.publish(url); - if (!endpointPublishSupport) { - TestUtil - .logErr("expected exception when endpoint publish not supported"); - pass = false; - } else { - epr = endpoint.getEndpointReference(); - TestUtil.logMsg("EndpointReference object=" + epr); - if (epr == null) { - TestUtil.logErr("getEndpointReference() returned null"); - pass = false; - } else - TestUtil.logMsg( - "getEndpointReference() returned EndpointReference object: " - + epr); - if (epr instanceof W3CEndpointReference) - TestUtil.logMsg("epr instanceof W3CEndpointReference"); - else { - TestUtil.logErr("epr not instanceof W3CEndpointReference"); - pass = false; - } - } - } catch (Exception e) { - if (modeProperty.equals("standalone") && endpointPublishSupport) { - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (!pass) - throw new Fault("getEndpointReferenceParamsTest failed"); - } - - /* - * @testName: getEndpointReferenceClassTest - * - * @assertion_ids: JAXWS:JAVADOC:138; - * - * @test_Strategy: - */ - public void getEndpointReferenceClassTest() throws Fault { - TestUtil.logTrace("getEndpointReferenceClassTest"); - boolean pass = true; - if (modeProperty.equals("jakartaEE")) { - TestUtil.logMsg("Not tested in jakartaEE platform"); - pass = false; - } - try { - endpoint.publish(url); - if (!endpointPublishSupport) { - TestUtil - .logErr("expected exception when endpoint publish not supported"); - pass = false; - } else { - epr = endpoint.getEndpointReference(W3CEndpointReference.class); - TestUtil.logMsg("EndpointReference object=" + epr); - if (epr == null) { - TestUtil.logErr("getEndpointReference() returned null"); - pass = false; - } else - TestUtil.logMsg( - "getEndpointReference() returned EndpointReference object: " - + epr); - if (epr instanceof W3CEndpointReference) - TestUtil.logMsg("epr instanceof W3CEndpointReference"); - else { - TestUtil.logErr("epr not instanceof W3CEndpointReference"); - pass = false; - } - } - } catch (Exception e) { - if (modeProperty.equals("standalone") && endpointPublishSupport) { - TestUtil.printStackTrace(e); - pass = false; - } - } - - if (!pass) - throw new Fault("getEndpointReferenceClassTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/HelloImpl.java deleted file mode 100644 index 08626cc6b6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/HelloImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: HelloImpl.java 51058 2006-02-11 20:00:31Z adf $ - */ - -package com.sun.ts.tests.jaxws.se.api.jakarta_xml_ws.Endpoint; - -import jakarta.jws.WebService; - -@WebService(name = "Hello", portName = "HelloPort", serviceName = "HelloService", targetNamespace = "http://helloservice.org/wsdl") -public class HelloImpl { - public String hello(String who) { - return "Hello, " + who; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/build.xml deleted file mode 100644 index 375b6c0397..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/contentRoot/mydocs/good/HelloService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/contentRoot/mydocs/good/HelloService.wsdl deleted file mode 100644 index 1827376564..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/contentRoot/mydocs/good/HelloService.wsdl +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/contentRoot/mydocs/good/HelloService_schema1.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/contentRoot/mydocs/good/HelloService_schema1.xsd deleted file mode 100644 index 20a8d3e8fb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/contentRoot/mydocs/good/HelloService_schema1.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/customfile.xml deleted file mode 100644 index f854860af5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/se/api/jakarta_xml_ws/Endpoint/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/Client.java deleted file mode 100644 index 7b1adc814c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/Client.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.porting.TSURL; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.io.Serializable; - -public abstract class Client implements Serializable { - private static final String DEFAULT_SCHEME = "http"; - - private String webServerHost; - - private int webServerPort; - - private int mode; - - private TSURL ctsURL; - - public Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this.webServerHost = webServerHost; - this.webServerPort = webServerPort; - this.mode = mode; - ctsURL = new TSURL(); - } - - protected String getWebServerHost() { - return webServerHost; - } - - protected int getWebServerPort() { - return webServerPort; - } - - protected String getScheme() { - return DEFAULT_SCHEME; - } - - protected TSURL getCTSURL() { - return ctsURL; - } - - /** - * Returns the endpoint URL string. - * - * @return the endpoint URL string. - * - * @throws java.lang.Exception - */ - protected String getEndpointURLString() throws EETest.Fault { - String file = null; - try { - file = JAXWS_Util.getURLFromProp(getEndpointURLProperty()); - } catch (Exception e) { - throw new EETest.Fault("Unable to obtain endpoint URL string", e); - } - String url = null; - if (file != null) { - url = ctsURL.getURLString(getScheme(), getWebServerHost(), - getWebServerPort(), file); - TestUtil.logMsg("endpoint url=" + url); - } - return url; - } - - protected String getWSDLURLString() throws EETest.Fault { - String file = null; - try { - file = JAXWS_Util.getURLFromProp(getWSDLURLProperty()); - } catch (Exception e) { - throw new EETest.Fault("Unable to obtain wsdl URL string", e); - } - String url = null; - if (file != null) { - url = ctsURL.getURLString(getScheme(), getWebServerHost(), - getWebServerPort(), file); - TestUtil.logMsg("wsdl url=" + url); - } - return url; - } - - protected abstract String getEndpointURLProperty(); - - protected abstract String getWSDLURLProperty(); - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/ClientFactory.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/ClientFactory.java deleted file mode 100644 index 585eac184a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/ClientFactory.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients; - -import java.lang.reflect.Constructor; -import java.util.Properties; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.harness.ServiceEETest; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.wsi.utils.PropertyUtils; - -import jakarta.xml.ws.Service; - -public class ClientFactory { - - public static SOAPClient getClient(Class clazz, Properties properties) - throws EETest.Fault { - return getClient(clazz, properties, null, null); - } - - public static SOAPClient getClient(Class clazz, Properties properties, - ServiceEETest theTest, Service theService) throws EETest.Fault { - int mode; - String property = properties.getProperty("platform.mode"); - if (property == null) { - throw new EETest.Fault( - "The 'platform.mode' property value is not defined"); - } - if (property.equalsIgnoreCase("standalone")) { - mode = SOAPClient.MODE_STANDALONE; - } else if (property.equalsIgnoreCase("jakartaEE")) { - mode = SOAPClient.MODE_JavaEE; - - } else { - throw new EETest.Fault( - "The 'platform.mode' property value '" + property + "' is invalid"); - } - String webServerHost = PropertyUtils.getProperty(properties, - "webServerHost"); - int webServerPort; - if (SecureClient.class.isAssignableFrom(clazz)) { - webServerPort = PropertyUtils.getIntegerProperty(properties, - "secureWebServerPort"); - } else { - webServerPort = PropertyUtils.getIntegerProperty(properties, - "webServerPort"); - } - try { - if (mode == SOAPClient.MODE_STANDALONE) { - Constructor ctr = clazz - .getConstructor(new Class[] { String.class, int.class, int.class }); - return (SOAPClient) ctr.newInstance(new Object[] { webServerHost, - Integer.valueOf(webServerPort), Integer.valueOf(mode) }); - } else { - Constructor ctr = clazz.getConstructor(new Class[] { String.class, - int.class, int.class, jakarta.xml.ws.Service.class }); - return (SOAPClient) ctr.newInstance( - new Object[] { webServerHost, Integer.valueOf(webServerPort), - Integer.valueOf(mode), getWebServiceRef(theTest, theService) }); - } - } catch (NoSuchMethodException e) { - throw new EETest.Fault( - "Client '" + clazz.getName() + "' does not have required constructor", - e); - } catch (ClassCastException e) { - throw new EETest.Fault("Client '" + clazz.getName() - + "' does not extend '" + SOAPClient.class.getName() + "'", e); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EETest.Fault("Unable to instantiate '" + clazz.getName() + "'", - e); - } - } - - private static jakarta.xml.ws.Service getWebServiceRef(ServiceEETest theTest, - Service theService) { - Service service = theService; - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Service) theTest.getSharedObject(); - TestUtil.logMsg("service=" + service); - return service; - } - - private ClientFactory() { - super(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/DescriptionClient.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/DescriptionClient.java deleted file mode 100644 index 42dcc7c6d5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/DescriptionClient.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)DescriptionClient.java 1.2 03/04/28 - */ - -package com.sun.ts.tests.jaxws.sharedclients; - -import java.io.IOException; -import java.io.FileInputStream; -import java.net.URL; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.FactoryConfigurationError; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -import com.sun.ts.lib.harness.EETest; - -import java.io.Serializable; - -public class DescriptionClient implements Serializable { - - private String url; - - public URL getAsURL() { - if (url == null) - return null; - try { - return new URL(url); - } catch (Exception e) { - return null; - } - } - - public String getURL() { - return url; - } - - public void setURL(String url) { - this.url = url; - } - - public Document getDocument() throws EETest.Fault { - try { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - DocumentBuilder builder = factory.newDocumentBuilder(); - InputSource is = new InputSource(new URL(url).openStream()); - return builder.parse(is); - } catch (FactoryConfigurationError e) { - throw new EETest.Fault( - "XML document builder factory configuration problem", e); - } catch (ParserConfigurationException e) { - throw new EETest.Fault("XML parser configuration problem", e); - } catch (IOException e) { - throw new EETest.Fault("Unable to read description from '" + url + "'", - e); - } catch (SAXException e) { - throw new EETest.Fault("Unable to parse description from '" + url + "'", - e); - } - } - - public Document getDocument(String file) throws EETest.Fault { - try { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - DocumentBuilder builder = factory.newDocumentBuilder(); - InputSource is = new InputSource(new FileInputStream(file)); - return builder.parse(is); - } catch (FactoryConfigurationError e) { - throw new EETest.Fault( - "XML document builder factory configuration problem", e); - } catch (ParserConfigurationException e) { - throw new EETest.Fault("XML parser configuration problem", e); - } catch (IOException e) { - throw new EETest.Fault("Unable to read description from '" + url + "'", - e); - } catch (SAXException e) { - throw new EETest.Fault("Unable to parse description from '" + url + "'", - e); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/HttpClient.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/HttpClient.java deleted file mode 100644 index 608e8f9fa8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/HttpClient.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.util.HashMap; -import java.util.Iterator; -import java.nio.charset.Charset; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.util.TestUtil; - -import java.io.Serializable; - -public class HttpClient implements Serializable { - - private final static String DEFAULT_CHARSET = "UTF-8"; - - /** - * HTTP GET method. - */ - public static final String HTTP_METHOD_GET = "GET"; - - /** - * HTTP POST method. - */ - public static final String HTTP_METHOD_POST = "POST"; - - /** - * The HTTP method. - */ - private String method; - - /** - * The HTTP headers. - */ - private HashMap headers; - - /** - * The URL. - */ - private String url; - - /** - * The Charset. - */ - private Charset cs; - - private HttpURLConnection conn; - - /** - * Constructs a new HttpRequest instance with the specified URL. - * - * @param url - * the URL. - */ - public HttpClient() throws EETest.Fault { - super(); - this.method = HTTP_METHOD_POST; - headers = new HashMap(); - headers.put("SOAPAction", "\"\""); - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public Charset getCharset() { - return cs; - } - - public void setCharset(Charset cs) { - this.cs = cs; - } - - private String getCharsetAsName() { - if (cs == null) - return DEFAULT_CHARSET; - else - return cs.name().toUpperCase(); - } - - /** - * Sets the HTTP request method. - * - * @param method - * the HTTP request method. - */ - public void setMethod(String method) { - if (method != null) { - this.method = method; - } else { - this.method = HTTP_METHOD_POST; - } - } - - /** - * Returns the HTTP request method. - * - * @return the HTTP request method. - */ - public String getMethod() { - return method; - } - - /** - * Adds the specified HTTP header. - * - * @param name - * the header name. - * @param value - * the header value. - */ - public void addHeader(String name, String value) { - name = properCase(name); - String current = (String) headers.get(name); - if (current != null) { - value = current + ", " + value; - } - headers.put(name, value); - } - - /** - * Sets the specified HTTP header. - * - * @param name - * the header name. - * @param value - * the header value. - */ - public void setHeader(String name, String value) { - headers.put(properCase(name), value); - } - - /** - * Sets the specified HTTP header. - * - * @param name - * the header name. - * @param value - * the header value. - */ - public void setHeaderCaseAsIs(String name, String value) { - headers.put(name, value); - } - - /** - * Returns the HTTP status code. Until the request has completed, this value - * is 200. - * - * @return the HTTP status code. - */ - public int getStatusCode() throws IOException { - return conn.getResponseCode(); - } - - /** - * Returns the HTTP status message. Until the request has completed, this - * value is OK. - * - * @return the HTTP status message. - */ - public String getStatusMessage() throws IOException { - return conn.getResponseMessage(); - } - - /** - * Interacts with the server by sending the request and receiving the - * response. - * - * @param is - * the request message input stream. - * - * @throws java.io.IOException - */ - public InputStream makeRequest(InputStream messageContent) - throws IOException { - String name = getCharsetAsName(); - TestUtil.logMsg("Charset name=" + name); - addHeader("Content-Type", "text/xml; charset=" + name); - conn = (HttpURLConnection) new URL(url).openConnection(); - sendRequest(messageContent); - return receiveResponse(); - } - - /** - * Sends the request to the server. - * - * @param conn - * the HTTP URL connection. - * @param is - * the request message input stream. - * - * @throws java.io.IOException - */ - protected void sendRequest(InputStream is) throws IOException { - conn.setRequestMethod(method); - Iterator iterator = headers.keySet().iterator(); - while (iterator.hasNext()) { - String name = (String) iterator.next(); - String value = (String) headers.get(name); - TestUtil.logMsg("Setting HTTP_HEADER: " + name + "=" + value); - conn.setRequestProperty(name, value); - } - if (is != null) { - conn.setDoOutput(true); - OutputStream os = conn.getOutputStream(); - transfer(is, os); - } - } - - /** - * Receives the response from the server. If no content is returned, this - * method returns null. - * - * @param conn - * the HTTP URL connection. - * - * @return the response message input stream. - * - * @throws java.io.IOException - */ - protected InputStream receiveResponse() throws IOException { - ByteArrayOutputStream os = new ByteArrayOutputStream(); - byte[] response; - InputStream is; - try { - try { - is = conn.getInputStream(); - } catch (IOException e) { - is = conn.getErrorStream(); - } - if (is == null) - return null; - transfer(is, os); - response = os.toByteArray(); - } catch (IOException e) { - TestUtil.printStackTrace(e); - response = null; - } - return (response != null ? new ByteArrayInputStream(response) : null); - } - - /** - * Transfers all data from the specified input stream to the specified output - * stream. - * - * @param is - * the input stream. - * @param os - * the output stream. - * - * @throws java.io.IOException - */ - protected void transfer(InputStream is, OutputStream os) throws IOException { - byte[] buffer = new byte[1024]; - int length; - do { - try { - length = is.read(buffer); - if (length > 0) { - os.write(buffer, 0, length); - } - } catch (IOException e) { - return; - } - } while (length > 0); - os.flush(); - } - - /** - * Proper cases an HTTP header name (e.g. Accept-Language). - * - * @param name - * the name. - * @return the proper cased name. - */ - protected String properCase(String name) { - StringBuffer buffer = new StringBuffer(name.length()); - char previous = '-'; - for (int i = 0; i < name.length(); i++) { - char c = name.charAt(i); - if (previous == '-') { - buffer.append(Character.toUpperCase(c)); - } else { - buffer.append(Character.toLowerCase(c)); - } - previous = c; - } - return buffer.toString(); - } - - public void logMessageInHarness(InputStream message) { - // This method is deprecated. Logging is done in SOAPClient. Set - // message=null. - } - - public String getResponseHeader(String name) { - return conn.getHeaderField(name); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/SOAPClient.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/SOAPClient.java deleted file mode 100644 index 5a0475a0e7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/SOAPClient.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStreamWriter; -import java.nio.charset.Charset; - -import org.w3c.dom.Document; - -public abstract class SOAPClient extends Client { - - private final static String DEFAULT_CHARSET = "UTF-8"; - - public static final int MODE_STANDALONE = 0; - - public static final int MODE_JavaEE = 1; - - private HttpClient httpClient; - - private SaajClient saajClient; - - private DescriptionClient descriptionClient; - - private String endpointURL; - - private String wsdlURL; - - protected StubContext stubContext; - - public SOAPClient(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - super(webServerHost, webServerPort, mode); - endpointURL = getEndpointURLString(); - wsdlURL = getWSDLURLString(); - httpClient = new HttpClient(); - httpClient.setUrl(endpointURL); - saajClient = new SaajClient(); - saajClient.setUrl(endpointURL); - descriptionClient = new DescriptionClient(); - descriptionClient.setURL(wsdlURL); - initStubContext(mode); - } - - public String getEndpointURL() { - return endpointURL; - } - - public String getWSDLURL() { - return wsdlURL; - } - - private void initStubContext(int mode) { - stubContext = new StubContext(); - stubContext.setMode(mode); - stubContext.setEndpointURL(endpointURL); - stubContext.setWsdllocURL(wsdlURL); - } - - private ByteArrayOutputStream getInputStreamAsOutputStream(InputStream is) - throws IOException { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - byte[] buffer = new byte[1024]; - int length; - do { - length = is.read(buffer); - if (length > 0) { - baos.write(buffer, 0, length); - } - } while (length > 0); - return baos; - } - - public SOAPMessage makeSaajRequest(String request) - throws SOAPException, IOException { - return makeSaajRequest(request, null); - } - - public SOAPMessage makeSaajRequest(SOAPMessage request) - throws SOAPException, IOException { - return makeSaajRequest(request, null); - } - - public SOAPMessage makeSaajRequest(String request, Charset cs) - throws SOAPException, IOException { - saajClient.setCharset(cs); - LoggingSOAPRequest(request); - SOAPMessage response = saajClient - .makeRequest(getInputStreamForString(request, cs)); - LoggingSOAPResponse(getResponseAsString(response)); - return response; - } - - public SOAPMessage makeSaajRequest(SOAPMessage request, Charset cs) - throws SOAPException, IOException { - saajClient.setCharset(cs); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - request.writeTo(baos); - String requestAsString = baos.toString(); - LoggingSOAPRequest(requestAsString); - SOAPMessage response = saajClient - .makeRequest(getInputStreamForString(requestAsString, cs)); - LoggingSOAPResponse(getResponseAsString(response)); - return response; - } - - public InputStream makeHTTPRequest(String request) throws IOException { - return makeHTTPRequest(request, null); - } - - public InputStream makeHTTPRequest(String request, Charset cs) - throws IOException { - LoggingSOAPRequest(request); - httpClient.setCharset(cs); - InputStream response = httpClient - .makeRequest(getInputStreamForString(request, cs)); - ByteArrayOutputStream baos = getInputStreamAsOutputStream(response); - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - LoggingSOAPResponse(baos.toString()); - LoggingHTTPStatusCode(); - return bais; - } - - public void logMessageInHarness(SOAPMessage message) { - saajClient.logMessageInHarness(message); - } - - public void logMessageInHarness(InputStream message) { - httpClient.logMessageInHarness(message); - } - - public int getStatusCode() throws IOException { - return httpClient.getStatusCode(); - } - - public Document getDocument() throws EETest.Fault { - return descriptionClient.getDocument(); - } - - public String getDescriptionURL() { - return descriptionClient.getURL(); - } - - public void addHeader(String name, String value) { - httpClient.addHeader(name, value); - } - - public void setHeader(String name, String value) { - httpClient.setHeader(name, value); - } - - public void setHeaderCaseASIs(String name, String value) { - httpClient.setHeaderCaseAsIs(name, value); - } - - public String getResponseHeader(String name) { - return httpClient.getResponseHeader(name); - } - - private ByteArrayInputStream getInputStreamForString(String request, - Charset cs) throws IOException { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - OutputStreamWriter osw; - if (cs != null) { - osw = new OutputStreamWriter(bos, cs); - } else { - osw = new OutputStreamWriter(bos, Charset.forName(DEFAULT_CHARSET)); - } - osw.write(request); - osw.flush(); - ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); - return bis; - } - - private String getResponseAsString(SOAPMessage response) - throws SOAPException, IOException { - if (response == null) - return null; - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - response.writeTo(baos); - return baos.toString(); - } - - private void LoggingSOAPRequest(String request) { - if (request == null) - return; - TestUtil.logMsg("-------------------"); - TestUtil.logMsg("Logging SOAPRequest"); - TestUtil.logMsg("-------------------"); - TestUtil.logMsg(request); - } - - private void LoggingSOAPResponse(String response) { - if (response == null) - return; - TestUtil.logMsg("--------------------"); - TestUtil.logMsg("Logging SOAPResponse"); - TestUtil.logMsg("--------------------"); - TestUtil.logMsg(response); - } - - private void LoggingHTTPStatusCode() throws IOException { - TestUtil.logMsg("HTTPStatusCode=" + getStatusCode()); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/SaajClient.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/SaajClient.java deleted file mode 100644 index 40dbacee17..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/SaajClient.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)SaajClient.java 1.2 03/04/24 - */ - -package com.sun.ts.tests.jaxws.sharedclients; - -import java.io.ByteArrayOutputStream; -import java.io.ByteArrayInputStream; -import java.io.BufferedInputStream; -import java.io.IOException; -import java.io.InputStream; - -import jakarta.xml.soap.MessageFactory; -import jakarta.xml.soap.MimeHeaders; -import jakarta.xml.soap.SOAPConnectionFactory; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPMessage; -import java.nio.charset.Charset; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.util.TestUtil; - -import java.io.Serializable; - -public class SaajClient implements Serializable { - - private final static String DEFAULT_CHARSET = "UTF-8"; - - private SOAPConnectionFactory connectionFactory; - - private MessageFactory messageFactory; - - private MimeHeaders headers; - - private HttpClient httpClient; - - private String url; - - private Charset cs; - - private boolean SoapConnectionFactorySupported = true; - - public SaajClient() throws EETest.Fault { - super(); - try { - messageFactory = MessageFactory.newInstance(); - httpClient = new HttpClient(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EETest.Fault("Unable to create message factory", e); - } - try { - connectionFactory = SOAPConnectionFactory.newInstance(); - } catch (UnsupportedOperationException e) { - SoapConnectionFactorySupported = false; - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EETest.Fault("Unable to create connection factory", e); - } - } - - public Charset getCharset() { - return cs; - } - - public void setCharset(Charset cs) { - this.cs = cs; - } - - private String getCharsetAsName() { - if (cs == null) - return DEFAULT_CHARSET; - else - return cs.name().toUpperCase(); - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - private SOAPMessage createSOAPMessage(InputStream is) { - SOAPMessage message = null; - headers = new MimeHeaders(); - headers.addHeader("Content-Type", - "text/xml; charset=" + getCharsetAsName()); - try { - message = messageFactory.createMessage(headers, is); - message.saveChanges(); - } catch (Exception e) { - message = null; - } - return message; - } - - private SOAPMessage sendAsHTTPMessage(InputStream is) throws IOException { - httpClient.setUrl(url); - httpClient.setCharset(getCharset()); - InputStream response = httpClient.makeRequest(is); - return createSOAPMessage(response); - } - - private ByteArrayOutputStream getInputStreamAsOutputStream(InputStream is) - throws IOException { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - byte[] buffer = new byte[1024]; - int length; - do { - length = is.read(buffer); - if (length > 0) { - baos.write(buffer, 0, length); - } - } while (length > 0); - return baos; - } - - public SOAPMessage makeRequest(InputStream messageContent) - throws SOAPException, IOException { - if (SoapConnectionFactorySupported) { - ByteArrayOutputStream baos = getInputStreamAsOutputStream(messageContent); - ByteArrayInputStream bais1 = new ByteArrayInputStream(baos.toByteArray()); - ByteArrayInputStream bais2 = new ByteArrayInputStream(baos.toByteArray()); - SOAPMessage message = createSOAPMessage(bais1); - if (message != null) { - SOAPMessage msg = null; - try { - // This could fail for invalid messages for negative test cases - TestUtil.logMsg("***** makeRequest via SAAJ first *****"); - msg = connectionFactory.createConnection().call(message, url); - } catch (Exception e) { - // Send as HTTP if above fails (only way left to send it) - TestUtil.logMsg("***** makeRequest via HTTP second *****"); - msg = sendAsHTTPMessage(bais2); - } - return msg; - } else { - return sendAsHTTPMessage(bais2); - } - } else { - return sendAsHTTPMessage(messageContent); - } - } - - public void logMessageInHarness(SOAPMessage message) { - // This method is deprecated. Logging is done in SOAPClient. Set - // message=null. - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/SecureClient.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/SecureClient.java deleted file mode 100644 index 9676f063db..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/SecureClient.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients; - -/** - * Marker interface for secure (https) clients. - */ -public interface SecureClient { -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/StubContext.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/StubContext.java deleted file mode 100644 index 1ee664d2c5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/StubContext.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients; - -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.lib.util.*; - -import javax.xml.namespace.QName; - -import jakarta.xml.ws.WebServiceFeature; -import java.net.URL; - -public class StubContext { - - /** - * The test name property name. - */ - public static final String TEST_NAME = "testName"; - - /** - * The web server host property name. - */ - public static final String WEB_SERVER_HOST = "webServerHost"; - - /** - * The web server port property name. - */ - public static final String WEB_SERVER_PORT = "webServerPort"; - - /** - * The secure web server port property name. - */ - public static final String SECURE_WEB_SERVER_PORT = "secureWebServerPort"; - - /** - * The monitor server port property name. - */ - public static final String MONITOR_PORT = "monitorPort"; - - /** - * The WSI home property name. - */ - public static final String WSI_HOME = "wsiHome"; - - private int mode; - - private String endpointURL; - - private String wsdllocURL; - - private String namespace; - - private String service; - - private String port; - - private Class endpointInterface; - - private QName serviceName; - - private QName portName; - - private Object stub; - - private jakarta.xml.ws.Service webServiceRef; - - private WebServiceFeature[] wsf; - - public int getMode() { - return mode; - } - - public void setMode(int mode) { - this.mode = mode; - } - - public String getEndpointURL() { - return endpointURL; - } - - public void setEndpointURL(String endpointURL) { - this.endpointURL = endpointURL; - } - - public String getWsdllocURL() { - return wsdllocURL; - } - - public void setWsdllocURL(String wsdllocURL) { - this.wsdllocURL = wsdllocURL; - } - - public WebServiceFeature[] getWSF() { - return wsf; - } - - public void setWSF(WebServiceFeature[] w) { - this.wsf = w; - } - - /** - * Initializes the stub. - * - * @throws java.lang.Exception - */ - protected void initStub() throws Exception { - if (stub == null) { - if (mode == SOAPClient.MODE_STANDALONE) { - createJAXWSStub(); - JAXWS_Util.setTargetEndpointAddress(stub, getEndpointURL()); - } else { - createJavaEEStub(); - } - } - } - - protected void createJAXWSStub() throws Exception { - TestUtil.logMsg("entering createJAXWSStub()"); - try { - serviceName = new QName(namespace, service); - portName = new QName(namespace, port); - Class siClass = Class - .forName(endpointInterface.getPackage().getName() + "." + service); - stub = JAXWS_Util.getPort(new URL(getWsdllocURL()), serviceName, siClass, - portName, endpointInterface, wsf); - JAXWS_Util.setSOAPLogging(stub); // For Debug only - } catch (Exception e) { - TestUtil.logMsg( - "StubContext.createJAXWSStub() could not get stub (caught exception)"); - TestUtil.printStackTrace(e); - throw e; - } - } - - protected void createJavaEEStub() throws Exception { - TestUtil.logMsg("entering createJavaEEStub()"); - try { - TestUtil.logMsg("webServiceRef=" + webServiceRef); - if (webServiceRef == null) - throw new Exception("webServiceRef is null"); - TestUtil.logMsg( - "Getting port from WebServiceRef for " + endpointInterface.getName()); - stub = webServiceRef.getPort(endpointInterface); - TestUtil.logMsg("port=" + stub); - JAXWS_Util.dumpTargetEndpointAddress(stub); - // JAXWS_Util.setSOAPLogging(stub); // For Debug only - } catch (Exception e) { - TestUtil.logMsg( - "StubContext.createJavaEEStub() could not get stub (caught exception)"); - TestUtil.printStackTrace(e); - throw e; - } - } - - /** - * @return String - */ - public String getNamespace() { - return namespace; - } - - /** - * @return QName - */ - public QName getPortName() { - return portName; - } - - /** - * @return String - */ - public String getPort() { - return port; - } - - /** - * @return String - */ - public String getService() { - return service; - } - - /** - * @return Class - */ - public Class getEndpointInterface() { - return endpointInterface; - } - - /** - * @return QName - */ - public QName getServiceName() { - return serviceName; - } - - /** - * @return Stub - */ - public Object getStub() throws Exception { - initStub(); - return stub; - } - - /** - * Sets the namespace. - * - * @param namespace - * The namespace to set - */ - public void setNamespace(String namespace) { - this.namespace = namespace; - } - - /** - * Sets the portName. - * - * @param portName - * The portName to set - */ - public void setPortName(QName portName) { - this.portName = portName; - } - - /** - * Sets the port. - * - * @param port - * The port to set - */ - public void setPort(String port) { - this.port = port; - } - - /** - * Sets the service. - * - * @param service - * The service to set - */ - public void setService(String service) { - this.service = service; - } - - /** - * Sets the endpointInterface. - * - * @param endpointInterface - * The endpointInterface to set - */ - public void setEndpointInterface(Class endpointInterface) { - this.endpointInterface = endpointInterface; - } - - /** - * Sets the serviceName. - * - * @param serviceName - * The serviceName to set - */ - public void setServiceName(QName serviceName) { - this.serviceName = serviceName; - } - - /** - * Sets the webServiceRef. - * - * @param webServiceRef - * The webServiceRef to set - */ - public void setWebServiceRef(jakarta.xml.ws.Service webServiceRef) { - this.webServiceRef = webServiceRef; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/build.xml deleted file mode 100644 index 9a6d288fa0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/build.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler1.java deleted file mode 100644 index ec5ec47433..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase; - -public class ClientLogicalHandler1 extends LogicalHandlerBase { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler1"; - - public ClientLogicalHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler2.java deleted file mode 100644 index 8445e1eb8e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler2.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase; - -public class ClientLogicalHandler2 extends LogicalHandlerBase { - - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler2"; - - public ClientLogicalHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler3.java deleted file mode 100644 index 298d54ace5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase; - -public class ClientLogicalHandler3 extends LogicalHandlerBase { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler3"; - - public ClientLogicalHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler4.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler4.java deleted file mode 100644 index db495c9342..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler4.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.handler.LogicalMessageContext; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.ProtocolException; - -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.soap.Name; - -import java.io.StringReader; -import javax.xml.transform.stream.StreamSource; - -public class ClientLogicalHandler4 extends LogicalHandlerBase { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler4"; - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private final QName FAULTCODE = new QName(NAMESPACEURI, "ItsASoapFault", - "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private jakarta.xml.soap.SOAPFault sf; - - public ClientLogicalHandler4() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(LogicalMessageContext context) { - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - String direction = Handler_Util.getDirection(context); - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.OUTBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleMessageThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound RuntimeException"); - throw new RuntimeException(HANDLERNAME - + ".handleMessage throwing an outbound RuntimeException"); - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleMessageFalseTest")) { - String tmp = Handler_Util.getMessageAsString(context); - String response = tmp.replaceAll("MyAction", "MyResult"); - context.getMessage() - .setPayload(new StreamSource(new StringReader(response))); - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleMessageThrowsSOAPFaultTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ClientLogicalHandler4.handleMessage throwing an outbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleMessageThrowsWebServiceExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound WebServiceException"); - throw new WebServiceException(HANDLERNAME - + ".handleMessage throwing an outbound WebServiceException"); - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleMessageThrowsProtocolExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound ProtocolException"); - throw new ProtocolException(HANDLERNAME - + ".handleMessage throwing an outbound ProtocolException"); - } - } else { - // inbound - if (Handler_Util.checkForMsg(this, context, - "ClientLogicalInboundHandleMessageThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound RuntimeException"); - throw new RuntimeException(HANDLERNAME - + ".handleMessage throwing an inbound RuntimeException"); - - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalInboundHandleMessageFalseTest")) { - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalInboundHandleMessageThrowsSOAPFaultTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ClientLogicalHandler4.handleMessage throwing an inbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalInboundHandleMessageThrowsWebServiceExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound WebServiceException"); - throw new WebServiceException(HANDLERNAME - + ".handleMessage throwing an inbound WebServiceException"); - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalInboundHandleMessageThrowsProtocolExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound ProtocolException"); - throw new ProtocolException(HANDLERNAME - + ".handleMessage throwing an inbound ProtocolException"); - } - } - } - return true; - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + this + ":handleFault"); - TestUtil.logTrace("in " + this + ":handleFault"); - HandlerTracker.reportHandleFault(this); - String direction = Handler_Util.getDirection(context); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ClientLogicalHandler6.handleMessage throws SOAPFaultException for ClientLogicalOutboundHandleFaultFalseTest")) { - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalHandler6.handleMessage throws SOAPFaultException for ClientLogicalOutboundHandleFaultThrowsSOAPFaultExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ClientLogicalHandler4.handleFault throwing an inbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleFault for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleFaultThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound RuntimeException"); - throw new RuntimeException( - HANDLERNAME + ".handleFault throwing an inbound RuntimeException"); - } - } - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler5.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler5.java deleted file mode 100644 index ee9d8f1101..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler5.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase; - -public class ClientLogicalHandler5 extends LogicalHandlerBase { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler5"; - - public ClientLogicalHandler5() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler6.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler6.java deleted file mode 100644 index 0c6a60f455..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientLogicalHandler6.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase; -import jakarta.xml.ws.handler.LogicalMessageContext; -import jakarta.xml.ws.soap.SOAPFaultException; - -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.soap.Name; - -public class ClientLogicalHandler6 extends LogicalHandlerBase { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler6"; - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private final QName FAULTCODE = new QName(NAMESPACEURI, "ItsASoapFault", - "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private jakarta.xml.soap.SOAPFault sf; - - public ClientLogicalHandler6() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(LogicalMessageContext context) { - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - String direction = Handler_Util.getDirection(context); - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.OUTBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleFaultFalseTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ClientLogicalHandler6.handleMessage throws SOAPFaultException for ClientLogicalOutboundHandleFaultFalseTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleFaultThrowsSOAPFaultExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ClientLogicalHandler6.handleMessage throws SOAPFaultException for ClientLogicalOutboundHandleFaultThrowsSOAPFaultExceptionTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientLogicalOutboundHandleFaultThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ClientLogicalHandler6.handleMessage throws SOAPFaultException for ClientLogicalOutboundHandleFaultThrowsRuntimeExceptionTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - } - } - - return true; - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + this + ":handleFault"); - TestUtil.logTrace("in " + this + ":handleFault"); - HandlerTracker.reportHandleFault(this); - String direction = Handler_Util.getDirection(context); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerLogicalHandler6.handleMessage throws SOAPFaultException for ServerLogicalInboundHandlerThrowsSOAPFaultToClientHandlersTest")) { - HandlerTracker.reportComment(this, - "received SOAPFault from Inbound ServerLogicalHandler6"); - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ServerLogicalHandler6.handleMessage throws SOAPFaultException for ServerLogicalOutboundHandlerThrowsSOAPFaultToClientHandlersTest")) { - HandlerTracker.reportComment(this, - "received SOAPFault from Outbound ServerLogicalHandler6"); - return false; - } - } - - System.out.println("exiting " + this + ":handleFault"); - TestUtil.logTrace("exiting " + this + ":handleFault"); - return true; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler1.java deleted file mode 100644 index 8e26f6b5d5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase; - -public class ClientSOAPHandler1 extends SOAPHandlerBase { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler1"; - - public ClientSOAPHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler2.java deleted file mode 100644 index 28e1165490..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler2.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase; - -public class ClientSOAPHandler2 extends SOAPHandlerBase { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler2"; - - public ClientSOAPHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler3.java deleted file mode 100644 index 38510c15d2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase; - -public class ClientSOAPHandler3 extends SOAPHandlerBase { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler3"; - - public ClientSOAPHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler4.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler4.java deleted file mode 100644 index 8fc958c86a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler4.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.ProtocolException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import javax.xml.namespace.QName; -import jakarta.xml.soap.*; -import java.util.Iterator; - -public class ClientSOAPHandler4 extends SOAPHandlerBase { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler4"; - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private final QName FAULTCODE = new QName(NAMESPACEURI, "ItsASoapFault", - "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private jakarta.xml.soap.SOAPFault sf; - - public ClientSOAPHandler4() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(SOAPMessageContext context) { - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - TestUtil.logTrace("in " + this + ":handleMessage"); - String direction = Handler_Util.getDirection(context); - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.OUTBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleMessageThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound RuntimeException"); - throw new RuntimeException(HANDLERNAME - + ".handleMessage throwing an outbound RuntimeException"); - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleMessageFalseTest")) { - SOAPMessage message = context.getMessage(); - try { - SOAPBody body = message.getSOAPBody(); - SOAPElement origBodyParam = (SOAPElement) body.getChildElements() - .next(); - System.out.println("-----------------------------"); - System.out.println("Original SOAP Message Request"); - System.out.println("-----------------------------"); - message.writeTo(System.out); - System.out.println("\n"); - - Iterator iterator = origBodyParam.getChildElements(); - origBodyParam.detachNode(); - - QName origName = origBodyParam.getElementQName(); - - SOAPElement newElement = body.addBodyElement(new QName( - origName.getNamespaceURI(), "MyResult", origName.getPrefix())); - while (iterator.hasNext()) { - Object o = iterator.next(); - SOAPElement s = (SOAPElement) o; - newElement.addChildElement(s); - } - - System.out.println("-----------------------------"); - System.out.println("Modified SOAP Message Request"); - System.out.println("-----------------------------"); - message.writeTo(System.out); - System.out.println("\n"); - message.saveChanges(); - - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for inbound ClientSOAPInboundHandleMessageFalseTest:" - + e)); - } - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleMessageThrowsSOAPFaultExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ClientSOAPHandler4.handleMessage throwing an outbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleMessageThrowsWebServiceExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound WebServiceException"); - throw new WebServiceException(HANDLERNAME - + ".handleMessage throwing an outbound WebServiceException"); - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleMessageThrowsProtocolExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound ProtocolException"); - throw new ProtocolException(HANDLERNAME - + ".handleMessage throwing an outbound ProtocolException"); - } - } else { - // inbound - if (Handler_Util.checkForMsg(this, context, - "ClientSOAPInboundHandleMessageThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound RuntimeException"); - throw new RuntimeException(HANDLERNAME - + ".handleMessage throwing an inbound RuntimeException"); - - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPInboundHandleMessageFalseTest")) { - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPInboundHandleMessageThrowsSOAPFaultExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ClientSOAPHandler4.handleMessage throwing an inbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPInboundHandleMessageThrowsWebServiceExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound WebServiceException"); - throw new WebServiceException(HANDLERNAME - + ".handleMessage throwing an inbound WebServiceException"); - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPInboundHandleMessageThrowsProtocolExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound ProtocolException"); - throw new ProtocolException(HANDLERNAME - + ".handleMessage throwing an inbound ProtocolException"); - } - } - } - - return true; - } - - public boolean handleFault(SOAPMessageContext context) { - TestUtil.logTrace("in " + this + ":handleFault"); - HandlerTracker.reportHandleFault(this); - String direction = Handler_Util.getDirection(context); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ClientSOAPHandler6.handleMessage throws SOAPFaultException for ClientSOAPOutboundHandleFaultFalseTest")) { - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleFaultThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound RuntimeException"); - throw new RuntimeException( - HANDLERNAME + ".handleFault throwing an inbound RuntimeException"); - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPHandler6.handleMessage throws SOAPFaultException for ClientSOAPOutboundHandleFaultThrowsSOAPFaultExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ClientSOAPHandler4.handleFault throwing an inbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleFault for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - } - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler5.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler5.java deleted file mode 100644 index ef0575fa1b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler5.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase; - -public class ClientSOAPHandler5 extends SOAPHandlerBase { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler5"; - - public ClientSOAPHandler5() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler6.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler6.java deleted file mode 100644 index c1a3b7666e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/ClientSOAPHandler6.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.dlhandlerclient; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.soap.Name; - -public class ClientSOAPHandler6 extends SOAPHandlerBase { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler6"; - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private final QName FAULTCODE = new QName(NAMESPACEURI, "ItsASoapFault", - "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private jakarta.xml.soap.SOAPFault sf; - - public ClientSOAPHandler6() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(SOAPMessageContext context) { - - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - TestUtil.logTrace("in " + this + ":handleMessage"); - String direction = Handler_Util.getDirection(context); - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.OUTBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleFaultFalseTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ClientSOAPHandler6.handleMessage throws SOAPFaultException for ClientSOAPOutboundHandleFaultFalseTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleFaultThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ClientSOAPHandler6.handleMessage throws SOAPFaultException for ClientSOAPOutboundHandleFaultThrowsRuntimeExceptionTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ClientSOAPOutboundHandleFaultThrowsSOAPFaultExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ClientSOAPHandler6.handleMessage throws SOAPFaultException for ClientSOAPOutboundHandleFaultThrowsSOAPFaultExceptionTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - } - } - - return true; - } - - public boolean handleFault(SOAPMessageContext context) { - System.out.println("in " + this + ":handleFault"); - TestUtil.logTrace("in " + this + ":handleFault"); - HandlerTracker.reportHandleFault(this); - String direction = Handler_Util.getDirection(context); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerSOAPHandler6.handleMessage throws SOAPFaultException for ServerSOAPInboundHandlerThrowsSOAPFaultToClientHandlersTest")) { - HandlerTracker.reportComment(this, - "received SOAPFault from Inbound ServerSOAPHandler6"); - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ServerSOAPHandler6.handleMessage throws SOAPFaultException for ServerSOAPOutboundHandlerThrowsSOAPFaultToClientHandlersTest")) { - HandlerTracker.reportComment(this, - "received SOAPFault from Outbound ServerSOAPHandler6"); - return false; - } - } - - System.out.println("exiting " + this + ":handleFault"); - TestUtil.logTrace("exiting " + this + ":handleFault"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/build.xml deleted file mode 100644 index dae8557a06..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/build.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/customfile.xml deleted file mode 100644 index 044d5bc9a9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhandlerclient/customfile.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - true - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhelloproviderclient/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhelloproviderclient/build.xml deleted file mode 100644 index 5440c53f94..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhelloproviderclient/build.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhelloproviderclient/jakartaEE-customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhelloproviderclient/jakartaEE-customfile.xml deleted file mode 100644 index dc64df6962..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhelloproviderclient/jakartaEE-customfile.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhelloproviderclient/standalone-customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhelloproviderclient/standalone-customfile.xml deleted file mode 100644 index dc64df6962..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/dlhelloproviderclient/standalone-customfile.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclitclient/J2WDLSharedClient.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclitclient/J2WDLSharedClient.java deleted file mode 100644 index f4655d2111..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclitclient/J2WDLSharedClient.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.doclitclient; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class J2WDLSharedClient extends SOAPClient { - public J2WDLSharedClient(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - super(webServerHost, webServerPort, mode); - } - - public J2WDLSharedClient(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - } - - /* - * (non-Javadoc) - * - * @see com.sun.ts.tests.jaxws.wsi.clients.Client#getEndpointURLProperty() - */ - protected String getEndpointURLProperty() { - return "wsi.j2wdlshared.endpoint.1"; - } - - /* - * (non-Javadoc) - * - * @see com.sun.ts.tests.jaxws.wsi.clients.Client#getWSDLURLProperty() - */ - protected String getWSDLURLProperty() { - return "wsi.j2wdlshared.wsdlloc.1"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclitclient/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclitclient/build.xml deleted file mode 100644 index 15e5430d72..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclitclient/build.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/ClientLogicalHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/ClientLogicalHandler.java deleted file mode 100644 index 652ff8cd7c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/ClientLogicalHandler.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientLogicalHandler.java 57427 2009-03-30 19:22:03Z adf $ - */ - -package com.sun.ts.tests.jaxws.sharedclients.doclithelloclient; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.LogicalMessage; - -import jakarta.xml.ws.WebServiceException; - -import javax.xml.transform.Source; -import javax.xml.transform.dom.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Constants; - -import org.w3c.dom.Node; - -public class ClientLogicalHandler - implements jakarta.xml.ws.handler.LogicalHandler { - - private static final jakarta.xml.bind.JAXBContext jaxbContext = createJAXBContext(); - - private static jakarta.xml.bind.JAXBContext createJAXBContext() { - try { - return jakarta.xml.bind.JAXBContext.newInstance( - com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.ObjectFactory.class); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - public boolean handleMessage(LogicalMessageContext context) { - - System.out.println("in " + this + ":handleMessage"); - String direction = null; - if (Handler_Util.getDirection(context).equals(Constants.INBOUND)) { - direction = Constants.INBOUND; - } else { - direction = Constants.OUTBOUND; - } - System.out.println("direction=" + direction); - - LogicalMessage lm = context.getMessage(); - if (lm != null) { - if (Handler_Util.checkForMsg(this, context, "setgetPayloadSourceTest")) { - Source source = lm.getPayload(); - if (source != null) { - try { - DOMResult dr = JAXWS_Util.getSourceAsDOMResult(source); - System.out.println("msg=" + JAXWS_Util.getDOMResultAsString(dr)); - - Node documentNode = dr.getNode(); - Node requestResponseNode = documentNode.getFirstChild(); - - System.out - .println("localname=" + requestResponseNode.getLocalName()); - if ((!requestResponseNode.getLocalName() - .startsWith("Hello3Request")) - && (!requestResponseNode.getLocalName() - .startsWith("Hello3Response"))) { - - System.out.println("The expected messages were not received"); - return true; - } - // The first child is the test name the second(last) is the argument - Node textNode = requestResponseNode.getLastChild().getFirstChild(); - String item = textNode.getNodeValue(); - System.out.println("orig value = " + item); - - textNode.setNodeValue(item + ":" + direction - + "ClientLogicalHandler_getsetPayloadSource"); - System.out.println("new value = " + textNode.getNodeValue()); - source = new DOMSource(documentNode); - lm.setPayload(source); - - } catch (Exception e) { - e.printStackTrace(); - } - } else { - System.out.println("LogicalMessage.getPayload returned null"); - } - } else if (Handler_Util.checkForMsg(this, context, - "setgetPayloadJAXBContextTest")) { - try { - if (direction.equals(Constants.OUTBOUND)) { - Hello3Request hreq = (Hello3Request) lm.getPayload(jaxbContext); - String item = hreq.getArgument(); - System.out.println("orig value = " + item); - item += ":" + direction - + "ClientLogicalHandler_getsetPayloadJAXBContext"; - hreq.setArgument(item); - System.out.println("new value = " + hreq.getArgument()); - lm.setPayload(hreq, jaxbContext); - } else { - Hello3Response hresp = (Hello3Response) lm.getPayload(jaxbContext); - String item = hresp.getArgument(); - System.out.println("orig value = " + item); - item += ":" + direction - + "ClientLogicalHandler_getsetPayloadJAXBContext"; - hresp.setArgument(item); - System.out.println("new value = " + hresp.getArgument()); - lm.setPayload(hresp, jaxbContext); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } else { - System.out.println("LogicalMessageContext.getMessage() returned null"); - } - - return true; - } - - public void close(MessageContext context) { - System.out.println("in " + this + ":close"); - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + this + ":handleFault"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/build.xml deleted file mode 100644 index b82fb7b49b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/jakartaEE-customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/jakartaEE-customfile.xml deleted file mode 100644 index ea884d5529..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/jakartaEE-customfile.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/standalone-customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/standalone-customfile.xml deleted file mode 100644 index 97f816a9ca..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/doclithelloclient/standalone-customfile.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - ClientLogicalHandler - com.sun.ts.tests.jaxws.sharedclients.doclithelloclient.ClientLogicalHandler - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/faultclient/FaultTestClient.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/faultclient/FaultTestClient.java deleted file mode 100644 index 6672e8681e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/faultclient/FaultTestClient.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.faultclient; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class FaultTestClient extends SOAPClient { - - public FaultTestClient(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public FaultTestClient(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace("http://faulttestservice.org/wsdl"); - stubContext.setService("FaultTest"); - stubContext.setPort("SoapFaultTestPort"); - stubContext.setEndpointInterface(SoapFaultTest.class); - stubContext.setWebServiceRef(webServiceRef); - - } - - public String getEndpointURLProperty() { - return "wsi.fault.endpoint.1"; - } - - public String getWSDLURLProperty() { - return "wsi.fault.wsdlloc.1"; - } - - public String alwaysThrowsSOAPFaultExceptionDetailNoChildren() - throws Exception { - return ((SoapFaultTest) stubContext.getStub()) - .alwaysThrowsSOAPFaultExceptionDetailNoChildren(); - } - - public String alwaysThrowsSOAPFaultExceptionDetailQualifiedChildren() - throws Exception { - return ((SoapFaultTest) stubContext.getStub()) - .alwaysThrowsSOAPFaultExceptionDetailQualifiedChildren(); - } - - public String alwaysThrowsSOAPFaultExceptionDetailUnqualifiedChildren() - throws Exception { - return ((SoapFaultTest) stubContext.getStub()) - .alwaysThrowsSOAPFaultExceptionDetailUnqualifiedChildren(); - } - - public String alwaysThrowsSOAPFaultExceptionDetailNoAttributes() - throws Exception { - return ((SoapFaultTest) stubContext.getStub()) - .alwaysThrowsSOAPFaultExceptionDetailNoAttributes(); - } - - public String alwaysThrowsSOAPFaultExceptionDetailQualifiedAttributes() - throws Exception { - return ((SoapFaultTest) stubContext.getStub()) - .alwaysThrowsSOAPFaultExceptionDetailQualifiedAttributes(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/faultclient/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/faultclient/build.xml deleted file mode 100644 index f910ccfb96..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/faultclient/build.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/hellosecureclient/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/hellosecureclient/build.xml deleted file mode 100644 index 938c05bcf9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/hellosecureclient/build.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/hellosecureclient/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/hellosecureclient/customfile.xml deleted file mode 100644 index cb47c27020..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/hellosecureclient/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler1.java deleted file mode 100644 index 7de06bd51a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ClientLogicalHandler1 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler1"; - - public ClientLogicalHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler2.java deleted file mode 100644 index 62a59cee0f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler2.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ClientLogicalHandler2 extends LogicalHandlerBase2 { - - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler2"; - - public ClientLogicalHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler3.java deleted file mode 100644 index 2d777fab79..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ClientLogicalHandler3 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler3"; - - public ClientLogicalHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler5.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler5.java deleted file mode 100644 index 3cb7ded1ae..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler5.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ClientLogicalHandler5 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler5"; - - public ClientLogicalHandler5() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler6.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler6.java deleted file mode 100644 index 88766497fe..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientLogicalHandler6.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ClientLogicalHandler6 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientLogicalHandler6"; - - public ClientLogicalHandler6() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientPNPSNBCLogicalHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientPNPSNBCLogicalHandler.java deleted file mode 100644 index cbff822325..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientPNPSNBCLogicalHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ClientPNPSNBCLogicalHandler extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientPortNamePatternShouldNotBeCalledLogicalHandler"; - - public ClientPNPSNBCLogicalHandler() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientPNPSNBCSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientPNPSNBCSOAPHandler.java deleted file mode 100644 index 4b90daca3c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientPNPSNBCSOAPHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ClientPNPSNBCSOAPHandler extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientPortNamePatternShouldNotBeCalledSOAPHandler"; - - public ClientPNPSNBCSOAPHandler() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSNBCLogicalHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSNBCLogicalHandler.java deleted file mode 100644 index 613397840f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSNBCLogicalHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ClientSNBCLogicalHandler extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientShouldNotBeCalledLogicalHandler"; - - public ClientSNBCLogicalHandler() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSNBCSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSNBCSOAPHandler.java deleted file mode 100644 index 42bbf01775..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSNBCSOAPHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ClientSNBCSOAPHandler extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientShouldNotBeCalledSOAPHandler"; - - public ClientSNBCSOAPHandler() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSNPSNBCLogicalHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSNPSNBCLogicalHandler.java deleted file mode 100644 index b45927ae30..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSNPSNBCLogicalHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ClientSNPSNBCLogicalHandler extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientServiceNamePatternShouldNotBeCalledLogicalHandler"; - - public ClientSNPSNBCLogicalHandler() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSNPSNBCSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSNPSNBCSOAPHandler.java deleted file mode 100644 index 098fd5078d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSNPSNBCSOAPHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ClientSNPSNBCSOAPHandler extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientServiceNamePatternShouldNotBeCalledSOAPHandler"; - - public ClientSNPSNBCSOAPHandler() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler1.java deleted file mode 100644 index c4797a6aed..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ClientSOAPHandler1 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler1"; - - public ClientSOAPHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler2.java deleted file mode 100644 index d59aef059f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler2.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ClientSOAPHandler2 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler2"; - - public ClientSOAPHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler3.java deleted file mode 100644 index 0c1a394277..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ClientSOAPHandler3 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler3"; - - public ClientSOAPHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler5.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler5.java deleted file mode 100644 index 8cc08c2f84..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler5.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ClientSOAPHandler5 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler5"; - - public ClientSOAPHandler5() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler6.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler6.java deleted file mode 100644 index 1ee6ee7b5d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/ClientSOAPHandler6.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ClientSOAPHandler6 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "ClientSOAPHandler6"; - - public ClientSOAPHandler6() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/build.xml deleted file mode 100644 index 6bfa5101c4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/build.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/jakartaEE-customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/jakartaEE-customfile.xml deleted file mode 100644 index ef7b0af5e0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/jakartaEE-customfile.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - true - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/standalone-customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/standalone-customfile.xml deleted file mode 100644 index d47c81cb3c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rlhandlerclient/standalone-customfile.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - true - - - - - - - - - - - - - - - ns1:RLHandlerService - - ClientLogicalHandler5 - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientLogicalHandler5 - - - - - ClientSOAPHandler5 - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSOAPHandler5 - - - - - - - foo:RLHandlerService - - ClientSNPSNBCLogicalHandler - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSNPSNBCLogicalHandler - - - - ns1:ServiceDoesNotExist - - ClientSNPSNBCSOAPHandler - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSNPSNBCSOAPHandler - - - - - - - - - - foo:HelloPort - - ClientPNPSNBCLogicalHandler - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientPNPSNBCLogicalHandler - - - - ns1:PortDoesNotExist - - ClientPNPSNBCSOAPHandler - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientPNPSNBCSOAPHandler - - - - - - - - ##SOAP11_HTTP - - ClientSOAPHandler1 - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientSOAPHandler1 - - - ClientLogicalHandler1 - com.sun.ts.tests.jaxws.sharedclients.rlhandlerclient.ClientLogicalHandler1 - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rpclitclient/J2WRLSharedClient.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rpclitclient/J2WRLSharedClient.java deleted file mode 100644 index 656d6508a2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rpclitclient/J2WRLSharedClient.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.rpclitclient; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class J2WRLSharedClient extends SOAPClient { - public J2WRLSharedClient(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public J2WRLSharedClient(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - } - - /* - * (non-Javadoc) - * - * @see com.sun.ts.tests.jaxws.wsi.clients.Client#getEndpointURLProperty() - */ - protected String getEndpointURLProperty() { - return "wsi.j2wrlshared.endpoint.1"; - } - - /* - * (non-Javadoc) - * - * @see com.sun.ts.tests.jaxws.wsi.clients.Client#getWSDLURLProperty() - */ - protected String getWSDLURLProperty() { - return "wsi.j2wrlshared.wsdlloc.1"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rpclitclient/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rpclitclient/build.xml deleted file mode 100644 index 3b8bc7ba83..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/rpclitclient/build.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/simpleclient/SimpleTestClient.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/simpleclient/SimpleTestClient.java deleted file mode 100644 index b867b7bd32..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/simpleclient/SimpleTestClient.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.simpleclient; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class SimpleTestClient extends SOAPClient { - - public SimpleTestClient(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public SimpleTestClient(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace("http://simpletestservice.org/wsdl"); - stubContext.setService("SimpleTest"); - stubContext.setPort("SimpleEndpointPort"); - stubContext.setEndpointInterface(SimpleEndpoint.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.simple.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.simple.wsdlloc.1"; - } - - public String helloWorld() throws Exception { - TestUtil - .logMsg("STUB CLASS: " + stubContext.getStub().getClass().getName()); - return ((SimpleEndpoint) stubContext.getStub()).helloWorld(); - } - - public String arrayOperationFromClient(String[] array) throws Exception { - StringArray strArr = new StringArray(); - for (int i = 0; i < array.length; i++) - strArr.getItem().add(array[i]); - return ((SimpleEndpoint) stubContext.getStub()) - .arrayOperationFromClient(strArr); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/simpleclient/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/simpleclient/build.xml deleted file mode 100644 index 355ba4707a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/simpleclient/build.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/xmlbinddlhelloproviderclient/SOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/xmlbinddlhelloproviderclient/SOAPHandler.java deleted file mode 100644 index f082200438..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/xmlbinddlhelloproviderclient/SOAPHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedclients.xmlbinddlhelloproviderclient; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class SOAPHandler extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Client"; - - private static final String HANDLERNAME = "SOAPHandler"; - - public SOAPHandler() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/xmlbinddlhelloproviderclient/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/xmlbinddlhelloproviderclient/build.xml deleted file mode 100644 index d7043faac7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/xmlbinddlhelloproviderclient/build.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/xmlbinddlhelloproviderclient/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/xmlbinddlhelloproviderclient/customfile.xml deleted file mode 100644 index ac7b3f77fa..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedclients/xmlbinddlhelloproviderclient/customfile.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/build.xml deleted file mode 100644 index 9d5ec86e63..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/DLHandlerService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/DLHandlerService.wsdl deleted file mode 100644 index 13f14041df..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/DLHandlerService.wsdl +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/GetTrackerDataImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/GetTrackerDataImpl.java deleted file mode 100644 index d188fb8dd0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/GetTrackerDataImpl.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "GetTrackerDataPort", targetNamespace = "http://dlhandlerservice.org/wsdl", serviceName = "DLHandlerService", wsdlLocation = "WEB-INF/wsdl/DLHandlerService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.GetTrackerData") - -public class GetTrackerDataImpl implements GetTrackerData { - public GetTrackerDataResult getTrackerData(GetTrackerDataAction action) { - - Handler_Util.setTraceFlag(action.getHarnesslogtraceflag()); - - Handler_Util.initTestUtil("GetTrackerDataImpl", action.getHarnessloghost(), - action.getHarnesslogport(), action.getHarnesslogtraceflag()); - - TestUtil.logTrace("*** in GetTrackerDataImpl ***"); - String[] messages = null; - - String theAction = action.getAction(); - TestUtil.logTrace("*** action = " + theAction + " ***"); - - if (theAction.equals("getArrayMessages1")) { - messages = HandlerTracker.getArrayMessages1(); - } else if (theAction.equals("getArrayMessages2")) { - messages = HandlerTracker.getArrayMessages2(); - } else if (theAction.equals("getArrayMessages3")) { - messages = HandlerTracker.getArrayMessages3(); - } else if (theAction.equals("getArrayMessages4")) { - messages = HandlerTracker.getArrayMessages4(); - } else if (theAction.equals("getArrayThrowables")) { - messages = HandlerTracker.getArrayThrowables(); - } else if (theAction.equals("purge")) { - HandlerTracker.purge(); - String m[] = { "purge complete" }; - messages = m; - } else { - String[] m = { - "Did not get one of the excepted GetTrackerData action messages, the action message received was:" - + theAction }; - messages = m; - } - - GetTrackerDataResult r = null; - try { - TestUtil.logTrace("The endpoint is sending back the following data:"); - TestUtil.logTrace("action=" + action.getAction()); - TestUtil.logTrace("harnessloghost=" + action.getHarnessloghost()); - TestUtil.logTrace("harnesslogport=" + action.getHarnesslogport()); - TestUtil - .logTrace("harnesslogtraceflag=" + action.getHarnesslogtraceflag()); - - r = new GetTrackerDataResult(); - for (int i = 0; i < messages.length; i++) { - r.getResult().add(messages[i]); - TestUtil.logTrace("message[" + i + "]=" + messages[i]); - } - - r.setHarnessloghost(action.getHarnessloghost()); - r.setHarnesslogport(action.getHarnesslogport()); - r.setHarnesslogtraceflag(action.getHarnesslogtraceflag()); - } catch (Exception e) { - throw new WebServiceException(e.getMessage(), e); - } - return r; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/Hello2Impl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/Hello2Impl.java deleted file mode 100644 index e8bf1232f9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/Hello2Impl.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.lib.util.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.xml.ws.soap.SOAPFaultException; -import javax.xml.namespace.QName; - -import jakarta.xml.soap.SOAPFault; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.soap.Name; - -import jakarta.jws.WebService; - -import com.sun.ts.tests.jaxws.common.*; - -@WebService(portName = "Hello2Port", targetNamespace = "http://dlhandlerservice.org/wsdl", serviceName = "DLHandlerService", wsdlLocation = "WEB-INF/wsdl/DLHandlerService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.Hello2") - -public class Hello2Impl implements Hello2 { - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private QName faultCode = new QName(NAMESPACEURI, "ItsASoapFault", "tns"); - - private Name name = null; - - private String faultActor = "faultActor"; - - public com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.MyResultType doHandlerTest2( - MyActionType action) { - - Handler_Util.setTraceFlag(action.getHarnesslogtraceflag()); - - Handler_Util.initTestUtil("Hello2Impl", action.getHarnessloghost(), - action.getHarnesslogport(), action.getHarnesslogtraceflag()); - - TestUtil.logTrace("*** in Hello2Impl ***"); - String theAction = action.getAction(); - TestUtil.logTrace("*** action = " + theAction + " ***"); - String testType = action.getTestType(); - TestUtil.logTrace("*** testType = " + testType + " ***"); - - if (theAction.equals("EndpointRemoteRuntimeExceptionTest")) { - TestUtil - .logTrace("Throwing a RuntimeException nested in a RemoteException"); - RuntimeException re = new RuntimeException( - "Hello2Impl:EndpointRemoteRuntimeExceptionTest"); - throw new WebServiceException( - "RemoteException with nested RuntimeException", re); - } else if (theAction.equals("EndpointRemoteSOAPFaultExceptionTest")) { - TestUtil.logTrace( - "Throwing a SOAPFaultException nested in a RemoteException"); - String faultString = "Hello2Impl:EndpointRemoteSOAPFaultExceptionTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - SOAPFault sf = SOAPFactory.newInstance().createFault(faultString, - faultCode); - sf.setFaultActor(faultActor); - sf.addDetail(); - sf.getDetail().addDetailEntry(name); - SOAPFaultException sfe = new SOAPFaultException(sf); - throw new WebServiceException( - "WebServiceException with nested SOAPFaultException", sfe); - } catch (Exception e) { - throw new WebServiceException( - "Unexpected error occurred in Hello2Impl.doHandlerTest2:" + e); - } - } - - MyResultType r = null; - try { - TestUtil.logTrace("The endpoint is sending back the following data:"); - TestUtil.logTrace("action=" + action.getAction()); - TestUtil.logTrace("getTestType=" + action.getTestType()); - TestUtil.logTrace("harnessloghost=" + action.getHarnessloghost()); - TestUtil.logTrace("harnesslogport=" + action.getHarnesslogport()); - TestUtil - .logTrace("harnesslogtraceflag=" + action.getHarnesslogtraceflag()); - - r = new MyResultType(); - r.setAction(action.getAction()); - r.setTestType(action.getTestType()); - r.setHarnessloghost(action.getHarnessloghost()); - r.setHarnesslogport(action.getHarnesslogport()); - r.setHarnesslogtraceflag(action.getHarnesslogtraceflag()); - } catch (Exception e) { - throw new WebServiceException(e.getMessage(), e); - } - return r; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/Hello3Impl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/Hello3Impl.java deleted file mode 100644 index b6f9457ad7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/Hello3Impl.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.lib.util.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.xml.ws.soap.SOAPFaultException; -import javax.xml.namespace.QName; - -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.soap.Name; -import jakarta.xml.soap.SOAPFault; - -import com.sun.ts.tests.jaxws.common.*; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "Hello3Port", targetNamespace = "http://dlhandlerservice.org/wsdl", serviceName = "DLHandlerService", wsdlLocation = "WEB-INF/wsdl/DLHandlerService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.Hello3") - -public class Hello3Impl implements Hello3 { - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private QName faultCode = new QName(NAMESPACEURI, "ItsASoapFault", "tns"); - - private Name name = null; - - private String faultActor = "faultActor"; - - public com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.MyResultType doHandlerTest3( - MyActionType action) { - Handler_Util.setTraceFlag(action.getHarnesslogtraceflag()); - - Handler_Util.initTestUtil("Hello3Impl", action.getHarnessloghost(), - action.getHarnesslogport(), action.getHarnesslogtraceflag()); - - TestUtil.logTrace("*** in Hello3Impl ***"); - - String theAction = action.getAction(); - TestUtil.logTrace("*** action = " + theAction + " ***"); - String testType = action.getTestType(); - TestUtil.logTrace("*** testType = " + testType + " ***"); - - if (theAction.equals("EndpointRemoteRuntimeExceptionTest")) { - TestUtil - .logTrace("Throwing a RuntimeException nested in a RemoteException"); - RuntimeException re = new RuntimeException( - "Hello3Impl:EndpointRemoteRuntimeExceptionTest"); - throw new WebServiceException( - "RemoteException with nested RuntimeException", re); - } else if (theAction.equals("EndpointRemoteSOAPFaultExceptionTest")) { - TestUtil.logTrace( - "Throwing a SOAPFaultException nested in a RemoteException"); - String faultString = "Hello3Impl:EndpointRemoteSOAPFaultExceptionTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - SOAPFault sf = SOAPFactory.newInstance().createFault(faultString, - faultCode); - sf.setFaultActor(faultActor); - sf.addDetail(); - sf.getDetail().addDetailEntry(name); - SOAPFaultException sfe = new SOAPFaultException(sf); - throw new WebServiceException( - "WebServiceException with nested SOAPFaultException", sfe); - } catch (Exception e) { - throw new WebServiceException( - "Unexpected error occurred in Hello3Impl.doHandlerTest3:" + e); - } - } - - MyResultType r = null; - try { - TestUtil.logTrace("The endpoint is sending back the following data:"); - TestUtil.logTrace("action=" + action.getAction()); - TestUtil.logTrace("getTestType=" + action.getTestType()); - TestUtil.logTrace("harnessloghost=" + action.getHarnessloghost()); - TestUtil.logTrace("harnesslogport=" + action.getHarnesslogport()); - TestUtil - .logTrace("harnesslogtraceflag=" + action.getHarnesslogtraceflag()); - - r = new MyResultType(); - r.setAction(action.getAction()); - r.setTestType(action.getTestType()); - r.setHarnessloghost(action.getHarnessloghost()); - r.setHarnesslogport(action.getHarnesslogport()); - r.setHarnesslogtraceflag(action.getHarnesslogtraceflag()); - } catch (Exception e) { - throw new WebServiceException(e.getMessage(), e); - } - return r; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/HelloImpl.java deleted file mode 100644 index fa63ec6317..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/HelloImpl.java +++ /dev/null @@ -1,406 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)HelloImpl.java 1.16 05/09/14 - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.*; - -import jakarta.xml.ws.WebServiceException; - -import java.util.Iterator; -import java.util.Map; -import java.util.List; -import java.util.Set; -import java.util.Vector; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.activation.DataHandler; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; -import jakarta.annotation.Resource; - -@WebService(portName = "HelloPort", targetNamespace = "http://dlhandlerservice.org/wsdl", serviceName = "DLHandlerService", wsdlLocation = "WEB-INF/wsdl/DLHandlerService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.Hello") - -public class HelloImpl implements Hello { - - @Resource - WebServiceContext wscontext; - - public com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.MyResultType doHandlerTest1( - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.MyActionType action) { - - Handler_Util.setTraceFlag(action.getHarnesslogtraceflag()); - - Handler_Util.initTestUtil("HelloImpl", action.getHarnessloghost(), - action.getHarnesslogport(), action.getHarnesslogtraceflag()); - - TestUtil.logTrace("*** in HelloImpl:doHandlerTest1 ***"); - String theAction = action.getAction(); - TestUtil.logTrace("*** action = " + theAction + " ***"); - String testType = action.getTestType(); - TestUtil.logTrace("*** testType = " + testType + " ***"); - TestUtil.logTrace("*** wscontext = " + wscontext + " ***"); - - String errors = ""; - - if (theAction.equals("ServerMessageContextTest")) { - if ((testType.equals("LogicalTest")) || (testType.equals("SOAPTest"))) { - String contextType = null; - if (testType.equals("LogicalTest")) { - contextType = "Logical"; - } else { - contextType = "SOAP"; - } - MessageContext mc = null; - try { - mc = wscontext.getMessageContext(); - TestUtil.logTrace("MessageContext=" + mc); - if (mc != null) { - if (mc.containsKey("INBOUNDServer" + contextType - + "MessageScopeAppPropSetByHandler3")) { - - TestUtil.logTrace("Found INBOUNDServer" + contextType - + "MessageScopeAppPropSetByHandler3"); - } else { - errors = errors + ", The property INBOUNDServer" + contextType - + "MessageScopeAppPropSetByHandler3 was not accessible by the endpoint"; - } - if (mc.containsKey("INBOUNDServer" + contextType - + "MessageScopeHandlerPropSetByHandler3")) { - errors = errors + ", The property INBOUNDServer" + contextType - + "MessageScopeHandlerPropSetByHandler3 was accessible by the endpoint"; - } else { - TestUtil.logTrace("Did not find Server" + contextType - + "MessageScopeHandlerPropSetByHandler3"); - } - - if (mc.containsKey("HandlerServerHandlerProp")) { - TestUtil.logTrace("Found HandlerServerHandlerProp"); - TestUtil.logTrace( - "Getting the value of HandlerServerHandlerProp from the MessageContext"); - String tmp = (String) mc.get("HandlerServerHandlerProp"); - TestUtil.logTrace("The value of HandlerServerHandlerProp=" + tmp); - TestUtil - .logTrace("Setting the value of HandlerServerHandlerProp to:" - + tmp + "server"); - mc.put("HandlerServerHandlerProp", tmp + "server"); - } else { - errors = errors - + ", The property HandlerServerHandlerProp was accessible by the endpoint"; - } - - } else { - errors = errors - + ", The MessageContext did not contain any key-value pairs in the endpoint"; - } - - } catch (Exception e) { - throw new WebServiceException("Error occurred in endpoint" + e); - } - } else { - errors = errors - + "The testType did not contain either LogicalTest or SOAPTest, it was:" - + testType; - } - } - - MyResultType r = null; - try { - TestUtil.logTrace("The endpoint is sending back the following data:"); - TestUtil.logTrace("action=" + action.getAction()); - TestUtil.logTrace("getTestType=" + action.getTestType()); - TestUtil.logTrace("harnessloghost=" + action.getHarnessloghost()); - TestUtil.logTrace("harnesslogport=" + action.getHarnesslogport()); - TestUtil - .logTrace("harnesslogtraceflag=" + action.getHarnesslogtraceflag()); - TestUtil.logTrace("errors=|" + errors + "|"); - - r = new MyResultType(); - r.setAction(action.getAction()); - r.setTestType(action.getTestType()); - r.setErrors(errors); - r.setHarnessloghost(action.getHarnessloghost()); - r.setHarnesslogport(action.getHarnesslogport()); - r.setHarnesslogtraceflag(action.getHarnesslogtraceflag()); - } catch (Exception e) { - throw new WebServiceException(e.getMessage(), e); - } - return r; - } - - public MyResultType doHandlerHeaderTest1(MyActionType action, - Holder myHeader) { - - Handler_Util.setTraceFlag(action.getHarnesslogtraceflag()); - - Handler_Util.initTestUtil("HelloImpl", action.getHarnessloghost(), - action.getHarnesslogport(), action.getHarnesslogtraceflag()); - - TestUtil.logTrace("*** in HelloImpl:doHandlerTest1 ***"); - String theAction = action.getAction(); - TestUtil.logTrace("*** action = " + theAction + " ***"); - String header = myHeader.value.getHeader(); - TestUtil.logTrace("*** header = " + header + " ***"); - - TestUtil.logTrace("*** wscontext = " + wscontext + " ***"); - - String errors = ""; - - MyResultType r = null; - try { - TestUtil.logTrace("The endpoint is sending back the following data:"); - TestUtil.logTrace("action=" + action.getAction()); - TestUtil.logTrace("getTestType=" + action.getTestType()); - TestUtil.logTrace("harnessloghost=" + action.getHarnessloghost()); - TestUtil.logTrace("harnesslogport=" + action.getHarnesslogport()); - TestUtil - .logTrace("harnesslogtraceflag=" + action.getHarnesslogtraceflag()); - TestUtil.logTrace("errors=|" + errors + "|"); - r = new MyResultType(); - r.setAction(action.getAction()); - r.setTestType(action.getTestType()); - r.setErrors(errors); - r.setHarnessloghost(action.getHarnessloghost()); - r.setHarnesslogport(action.getHarnesslogport()); - r.setHarnesslogtraceflag(action.getHarnesslogtraceflag()); - } catch (Exception e) { - throw new WebServiceException(e.getMessage(), e); - } - return r; - } - - public com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.MyResult2 doHandlerAttachmentTest( - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.MyActionType action, - jakarta.xml.ws.Holder attach1) { - - Handler_Util.setTraceFlag(action.getHarnesslogtraceflag()); - - Handler_Util.initTestUtil("HelloImpl", action.getHarnessloghost(), - action.getHarnesslogport(), action.getHarnesslogtraceflag()); - - TestUtil.logTrace("*** in HelloImpl:doHandlerAttachmentTest ***"); - String theAction = action.getAction(); - TestUtil.logTrace("*** action = " + theAction + " ***"); - String testType = action.getTestType(); - TestUtil.logTrace("*** testType = " + testType + " ***"); - TestUtil.logTrace("*** wscontext = " + wscontext + " ***"); - - String errors = ""; - Vector results = new Vector(); - - if (theAction.equals("ContextPropertiesTest")) { - if ((testType.equals("LogicalTest")) || (testType.equals("SOAPTest"))) { - MessageContext mc = null; - try { - mc = wscontext.getMessageContext(); - TestUtil.logTrace("MessageContext=" + mc); - if (mc != null) { - Map m1 = (Map) mc - .get(MessageContext.INBOUND_MESSAGE_ATTACHMENTS); - StringBuffer sb = new StringBuffer(); - int cnt = 0; - try { - if (m1 != null) { - if (m1.size() > 0) { - Set> m1Set = m1.entrySet(); - Iterator> iterator = m1Set - .iterator(); - while (iterator.hasNext()) { - Map.Entry elem = iterator.next(); - String key = elem.getKey(); - DataHandler value = elem.getValue(); - TestUtil.logTrace( - "request attachments key[" + cnt + "]=" + key); - sb.append("key[" + cnt + "]=" + key + "_" + value + "|"); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - sb.append("empty"); - } - } else { - TestUtil.logTrace("null"); - sb.append("null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - results.add("Endpoint:MessageContext.INBOUND_MESSAGE_ATTACHMENTS=" - + sb.toString()); - - String ss = (String) mc.get(MessageContext.HTTP_REQUEST_METHOD); - if (ss != null) { - results.add("Endpoint:MessageContext.HTTP_REQUEST_METHOD=" + ss); - } else { - results.add("Endpoint:MessageContext.HTTP_REQUEST_METHOD=null"); - } - Integer ii = (Integer) mc.get(MessageContext.HTTP_RESPONSE_CODE); - if (ii != null) { - results.add("Endpoint:MessageContext.HTTP_RESPONSE_CODE=" - + ii.toString()); - } else { - results.add("Endpoint:MessageContext.HTTP_RESPONSE_CODE=null"); - } - - Map> m2 = (Map>) mc - .get(MessageContext.HTTP_REQUEST_HEADERS); - sb = new StringBuffer(); - cnt = 0; - try { - if (m2 != null) { - if (m2.size() > 0) { - Set>> m2Set = m2.entrySet(); - Iterator>> iterator = m2Set - .iterator(); - while (iterator.hasNext()) { - Map.Entry> elem = iterator.next(); - String key = elem.getKey(); - TestUtil - .logTrace("request headers key[" + cnt + "]=" + key); - List values = elem.getValue(); - Iterator iterator2 = values.iterator(); - TestUtil.logTrace("request headers value[" + cnt + "]="); - sb.append("value[" + cnt + "]="); - while (iterator2.hasNext()) { - String value = iterator2.next(); - TestUtil.logTrace(value); - sb.append("_" + value); - } - sb.append("|"); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - sb.append("empty"); - } - } else { - TestUtil.logTrace("null"); - sb.append("null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - results.add("Endpoint:MessageContext.HTTP_REQUEST_HEADERS=" - + sb.toString()); - - m2 = (Map>) mc - .get(MessageContext.HTTP_RESPONSE_HEADERS); - sb = new StringBuffer(); - cnt = 0; - try { - if (m2 != null) { - if (m2.size() > 0) { - Set>> m2Set = m2.entrySet(); - Iterator>> iterator = m2Set - .iterator(); - while (iterator.hasNext()) { - Map.Entry> elem = iterator.next(); - String key = elem.getKey(); - TestUtil - .logTrace("response headers key[" + cnt + "]=" + key); - sb.append("key[" + cnt + "]=" + key + "|"); - cnt++; - } - } else { - TestUtil.logTrace("empty"); - sb.append("empty"); - } - } else { - TestUtil.logTrace("null"); - sb.append("null"); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - results.add("Endpoint:MessageContext.HTTP_RESPONSE_HEADERS=" - + sb.toString()); - - Object oo = mc.get(MessageContext.SERVLET_REQUEST); - if (oo != null) { - results.add( - "Endpoint:MessageContext.SERVLET_REQUEST=" + oo.toString()); - } else { - results.add("Endpoint:MessageContext.SERVLET_REQUEST=null"); - } - oo = mc.get(MessageContext.SERVLET_RESPONSE); - if (oo != null) { - results.add( - "Endpoint:MessageContext.SERVLET_RESPONSE=" + oo.toString()); - } else { - results.add("Endpoint:MessageContext.SERVLET_RESPONSE=null"); - } - oo = mc.get(MessageContext.SERVLET_CONTEXT); - if (oo != null) { - results.add( - "Endpoint:MessageContext.SERVLET_CONTEXT=" + oo.toString()); - } else { - results.add("Endpoint:MessageContext.SERVLET_CONTEXT=null"); - } - - } else { - errors = errors - + ", The MessageContext did not contain any key-value pairs in the endpoint"; - } - - } catch (Exception e) { - throw new WebServiceException("Error occurred in endpoint" + e); - } - } else { - errors = errors - + "The testType did not contain either LogicalTest or SOAPTest, it was:" - + testType; - } - } - - MyResult2 r = null; - try { - TestUtil.logTrace("The endpoint is sending back the following data:"); - TestUtil.logTrace("action=" + action.getAction()); - TestUtil.logTrace("getTestType=" + action.getTestType()); - TestUtil.logTrace("harnessloghost=" + action.getHarnessloghost()); - TestUtil.logTrace("harnesslogport=" + action.getHarnesslogport()); - TestUtil - .logTrace("harnesslogtraceflag=" + action.getHarnesslogtraceflag()); - TestUtil.logTrace("attach1=" + attach1.value); - TestUtil.logTrace("errors=|" + errors + "|"); - r = new MyResult2(); - r.setAction(action.getAction()); - r.setTestType(action.getTestType()); - r.setErrors(errors); - r.setHarnessloghost(action.getHarnessloghost()); - r.setHarnesslogport(action.getHarnesslogport()); - r.setHarnesslogtraceflag(action.getHarnesslogtraceflag()); - - for (int i = 0; i < results.size(); i++) { - r.getResult().add(results.get(i)); - TestUtil.logTrace("results[" + i + "]=" + results.get(i)); - } - - } catch (Exception e) { - throw new WebServiceException(e.getMessage(), e); - } - return r; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler1.java deleted file mode 100644 index 8eee9e157a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase; - -public class ServerLogicalHandler1 extends LogicalHandlerBase { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler1"; - - public ServerLogicalHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler2.java deleted file mode 100644 index ac6df6e79e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler2.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase; - -public class ServerLogicalHandler2 extends LogicalHandlerBase { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler2"; - - public ServerLogicalHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler3.java deleted file mode 100644 index ab937b9867..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase; - -public class ServerLogicalHandler3 extends LogicalHandlerBase { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler3"; - - public ServerLogicalHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler4.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler4.java deleted file mode 100644 index 956514b965..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler4.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.handler.LogicalMessageContext; -import jakarta.xml.ws.soap.SOAPFaultException; - -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.soap.Name; - -import java.io.StringReader; -import javax.xml.transform.stream.StreamSource; - -public class ServerLogicalHandler4 extends LogicalHandlerBase { - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler4"; - - private final QName FAULTCODE = new QName(NAMESPACEURI, "ItsASoapFault", - "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private jakarta.xml.soap.SOAPFault sf; - - public ServerLogicalHandler4() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(LogicalMessageContext context) { - - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - String direction = Handler_Util.getDirection(context); - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerLogicalInboundHandleMessageThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound RuntimeException"); - throw new RuntimeException(HANDLERNAME - + ".handleMessage throwing an inbound RuntimeException"); - } else if (Handler_Util.checkForMsg(this, context, - "ServerLogicalInboundHandleMessageFalseTest")) { - String tmp = Handler_Util.getMessageAsString(context); - String response = tmp.replaceAll("MyAction", "MyResult"); - context.getMessage() - .setPayload(new StreamSource(new StringReader(response))); - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ServerLogicalInboundHandleMessageThrowsSOAPFaultTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerLogicalHandler4.handleMessage throwing an inbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, - new Exception( - "Unexpected error in handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - } else if (direction.equals(Constants.OUTBOUND)) { - - if (Handler_Util.checkForMsg(this, context, - "ServerLogicalOutboundHandleMessageThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound RuntimeException"); - throw new RuntimeException(HANDLERNAME - + ".handleMessage throwing an outbound RuntimeException"); - } else if (Handler_Util.checkForMsg(this, context, - "ServerLogicalOutboundHandleMessageFalseTest")) { - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ServerLogicalOutboundHandleMessageThrowsSOAPFaultTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ServerLogicalHandler4.handleMessage throwing an outbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, - new Exception( - "Unexpected error in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - } - } - - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + this + ":handleFault"); - TestUtil.logTrace("in " + this + ":handleFault"); - HandlerTracker.reportHandleFault(this); - String direction = Handler_Util.getDirection(context); - if (direction.equals(Constants.OUTBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerLogicalHandler5.handleMessage throws SOAPFaultException for ServerLogicalInboundHandleFaultFalseTest")) { - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ServerLogicalHandler6.handleMessage throws SOAPFaultException for ServerLogicalInboundHandleFaultThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound RuntimeException"); - throw new RuntimeException( - HANDLERNAME + ".handleFault throwing an outbound RuntimeException"); - } else if (Handler_Util.checkForMsg(this, context, - "ServerLogicalHandler6.handleMessage throws SOAPFaultException for ServerLogicalInboundHandleFaultThrowsSOAPFaultExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ServerLogicalHandler4.handleFault throwing an outbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleFault for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - } - - System.out.println("exiting " + this + ":handleFault"); - TestUtil.logTrace("exiting " + this + ":handleFault"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler5.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler5.java deleted file mode 100644 index a57159c171..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler5.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase; -import jakarta.xml.ws.handler.LogicalMessageContext; -import jakarta.xml.ws.soap.SOAPFaultException; - -import javax.xml.namespace.QName; -import jakarta.xml.soap.SOAPFactory; -import jakarta.xml.soap.Name; - -public class ServerLogicalHandler5 extends LogicalHandlerBase { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler5"; - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private final QName FAULTCODE = new QName(NAMESPACEURI, "ItsASoapFault", - "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private jakarta.xml.soap.SOAPFault sf; - - public ServerLogicalHandler5() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - String direction = Handler_Util.getDirection(context); - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerLogicalInboundHandleFaultFalseTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerLogicalHandler5.handleMessage throws SOAPFaultException for ServerLogicalInboundHandleFaultFalseTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ServerLogicalInboundHandleFaultThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerLogicalHandler6.handleMessage throws SOAPFaultException for ServerLogicalInboundHandleFaultThrowsRuntimeExceptionTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ServerLogicalInboundHandleFaultThrowsSOAPFaultExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerLogicalHandler6.handleMessage throws SOAPFaultException for ServerLogicalInboundHandleFaultThrowsSOAPFaultExceptionTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in ServerSOAPHandler6.handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - - } - } - - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler6.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler6.java deleted file mode 100644 index 69ddbac2ee..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerLogicalHandler6.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; -import jakarta.xml.ws.handler.LogicalMessageContext; -import jakarta.xml.ws.soap.SOAPFaultException; -import javax.xml.namespace.QName; -import jakarta.xml.soap.*; - -public class ServerLogicalHandler6 extends LogicalHandlerBase { - - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler6"; - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private final QName FAULTCODE = new QName(NAMESPACEURI, "ItsASoapFault", - "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private jakarta.xml.soap.SOAPFault sf; - - public ServerLogicalHandler6() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - String direction = Handler_Util.getDirection(context); - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerLogicalInboundHandlerThrowsSOAPFaultToClientHandlersTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerLogicalHandler6.handleMessage throws SOAPFaultException for ServerLogicalInboundHandlerThrowsSOAPFaultToClientHandlersTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - } else { - if (Handler_Util.checkForMsg(this, context, - "ServerLogicalOutboundHandlerThrowsSOAPFaultToClientHandlersTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ServerLogicalHandler6.handleMessage throws SOAPFaultException for ServerLogicalOutboundHandlerThrowsSOAPFaultToClientHandlersTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - - } - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler1.java deleted file mode 100644 index f36bcb9f7c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase; - -public class ServerSOAPHandler1 extends SOAPHandlerBase { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler1"; - - public ServerSOAPHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler2.java deleted file mode 100644 index a53209537f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler2.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase; - -public class ServerSOAPHandler2 extends SOAPHandlerBase { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler2"; - - public ServerSOAPHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler3.java deleted file mode 100644 index bb621a6cbe..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase; - -public class ServerSOAPHandler3 extends SOAPHandlerBase { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler3"; - - public ServerSOAPHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler4.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler4.java deleted file mode 100644 index 203bae6ebf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler4.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.soap.SOAPFaultException; -import javax.xml.namespace.QName; -import jakarta.xml.soap.*; -import java.util.Iterator; - -public class ServerSOAPHandler4 extends SOAPHandlerBase { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler4"; - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private final QName FAULTCODE = new QName(NAMESPACEURI, "ItsASoapFault", - "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private jakarta.xml.soap.SOAPFault sf; - - public ServerSOAPHandler4() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - String direction = Handler_Util.getDirection(context); - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerSOAPInboundHandleMessageThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound RuntimeException"); - throw new RuntimeException(HANDLERNAME - + ".handleMessage throwing an inbound RuntimeException"); - } else if (Handler_Util.checkForMsg(this, context, - "ServerSOAPInboundHandleMessageFalseTest")) { - SOAPMessage message = context.getMessage(); - try { - SOAPBody body = message.getSOAPBody(); - SOAPElement origBodyParam = (SOAPElement) body.getChildElements() - .next(); - System.out.println("-----------------------------"); - System.out.println("Original SOAP Message Request"); - System.out.println("-----------------------------"); - message.writeTo(System.out); - System.out.println("\n"); - - Iterator iterator = origBodyParam.getChildElements(); - origBodyParam.detachNode(); - - QName origName = origBodyParam.getElementQName(); - - SOAPElement newElement = body.addBodyElement(new QName( - origName.getNamespaceURI(), "MyResult", origName.getPrefix())); - while (iterator.hasNext()) { - Object o = iterator.next(); - SOAPElement s = (SOAPElement) o; - newElement.addChildElement(s); - } - - System.out.println("-----------------------------"); - System.out.println("Modified SOAP Message Request"); - System.out.println("-----------------------------"); - message.writeTo(System.out); - System.out.println("\n"); - message.saveChanges(); - - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for inbound ServerSOAPInboundHandleMessageFalseTest:" - + e)); - } - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ServerSOAPInboundHandleMessageThrowsSOAPFaultExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerSOAPHandler4.handleMessage throwing an inbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - } else if (direction.equals(Constants.OUTBOUND)) { - - if (Handler_Util.checkForMsg(this, context, - "ServerSOAPOutboundHandleMessageThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound RuntimeException"); - throw new RuntimeException(HANDLERNAME - + ".handleMessage throwing an outbound RuntimeException"); - } else if (Handler_Util.checkForMsg(this, context, - "ServerSOAPOutboundHandleMessageFalseTest")) { - return false; - } else if (Handler_Util.checkForMsg(this, context, - "ServerSOAPOutboundHandleMessageThrowsSOAPFaultExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ServerSOAPHandler4.handleMessage throwing an outbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - } - } - - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - - public boolean handleFault(SOAPMessageContext context) { - System.out.println("in " + this + ":handleFault"); - TestUtil.logTrace("in " + this + ":handleFault"); - HandlerTracker.reportHandleFault(this); - String direction = Handler_Util.getDirection(context); - if (direction.equals(Constants.OUTBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerSOAPHandler6.handleMessage throws SOAPFaultException for ServerSOAPInboundHandleFaultThrowsSOAPFaultExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ServerSOAPHandler4.handleFault throwing an outbound SOAPFaultException"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in ServerSOAPHandler4.handleFault for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ServerSOAPHandler6.handleMessage throws SOAPFaultException for ServerSOAPInboundHandleFaultThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound RuntimeException"); - throw new RuntimeException( - HANDLERNAME + ".handleFault throwing an outbound RuntimeException"); - } else if (Handler_Util.checkForMsg(this, context, - "ServerSOAPHandler5.handleMessage throws SOAPFaultException for ServerSOAPInboundHandleFaultFalseTest")) { - return false; - } - } - - System.out.println("exiting " + this + ":handleFault"); - TestUtil.logTrace("exiting " + this + ":handleFault"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler5.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler5.java deleted file mode 100644 index 9ea39f5374..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler5.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import javax.xml.namespace.QName; -import jakarta.xml.soap.*; - -public class ServerSOAPHandler5 extends SOAPHandlerBase { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler5"; - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private final QName FAULTCODE = new QName(NAMESPACEURI, "ItsASoapFault", - "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private jakarta.xml.soap.SOAPFault sf; - - public ServerSOAPHandler5() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - String direction = Handler_Util.getDirection(context); - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - HandlerTracker.reportHandleMessage(this, direction); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerSOAPInboundHandleFaultFalseTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerSOAPHandler5.handleMessage throws SOAPFaultException for ServerSOAPInboundHandleFaultFalseTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an outbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ServerSOAPInboundHandleFaultThrowsRuntimeExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerSOAPHandler6.handleMessage throws SOAPFaultException for ServerSOAPInboundHandleFaultThrowsRuntimeExceptionTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in ServerSOAPHandler6.handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } else if (Handler_Util.checkForMsg(this, context, - "ServerSOAPInboundHandleFaultThrowsSOAPFaultExceptionTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerSOAPHandler6.handleMessage throws SOAPFaultException for ServerSOAPInboundHandleFaultThrowsSOAPFaultExceptionTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - - } - } - - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler6.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler6.java deleted file mode 100644 index 8fe928f535..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/ServerSOAPHandler6.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice; - -import com.sun.ts.lib.util.*; -import com.sun.ts.tests.jaxws.common.*; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.soap.SOAPFaultException; -import javax.xml.namespace.QName; -import jakarta.xml.soap.*; - -public class ServerSOAPHandler6 extends SOAPHandlerBase { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler6"; - - private static final String NAMESPACEURI = "http://dlhandlerservice.org/wsdl"; - - private final QName FAULTCODE = new QName(NAMESPACEURI, "ItsASoapFault", - "tns"); - - private static final String FAULTACTOR = "faultActor"; - - private Name name = null; - - private jakarta.xml.soap.SOAPFault sf; - - public ServerSOAPHandler6() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + this + ":handleMessage"); - TestUtil.logTrace("in " + this + ":handleMessage"); - Handler_Util.setTraceFlag( - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - Handler_Util.initTestUtil(this, - Handler_Util.getValueFromMsg(this, context, "harnessloghost"), - Handler_Util.getValueFromMsg(this, context, "harnesslogport"), - Handler_Util.getValueFromMsg(this, context, "harnesslogtraceflag")); - - String direction = Handler_Util.getDirection(context); - if (!Handler_Util.checkForMsg(this, context, "GetTrackerData")) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - if (direction.equals(Constants.INBOUND)) { - if (Handler_Util.checkForMsg(this, context, - "ServerSOAPInboundHandlerThrowsSOAPFaultToClientHandlersTest")) { - HandlerTracker.reportComment(this, - "Throwing an inbound SOAPFaultException"); - String faultString = "ServerSOAPHandler6.handleMessage throws SOAPFaultException for ServerSOAPInboundHandlerThrowsSOAPFaultToClientHandlersTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - } else { - if (Handler_Util.checkForMsg(this, context, - "ServerSOAPOutboundHandlerThrowsSOAPFaultToClientHandlersTest")) { - HandlerTracker.reportComment(this, - "Throwing an outbound SOAPFaultException"); - String faultString = "ServerSOAPHandler6.handleMessage throws SOAPFaultException for ServerSOAPOutboundHandlerThrowsSOAPFaultToClientHandlersTest"; - try { - name = SOAPFactory.newInstance().createName("somefaultentry"); - sf = JAXWS_Util.createSOAPFault("soap11", FAULTCODE, FAULTACTOR, - faultString, name); - } catch (Exception e) { - HandlerTracker.reportThrowable(this, new Exception( - "Unexpected error occurred in handleMessage for an inbound message" - + e)); - } - throw new SOAPFaultException(sf); - } - - } - } - System.out.println("exiting " + this + ":handleMessage"); - TestUtil.logTrace("exiting " + this + ":handleMessage"); - return true; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/build.xml deleted file mode 100644 index aff942d771..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/build.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/contentRoot/attach.text b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/contentRoot/attach.text deleted file mode 100644 index cdc8a13be3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/contentRoot/attach.text +++ /dev/null @@ -1 +0,0 @@ -This is a plain text attachment. diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/customfile.xml deleted file mode 100644 index ffc7fc26fd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/customfile.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - true - - - - - - - - - - - - - - - - ServerLogicalHandler5 - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ServerLogicalHandler5 - - - ServerSOAPHandler5 - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ServerSOAPHandler5 - - - - - - - - - - - ns1:HelloPort - - ServerSOAPHandler1 - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ServerSOAPHandler1 - - - ServerLogicalHandler1 - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ServerLogicalHandler1 - - - ServerSOAPHandler2 - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ServerSOAPHandler2 - - - ServerLogicalHandler2 - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ServerLogicalHandler2 - - - ServerSOAPHandler3 - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ServerSOAPHandler3 - - - ServerLogicalHandler3 - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ServerLogicalHandler3 - - - - - - - - ns1:Hello2Port - - ServerLogicalHandler4 - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ServerLogicalHandler4 - - - - - - - - ns1:Hello3Port - - ServerSOAPHandler4 - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ServerSOAPHandler4 - - - - - - - - ##SOAP11_HTTP - - ServerSOAPHandler6 - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ServerSOAPHandler6 - - - ServerLogicalHandler6 - com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.ServerLogicalHandler6 - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/jakartaEE.tokens deleted file mode 100644 index 29d3e6f05d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/jakartaEE.tokens +++ /dev/null @@ -1,27 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsdlhandlerservice") -SERVICE=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.DLHandlerService -SEI=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.GetTrackerData -SEI2=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.Hello3 -SEI3=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.Hello2 -SEI4=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.Hello -IMPL=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.GetTrackerDataImpl -IMPL2=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.Hello3Impl -IMPL3=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.Hello2Impl -IMPL4=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.HelloImpl -NAMESPACEURI=http://dlhandlerservice.org/wsdl -PORT=GetTrackerDataPort -PORT2=Hello3Port -PORT3=Hello2Port -PORT4=HelloPort -SERVLET=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.GetTrackerDataImpl -SERVLET2=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.Hello3Impl -SERVLET3=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.Hello2Impl -SERVLET4=com.sun.ts.tests.jaxws.sharedwebservices.dlhandlerservice.HelloImpl -URLALIAS=/jaxws/GetTrackerData -URLALIAS2=/jaxws/Hello3 -URLALIAS3=/jaxws/Hello2 -URLALIAS4=/jaxws/Hello -WEBSERVICEDESCRIPTION=DLHandlerService -SERVICEREFNAMEWSSERVLET=service/wsdlhandlerservice -SERVICEREFNAMEWSEJB=service/wsdlhandlerservice -SERVICEREFNAMEWSAPPCLIENT=service/wsdlhandlerservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/jakartaEE.web.xml deleted file mode 100644 index f1402b0304..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/jakartaEE.web.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - @WEBSERVICEDESCRIPTION@App - - @SERVLET@ - @IMPL@ - 0 - - - @SERVLET2@ - @IMPL2@ - 0 - - - @SERVLET3@ - @IMPL3@ - 0 - - - @SERVLET4@ - @IMPL4@ - 0 - - - @SERVLET@ - @URLALIAS@ - - - @SERVLET2@ - @URLALIAS2@ - - - @SERVLET3@ - @URLALIAS3@ - - - @SERVLET4@ - @URLALIAS4@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/standalone-sun-jaxws.xml deleted file mode 100644 index b51c28bd8e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/standalone-sun-jaxws.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/standalone.web.xml deleted file mode 100644 index 8a16e950f9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhandlerservice/standalone.web.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - WSDLHandlerServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -GetTrackerData -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello3 -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello2 -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -GetTrackerData -/jaxws/GetTrackerData - - -Hello3 -/jaxws/Hello3 - - -Hello2 -/jaxws/Hello2 - - -Hello -/jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/Hello2Impl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/Hello2Impl.java deleted file mode 100644 index acc3d7237e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/Hello2Impl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice; - -import jakarta.xml.ws.*; -import jakarta.xml.soap.*; - -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -/* - * Provider - req/res a SOAPMessage in Message Mode - */ -@WebServiceProvider(serviceName = "HelloService", portName = "Hello2Port", targetNamespace = "http://helloservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSDLHelloProviderService.wsdl") -@BindingType(value = jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING) -@ServiceMode(value = jakarta.xml.ws.Service.Mode.MESSAGE) -public class Hello2Impl implements Provider { - - public SOAPMessage invoke(SOAPMessage req) { - System.out.println("**** Received in Provider Impl Hello2Impl ******"); - System.out.println("-> SOAPMessage received=" + req); - JAXWS_Util.dumpSOAPMessage(req, false); - SOAPMessage respMsg = null; - try { - - String helloResp = "responseBean"; - - respMsg = JAXWS_Util.makeSOAPMessage(helloResp); - respMsg.saveChanges(); - } catch (Exception e) { - System.out.println("Exception: occurred " + e); - } - System.out.println("-> SOAPMessage being returned=" + respMsg); - JAXWS_Util.dumpSOAPMessage(respMsg, false); - - return respMsg; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/Hello3Impl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/Hello3Impl.java deleted file mode 100644 index a15c50d59b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/Hello3Impl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Hello3Impl.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice; - -import jakarta.xml.ws.*; - -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import javax.xml.transform.Source; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.sax.SAXSource; -import javax.xml.transform.stream.StreamSource; - -/* - * Provider - req/res a Source in Payload Mode - */ -@WebServiceProvider(serviceName = "HelloService", portName = "Hello3Port", targetNamespace = "http://helloservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSDLHelloProviderService.wsdl") -@BindingType(value = jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING) -@ServiceMode(value = jakarta.xml.ws.Service.Mode.PAYLOAD) -public class Hello3Impl implements Provider { - - String helloResp = "response"; - - public Source invoke(Source req) { - System.out.println("**** Received in Provider Impl Hello3Impl ******"); - String str = null; - try { - str = JAXWS_Util.getSourceAsString(req); - System.out.println("-> Source received=" + str); - } catch (Exception e) { - e.printStackTrace(); - } - if (str.indexOf("sendEmptyStreamSource") >= 0) - return new StreamSource(); - else if (str.indexOf("sendEmptyDOMSource") >= 0) - return new DOMSource(); - else if (str.indexOf("sendEmptySAXSource") >= 0) - return new SAXSource(); - else - return JAXWS_Util.makeSource(helloResp, "StreamSource"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/HelloImpl.java deleted file mode 100644 index ac3fa6822e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/HelloImpl.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice; - -import jakarta.xml.ws.*; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; -import java.io.StringReader; -import java.io.StringWriter; - -import jakarta.xml.bind.Marshaller; - -/* - * Provider - req/res a Source in Payload Mode (use of JAXB objects) - */ -@WebServiceProvider(serviceName = "HelloService", portName = "HelloPort", targetNamespace = "http://helloservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSDLHelloProviderService.wsdl") -@BindingType(value = jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING) -@ServiceMode(value = jakarta.xml.ws.Service.Mode.PAYLOAD) -public class HelloImpl implements Provider { - private static final jakarta.xml.bind.JAXBContext jaxbContext = createJAXBContext(); - - public jakarta.xml.bind.JAXBContext getJAXBContext() { - return jaxbContext; - } - - private static jakarta.xml.bind.JAXBContext createJAXBContext() { - try { - return jakarta.xml.bind.JAXBContext.newInstance( - com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice.ObjectFactory.class); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - public Source invoke(Source req) { - System.out.println("**** in Provider Impl invoke HelloImpl ******"); - HelloRequest helloRequest = null; - HelloOneWayRequest helloOneWayRequest = null; - String arg = null; - boolean oneWay = false; - try { - Object request = recvBean(req); - if (request instanceof HelloRequest) { - helloRequest = (HelloRequest) request; - arg = helloRequest.getArgument(); - oneWay = false; - } else if (request instanceof HelloOneWayRequest) { - helloOneWayRequest = (HelloOneWayRequest) request; - arg = helloOneWayRequest.getArgument(); - oneWay = true; - } - System.out.println("arg=" + arg); - if (arg == null) - throw new WebServiceException("arg is null"); - if (!oneWay) { - if (arg.equals("sendBean")) - return sendBean(); - else if (arg.equals("sendSource")) - return sendSource(); - else if (arg.equals("sendEmptyStreamSource")) - return sendEmptyStreamSource(); - else - throw new WebServiceException("Unexpected Argument: " + arg); - } else { - if (arg.equals("sendEmptyStreamSource")) - return null; - else - throw new WebServiceException("Unexpected Argument: " + arg); - } - } catch (Exception e) { - e.printStackTrace(); - throw new WebServiceException("Provider endpoint failed", e); - } - } - - private Source sendSource() { - System.out.println("*** sendSource ***"); - String body = "sendSource"; - Source source = new StreamSource(new StringReader(body)); - return source; - } - - private Source sendEmptyStreamSource() { - System.out.println("*** sendEmptyStreamSource ***"); - Source source = new StreamSource(); - return source; - } - - private Object recvBean(Source req) { - System.out.println("*** recvBean ***"); - Object request = null; - try { - request = jaxbContext.createUnmarshaller().unmarshal(req); - // System.out.println("argument="+helloReq.getArgument()); - } catch (Exception e) { - System.out.println("Received an exception while parsing the source"); - e.printStackTrace(); - } - return request; - } - - private Source sendBean() { - System.out.println("*** sendBean ***"); - StreamSource ss = null; - HelloResponse helloRes = new HelloResponse(); - helloRes.setArgument("sendBean"); - try { - Marshaller m = jaxbContext.createMarshaller(); - m.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE); - StringWriter writer = new StringWriter(); - m.marshal(helloRes, writer); - StringReader reader = new StringReader(writer.toString()); - ss = new StreamSource(reader); - } catch (jakarta.xml.bind.JAXBException jbe) { - System.out.println("Catch Exception while Marshalling bean:"); - jbe.printStackTrace(); - } - return ss; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/WSDLHelloProviderService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/WSDLHelloProviderService.wsdl deleted file mode 100644 index b5c68b7fd4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/WSDLHelloProviderService.wsdl +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/build.xml deleted file mode 100644 index 62a4f898e3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/customfile.xml deleted file mode 100644 index 7808e33896..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/customfile.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/jakartaEE.tokens deleted file mode 100644 index fbaff33596..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/jakartaEE.tokens +++ /dev/null @@ -1,22 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhelloproviderservice") -SERVICE=com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice.HelloService -IMPL=com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice.HelloImpl -IMPL2=com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice.Hello2Impl -IMPL3=com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice.Hello3Impl -SEI=com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice.Hello -SEI2=com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice.Hello2 -SEI3=com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice.Hello3 -NAMESPACEURI=http://helloservice.org/wsdl -PORT=HelloPort -PORT2=Hello2Port -PORT3=Hello3Port -URLALIAS=/jaxws/Hello -URLALIAS2=/jaxws/Hello2 -URLALIAS3=/jaxws/Hello3 -SERVLETNAME=com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice.HelloImpl -SERVLETNAME2=com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice.Hello2Impl -SERVLETNAME3=com.sun.ts.tests.jaxws.sharedwebservices.dlhelloproviderservice.Hello3Impl -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloproviderservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloproviderservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloproviderservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/jakartaEE.web.xml deleted file mode 100644 index f301dadfb8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/jakartaEE.web.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME3@ - @IMPL3@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - @SERVLETNAME3@ - @URLALIAS3@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/standalone-sun-jaxws.xml deleted file mode 100644 index b8ee12da5b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/standalone-sun-jaxws.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/standalone.web.xml deleted file mode 100644 index 85abcc5653..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/dlhelloproviderservice/standalone.web.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - WSDLHelloProviderServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - Hello - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - Hello2 - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - Hello3 - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - Hello - /jaxws/Hello - - - Hello2 - /jaxws/Hello2 - - - Hello3 - /jaxws/Hello3 - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/Hello2Impl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/Hello2Impl.java deleted file mode 100644 index 241b81063f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/Hello2Impl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Hello2Impl.java 51047 2006-01-17 19:39:40Z adf $ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.MTOM; - -@WebService(portName = "Hello2Port", serviceName = "HelloService", targetNamespace = "http://helloservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSDLHelloService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.Hello2") -@Addressing -@MTOM -public class Hello2Impl implements Hello2 { - private static final ObjectFactory of = new ObjectFactory(); - - public HelloResponse hello(HelloRequest req) { - System.out.println("Hello2Impl received: " + req.getArgument()); - HelloResponse resp = null; - resp = of.createHelloResponse(); - resp.setArgument(req.getArgument()); - return resp; - } - - public void helloOneWay(HelloOneWayRequest req) { - System.out.println("Hello2Impl received: " + req.getArgument()); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/Hello3Impl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/Hello3Impl.java deleted file mode 100644 index 5f00a8a4ea..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/Hello3Impl.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Hello3Impl.java 52501 2009-01-24 02:29:49Z adf $ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.*; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; - -@WebService(portName = "Hello3Port", targetNamespace = "http://helloservice.org/wsdl", serviceName = "HelloService", wsdlLocation = "WEB-INF/wsdl/WSDLHelloService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.Hello3") - -public class Hello3Impl implements Hello3 { - - public Hello3Response hello(Hello3Request hreq) { - - TestUtil.logTrace("*** in Hello3Impl ***"); - String testName = hreq.getTestname(); - TestUtil.logTrace("*** testName = " + testName + " ***"); - String argument = hreq.getArgument(); - TestUtil.logTrace("*** argument = " + argument + " ***"); - - argument += ":Hello3Impl"; - Hello3Response hres = new Hello3Response(); - hres.setTestname(testName); - hres.setArgument(argument); - return hres; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/HelloImpl.java deleted file mode 100644 index 09ee56969e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/HelloImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "HelloService", targetNamespace = "http://helloservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSDLHelloService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.Hello") - -public class HelloImpl implements Hello { - private static final ObjectFactory of = new ObjectFactory(); - - public HelloResponse hello(HelloRequest req) { - System.out.println("HelloImpl received: " + req.getArgument()); - HelloResponse resp = null; - resp = of.createHelloResponse(); - resp.setArgument(req.getArgument()); - return resp; - } - - public void helloOneWay(HelloOneWayRequest req) { - System.out.println("HelloImpl received: " + req.getArgument()); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/ServerLogicalHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/ServerLogicalHandler.java deleted file mode 100644 index 6988c3fc5f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/ServerLogicalHandler.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerLogicalHandler.java 52501 2009-01-24 02:29:49Z adf $ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.LogicalMessage; - -import jakarta.xml.ws.WebServiceException; - -import javax.xml.transform.Source; -import javax.xml.transform.dom.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Constants; - -import org.w3c.dom.Node; - -public class ServerLogicalHandler - implements jakarta.xml.ws.handler.LogicalHandler { - - private static final jakarta.xml.bind.JAXBContext jaxbContext = createJAXBContext(); - - private static jakarta.xml.bind.JAXBContext createJAXBContext() { - try { - return jakarta.xml.bind.JAXBContext.newInstance( - com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.ObjectFactory.class); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - public boolean handleMessage(LogicalMessageContext context) { - - System.out.println("in " + this + ":handleMessage"); - String direction = null; - if (Handler_Util.getDirection(context).equals(Constants.INBOUND)) { - direction = Constants.INBOUND; - } else { - direction = Constants.OUTBOUND; - } - System.out.println("direction=" + direction); - - LogicalMessage lm = context.getMessage(); - if (lm != null) { - if (Handler_Util.checkForMsg(this, context, "setgetPayloadSourceTest")) { - Source source = lm.getPayload(); - if (source != null) { - try { - DOMResult dr = JAXWS_Util.getSourceAsDOMResult(source); - System.out.println("msg=" + JAXWS_Util.getDOMResultAsString(dr)); - - Node documentNode = dr.getNode(); - Node requestResponseNode = documentNode.getFirstChild(); - - System.out - .println("localname=" + requestResponseNode.getLocalName()); - if ((!requestResponseNode.getLocalName() - .startsWith("Hello3Request")) - && (!requestResponseNode.getLocalName() - .startsWith("Hello3Response"))) { - - System.out.println("The expected messages were not received"); - return true; - } - // The first child is the test name the second(last) is the argument - Node textNode = requestResponseNode.getLastChild().getFirstChild(); - - String item = textNode.getNodeValue(); - System.out.println("orig value = " + item); - - textNode.setNodeValue(item + ":" + direction - + "ServerLogicalHandler_getsetPayloadSource"); - System.out.println("new value = " + textNode.getNodeValue()); - source = new DOMSource(documentNode); - lm.setPayload(source); - } catch (Exception e) { - e.printStackTrace(); - } - } else { - System.out.println("LogicalMessage.getPayload returned null"); - } - } else if (Handler_Util.checkForMsg(this, context, - "setgetPayloadJAXBContextTest")) { - try { - if (direction.equals(Constants.INBOUND)) { - Hello3Request hreq = (Hello3Request) lm.getPayload(jaxbContext); - String item = hreq.getArgument(); - item += ":" + direction - + "ServerLogicalHandler_getsetPayloadJAXBContext"; - hreq.setArgument(item); - lm.setPayload(hreq, jaxbContext); - } else { - Hello3Response hresp = (Hello3Response) lm.getPayload(jaxbContext); - String item = hresp.getArgument(); - item += ":" + direction - + "ServerLogicalHandler_getsetPayloadJAXBContext"; - hresp.setArgument(item); - lm.setPayload(hresp, jaxbContext); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } else { - System.out.println("LogicalMessageContext.getMessage() returned null"); - } - return true; - } - - public void close(MessageContext context) { - System.out.println("in " + this + ":close"); - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + this + ":handleFault"); - return true; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/WSDLHelloService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/WSDLHelloService.wsdl deleted file mode 100644 index cbb8a213a1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/WSDLHelloService.wsdl +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/build.xml deleted file mode 100644 index ebd2a73db2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/customfile.xml deleted file mode 100644 index 9db4df701b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/customfile.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - ns1:Hello3Port - - ServerLogicalHandler - com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.ServerLogicalHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/jakartaEE.tokens deleted file mode 100644 index 3ce78ff100..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/jakartaEE.tokens +++ /dev/null @@ -1,22 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlhelloservice") -SERVICE=com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.HelloService -IMPL=com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.HelloImpl -IMPL2=com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.Hello2Impl -IMPL3=com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.Hello3Impl -SEI=com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.Hello -SEI2=com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.Hello2 -SEI3=com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.Hello3 -NAMESPACEURI=http://helloservice.org/wsdl -PORT=HelloPort -PORT2=Hello2Port -PORT3=Hello3Port -URLALIAS=/jaxws/Hello -URLALIAS2=/jaxws/Hello2 -URLALIAS3=/jaxws/Hello3 -WEBSERVICEDESCRIPTION=HelloService -SERVLETNAME=com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.HelloImpl -SERVLETNAME2=com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.Hello2Impl -SERVLETNAME3=com.sun.ts.tests.jaxws.sharedwebservices.doclithelloservice.Hello3Impl -SERVICEREFNAMEWSSERVLET=service/wsw2jdlhelloservice -SERVICEREFNAMEWSEJB=service/wsw2jdlhelloservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlhelloservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/jakartaEE.web.xml deleted file mode 100644 index f301dadfb8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/jakartaEE.web.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME3@ - @IMPL3@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - @SERVLETNAME3@ - @URLALIAS3@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/standalone-sun-jaxws.xml deleted file mode 100644 index 484277fc78..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/standalone-sun-jaxws.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/standalone.web.xml deleted file mode 100644 index 9382e116df..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/doclithelloservice/standalone.web.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - -WSDLHelloServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello2 -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello3 -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -/jaxws/Hello - - -Hello2 -/jaxws/Hello2 - - -Hello3 -/jaxws/Hello3 - - -54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/HelloImpl.java deleted file mode 100644 index 927caa473d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/HelloImpl.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.hellosecureservice; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import java.security.Principal; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; -import jakarta.annotation.Resource; - -@WebService(portName = "HelloPort", serviceName = "HelloService", targetNamespace = "http://helloservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSHelloSecureService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.hellosecureservice.Hello") - -public class HelloImpl implements Hello { - - @Resource - protected WebServiceContext wsContext; - - public String hello(String s) { - return "Hello, " + s + "!"; - } - - public boolean getMessageContextTest() { - if (wsContext == null) - return false; - else { - MessageContext v = wsContext.getMessageContext(); - System.out.println("MessageContext=" + v); - return true; - } - } - - public boolean getUserPrincipalTest() { - if (wsContext == null) - return false; - else { - java.security.Principal v = wsContext.getUserPrincipal(); - System.out.println("UserPrincipal=" + v); - return true; - } - } - - public boolean isUserInRoleTest(String s) { - if (wsContext == null) - return false; - else - return wsContext.isUserInRole(s); - } - - public boolean getEndpointReferenceTest() { - boolean pass = true; - if (wsContext == null) { - pass = false; - } else { - EndpointReference epr = wsContext.getEndpointReference(); - TestUtil.logMsg("EndpointReference object=" + epr); - if (epr == null) { - TestUtil.logErr("getEndpointReference() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getEndpointReference() returned EndpointReference object: " + epr); - } - if (epr instanceof W3CEndpointReference) { - TestUtil.logMsg("epr instanceof W3CEndpointReference"); - } else { - TestUtil.logErr("epr not instanceof W3CEndpointReference"); - pass = false; - } - } - if (!pass) { - return false; - } else { - return true; - } - } - - /* - * T getEndpointReference(java.lang.Class - * clazz, org.w3c.dom.Element... referenceParameters) - */ - public boolean getEndpointReference2Test() { - boolean pass = true; - if (wsContext == null) { - pass = false; - } else { - // this is what the params needs to be java.lang.Class clazz, - // org.w3c.dom.Element... referenceParameters - // T epr= - // wsContext.getEndpointReference(W3CEndpointReference.class); - EndpointReference epr = wsContext - .getEndpointReference(W3CEndpointReference.class); - TestUtil.logMsg("EndpointReference object=" + epr); - if (epr == null) { - TestUtil.logErr("getEndpointReference() returned null"); - pass = false; - } else { - TestUtil.logMsg( - "getEndpointReference() returned EndpointReference object: " + epr); - } - if (epr instanceof W3CEndpointReference) { - TestUtil.logMsg("epr instanceof W3CEndpointReference"); - } else { - TestUtil.logErr("epr not instanceof W3CEndpointReference"); - pass = false; - } - } - if (!pass) { - return false; - } else { - return true; - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/WSHelloSecureService.ear.sun-application.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/WSHelloSecureService.ear.sun-application.xml deleted file mode 100644 index 5f63917c85..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/WSHelloSecureService.ear.sun-application.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - WSHelloSecureService_web.war - WSHelloSecureService_web - - 0 - - Administrator - j2ee - - - Manager - javajoe - - - Employee - javajoe - j2ee - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/WSHelloSecureService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/WSHelloSecureService.wsdl deleted file mode 100644 index 733dfefaf2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/WSHelloSecureService.wsdl +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/WSHelloSecureService_web.war.sun-web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/WSHelloSecureService_web.war.sun-web.xml deleted file mode 100644 index 6923b281be..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/WSHelloSecureService_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - HelloService - http://webServerHost.1:webServerPort.1/WSHelloSecureService_web/jaxws/Hello?WSDL - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/build.xml deleted file mode 100644 index b3353ca7fe..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/build.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/customfile.xml deleted file mode 100644 index 28b6735d60..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/jakartaEE.tokens deleted file mode 100644 index 7ffb5c3400..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jhellosecureservice") -SERVICE=com.sun.ts.tests.jaxws.sharedwebservices.hellosecureservice.HelloService -IMPL=com.sun.ts.tests.jaxws.sharedwebservices.hellosecureservice.HelloImpl -SEI=com.sun.ts.tests.jaxws.sharedwebservices.hellosecureservice.Hello -NAMESPACEURI=http://helloservice.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVLETNAME=com.sun.ts.tests.jaxws.sharedwebservices.hellosecureservice.HelloImpl -SERVICEREFNAMEWSSERVLET=service/wsw2jhellosecureservice -SERVICEREFNAMEWSEJB=service/wsw2jhellosecureservice -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jhellosecureservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/jakartaEE.web.xml deleted file mode 100644 index 6e3fb919ff..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/jakartaEE.web.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - ADM - Administrator - - - MGR - Manager - - - EMP - Employee - - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - - WSHelloSecureService - /jaxws/* - POST - - - Administrator - - - NONE - - - - BASIC - default - - - Administrator - - - Manager - - - Employee - - - Guest - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/standalone-sun-jaxws.xml deleted file mode 100644 index 8e4b4efc7a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/standalone.sun-web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/standalone.sun-web.xml deleted file mode 100644 index d2e58295c3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/standalone.sun-web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Administrator - j2ee - - - Manager - javajoe - - - Employee - javajoe - j2ee - - - Guest - javajoe - j2ee - guest - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/standalone.web.xml deleted file mode 100644 index f25b2a7a10..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/hellosecureservice/standalone.web.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - WSHelloSecureServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -/jaxws/Hello - - - 54 - - - - WSHelloSecureService - /jaxws/* - POST - - - Administrator - - - NONE - - - - BASIC - default - - - Administrator - - - Manager - - - Employee - - - Guest - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/GetTrackerDataImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/GetTrackerDataImpl.java deleted file mode 100644 index 39b82c0914..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/GetTrackerDataImpl.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "GetTrackerDataPort", targetNamespace = "http://rlhandlerservice.org/wsdl", serviceName = "RLHandlerService", wsdlLocation = "WEB-INF/wsdl/RLHandlerService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.GetTrackerData") - -public class GetTrackerDataImpl implements GetTrackerData { - public GetTrackerDataResult getTrackerData(GetTrackerDataAction action) { - - Handler_Util.setTraceFlag(action.getHarnesslogtraceflag()); - - Handler_Util.initTestUtil("GetTrackerDataImpl", action.getHarnessloghost(), - action.getHarnesslogport(), action.getHarnesslogtraceflag()); - - TestUtil.logTrace("*** in GetTrackerDataImpl ***"); - String[] messages = null; - - String theAction = action.getAction(); - TestUtil.logTrace("*** action = " + theAction + " ***"); - - if (theAction.equals("getArrayMessages1")) { - messages = HandlerTracker.getArrayMessages1(); - } else if (theAction.equals("getArrayMessages2")) { - messages = HandlerTracker.getArrayMessages2(); - } else if (theAction.equals("getArrayMessages3")) { - messages = HandlerTracker.getArrayMessages3(); - } else if (theAction.equals("getArrayMessages4")) { - messages = HandlerTracker.getArrayMessages4(); - } else if (theAction.equals("getArrayThrowables")) { - messages = HandlerTracker.getArrayThrowables(); - } else if (theAction.equals("purge")) { - HandlerTracker.purge(); - String m[] = { "purge complete" }; - messages = m; - } else { - String[] m = { - "Did not get one of the excepted GetTrackerData action messages, the action message received was:" - + theAction }; - messages = m; - } - - GetTrackerDataResult r = null; - try { - TestUtil.logTrace("The endpoint is sending back the following data:"); - TestUtil.logTrace("action=" + action.getAction()); - TestUtil.logTrace("harnessloghost=" + action.getHarnessloghost()); - TestUtil.logTrace("harnesslogport=" + action.getHarnesslogport()); - TestUtil - .logTrace("harnesslogtraceflag=" + action.getHarnesslogtraceflag()); - - r = new GetTrackerDataResult(); - for (int i = 0; i < messages.length; i++) { - r.getResult().add(messages[i]); - TestUtil.logTrace("message[" + i + "]=" + messages[i]); - } - - r.setHarnessloghost(action.getHarnessloghost()); - r.setHarnesslogport(action.getHarnesslogport()); - r.setHarnesslogtraceflag(action.getHarnesslogtraceflag()); - } catch (Exception e) { - throw new WebServiceException(e.getMessage(), e); - } - return r; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/HelloImpl.java deleted file mode 100644 index e46e17eeb1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/HelloImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)HelloImpl.java 1.16 05/09/14 - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.*; - -import jakarta.xml.ws.*; - -import jakarta.xml.ws.WebServiceException; - -// Service Implementation Class - as outlined in JAX-WS Specification - -import jakarta.jws.WebService; -import jakarta.annotation.Resource; - -@WebService(portName = "HelloPort", targetNamespace = "http://rlhandlerservice.org/wsdl", serviceName = "RLHandlerService", wsdlLocation = "WEB-INF/wsdl/RLHandlerService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.Hello") - -public class HelloImpl implements Hello { - - @Resource - WebServiceContext wscontext; - - public com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.MyResultType doHandlerTest1( - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.MyActionType action) { - - Handler_Util.setTraceFlag(action.getHarnesslogtraceflag()); - - Handler_Util.initTestUtil("HelloImpl", action.getHarnessloghost(), - action.getHarnesslogport(), action.getHarnesslogtraceflag()); - - TestUtil.logTrace("*** in HelloImpl:doHandlerTest1 ***"); - String theAction = action.getAction(); - TestUtil.logTrace("*** action = " + theAction + " ***"); - String testType = action.getTestType(); - TestUtil.logTrace("*** testType = " + testType + " ***"); - TestUtil.logTrace("*** wscontext = " + wscontext + " ***"); - - String errors = ""; - - MyResultType r = null; - try { - TestUtil.logTrace("The endpoint is sending back the following data:"); - TestUtil.logTrace("action=" + action.getAction()); - TestUtil.logTrace("getTestType=" + action.getTestType()); - TestUtil.logTrace("harnessloghost=" + action.getHarnessloghost()); - TestUtil.logTrace("harnesslogport=" + action.getHarnesslogport()); - TestUtil - .logTrace("harnesslogtraceflag=" + action.getHarnesslogtraceflag()); - TestUtil.logTrace("errors:" + errors); - - r = new MyResultType(); - r.setAction(action.getAction()); - r.setTestType(action.getTestType()); - r.setErrors(errors); - r.setHarnessloghost(action.getHarnessloghost()); - r.setHarnesslogport(action.getHarnesslogport()); - r.setHarnesslogtraceflag(action.getHarnesslogtraceflag()); - } catch (Exception e) { - throw new WebServiceException(e.getMessage(), e); - } - return r; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/RLHandlerService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/RLHandlerService.wsdl deleted file mode 100644 index 3f35cf74e5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/RLHandlerService.wsdl +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler1.java deleted file mode 100644 index ce35e0c062..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ServerLogicalHandler1 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler1"; - - public ServerLogicalHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler2.java deleted file mode 100644 index 937631d172..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler2.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ServerLogicalHandler2 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler2"; - - public ServerLogicalHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler3.java deleted file mode 100644 index bca2068f7d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ServerLogicalHandler3 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler3"; - - public ServerLogicalHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler5.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler5.java deleted file mode 100644 index 795f24979d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler5.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -import javax.xml.namespace.QName; - -public class ServerLogicalHandler5 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler5"; - - private static final String NAMESPACEURI = "http://rlhandlerservice.org/wsdl"; - - private final QName FAULTCODE = new QName(NAMESPACEURI, "ItsASoapFault", - "tns"); - - private static final String FAULTACTOR = "faultActor"; - - public ServerLogicalHandler5() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler6.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler6.java deleted file mode 100644 index 1aae0376a9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerLogicalHandler6.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ServerLogicalHandler6 extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerLogicalHandler6"; - - public ServerLogicalHandler6() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerPNPSNBCLogicalHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerPNPSNBCLogicalHandler.java deleted file mode 100644 index 09e16ad294..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerPNPSNBCLogicalHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ServerPNPSNBCLogicalHandler extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerPortNamePatternShouldNotBeCalledLogicalHandler"; - - public ServerPNPSNBCLogicalHandler() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerPNPSNBCSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerPNPSNBCSOAPHandler.java deleted file mode 100644 index 1c36c1b6ef..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerPNPSNBCSOAPHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ServerPNPSNBCSOAPHandler extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerPortNamePatternShouldNotBeCalledSOAPHandler"; - - public ServerPNPSNBCSOAPHandler() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSNPSNBCLogicalHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSNPSNBCLogicalHandler.java deleted file mode 100644 index 96b64c5138..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSNPSNBCLogicalHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.LogicalHandlerBase2; - -public class ServerSNPSNBCLogicalHandler extends LogicalHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerServiceNamePatternShouldNotBeCalledLogicalHandler"; - - public ServerSNPSNBCLogicalHandler() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSNPSNBCSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSNPSNBCSOAPHandler.java deleted file mode 100644 index abb5251011..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSNPSNBCSOAPHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ServerSNPSNBCSOAPHandler extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerServiceNamePatternShouldNotBeCalledSOAPHandler"; - - public ServerSNPSNBCSOAPHandler() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler1.java deleted file mode 100644 index 140f1c8d56..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ServerSOAPHandler1 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler1"; - - public ServerSOAPHandler1() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler2.java deleted file mode 100644 index 03254c426e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler2.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ServerSOAPHandler2 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler2"; - - public ServerSOAPHandler2() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler3.java deleted file mode 100644 index fae3c1d6e5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler3.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ServerSOAPHandler3 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler3"; - - public ServerSOAPHandler3() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler5.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler5.java deleted file mode 100644 index 337c731eef..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler5.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ServerSOAPHandler5 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler5"; - - public ServerSOAPHandler5() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler6.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler6.java deleted file mode 100644 index f17c8293aa..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/ServerSOAPHandler6.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice; - -import com.sun.ts.tests.jaxws.common.SOAPHandlerBase2; - -public class ServerSOAPHandler6 extends SOAPHandlerBase2 { - private static final String WHICHHANDLERTYPE = "Server"; - - private static final String HANDLERNAME = "ServerSOAPHandler6"; - - public ServerSOAPHandler6() { - super(); - super.setWhichHandlerType(WHICHHANDLERTYPE); - super.setHandlerName(HANDLERNAME); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/build.xml deleted file mode 100644 index 2f8dfc1824..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/customfile.xml deleted file mode 100644 index 994c2920a4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/customfile.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - true - - - - - - - - - - - - - - - ns1:RLHandlerService - - ServerLogicalHandler5 - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerLogicalHandler5 - - - - - ServerSOAPHandler5 - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerSOAPHandler5 - - - - - - - - foo:RLHandlerService - - ServerSNPSNBCLogicalHandler - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerSNPSNBCLogicalHandler - - - - ns1:ServiceDoesNotExist - - ServerSNPSNBCSOAPHandler - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerSNPSNBCSOAPHandler - - - - - - - - - - - - ns1:HelloPort - - ServerSOAPHandler1 - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerSOAPHandler1 - - - ServerLogicalHandler1 - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerLogicalHandler1 - - - ServerSOAPHandler2 - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerSOAPHandler2 - - - ServerLogicalHandler2 - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerLogicalHandler2 - - - ServerSOAPHandler3 - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerSOAPHandler3 - - - ServerLogicalHandler3 - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerLogicalHandler3 - - - - - - - - foo:HelloPort - - ServerPNPSNBCLogicalHandler - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerPNPSNBCLogicalHandler - - - - ns1:PortDoesNotExist - - ServerPNPSNBCSOAPHandler - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerPNPSNBCSOAPHandler - - - - - - - - ##SOAP11_HTTP - - ServerSOAPHandler6 - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerSOAPHandler6 - - - ServerLogicalHandler6 - com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.ServerLogicalHandler6 - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/jakartaEE.tokens deleted file mode 100644 index 24b081e6be..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsrlhandlerservice") -SERVICE=com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.RLHandlerService -SEI=com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.Hello -SEI2=com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.GetTrackerData -IMPL=com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.HelloImpl -IMPL2=com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.GetTrackerDataImpl -NAMESPACEURI=http://rlhandlerservice.org/wsdl -PORT=HelloPort -PORT2=GetTrackerDataPort -SERVLET=com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.HelloImpl -SERVLET2=com.sun.ts.tests.jaxws.sharedwebservices.rlhandlerservice.GetTrackerDataImpl -URLALIAS=/jaxws/Hello -URLALIAS2=/jaxws/GetTrackerData -WEBSERVICEDESCRIPTION=RLHandlerService -SERVICEREFNAMEWSSERVLET=service/wsrlhandlerservice -SERVICEREFNAMEWSEJB=service/wsrlhandlerservice -SERVICEREFNAMEWSAPPCLIENT=service/wsrlhandlerservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/jakartaEE.web.xml deleted file mode 100644 index e2d83a2db9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @WEBSERVICEDESCRIPTION@App - - @SERVLET@ - @IMPL@ - 0 - - - @SERVLET2@ - @IMPL2@ - 0 - - - @SERVLET@ - @URLALIAS@ - - - @SERVLET2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/standalone-sun-jaxws.xml deleted file mode 100644 index 9cceb6600d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/standalone.web.xml deleted file mode 100644 index 60a909c133..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/rlhandlerservice/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSHandlerServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -GetTrackerData -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -GetTrackerData -/jaxws/GetTrackerData - - -Hello -/jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/HelloImpl.java deleted file mode 100644 index e03ffef177..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/HelloImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.sharedwebservices.xmlbinddlhelloproviderservice; - -import jakarta.xml.ws.*; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; -import java.io.StringReader; - -import jakarta.xml.ws.http.HTTPBinding; - -@WebServiceProvider -@BindingType(value = HTTPBinding.HTTP_BINDING) -@ServiceMode(value = jakarta.xml.ws.Service.Mode.MESSAGE) -public class HelloImpl implements Provider { - private static final jakarta.xml.bind.JAXBContext jaxbContext = createJAXBContext(); - - private static int combo = -1; - - public jakarta.xml.bind.JAXBContext getJAXBContext() { - return jaxbContext; - } - - private static jakarta.xml.bind.JAXBContext createJAXBContext() { - try { - return jakarta.xml.bind.JAXBContext.newInstance( - com.sun.ts.tests.jaxws.sharedwebservices.xmlbinddlhelloproviderservice.ObjectFactory.class); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - public Source invoke(Source source) { - System.out.println("**** Received in Provider Impl ******"); - try { - recvBean(source); - } catch (Exception e) { - e.printStackTrace(); - throw new WebServiceException("Provider endpoint failed", e); - } - return sendSource(); - } - - private Source sendSource() { - System.out.println("*** sendSource ***"); - String body = "foo"; - Source source = new StreamSource(new StringReader(body)); - return source; - } - - private void recvBean(Source req) throws Exception { - System.out.println("*** recvBean ***"); - HelloRequest helloReq = null; - try { - helloReq = (HelloRequest) jaxbContext.createUnmarshaller().unmarshal(req); - System.out.println("argument=" + helloReq.getArgument()); - } catch (Exception e) { - System.out.println("Received an exception while parsing the source"); - e.printStackTrace(); - throw e; - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/WSXMLBindDLHelloProviderService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/WSXMLBindDLHelloProviderService.wsdl deleted file mode 100644 index c2ae5ebdce..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/WSXMLBindDLHelloProviderService.wsdl +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/build.xml deleted file mode 100644 index 830b223b7b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/build.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/customfile.xml deleted file mode 100644 index 9fec00180f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/customfile.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/jakartaEE.tokens deleted file mode 100644 index ead924c046..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsxmlbinddlhelloproviderservice") -SERVICE=com.sun.ts.tests.jaxws.sharedwebservices.xmlbinddlhelloproviderservice.HelloService -IMPL=com.sun.ts.tests.jaxws.sharedwebservices.xmlbinddlhelloproviderservice.HelloImpl -SEI=com.sun.ts.tests.jaxws.sharedwebservices.xmlbinddlhelloproviderservice.Hello -NAMESPACEURI=http://helloservice.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -SERVLETNAME=com.sun.ts.tests.jaxws.sharedwebservices.xmlbinddlhelloproviderservice.HelloImpl -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/wsxmlbinddlhelloproviderservice -SERVICEREFNAMEWSEJB=service/wsxmlbinddlhelloproviderservice -SERVICEREFNAMEWSAPPCLIENT=service/wsxmlbinddlhelloproviderservice diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/standalone-sun-jaxws.xml deleted file mode 100644 index 98de0c947d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/standalone.web.xml deleted file mode 100644 index b979f78666..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/xmlbinddlhelloproviderservice/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSDLHelloProviderServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -/jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/util/PublishEndpoint.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/util/PublishEndpoint.java deleted file mode 100644 index 2a0d353395..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/util/PublishEndpoint.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.util; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.io.*; -import java.net.*; -import java.util.*; - -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import jakarta.xml.ws.Endpoint; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; - -public class PublishEndpoint { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final String BINDINGID_STRING = "http://schemas.xmlsoap.org/wsdl/soap/http"; - - private static TSURL ctsurl = new TSURL(); - - private static String url = null; - - private static String hostname = HOSTNAME; - - private static int portnum = 0; - - private static Properties properties = null; - - private static String contextroot = null; - - private static String datfile = null; - - private static String tshome = null; - - private static File tsHome = null; - - private static String tsjte = null; - - private static String webappdir = null; - - private static File webAppDir = null; - - private static Vector le = new Vector(); - - private static ClassLoader cl = Thread.currentThread() - .getContextClassLoader(); - - public static void main(String[] args) { - int i = 0; - while (i < args.length) { - String arg = args[i++]; - if (i == args.length - 1 && !arg.startsWith("-")) { - System.out.println( - "ERROR: argument found that does not have a option '" + arg + "'"); - getUsage(); - System.exit(1); - } else if (arg.equals("-h")) { - getUsage(); - System.exit(0); - } else if (arg.equals("-tshome")) { - tshome = args[i++]; - tsHome = new File(tshome); - if (tsHome.isDirectory()) { - Properties props = new Properties(); - tsjte = tshome + File.separator + "bin" + File.separator + "ts.jte"; - try { - FileInputStream fis = new FileInputStream(new File(tsjte)); - props.load(fis); - hostname = props.getProperty("webServerHost"); - portnum = Integer.parseInt(props.getProperty("webServerPort")); - try { - TestUtil.init(props); - } catch (Exception e) { - ; - } - } catch (Exception e) { - e.printStackTrace(); - } - - datfile = tshome + File.separator + "bin" + File.separator - + "jaxws-url-props.dat"; - try { - FileInputStream fis = new FileInputStream(new File(datfile)); - properties = new Properties(); - properties.load(fis); - } catch (Exception e) { - e.printStackTrace(); - } - - } else { - System.out.println("ERROR: -tshome did not specify a directory"); - System.exit(1); - } - continue; - } else if (arg.equals("-host")) { - hostname = args[i++]; - continue; - } else if (arg.equals("-port")) { - portnum = Integer.parseInt(args[i++]); - continue; - } else if (arg.equals("-datfile")) { - datfile = args[i++]; - try { - FileInputStream fis = new FileInputStream(new File(datfile)); - properties = new Properties(); - properties.load(fis); - } catch (Exception e) { - e.printStackTrace(); - System.exit(1); - } - continue; - } else if (arg.equals("-webappdir")) { - webappdir = args[i++]; - try { - webAppDir = new File(webappdir); - } catch (Exception e) { - e.printStackTrace(); - System.exit(1); - } - if (!webAppDir.isDirectory()) { - System.out.println("ERROR: -webappdir dir not specify a directory"); - System.exit(1); - } - continue; - } else if (arg.equals("-tsjte")) { - tsjte = args[i++]; - try { - FileInputStream fis = new FileInputStream(new File(tsjte)); - Properties props = new Properties(); - props.load(fis); - TestUtil.init(props); - } catch (Exception e) { - e.printStackTrace(); - System.exit(1); - } - continue; - } else { - System.out.println("ERROR: illegal argument '" + args[i++] + "'"); - getUsage(); - System.exit(1); - } - } - - if (datfile == null) { - System.out.println("ERROR: -datfile was not specified"); - getUsage(); - System.exit(1); - } - if (webappdir == null) { - System.out.println("ERROR: -webappdir was not specified"); - getUsage(); - System.exit(1); - } - if (tsjte == null) { - System.out.println("ERROR: -tsjte was not specified"); - getUsage(); - System.exit(1); - } - - if (portnum == 0) { - int javaseServerPort = JAXWS_Util.getFreePort(); - if (javaseServerPort <= 0) { - TestUtil.logErr("Free port not found."); - } else { - portnum = javaseServerPort; - } - } - - String[] dirListing = webAppDir.list(JarFilter.getInstance()); - for (int k = 0; k < dirListing.length; k++) { - // System.out.println("Working on archive -> "+dirListing[k]); - - contextroot = dirListing[k].substring(0, dirListing[k].indexOf(".")); - - String datfileKey = properties.getProperty(contextroot); - if ((datfileKey == null) || (datfileKey.equals(""))) { - System.out.println("ERROR: Could not find the key for the '" - + contextroot + "' in the dat file"); - System.out.println("so this webapp will not be published"); - continue; - } - boolean found = true; - int j = 1; - while (found) { - String implProp = datfileKey + ".impl." + j; - String impl = properties.getProperty(implProp); - if (((impl == null) || (impl.equals(""))) && (j == 1)) { - System.out.println( - "ERROR: Could not find the following implementation prop '" - + implProp + "'"); - System.out - .println("in the dat file, so this webapp will not be published"); - break; - } else if (impl == null) { - found = false; - } else { - String endpointurl = properties - .getProperty(datfileKey + ".endpoint." + j); - // System.out.println("impl="+impl); - // System.out.println("PROTOCOL="+PROTOCOL); - // System.out.println("hostname="+hostname); - // System.out.println("portnum="+portnum); - // System.out.println("endpointurl="+endpointurl); - - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, endpointurl); - Endpoint endpoint = null; - try { - Class c = Class.forName(impl); - Object o = c.newInstance(); - endpoint = Endpoint.create(o); - - List listMetaData = new ArrayList(); - boolean foundMetaData = true; - int jj = 1; - while (foundMetaData) { - String metadataProp = datfileKey + ".metadata." + jj; - String metadata = properties.getProperty(metadataProp); - if (metadata == null) { - foundMetaData = false; - } else { - URL url = cl.getResource(metadata); - if (url != null) { - listMetaData.add( - new StreamSource(url.openStream(), url.toExternalForm())); - } - } - jj++; - } - if (listMetaData != null) { - if (listMetaData.size() > 0) { - endpoint.setMetadata(listMetaData); - } - } - endpoint.publish(url); - System.out.println("Published endpoint to url " + url); - - le.add(endpoint); - } catch (Exception e) { - System.out - .println("Exception occurred trying to publish url:" + url); - e.printStackTrace(); - } - } - j++; - - } - } - - int len = le.size(); - if (len > 0) { - - try { - File terminate = new File(webappdir + File.separator + "terminate"); - boolean bFound = true; - while (bFound) { - Thread.sleep(10000); - if (terminate.exists()) { - bFound = false; - } - } - - } catch (Exception e) { - e.printStackTrace(); - } - System.out.println("Unpublishing:" + len + " endpoints"); - for (int j = 0; j < len; j++) { - Endpoint e = le.get(j); - e.stop(); - } - } else { - System.out.println("No endpoints were published, so terminating..."); - } - System.out.println("exiting PublishEndpoint"); - System.exit(0); - } - - private static void getUsage() { - System.out.println("PublishEndpoint [-tshome fullpathname] ||"); - System.out.println( - " [[-host hostname] | [-port portnum] | [-datfile fullpathtofilename] | [-tsjte fullpathtofilename]]"); - System.out.println(" -webappdir fullpathtoarchives "); - - } - - private static class JarFilter implements FilenameFilter { - private static JarFilter instance = new JarFilter(); - - private JarFilter() { - } - - public static JarFilter getInstance() { - return instance; - } - - public boolean accept(File dir, String name) { - return name.endsWith(".jar"); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/util/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/util/build.xml deleted file mode 100644 index 02ad267e6d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/util/build.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/build.xml deleted file mode 100644 index aad12c116c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/build.xml deleted file mode 100644 index 25b277cfdd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/build.xml deleted file mode 100644 index 0e0485e3ef..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/Client.java deleted file mode 100644 index 5a8556f4b4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/Client.java +++ /dev/null @@ -1,750 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; - -import java.util.Properties; -import javax.xml.namespace.QName; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsaj2wdlactiontest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsaj2wdlactiontest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - // service and port information - private static final String NAMESPACEURI = "http://foobar.org/"; - - private static final String SERVICE_NAME = "AddNumbersService"; - - private static final String PORT_NAME = "AddNumbersPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private WebServiceFeature[] enabledRequiredwsf = { - new AddressingFeature(true, true) }; - - private WebServiceFeature[] disabledNotRequiredwsf = { - new AddressingFeature(false, false) }; - - AddNumbers portEnabled = null; - - AddNumbers portDisabled = null; - - static AddNumbersService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - TestUtil.logMsg("Obtain port"); - portEnabled = (AddNumbers) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddNumbersService.class, PORT_QNAME, AddNumbers.class, - enabledRequiredwsf); - portDisabled = (AddNumbers) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddNumbersService.class, PORT_QNAME, AddNumbers.class, - disabledNotRequiredwsf); - JAXWS_Util.setTargetEndpointAddress(portEnabled, url); - JAXWS_Util.setTargetEndpointAddress(portDisabled, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Obtain port"); - portEnabled = (AddNumbers) service.getPort(AddNumbers.class, - enabledRequiredwsf); - portDisabled = (AddNumbers) service.getPort(AddNumbers.class, - disabledNotRequiredwsf); - JAXWS_Util.dumpTargetEndpointAddress(portEnabled); - JAXWS_Util.dumpTargetEndpointAddress(portDisabled); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg("WebServiceRef is not set in Client " - + "(get it from specific vehicle)"); - service = (AddNumbersService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server in " + "config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: testNoActionOnInputOutput - * - * @assertion_ids: JAXWS:SPEC:7017; JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.2; - * JAXWS:SPEC:7017.3; JAXWS:SPEC:10025; JAXWS:SPEC:10026; WSAMD:SPEC:4004; - * WSAMD:SPEC:4004.1; WSAMD:SPEC:4004.2; WSAMD:SPEC:4004.4; WSAMD:SPEC:4004.5; - * JAXWS:SPEC:3055; - * - * @test_Strategy: Test no action for input/output elements. - * - */ - public void testNoActionOnInputOutput() throws Fault { - TestUtil.logMsg("testNoActionOnInputOutput "); - boolean pass = true; - try { - int result = portEnabled.addNumbersNoAction(10, 10); - TestUtil.logMsg("WSA:Action headers are correct"); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } - } catch (AddNumbersException ex) { - TestUtil.logErr("Caught unexpected AddNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testNoActionOnInputOutput failed", ex); - } - if (!pass) - throw new Fault("testNoActionOnInputOutput failed"); - } - - /* - * @testName: testEmptyActionOnInputOutput - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.1; WSAMD:SPEC:4004.2; - * WSAMD:SPEC:4004.4; WSAMD:SPEC:4004.5; JAXWS:SPEC:3055; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.2; JAXWS:SPEC:7017.3; JAXWS:SPEC:10025; - * JAXWS:SPEC:10026; - * - * @test_Strategy: Test default action for WSDL input/output elements and no - * explicit message names - * - */ - public void testEmptyActionOnInputOutput() throws Fault { - TestUtil.logMsg("testEmptyActionOnInputOutput"); - boolean pass = true; - try { - int result = portEnabled.addNumbersEmptyAction(10, 10); - TestUtil.logMsg("WSA:Action headers are correct"); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } - } catch (AddNumbersException ex) { - TestUtil.logErr("Caught unexpected AddNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testEmptyActionOnInputOutput failed", ex); - } - if (!pass) - throw new Fault("testEmptyActionOnInputOutput failed"); - } - - /* - * @testName: testExplicitInputOutputActions1 - * - * @assertion_ids: JAXWS:SPEC:7017; JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.2; - * JAXWS:SPEC:7017.3; JAXWS:SPEC:10025; JAXWS:SPEC:10026; WSAMD:SPEC:4003; - * WSAMD:SPEC:4003.1; WSAMD:SPEC:4003.2; JAXWS:SPEC:3055; - * - * @test_Strategy: Test explicit action for input/output elements - * - */ - public void testExplicitInputOutputActions1() throws Fault { - TestUtil.logMsg("testExplicitInputOutputActions1"); - boolean pass = true; - try { - int result = portEnabled.addNumbers(10, 10); - TestUtil.logMsg("WSA:Action headers are correct"); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } - } catch (AddNumbersException ex) { - TestUtil.logErr("Caught unexpected AddNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testExplicitInputOutputActions1 failed", ex); - } - if (!pass) - throw new Fault("testExplicitInputOutputActions1 failed"); - } - - /* - * @testName: testExplicitInputOutputActions2 - * - * @assertion_ids: JAXWS:SPEC:7017; JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.2; - * JAXWS:SPEC:7017.3; JAXWS:SPEC:10025; JAXWS:SPEC:10026; WSAMD:SPEC:4003; - * WSAMD:SPEC:4003.1; WSAMD:SPEC:4003.2; JAXWS:SPEC:3055; - * - * @test_Strategy: Test explicit action for input/output elements - * - */ - public void testExplicitInputOutputActions2() throws Fault { - TestUtil.logMsg("testExplicitInputOutputActions2"); - boolean pass = true; - try { - int result = portEnabled.addNumbers2(10, 10); - TestUtil.logMsg("WSA:Action headers are correct"); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } - } catch (AddNumbersException ex) { - TestUtil.logErr("Caught unexpected AddNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testExplicitInputOutputActions2 failed", ex); - } - if (!pass) - throw new Fault("testExplicitInputOutputActions2 failed"); - } - - /* - * @testName: testDefaultOutputActionExplicitInputAction - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.2; WSAMD:SPEC:4003; - * WSAMD:SPEC:4003.1; WSAMD:SPEC:4004.5; JAXWS:SPEC:3055; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.2; JAXWS:SPEC:7017.3; JAXWS:SPEC:10025; - * JAXWS:SPEC:10026; - * - * @test_Strategy: Test default action for WSDL output element Test explicit - * action for WSDL input element - * - */ - public void testDefaultOutputActionExplicitInputAction() throws Fault { - TestUtil.logMsg("testDefaultOutputActionExplicitInputAction"); - boolean pass = true; - try { - int result = portEnabled.addNumbers3(10, 10); - TestUtil.logMsg("WSA:Action headers are correct"); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } - } catch (AddNumbersException ex) { - TestUtil.logErr("Caught unexpected AddNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testDefaultOutputActionExplicitInputAction failed", ex); - } - if (!pass) - throw new Fault("testDefaultOutputActionExplicitInputAction failed"); - } - - /* - * @testName: testSendingWrongSOAPActionHTTPHeaderValue - * - * @assertion_ids: JAXWS:SPEC:7017; JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.2; - * JAXWS:SPEC:7017.3; JAXWS:SPEC:10025; JAXWS:SPEC:10026; WSAMD:SPEC:4003; - * WSAMD:SPEC:4003.1; WSAMD:SPEC:4003.2; JAXWS:SPEC:3055; - * - * @test_Strategy: Test sedning wrong SOAPAction HTTP Value for operation with - * explicit input/output action elements - * - */ - public void testSendingWrongSOAPActionHTTPHeaderValue() throws Fault { - TestUtil.logMsg("testSendingWrongSOAPActionHTTPHeaderValue"); - boolean pass = true; - try { - int result = portEnabled.addNumbers4(10, 10); - TestUtil.logMsg("WSA:Action headers are correct"); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } - } catch (SOAPFaultException ex) { - TestUtil.logMsg("Caught expected SOAPFaultException"); - String detailName = null; - try { - detailName = ex.getFault().getDetail().getFirstChild().getLocalName(); - } catch (Exception e) { - } - if (detailName != null) - TestUtil.logMsg("DetailName = " + detailName); - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testSendingWrongSOAPActionHTTPHeaderValue failed", ex); - } - if (!pass) - throw new Fault("testSendingWrongSOAPActionHTTPHeaderValue failed"); - } - - /* - * @testName: testOneFaultExplicitAction - * - * @assertion_ids: JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; - * JAXWS:SPEC:10025; JAXWS:SPEC:10026; JAXWS:JAVADOC:131; JAXWS:JAVADOC:132; - * JAXWS:JAVADOC:143; JAXWS:JAVADOC:144; WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; - * JAXWS:SPEC:3055; - * - * @test_Strategy: Test explicit action for fault element - * - */ - public void testOneFaultExplicitAction() throws Fault { - TestUtil.logMsg("testOneFaultExplicitAction"); - boolean pass = true; - try { - portEnabled.addNumbersFault1(-10, 10); - } catch (AddNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testOneFaultExplicitAction failed", ex); - } - if (!pass) - throw new Fault("testOneFaultExplicitAction failed"); - } - - /* - * @testName: testTwoFaultsExplicitAction1 - * - * @assertion_ids: JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; - * JAXWS:SPEC:10025; JAXWS:SPEC:10026; JAXWS:JAVADOC:131; JAXWS:JAVADOC:132; - * JAXWS:JAVADOC:143; JAXWS:JAVADOC:144; WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; - * JAXWS:SPEC:3055; - * - * @test_Strategy: Test explicit action for fault element - * - */ - public void testTwoFaultsExplicitAction1() throws Fault { - TestUtil.logMsg("testTwoFaultsExplicitAction1"); - boolean pass = true; - try { - portEnabled.addNumbersFault2(-10, 10); - } catch (AddNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (TooBigNumbersException ex) { - TestUtil.logErr("Caught unexpected TooBigNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testTwoFaultsExplicitAction1 failed", ex); - } - if (!pass) - throw new Fault("testTwoFaultsExplicitAction1 failed"); - } - - /* - * @testName: testTwoFaultsExplicitAction2 - * - * @assertion_ids: JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; - * JAXWS:SPEC:10025; JAXWS:SPEC:10026; JAXWS:JAVADOC:131; JAXWS:JAVADOC:132; - * JAXWS:JAVADOC:143; JAXWS:JAVADOC:144; WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; - * JAXWS:SPEC:3055; - * - * @test_Strategy: Test explicit action for fault element - * - */ - public void testTwoFaultsExplicitAction2() throws Fault { - TestUtil.logMsg("testTwoFaultsExplicitAction2"); - boolean pass = true; - try { - portEnabled.addNumbersFault2(20, 10); - } catch (TooBigNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (AddNumbersException ex) { - TestUtil.logErr("Caught unexpected AddNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("WSA:Action headers are incorrect"); - throw new Fault("testTwoFaultsExplicitAction2 failed", ex); - } - if (!pass) - throw new Fault("testTwoFaultsExplicitAction2 failed"); - } - - /* - * @testName: testTwoFaultsExplicitAddNumbersFault3 - * - * @assertion_ids: JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; - * JAXWS:SPEC:10025; JAXWS:SPEC:10026; JAXWS:JAVADOC:131; JAXWS:JAVADOC:132; - * JAXWS:JAVADOC:143; JAXWS:JAVADOC:144; WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; - * JAXWS:SPEC:3055; - * - * @test_Strategy: Test explicit action for fault element - * - */ - public void testTwoFaultsExplicitAddNumbersFault3() throws Fault { - TestUtil.logMsg("testTwoFaultsExplicitAddNumbersFault3"); - boolean pass = true; - try { - portEnabled.addNumbersFault3(-10, 10); - } catch (AddNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (TooBigNumbersException ex) { - TestUtil.logErr("Caught unexpected TooBigNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testTwoFaultsExplicitAddNumbersFault3 failed", ex); - } - if (!pass) - throw new Fault("testTwoFaultsExplicitAddNumbersFault3 failed"); - } - - /* - * @testName: testTwoFaultsDefaultTooBigNumbersFault3 - * - * @assertion_ids: JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; - * JAXWS:SPEC:10025; JAXWS:SPEC:10026; JAXWS:JAVADOC:131; JAXWS:JAVADOC:132; - * JAXWS:JAVADOC:143; JAXWS:JAVADOC:144; WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; - * JAXWS:SPEC:3055; - * - * @test_Strategy: Test no action for fault element - * - */ - public void testTwoFaultsDefaultTooBigNumbersFault3() throws Fault { - TestUtil.logMsg("testTwoFaultsDefaultTooBigNumbersFault3"); - boolean pass = true; - try { - portEnabled.addNumbersFault3(20, 10); - } catch (TooBigNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (AddNumbersException ex) { - TestUtil.logErr("Caught unexpected AddNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testTwoFaultsDefaultTooBigNumbersFault3 failed", ex); - } - if (!pass) - throw new Fault("testTwoFaultsDefaultTooBigNumbersFault3 failed"); - } - - /* - * @testName: testTwoFaultsExplicitAddNumbersFault4 - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; JAXWS:SPEC:3055; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:10025; - * JAXWS:SPEC:10026; - * - * @test_Strategy: Test explicit action for WSDL fault element - * - */ - public void testTwoFaultsExplicitAddNumbersFault4() throws Fault { - TestUtil.logMsg("testTwoFaultsExplicitAddNumbersFault4"); - boolean pass = true; - try { - portEnabled.addNumbersFault4(-10, 10); - } catch (AddNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (TooBigNumbersException ex) { - TestUtil.logErr("Caught unexpected TooBigNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testTwoFaultsExplicitAddNumbersFault4 failed", ex); - } - if (!pass) - throw new Fault("testTwoFaultsExplicitAddNumbersFault4 failed"); - } - - /* - * @testName: testTwoFaultsDefaultTooBigNumbersFault4 - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; JAXWS:SPEC:3055; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:10025; - * JAXWS:SPEC:10026; - * - * @test_Strategy: Test default action for WSDL fault element - * - */ - public void testTwoFaultsDefaultTooBigNumbersFault4() throws Fault { - TestUtil.logMsg("testTwoFaultsDefaultTooBigNumbersFault4"); - boolean pass = true; - try { - portEnabled.addNumbersFault4(20, 10); - } catch (TooBigNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (AddNumbersException ex) { - TestUtil.logErr("Caught unexpected AddNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testTwoFaultsDefaultTooBigNumbersFault4 failed", ex); - } - if (!pass) - throw new Fault("testTwoFaultsDefaultTooBigNumbersFault4 failed"); - } - - /* - * @testName: testTwoFaultsDefaultAddNumbersFault5 - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; JAXWS:SPEC:3055; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:10025; - * JAXWS:SPEC:10026; - * - * @test_Strategy: Test default action for WSDL fault element - * - */ - public void testTwoFaultsDefaultAddNumbersFault5() throws Fault { - TestUtil.logMsg("testTwoFaultsDefaultAddNumbersFault5"); - boolean pass = true; - try { - portEnabled.addNumbersFault5(-10, 10); - } catch (AddNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (TooBigNumbersException ex) { - TestUtil.logErr("Caught unexpected TooBigNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testTwoFaultsDefaultAddNumbersFault5 failed", ex); - } - if (!pass) - throw new Fault("testTwoFaultsDefaultAddNumbersFault5 failed"); - } - - /* - * @testName: testTwoFaultsExplicitTooBigNumbersFault5 - * - * @assertion_ids: WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; JAXWS:JAVADOC:143; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:10025; - * JAXWS:SPEC:10026; JAXWS:SPEC:3055; - * - * @test_Strategy: Test explicit action for WSDL fault element - * - */ - public void testTwoFaultsExplicitTooBigNumbersFault5() throws Fault { - TestUtil.logMsg("testTwoFaultsExplicitTooBigNumbersFault5"); - boolean pass = true; - try { - portEnabled.addNumbersFault5(20, 10); - } catch (TooBigNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (AddNumbersException ex) { - TestUtil.logErr("Caught unexpected AddNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testTwoFaultsExplicitTooBigNumbersFault5 failed", ex); - } - if (!pass) - throw new Fault("testTwoFaultsExplicitTooBigNumbersFault5 failed"); - } - - /* - * @testName: testOnlyFaultActionsBothExplicit1 - * - * @assertion_ids: WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; JAXWS:JAVADOC:143; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:10025; - * JAXWS:SPEC:10026; JAXWS:SPEC:3055; - * - * @test_Strategy: Test explicit action for WSDL fault element - * - */ - public void testOnlyFaultActionsBothExplicit1() throws Fault { - TestUtil.logMsg("testOnlyFaultActionsBothExplicit1"); - boolean pass = true; - try { - portEnabled.addNumbersFault6(-10, 10); - } catch (AddNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (TooBigNumbersException ex) { - TestUtil.logErr("Caught unexpected TooBigNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testOnlyFaultActionsBothExplicit1 failed", ex); - } - if (!pass) - throw new Fault("testOnlyFaultActionsBothExplicit1 failed"); - } - - /* - * @testName: testOnlyFaultActionsBothExplicit2 - * - * @assertion_ids: WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; JAXWS:JAVADOC:143; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:10025; - * JAXWS:SPEC:10026; JAXWS:SPEC:3055; - * - * @test_Strategy: Test explicit action for WSDL fault element - * - */ - public void testOnlyFaultActionsBothExplicit2() throws Fault { - TestUtil.logMsg("testOnlyFaultActionsBothExplicit2"); - boolean pass = true; - try { - portEnabled.addNumbersFault6(20, 10); - } catch (TooBigNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (AddNumbersException ex) { - TestUtil.logErr("Caught unexpected AddNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testOnlyFaultActionsBothExplicit2 failed", ex); - } - if (!pass) - throw new Fault("testOnlyFaultActionsBothExplicit2 failed"); - } - - /* - * @testName: testOnlyFaultActionsFault7BothEmpty1 - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; JAXWS:SPEC:3055; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:10025; - * JAXWS:SPEC:10026; - * - * @test_Strategy: Test default action for WSDL fault element - * - */ - public void testOnlyFaultActionsFault7BothEmpty1() throws Fault { - TestUtil.logMsg("testOnlyFaultActionsFault7BothEmpty1"); - boolean pass = true; - try { - portEnabled.addNumbersFault7(-10, 10); - } catch (AddNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (TooBigNumbersException ex) { - TestUtil.logErr("Caught unexpected TooBigNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testOnlyFaultActionsFault7BothEmpty1 failed", ex); - } - if (!pass) - throw new Fault("testOnlyFaultActionsFault7BothEmpty1 failed"); - } - - /* - * @testName: testOnlyFaultActionsFault7BothEmpty2 - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; JAXWS:SPEC:3055; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:10025; - * JAXWS:SPEC:10026; - * - * @test_Strategy: Test default action for WSDL fault element - * - */ - public void testOnlyFaultActionsFault7BothEmpty2() throws Fault { - TestUtil.logMsg("testOnlyFaultActionsFault7BothEmpty2"); - boolean pass = true; - try { - portEnabled.addNumbersFault7(20, 10); - } catch (TooBigNumbersException ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (AddNumbersException ex) { - TestUtil.logErr("Caught unexpected AddNumbersException"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testOnlyFaultActionsFault7BothEmpty2 failed", ex); - } - if (!pass) - throw new Fault("testOnlyFaultActionsFault7BothEmpty2 failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/ClientSOAPHandler.java deleted file mode 100644 index 25a875b202..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/ClientSOAPHandler.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.action; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.*; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", action=" + action + "]"); - TestUtil.logMsg("Verify output action: [" + action + "]"); - if (oper.equals("addNumbersNoActionResponse")) { - if (!action.equals(TestConstants.ADD_NUMBERS_OUT_NOACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS_OUT_NOACTION, - action); - } - } else if (oper.equals("addNumbersEmptyActionResponse")) { - if (!action.equals(TestConstants.ADD_NUMBERS_OUT_EMPTYACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_OUT_EMPTYACTION, action); - } - } else if (oper.equals("addNumbersResponse")) { - if (!action.equals(TestConstants.ADD_NUMBERS_OUT_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS_OUT_ACTION, - action); - } - } else if (oper.equals("addNumbers2Response")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_OUT_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS2_OUT_ACTION, - action); - } - } else if (oper.equals("addNumbers3Response")) { - if (!action.equals(TestConstants.ADD_NUMBERS3_OUT_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS3_OUT_ACTION, - action); - } - } - } - - @Override - protected void checkFaultActions(String requestName, String detailName, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkFaultActions: [input=" + requestName - + ", detailName=" + detailName + ", action=" + action + "]"); - TestUtil.logMsg("Verify fault action: [" + action + "]"); - if (requestName.equals("addNumbers4")) - return; - if (requestName.equals("addNumbersFault1") - && detailName.equals("AddNumbersException")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT1_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT1_ADDNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbersFault2") - && detailName.equals("AddNumbersException")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT2_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT2_ADDNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbersFault2") - && detailName.equals("TooBigNumbersException")) { - if (!action - .equals(TestConstants.ADD_NUMBERS_FAULT2_TOOBIGNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT2_TOOBIGNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbersFault3") - && detailName.equals("AddNumbersException")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT3_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT3_ADDNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbersFault3") - && detailName.equals("TooBigNumbersException")) { - if (!action - .equals(TestConstants.ADD_NUMBERS_FAULT3_TOOBIGNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT3_TOOBIGNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbersFault4") - && detailName.equals("AddNumbersException")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT4_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT4_ADDNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbersFault4") - && detailName.equals("TooBigNumbersException")) { - if (!action - .equals(TestConstants.ADD_NUMBERS_FAULT4_TOOBIGNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT4_TOOBIGNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbersFault5") - && detailName.equals("AddNumbersException")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT5_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT5_ADDNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbersFault5") - && detailName.equals("TooBigNumbersException")) { - if (!action - .equals(TestConstants.ADD_NUMBERS_FAULT5_TOOBIGNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT5_TOOBIGNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbersFault6") - && detailName.equals("AddNumbersException")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT6_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT6_ADDNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbersFault6") - && detailName.equals("TooBigNumbersException")) { - if (!action - .equals(TestConstants.ADD_NUMBERS_FAULT6_TOOBIGNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT6_TOOBIGNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbersFault7") - && detailName.equals("AddNumbersException")) { - if (!action.equals(TestConstants.ADD_NUMBERS_FAULT7_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT7_ADDNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbersFault7") - && detailName.equals("TooBigNumbersException")) { - if (!action - .equals(TestConstants.ADD_NUMBERS_FAULT7_TOOBIGNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_FAULT7_TOOBIGNUMBERS_ACTION, action); - } - } - super.checkFaultActions(requestName, detailName, action); - } - - @Override - protected String getOperationName(SOAPBody soapBody) throws SOAPException { - String opName = super.getOperationName(soapBody); - if (!opName.startsWith("addNumbersFault")) - return opName; - - if (opName.equals("addNumbersFault1")) - return opName; - - if (opName.equals("addNumbersFault2")) { - soapBody.getFirstChild().getFirstChild().getNodeValue(); - } - return opName; - } - - private void ThrowActionNotSupportedException(String expected, - String actual) { - throw new ActionNotSupportedException( - "Expected:" + expected + ", Actual:" + actual); - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/build.xml deleted file mode 100644 index 71dee8b89b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/action/build.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/Client.java deleted file mode 100644 index ca75b72af8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/Client.java +++ /dev/null @@ -1,662 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.xml.ws.soap.SOAPFaultException; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -import java.net.URL; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.AddressingFeature; - -import java.util.Properties; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature."; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL1 = "wsaj2wdladdressingfeaturetest.endpoint.1"; - - private static final String ENDPOINT_URL2 = "wsaj2wdladdressingfeaturetest.endpoint.2"; - - private static final String ENDPOINT_URL3 = "wsaj2wdladdressingfeaturetest.endpoint.3"; - - private static final String ENDPOINT_URL4 = "wsaj2wdladdressingfeaturetest.endpoint.4"; - - private static final String WSDLLOC_URL1 = "wsaj2wdladdressingfeaturetest.wsdlloc.1"; - - private static final String WSDLLOC_URL2 = "wsaj2wdladdressingfeaturetest.wsdlloc.2"; - - private static final String WSDLLOC_URL3 = "wsaj2wdladdressingfeaturetest.wsdlloc.3"; - - private static final String WSDLLOC_URL4 = "wsaj2wdladdressingfeaturetest.wsdlloc.4"; - - // service and port information - private static final String NAMESPACEURI = "http://addressingfeatureservice.org/wsdl"; - - private static final String SERVICE1_NAME = "AddressingFeatureTest1Service"; - - private static final String SERVICE2_NAME = "AddressingFeatureTest2Service"; - - private static final String SERVICE3_NAME = "AddressingFeatureTest3Service"; - - private static final String SERVICE4_NAME = "AddressingFeatureTest4Service"; - - private static final String PORT_NAME1 = "AddressingFeatureTest1Port"; - - private static final String PORT_NAME2 = "AddressingFeatureTest2Port"; - - private static final String PORT_NAME3 = "AddressingFeatureTest3Port"; - - private static final String PORT_NAME4 = "AddressingFeatureTest4Port"; - - private QName SERVICE1_QNAME = new QName(NAMESPACEURI, SERVICE1_NAME); - - private QName SERVICE2_QNAME = new QName(NAMESPACEURI, SERVICE2_NAME); - - private QName SERVICE3_QNAME = new QName(NAMESPACEURI, SERVICE3_NAME); - - private QName SERVICE4_QNAME = new QName(NAMESPACEURI, SERVICE4_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private QName PORT_QNAME2 = new QName(NAMESPACEURI, PORT_NAME2); - - private QName PORT_QNAME3 = new QName(NAMESPACEURI, PORT_NAME3); - - private QName PORT_QNAME4 = new QName(NAMESPACEURI, PORT_NAME4); - - private String url1 = null; - - private String url2 = null; - - private String url3 = null; - - private String url4 = null; - - private URL wsdlurl1 = null; - - private URL wsdlurl2 = null; - - private URL wsdlurl3 = null; - - private URL wsdlurl4 = null; - - private String ctxroot = null; - - private AddressingFeatureTest1 port1 = null; - - private AddressingFeatureTest2 port2 = null; - - private AddressingFeatureTest3 port3 = null; - - private AddressingFeatureTest4 port4 = null; - - private AddressingFeatureTest1 port5 = null; - - private AddressingFeatureTest2 port6 = null; - - private AddressingFeatureTest4 port7 = null; - - private WebServiceFeature[] enabledNotRequiredwsf = { - new AddressingFeature(true, false) }; - - private WebServiceFeature[] nonEnabledwsf = { new AddressingFeature(false) }; - - private WebServiceFeature[] enabledRequiredwsf = { - new AddressingFeature(true, true) }; - - static AddressingFeatureTest1Service service1 = null; - - static AddressingFeatureTest2Service service2 = null; - - static AddressingFeatureTest3Service service3 = null; - - static AddressingFeatureTest4Service service4 = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL1); - url1 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL1); - wsdlurl1 = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - - String file2 = JAXWS_Util.getURLFromProp(ENDPOINT_URL2); - url2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file2); - file2 = JAXWS_Util.getURLFromProp(WSDLLOC_URL2); - wsdlurl2 = ctsurl.getURL(PROTOCOL, hostname, portnum, file2); - - String file3 = JAXWS_Util.getURLFromProp(ENDPOINT_URL3); - url3 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file3); - file3 = JAXWS_Util.getURLFromProp(WSDLLOC_URL3); - wsdlurl3 = ctsurl.getURL(PROTOCOL, hostname, portnum, file3); - - String file4 = JAXWS_Util.getURLFromProp(ENDPOINT_URL4); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file4); - file4 = JAXWS_Util.getURLFromProp(WSDLLOC_URL4); - wsdlurl4 = ctsurl.getURL(PROTOCOL, hostname, portnum, file4); - - TestUtil.logMsg("Service Endpoint URL1: " + url1); - TestUtil.logMsg("Service Endpoint URL2: " + url2); - TestUtil.logMsg("Service Endpoint URL3: " + url3); - TestUtil.logMsg("Service Endpoint URL4: " + url4); - TestUtil.logMsg("WSDL Location URL1: " + wsdlurl1); - TestUtil.logMsg("WSDL Location URL2: " + wsdlurl2); - TestUtil.logMsg("WSDL Location URL3: " + wsdlurl3); - TestUtil.logMsg("WSDL Location URL4: " + wsdlurl4); - } - - private void getPortStandalone() throws Exception { - TestUtil.logMsg( - "******************************Retrieving Port 1************************\n"); - // client side Addressing enabled/NotRequired; server side - // Addressing/NotRequired - port1 = (AddressingFeatureTest1) JAXWS_Util.getPort(wsdlurl1, - SERVICE1_QNAME, AddressingFeatureTest1Service.class, PORT_QNAME1, - AddressingFeatureTest1.class, enabledNotRequiredwsf); - JAXWS_Util.setTargetEndpointAddress(port1, url1); - - TestUtil.logMsg( - "******************************Retrieving Port 2************************\n"); - // client side Addressing enabled/NotRequired; server side - // Addressing/Required - port2 = (AddressingFeatureTest2) JAXWS_Util.getPort(wsdlurl2, - SERVICE2_QNAME, AddressingFeatureTest2Service.class, PORT_QNAME2, - AddressingFeatureTest2.class, enabledNotRequiredwsf); - JAXWS_Util.setTargetEndpointAddress(port2, url2); - - TestUtil.logMsg( - "******************************Retrieving Port 3************************\n"); - // client side Addressing enabled/NotRequired; server side Addressing (using - // default) - port3 = (AddressingFeatureTest3) JAXWS_Util.getPort(wsdlurl3, - SERVICE3_QNAME, AddressingFeatureTest3Service.class, PORT_QNAME3, - AddressingFeatureTest3.class, enabledNotRequiredwsf); - JAXWS_Util.setTargetEndpointAddress(port3, url3); - - TestUtil.logMsg( - "******************************Retrieving Port 4************************\n"); - // client side Addressing enabled/NotRequired; server side Addressing off - port4 = (AddressingFeatureTest4) JAXWS_Util.getPort(wsdlurl4, - SERVICE4_QNAME, AddressingFeatureTest4Service.class, PORT_QNAME4, - AddressingFeatureTest4.class, enabledNotRequiredwsf); - JAXWS_Util.setTargetEndpointAddress(port4, url4); - - TestUtil.logMsg( - "******************************Retrieving Port 5************************\n"); - // client side Addressing off; server side Addressing/NotRequired - port5 = (AddressingFeatureTest1) JAXWS_Util.getPort(wsdlurl1, - SERVICE1_QNAME, AddressingFeatureTest1Service.class, PORT_QNAME1, - AddressingFeatureTest1.class, nonEnabledwsf); - JAXWS_Util.setTargetEndpointAddress(port5, url1); - - TestUtil.logMsg( - "******************************Retrieving Port 6************************\n"); - // client side Addressing off; server side Addressing/Required - port6 = (AddressingFeatureTest2) JAXWS_Util.getPort(wsdlurl2, - SERVICE2_QNAME, AddressingFeatureTest2Service.class, PORT_QNAME2, - AddressingFeatureTest2.class, nonEnabledwsf); - JAXWS_Util.setTargetEndpointAddress(port6, url2); - - TestUtil.logMsg( - "******************************Retrieving Port 7************************\n"); - // client side Addressing enabled/Required; server side off - port7 = (AddressingFeatureTest4) JAXWS_Util.getPort(wsdlurl4, - SERVICE4_QNAME, AddressingFeatureTest4Service.class, PORT_QNAME4, - AddressingFeatureTest4.class, enabledRequiredwsf); - JAXWS_Util.setTargetEndpointAddress(port7, url4); - } - - private void getPortJavaEE() throws Exception { - javax.naming.InitialContext ic = new javax.naming.InitialContext(); - TestUtil.logMsg("Obtain service1 via WebServiceRef annotation"); - AddressingFeatureTest1Service service1 = (AddressingFeatureTest1Service) ic - .lookup("java:comp/env/service/WSAJ2WDLAddressingFeatureTest1"); - TestUtil.logMsg("service1=" + service1); - TestUtil.logMsg( - "******************************Retrieving Port 1************************\n"); - port1 = (AddressingFeatureTest1) service1 - .getPort(AddressingFeatureTest1.class, enabledNotRequiredwsf); - - TestUtil.logMsg("Obtain service2 via WebServiceRef annotation"); - AddressingFeatureTest2Service service2 = (AddressingFeatureTest2Service) ic - .lookup("java:comp/env/service/WSAJ2WDLAddressingFeatureTest2"); - TestUtil.logMsg("service2=" + service2); - TestUtil.logMsg( - "******************************Retrieving Port 2************************\n"); - port2 = (AddressingFeatureTest2) service2 - .getPort(AddressingFeatureTest2.class, enabledNotRequiredwsf); - - TestUtil.logMsg("Obtain service3 via WebServiceRef annotation"); - AddressingFeatureTest3Service service3 = (AddressingFeatureTest3Service) ic - .lookup("java:comp/env/service/WSAJ2WDLAddressingFeatureTest3"); - TestUtil.logMsg("service3=" + service3); - TestUtil.logMsg( - "******************************Retrieving Port 3************************\n"); - port3 = (AddressingFeatureTest3) service3 - .getPort(AddressingFeatureTest3.class, enabledNotRequiredwsf); - - TestUtil.logMsg("Obtain service4 via WebServiceRef annotation"); - AddressingFeatureTest4Service service4 = (AddressingFeatureTest4Service) ic - .lookup("java:comp/env/service/WSAJ2WDLAddressingFeatureTest4"); - TestUtil.logMsg("service4=" + service4); - TestUtil.logMsg( - "******************************Retrieving Port 4************************\n"); - port4 = (AddressingFeatureTest4) service4 - .getPort(AddressingFeatureTest4.class, enabledNotRequiredwsf); - - TestUtil.logMsg( - "******************************Retrieving Port 5************************\n"); - port5 = (AddressingFeatureTest1) service1 - .getPort(AddressingFeatureTest1.class, nonEnabledwsf); - - TestUtil.logMsg( - "******************************Retrieving Port 6************************\n"); - port6 = (AddressingFeatureTest2) service2 - .getPort(AddressingFeatureTest2.class, nonEnabledwsf); - - TestUtil.logMsg( - "******************************Retrieving Port 7************************\n"); - port7 = (AddressingFeatureTest4) service4 - .getPort(AddressingFeatureTest4.class, enabledRequiredwsf); - - Object[] portsTodump = new Object[] { port1, port2, port3, port4, port5, - port6, port7 }; - dumpTargetEndpointAddressForPort(portsTodump); - } - - private void dumpTargetEndpointAddressForPort(Object[] portsTodump) { - try { - for (int i = 0; i < portsTodump.length; i++) { - TestUtil.logMsg("port=" + portsTodump[i]); - TestUtil.logMsg("Obtained port" + i); - JAXWS_Util.dumpTargetEndpointAddress(portsTodump[i]); - } - } catch (java.lang.Exception e) { - TestUtil.printStackTrace(e); - TestUtil.logErr("Error dumping EndpointAddress for port"); - } - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) { - pass = false; - } else if (hostname.equals("")) { - pass = false; - } - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - getTestURLs(); - getPortJavaEE(); - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: afClientEnabledNotREQServerEnabledNotREQTest - * - * @assertion_ids: JAXWS:SPEC:3047; - * - * @test_Strategy: Test Addressing Feature. Client enabled/NotRequired, Server - * enabled/NotRequired. Addressing headers MAY be present on SOAPRequest and - * SOAPResponse since Addressing is Optional. If addressing headers exist - * check them otherwise don't. - */ - public void afClientEnabledNotREQServerEnabledNotREQTest() throws Fault { - TestUtil.logMsg("afClientEnabledNotREQServerEnabledNotREQTest"); - boolean pass = true; - try { - // client side and server side Addressing enabled/NotRequired - port1.addNumbers1(new Holder("ClientEnabledNotREQServerEnabledNotREQ"), - 10, 10); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientEnabledNotREQServerEnabledNotREQTest failed", e); - } - - if (!pass) { - throw new Fault("afClientEnabledNotREQServerEnabledNotREQTest failed"); - } - } - - /* - * @testName: afClientEnabledNotREQServerEnabledREQTest - * - * @assertion_ids: JAXWS:SPEC:3047; - * - * @test_Strategy: Test Addressing Feature. Client enabled/NotRequired, Server - * enabled/Required. If the Client does not send Addressing headers then the - * Server MUST throw back a SOAP Fault with a MessageAddressingHeaderRequired - * fault code since the Server mandates Addressing Required. If the Client - * does send Addressing headers then they MUST be present on SOAPRequest and - * SOAPResponse since the Server mandates requires addressing. - */ - public void afClientEnabledNotREQServerEnabledREQTest() throws Fault { - TestUtil.logMsg("afClientEnabledNotREQServerEnabledREQTest"); - boolean pass = true; - try { - // client side Addressing enabled/NotRequired; server side - // Addressing/Required - port2.addNumbers2(new Holder("ClientEnabledNotREQServerEnabledREQ"), 10, - 10); - } catch (SOAPFaultException sfe) { - try { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientEnabledNotREQServerEnabledREQTest failed", e); - } - - if (!pass) { - throw new Fault("afClientEnabledNotREQServerEnabledREQTest failed"); - } - } - - /* - * @testName: afClientEnabledNotREQServerUsingDefaultsTest - * - * @assertion_ids: JAXWS:SPEC:3047; - * - * @test_Strategy: Test Addressing Feature. Client enabled/NotRequired, Server - * using defaults. Addressing headers MAY be present on SOAPRequest and - * SOAPResponse since Addressing is Optional. If addressing headers exist - * check them otherwise don't. - */ - public void afClientEnabledNotREQServerUsingDefaultsTest() throws Fault { - TestUtil.logMsg("afClientEnabledNotREQServerUsingDefaultsTest"); - boolean pass = true; - try { - // client side Addressing enabled/NotRequired; Server side using defaults - port3.addNumbers3(new Holder("ClientEnabledNotREQServerUsingDefaults"), - 10, 10); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientEnabledNotREQServerUsingDefaultsTest failed", e); - } - - if (!pass) { - throw new Fault("afClientEnabledNotREQServerUsingDefaultsTest failed"); - } - } - - /* - * @testName: afClientEnabledNotREQServerNotEnabledTest - * - * @assertion_ids: JAXWS:SPEC:3047; - * - * @test_Strategy: Test Addressing Feature. Client enabled/NotRequired, Server - * NotEnabled. Addressing headers MAY be present on SOAPRequest but MUST NOT - * be present on SOAPResponse. - */ - public void afClientEnabledNotREQServerNotEnabledTest() throws Fault { - TestUtil.logMsg("afClientEnabledNotREQServerNotEnabledTest"); - boolean pass = true; - try { - // client side Addressing enabled/NotRequired; Server - // NotEnabled/NotRequired - port4.addNumbers4(new Holder("ClientEnabledNotREQServerNotEnabled"), 10, - 10); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientEnabledNotREQServerNotEnabledTest failed", e); - } - - if (!pass) { - throw new Fault("afClientEnabledNotREQServerNotEnabledTest failed"); - } - } - - /* - * @testName: afClientNotEnabledServerEnabledNotREQTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.3; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6011; JAXWS:SPEC:6011.2; JAXWS:SPEC:6012; JAXWS:SPEC:6012.3; - * JAXWS:SPEC:6012.5; JAXWS:SPEC:7020; JAXWS:SPEC:7020.2; JAXWS:SPEC:10025; - * JAXWS:JAVADOC:190; JAXWS:SPEC:4034; JAXWS:SPEC:6012.1; - * - * @test_Strategy: Test Addressing Feature. Client NotEnabled, Server - * enabled/NotRequired. Addressing headers MUST not be present on SOAPRequest - * and SOAPResponse. - */ - public void afClientNotEnabledServerEnabledNotREQTest() throws Fault { - TestUtil.logMsg("afClientNotEnabledServerEnabledNotREQTest"); - TestUtil.logMsg( - "Verify Addressing headers are NOT present on SOAPRequest and SOAPResponse"); - boolean pass = true; - try { - port5.addNumbers1(new Holder("ClientNotEnabledServerEnabledNotREQ"), 10, - 10); - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientNotEnabledServerEnabledNotREQTest failed", e); - } - - if (!pass) { - throw new Fault("afClientNotEnabledServerEnabledNotREQTest failed"); - } - } - - /* - * @testName: afClientNotEnabledServerEnabledREQTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.3; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:4031; JAXWS:SPEC:6011; JAXWS:SPEC:6011.2; JAXWS:SPEC:6012; - * JAXWS:SPEC:6012.1; JAXWS:SPEC:6012.3; JAXWS:SPEC:6012.5; JAXWS:SPEC:3046; - * WSASB:SPEC:6004.3; - * - * @test_Strategy: Test Addressing Feature. Client Not Enabled, Server - * enabled/Required. This scenario MUST throw back a SOAP Fault. Make sure the - * SOAP Fault has the correct information in it. The SOAP Fault faultcode must - * be: MessageAddressingHeaderRequired. - */ - public void afClientNotEnabledServerEnabledREQTest() throws Fault { - TestUtil.logMsg("afClientNotEnabledServerEnabledREQTest"); - TestUtil.logMsg( - "Verify MessageAddressingHeaderRequired soap fault is thrown by endpoint"); - boolean pass = true; - try { - port6.addNumbers2(new Holder("ClientNotEnabledServerEnabledREQ"), 10, 10); - pass = false; - } catch (SOAPFaultException sfe) { - try { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - throw new Fault("afClientNotEnabledServerEnabledREQTest failed", e2); - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientNotEnabledServerEnabledREQTest failed", e); - } - - if (!pass) { - throw new Fault("afClientNotEnabledServerEnabledREQTest failed"); - } - } - - /* - * @testName: afClientEnabledREQServerNotEnabledTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.2; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6012.2; JAXWS:SPEC:6012.3; JAXWS:SPEC:6012.4; JAXWS:SPEC:6012.6; - * JAXWS:SPEC:6016.1; JAXWS:SPEC:7020; JAXWS:SPEC:7020.1; JAXWS:JAVADOC:191; - * - * @test_Strategy: Test Addressing Feature. Client enabled/Required, Server - * not enabled. This scenario MUST throw back a WebServiceException. - */ - public void afClientEnabledREQServerNotEnabledTest() throws Fault { - TestUtil.logMsg("afClientEnabledREQServerNotEnabledTest"); - TestUtil.logMsg("Verify WebServiceException is thrown"); - boolean pass = true; - try { - port7.addNumbers4(new Holder("ClientEnabledREQServerNotEnabled"), 10, 10); - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientEnabledREQServerNotEnabledTest failed", e); - } - - if (!pass) { - throw new Fault("afClientEnabledREQServerNotEnabledTest failed"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/ClientSOAPHandler.java deleted file mode 100644 index 8edf66fea1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/ClientSOAPHandler.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.SOAPException; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - String testName = null; - - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - // figure out which testname i'm checking for and call appropropriate - // verify*(...) - if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerNotEnabled")) { - verifyClientEnabledNotREQServerNotEnabled(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientNotEnabledServerEnabledNotREQ")) { - verifyClientNotEnabledServerEnabledNotREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerEnabledREQ")) { - verifyClientEnabledNotREQServerEnabledREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerEnabledNotREQ")) { - verifyClientEnabledNotREQServerEnabledNotREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerUsingDefaults")) { - verifyClientEnabledNotREQServerUsingDefaults(context, action); - } - } - - private void verifyClientNotEnabledServerEnabledNotREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientNotEnabledServerEnabledNotREQ here... - checkAddressingHeadersDoNotExist(context, action); - } - - private void verifyClientEnabledNotREQServerNotEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerNotEnabled here... - checkAddressingHeadersDoNotExist(context, action); - } - - private void verifyClientEnabledNotREQServerEnabledREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerEnabledREQ here... - checkAddressingHeadersMayExist(context, action); - } - - private void verifyClientEnabledNotREQServerEnabledNotREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerEnabledNotREQ - // here... - checkAddressingHeadersMayExist(context, action); - } - - private void verifyClientEnabledNotREQServerUsingDefaults( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerUsingDefaults - // here... - checkAddressingHeadersMayExist(context, action); - } - - private void verifyAction(String action) { - TestUtil.logMsg("ClientSOAPHandler.verifyAction: [action=" + action + "]"); - if (!TestConstants.ADD_NUMBERS_OUT_ACTION.equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS_OUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersMayExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersMayExist"); - // If Addressing headers exist then check them otherwise don't - if (action != null) { - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersExist"); - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersDoNotExist"); - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundRelatesToDoesNotExist(context); - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - testName = (String) context.get("test.name"); - TestUtil.logMsg("ClientSOAPHandler.getAction(): testName=" + testName); - if (testName == null) { - return super.getAction(context); - } - /* Headers MAY be present on SOAPResponse */ - else if (testName.equals("ClientEnabledNotREQServerEnabledNotREQ") - || testName.equals("ClientEnabledNotREQServerEnabledREQ") - || testName.equals("ClientEnabledNotREQServerUsingDefaults")) { - try { - return super.getAction(context); - } catch (Exception e) { - return null; - } - } - /* Headers MUST NOT be present on SOAPResponse */ - else if (testName.equals("ClientEnabledNotREQServerNotEnabled") - || testName.equals("ClientNotEnabledServerEnabledNotREQ")) { - return super.getActionDoesNotExist(context); - } - /* Fault case just return null */ - else - return null; - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/build.xml deleted file mode 100644 index 02c2e006c9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/build.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/wsappclient_vehicle_client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/wsappclient_vehicle_client.xml deleted file mode 100644 index bd8f9968ad..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/wsappclient_vehicle_client.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - TS app client vehicle - wsappclient_vehicle_client - - service/WSAJ2WDLAddressingFeatureTest1 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1Service - META-INF/wsdl/AddressingFeatureTest1Service.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1 - - - - service/WSAJ2WDLAddressingFeatureTest2 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2Service - META-INF/wsdl/AddressingFeatureTest2Service.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2 - - - - service/WSAJ2WDLAddressingFeatureTest3 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3Service - META-INF/wsdl/AddressingFeatureTest3Service.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3 - - - - service/WSAJ2WDLAddressingFeatureTest4 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4Service - META-INF/wsdl/AddressingFeatureTest4Service.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/wsejb_vehicle_ejb.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/wsejb_vehicle_ejb.xml deleted file mode 100644 index 44ef975987..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature/wsejb_vehicle_ejb.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - Ejb1 - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicleRemote - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicle - Stateful - Container - - - service/WSAJ2WDLAddressingFeatureTest1 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1Service - META-INF/wsdl/AddressingFeatureTest1Service.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest1 - - - - service/WSAJ2WDLAddressingFeatureTest2 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2Service - META-INF/wsdl/AddressingFeatureTest2Service.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest2 - - - - service/WSAJ2WDLAddressingFeatureTest3 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3Service - META-INF/wsdl/AddressingFeatureTest3Service.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest3 - - - - service/WSAJ2WDLAddressingFeatureTest4 - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4Service - META-INF/wsdl/AddressingFeatureTest4Service.wsdl - - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.addressingfeature.AddressingFeatureTest4 - - - - - - - - - - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - Remote - runTest - - Required - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/Client.java deleted file mode 100644 index 63f34578f3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/Client.java +++ /dev/null @@ -1,1106 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.*; -import com.sun.javatest.Status; - -import java.text.MessageFormat; -import java.net.*; -import java.util.UUID; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.xml.soap.*; -import java.util.Properties; -import javax.xml.namespace.QName; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.Exchanger; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String ENDPOINTPUBLISHPROP = "http.server.supports.endpoint.publish"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private boolean endpointPublishSupport; - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous."; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private static final String MINPORT = "port.range.min"; - - private int minPort = -1; - - private static final String MAXPORT = "port.range.max"; - - private int maxPort = -1; - - private int javaseServerPort; - - // URL properties used by the test - private static final String ENDPOINT_URL3 = "wsaj2wdlanonymoustest.endpoint.3"; - - private static final String WSDLLOC_URL3 = "wsaj2wdlanonymoustest.wsdlloc.3"; - - private static final String ENDPOINT_URL4 = "wsaj2wdlanonymoustest.endpoint.4"; - - private static final String WSDLLOC_URL4 = "wsaj2wdlanonymoustest.wsdlloc.4"; - - // NonAnonymousProcessor's - private static final String NONANONYMOUSPROCESSOR = "/NonAnonymousProcessor"; - - private static final String NONANONYMOUSPROCESSOR2 = "/NonAnonymousProcessor2"; - - // service and port information - private static final String NAMESPACEURI = "http://example.com/"; - - private static final String TARGET_NAMESPACE = NAMESPACEURI; - - private static final String SERVICE_NAME3 = "AddNumbersService3"; - - private static final String SERVICE_NAME4 = "AddNumbersService4"; - - private static final String PORT_NAME3 = "AddNumbersPort3"; - - private static final String PORT_NAME4 = "AddNumbersPort4"; - - private static QName SERVICE_QNAME3 = new QName(NAMESPACEURI, SERVICE_NAME3); - - private static QName SERVICE_QNAME4 = new QName(NAMESPACEURI, SERVICE_NAME4); - - private static QName PORT_QNAME3 = new QName(NAMESPACEURI, PORT_NAME3); - - private static QName PORT_QNAME4 = new QName(NAMESPACEURI, PORT_NAME4); - - private static AddressingFeature ENABLED_ADDRESSING_FEATURE = new AddressingFeature( - true, true); - - private static AddressingFeature DISABLED_ADDRESSING_FEATURE = new AddressingFeature( - false); - - private String file3 = null; - - private String file4 = null; - - private String urlToNonAnonymousProcessor = null; - - private String urlToNonAnonymousProcessor2 = null; - - private String url3 = null; - - private String url4 = null; - - private URL wsdlurl3 = null; - - private URL wsdlurl4 = null; - - AddNumbersPortType3 port3 = null; - - AddNumbersPortType4 port4 = null; - - static AddNumbersService3 service3 = null; - - static AddNumbersService4 service4 = null; - - String ReplyToHeaderForAnonymousResponsesSoapMsg = "{0}uuid:{1}
{2}
http://example.com/AddNumbersPortType3/add
1010testAnonymousResponsesReplyToHeader
"; - - String FaultToHeaderForAnonymousResponsesSoapMsg = "{0}uuid:{1}
{2}
{3}
http://example.com/AddNumbersPortType3/add
-10-10testAnonymousResponsesFaultToHeader
"; - - String ReplyToHeaderForNonAnonymousResponsesSoapMsg = "{0}uuid:{1}
{2}
http://example.com/AddNumbersPortType4/add
1010testNonAnonymousResponsesReplyToHeader
"; - - String FaultToHeaderForNonAnonymousResponsesSoapMsg = "{0}uuid:{1}
{2}
{3}
http://example.com/AddNumbersPortType4/add
-10-10testNonAnonymousResponsesFaultToHeader
"; - - String TestNonAnonymousResponsesAssertionSoapMsg = "{0}uuid:{1}
{2}
http://example.com/AddNumbersPortType4/add
1010testNonAnonymousResponsesAssertion
"; - - private Dispatch createDispatchSOAPMessage(Service service, - QName port) throws Exception { - return service.createDispatch(port, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE, DISABLED_ADDRESSING_FEATURE); - } - - private Dispatch createAnonymousResponsesDispatch() { - return service3.createDispatch(PORT_QNAME3, SOAPMessage.class, - Service.Mode.MESSAGE, ENABLED_ADDRESSING_FEATURE); - } - - private Dispatch createNonAnonymousResponsesDispatch() { - return service4.createDispatch(PORT_QNAME4, SOAPMessage.class, - Service.Mode.MESSAGE, ENABLED_ADDRESSING_FEATURE); - } - - private Dispatch createAnonymousResponsesDispatchWithoutAddressing() { - return service3.createDispatch(PORT_QNAME3, SOAPMessage.class, - Service.Mode.MESSAGE, DISABLED_ADDRESSING_FEATURE); - } - - private Dispatch createNonAnonymousResponsesDispatchWithoutAddressing() { - return service4.createDispatch(PORT_QNAME4, SOAPMessage.class, - Service.Mode.MESSAGE, DISABLED_ADDRESSING_FEATURE); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - file3 = JAXWS_Util.getURLFromProp(ENDPOINT_URL3); - url3 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file3); - file4 = JAXWS_Util.getURLFromProp(ENDPOINT_URL4); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file4); - if (endpointPublishSupport) { - urlToNonAnonymousProcessor = ctsurl.getURLString(PROTOCOL, hostname, - javaseServerPort, NONANONYMOUSPROCESSOR); - urlToNonAnonymousProcessor2 = ctsurl.getURLString(PROTOCOL, hostname, - javaseServerPort, NONANONYMOUSPROCESSOR2); - } else { - urlToNonAnonymousProcessor = ctsurl.getURLString(PROTOCOL, hostname, - portnum, NONANONYMOUSPROCESSOR); - urlToNonAnonymousProcessor2 = ctsurl.getURLString(PROTOCOL, hostname, - portnum, NONANONYMOUSPROCESSOR2); - } - - file3 = JAXWS_Util.getURLFromProp(WSDLLOC_URL3); - wsdlurl3 = ctsurl.getURL(PROTOCOL, hostname, portnum, file3); - file4 = JAXWS_Util.getURLFromProp(WSDLLOC_URL4); - wsdlurl4 = ctsurl.getURL(PROTOCOL, hostname, portnum, file4); - TestUtil.logMsg( - "NonAnonymousProcessor Endpoint: " + urlToNonAnonymousProcessor); - TestUtil.logMsg( - "NonAnonymousProcessor2 Endpoint: " + urlToNonAnonymousProcessor2); - TestUtil.logMsg("Service Endpoint URL3: " + url3); - TestUtil.logMsg("Service Endpoint URL4: " + url4); - TestUtil.logMsg("WSDL Location URL3: " + wsdlurl3); - TestUtil.logMsg("WSDL Location URL4: " + wsdlurl4); - } - - private void getPortsStandalone() throws Exception { - port3 = (AddNumbersPortType3) JAXWS_Util.getPort(service3, PORT_QNAME3, - AddNumbersPortType3.class); - port4 = (AddNumbersPortType4) JAXWS_Util.getPort(service4, PORT_QNAME4, - AddNumbersPortType4.class); - TestUtil.logMsg("port3=" + port3); - TestUtil.logMsg("port4=" + port4); - JAXWS_Util.setTargetEndpointAddress(port3, url3); - JAXWS_Util.setTargetEndpointAddress(port4, url4); - JAXWS_Util.setSOAPLogging(port3); - JAXWS_Util.setSOAPLogging(port4); - } - - private void getPortsJavaEE() throws Exception { - javax.naming.InitialContext ic = new javax.naming.InitialContext(); - - TestUtil.logMsg("Obtain service3 via JNDI lookup"); - service3 = (AddNumbersService3) ic - .lookup("java:comp/env/service/WSAJ2WDLAnonymousTest3"); - TestUtil.logMsg("service3=" + service3); - port3 = (AddNumbersPortType3) service3.getPort(AddNumbersPortType3.class); - - TestUtil.logMsg("Obtain service4 via JNDI lookup"); - service4 = (AddNumbersService4) ic - .lookup("java:comp/env/service/WSAJ2WDLAnonymousTest4"); - TestUtil.logMsg("service4=" + service4); - port4 = (AddNumbersPortType4) service4.getPort(AddNumbersPortType4.class); - - JAXWS_Util.dumpTargetEndpointAddress(port3); - JAXWS_Util.dumpTargetEndpointAddress(port4); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * port.range.min; port.range.max; http.server.supports.endpoint.publish; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - endpointPublishSupport = Boolean - .parseBoolean(p.getProperty(ENDPOINTPUBLISHPROP)); - modeProperty = p.getProperty(MODEPROP); - - if (endpointPublishSupport) { - try { - maxPort = Integer.parseInt(p.getProperty(MAXPORT)); - } catch (Exception e) { - maxPort = -1; - } - try { - minPort = Integer.parseInt(p.getProperty(MINPORT)); - } catch (Exception e) { - minPort = -1; - } - - TestUtil.logMsg("minPort=" + minPort); - TestUtil.logMsg("maxPort=" + maxPort); - - javaseServerPort = JAXWS_Util.getFreePort(); - if (javaseServerPort <= 0) { - TestUtil.logMsg("Free port not found, use standard webserver port."); - javaseServerPort = portnum; - pass = false; - } - - getTestURLs(); - service3 = (AddNumbersService3) JAXWS_Util.getService(wsdlurl3, - SERVICE_QNAME3, AddNumbersService3.class); - service4 = (AddNumbersService4) JAXWS_Util.getService(wsdlurl4, - SERVICE_QNAME4, AddNumbersService4.class); - getPortsStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - getTestURLs(); - getPortsJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: testAnonymousResponsesAssertion - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * - * @test_Strategy: Invocation on port marked with AnonymousResponses assertion - * Verify that wsa:ReplyTo in the SOAPRequest is the anonymous URI. Verify - * that wsa:To in the SOAPResponse is the anonymous URI. - */ - public void testAnonymousResponsesAssertion() throws Fault { - TestUtil.logMsg("testAnonymousResponsesAssertion"); - boolean pass = true; - - try { - port3.addNumbers(10, 10, "testAnonymousResponsesAssertion"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: ", e); - pass = false; - } - - if (!pass) - throw new Fault("testAnonymousResponsesAssertion failed"); - } - - /* - * @testName: testNonAnonymousResponsesAssertion - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.3; - * - * @test_Strategy: Invocation on port marked with NonAnonymousResponses - * assertion. The header may or may not be set by default depending - * on the implementation. The test has to account for this. - */ - public void testNonAnonymousResponsesAssertion() throws Fault { - TestUtil.logMsg("testNonAnonymousResponsesAssertion"); - boolean pass = true; - - try { - TestUtil.logMsg("Expect a WebServiceException on port invocation"); - port4.addNumbers(10, 10, "testNonAnonymousResponsesAssertion"); - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - - if (!pass) - throw new Fault("testNonAnonymousResponsesAssertion failed"); - } - - /* - * @testName: testNonAnonymousResponsesWithReplyToSetToValidProviderEndpoint - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for NonAnonymousResponses assertion where - * header is set to a NonAnonymousProvider which will process the SOAP - * response. Verify that the NonAnonymousProvider recieved the SOAP response. - */ - public void testNonAnonymousResponsesWithReplyToSetToValidProviderEndpoint() - throws Fault { - TestUtil.logMsg( - "testNonAnonymousResponsesWithReplyToSetToValidProviderEndpoint"); - boolean pass = true; - - SOAPMessage request = null, response = null; - Dispatch dispatchSM; - Endpoint responseProcessor = null; - Exchanger respMsgExchanger = new Exchanger(); - - try { - if (modeProperty.equals("standalone") && endpointPublishSupport) { - responseProcessor = Endpoint - .create(new NonAnonymousRespProcessor(respMsgExchanger)); - responseProcessor.publish(urlToNonAnonymousProcessor); - String soapmsg = MessageFormat.format( - ReplyToHeaderForNonAnonymousResponsesSoapMsg, url4, - UUID.randomUUID(), urlToNonAnonymousProcessor); - dispatchSM = createDispatchSOAPMessage(service4, PORT_QNAME4); - request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - dispatchSM.invokeAsync(request); - response = respMsgExchanger.exchange(null, 30L, TimeUnit.SECONDS); - if (response != null) { - System.out.println("****************************"); - response.writeTo(System.out); - System.out.println("\n****************************"); - } else { - pass = false; - } - } - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } finally { - if (responseProcessor != null) - responseProcessor.stop(); - } - if (!pass) - throw new Fault( - "testNonAnonymousResponsesWithReplyToSetToValidProviderEndpoint failed"); - } - - /* - * @testName: testNonAnonymousResponsesWithFaultToSetToValidProviderEndpoint - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for NonAnonymousResponses assertion where - * header is set to a NonAnonymousProvider which will process the SOAP - * response. Verify that the NonAnonymousProvider received the SOAPFault - * message. - */ - public void testNonAnonymousResponsesWithFaultToSetToValidProviderEndpoint() - throws Fault { - TestUtil.logMsg( - "testNonAnonymousResponsesWithFaultToSetToValidProviderEndpoint"); - boolean pass = true; - - SOAPMessage request = null, response = null; - Dispatch dispatchSM; - Endpoint responseProcessor = null; - Endpoint responseProcessor2 = null; - Exchanger respMsgExchanger = new Exchanger(); - Exchanger respMsgExchanger2 = new Exchanger(); - - try { - if (modeProperty.equals("standalone") && endpointPublishSupport) { - responseProcessor = Endpoint - .create(new NonAnonymousRespProcessor(respMsgExchanger)); - responseProcessor.publish(urlToNonAnonymousProcessor); - responseProcessor2 = Endpoint - .create(new NonAnonymousRespProcessor2(respMsgExchanger2)); - responseProcessor2.publish(urlToNonAnonymousProcessor2); - String soapmsg = MessageFormat.format( - FaultToHeaderForNonAnonymousResponsesSoapMsg, url4, - UUID.randomUUID(), urlToNonAnonymousProcessor2, - urlToNonAnonymousProcessor); - dispatchSM = createDispatchSOAPMessage(service4, PORT_QNAME4); - request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - dispatchSM.invokeAsync(request); - response = respMsgExchanger2.exchange(null, 30L, TimeUnit.SECONDS); - if (response != null) { - System.out.println("****************************"); - response.writeTo(System.out); - System.out.println("\n****************************"); - } else { - pass = false; - } - } - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } finally { - if (responseProcessor != null) - responseProcessor.stop(); - if (responseProcessor2 != null) - responseProcessor2.stop(); - } - if (!pass) - throw new Fault( - "testNonAnonymousResponsesWithFaultToSetToValidProviderEndpoint failed"); - } - - /* - * @testName: testAnonymousResponsesWithReplyToSetToNone - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for AnonymousResponses assertion where - * header is set to the None URI. This value must be accepted. - * - */ - public void testAnonymousResponsesWithReplyToSetToNone() throws Fault { - TestUtil.logMsg("testAnonymousResponsesWithReplyToSetToNone"); - boolean pass = true; - boolean done = false; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - ReplyToHeaderForAnonymousResponsesSoapMsg, url3, UUID.randomUUID(), - W3CAddressingConstants.WSA_NONE_ADDRESS); - dispatchSM = createDispatchSOAPMessage(service3, PORT_QNAME3); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("testAnonymousResponsesWithReplyToSetToNone failed"); - } - - /* - * @testName: testAnonymousResponsesWithFaultToSetToNone - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for AnonymousResponses assertion where - * header is set to the None URI. This value must be accepted. - * - */ - public void testAnonymousResponsesWithFaultToSetToNone() throws Fault { - TestUtil.logMsg("testAnonymousResponsesWithFaultToSetToNone"); - boolean pass = true; - boolean done = false; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - FaultToHeaderForAnonymousResponsesSoapMsg, url3, UUID.randomUUID(), - W3CAddressingConstants.WSA_NONE_ADDRESS, - W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS); - dispatchSM = createDispatchSOAPMessage(service3, PORT_QNAME3); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("testAnonymousResponsesWithFaultToSetToNone failed"); - } - - /* - * @testName: testNonAnonymousResponsesWithReplyToSetToNone - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for NonAnonymousResponses assertion where - * header is set to the None URI. This value must be accepted. - */ - public void testNonAnonymousResponsesWithReplyToSetToNone() throws Fault { - TestUtil.logMsg("testNonAnonymousResponsesWithReplyToSetToNone"); - boolean pass = true; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - ReplyToHeaderForNonAnonymousResponsesSoapMsg, url4, UUID.randomUUID(), - W3CAddressingConstants.WSA_NONE_ADDRESS); - dispatchSM = createDispatchSOAPMessage(service4, PORT_QNAME4); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("testNonAnonymousResponsesWithReplyToSetToNone failed"); - } - - /* - * @testName: testNonAnonymousResponsesWithFaultToSetToNone - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for NonAnonymousResponses assertion where - * header is set to the None URI. This value must be accepted. - */ - public void testNonAnonymousResponsesWithFaultToSetToNone() throws Fault { - TestUtil.logMsg("testNonAnonymousResponsesWithFaultToSetToNone"); - boolean pass = true; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - FaultToHeaderForNonAnonymousResponsesSoapMsg, url4, UUID.randomUUID(), - W3CAddressingConstants.WSA_NONE_ADDRESS, - W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS); - dispatchSM = createDispatchSOAPMessage(service4, PORT_QNAME4); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("testNonAnonymousResponsesWithFaultToSetToNone failed"); - } - - /* - * @testName: testOnlyAnonymousAddressSupportedFaultBadReplyTo - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for OnlyAnonymousAddressSupported fault from client - * runtime. Pass in soap message with header not equal to Anonymous - * URI. Expect SOAPFault. - * - */ - public void testOnlyAnonymousAddressSupportedFaultBadReplyTo() throws Fault { - TestUtil.logMsg("testOnlyAnonymousAddressSupportedFaultBadReplyTo"); - boolean pass = true; - boolean done = false; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - ReplyToHeaderForAnonymousResponsesSoapMsg, url3, UUID.randomUUID(), - url3 + "/badurl"); - dispatchSM = createDispatchSOAPMessage(service3, PORT_QNAME3); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (SOAPFaultException e) { - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(e)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(e)); - if (WsaSOAPUtils.isOnlyAnonymousAddressSupportedFaultCode(e)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(e); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(e) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(e) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - done = true; - } catch (SOAPException e2) { - TestUtil.logErr("Caught unexpected exception: ", e2); - pass = false; - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault( - "testOnlyAnonymousAddressSupportedFaultBadReplyTo failed"); - if (done) - return; - - try { - if (response == null) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - if (!response.getSOAPPart().getEnvelope().getBody().hasFault()) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } catch (SOAPException e) { - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(response)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(response)); - if (WsaSOAPUtils.isOnlyAnonymousAddressSupportedFaultCode(response)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(response); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(response) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(response) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - - if (!pass) - throw new Fault( - "testOnlyAnonymousAddressSupportedFaultBadReplyTo failed"); - } - - /* - * @testName: testOnlyAnonymousAddressSupportedFaultBadFaultTo - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for OnlyAnonymousAddressSupported fault from client - * runtime. Pass in soap message with header not equal to Anonymous - * URI. Expect SOAPFault. - * - */ - public void testOnlyAnonymousAddressSupportedFaultBadFaultTo() throws Fault { - TestUtil.logMsg("testOnlyAnonymousAddressSupportedFaultBadFaultTo"); - boolean pass = true; - boolean done = false; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - FaultToHeaderForAnonymousResponsesSoapMsg, url3, UUID.randomUUID(), - url3 + "/badurl", W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS); - dispatchSM = createDispatchSOAPMessage(service3, PORT_QNAME3); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (SOAPFaultException e) { - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(e)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(e)); - if (WsaSOAPUtils.isOnlyAnonymousAddressSupportedFaultCode(e)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(e); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(e) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(e) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - done = true; - } catch (SOAPException e2) { - TestUtil.logErr("Caught unexpected exception: ", e2); - pass = false; - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault( - "testOnlyAnonymousAddressSupportedFaultBadFaultTo failed"); - if (done) - return; - - try { - if (response == null) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - if (!response.getSOAPPart().getEnvelope().getBody().hasFault()) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } catch (SOAPException e) { - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } - - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(response)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(response)); - if (WsaSOAPUtils.isOnlyAnonymousAddressSupportedFaultCode(response)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(response); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(response) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(response) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - - if (!pass) - throw new Fault( - "testOnlyAnonymousAddressSupportedFaultBadFaultTo failed"); - } - - /* - * @testName: testOnlyNonAnonymousAddressSupportedFaultBadReplyTo - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.3; - * WSASB:SPEC:6012; WSASB:SPEC:6012.8; WSASB:SPEC:6013; - * - * @test_Strategy: Test for OnlyNonAnonymousAddressSupported fault from client - * runtime. Pass in soap message with header equal to Anonymous URI. - * Expect SOAPFault. - * - */ - public void testOnlyNonAnonymousAddressSupportedFaultBadReplyTo() - throws Fault { - TestUtil.logMsg("testOnlyNonAnonymousAddressSupportedFaultBadReplyTo"); - boolean pass = true; - boolean done = false; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - ReplyToHeaderForNonAnonymousResponsesSoapMsg, url4, UUID.randomUUID(), - W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS); - dispatchSM = createDispatchSOAPMessage(service4, PORT_QNAME4); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (SOAPFaultException e) { - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(e)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(e)); - if (WsaSOAPUtils.isOnlyNonAnonymousAddressSupportedFaultCode(e)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyNonAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(e); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyNonAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(e) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(e) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - done = true; - } catch (SOAPException e2) { - TestUtil.logErr("Caught unexpected exception: ", e2); - pass = false; - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - - if (!pass) - throw new Fault( - "testOnlyNonAnonymousAddressSupportedFaultBadReplyTo failed"); - - if (done) - return; - - try { - if (response == null) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - if (!response.getSOAPPart().getEnvelope().getBody().hasFault()) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } catch (SOAPException e) { - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(response)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(response)); - if (WsaSOAPUtils.isOnlyNonAnonymousAddressSupportedFaultCode(response)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyNonAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(response); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyNonAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(response) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(response) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - - if (!pass) - throw new Fault( - "testOnlyNonAnonymousAddressSupportedFaultBadReplyTo failed"); - } - - /* - * @testName: testOnlyNonAnonymousAddressSupportedFaultBadFaultTo - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.3; - * WSASB:SPEC:6012; WSASB:SPEC:6012.8; WSASB:SPEC:6013; - * - * @test_Strategy: Test for OnlyNonAnonymousAddressSupported fault from client - * runtime. Pass in soap message with header equal to Anonymous URI. - * Expect SOAPFault. - * - */ - public void testOnlyNonAnonymousAddressSupportedFaultBadFaultTo() - throws Fault { - TestUtil.logMsg("testOnlyNonAnonymousAddressSupportedFaultBadFaultTo"); - boolean pass = true; - boolean done = false; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - FaultToHeaderForNonAnonymousResponsesSoapMsg, url4, UUID.randomUUID(), - W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS, - W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS); - dispatchSM = createDispatchSOAPMessage(service4, PORT_QNAME4); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (SOAPFaultException e) { - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(e)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(e)); - if (WsaSOAPUtils.isOnlyNonAnonymousAddressSupportedFaultCode(e)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyNonAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(e); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyNonAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(e) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(e) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - done = true; - } catch (SOAPException e2) { - TestUtil.logErr("Caught unexpected exception: ", e2); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: ", e); - pass = false; - } - - if (!pass) - throw new Fault( - "testOnlyNonAnonymousAddressSupportedFaultBadFaultTo failed"); - - if (done) - return; - - try { - if (response == null) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - if (!response.getSOAPPart().getEnvelope().getBody().hasFault()) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } catch (SOAPException e) { - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(response)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(response)); - if (WsaSOAPUtils.isOnlyNonAnonymousAddressSupportedFaultCode(response)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyNonAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(response); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyNonAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(response) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(response) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - - if (!pass) - throw new Fault( - "testOnlyNonAnonymousAddressSupportedFaultBadFaultTo failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/ClientSOAPHandler.java deleted file mode 100644 index 077d2c9106..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/ClientSOAPHandler.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientSOAPHandler.java 52501 2007-01-24 02:29:49Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, "testAnonymousResponsesAssertion")) { - VerifyAddressingHeadersForAnonymousResponsesAssertion(context, action); - } else if (Handler_Util.checkForMsg(context, - "testNonAnonymousResponsesAssertion")) { - VerifyAddressingHeadersForNonAnonymousResponsesAssertion(context, action); - } - } - - private void VerifyAddressingHeadersForAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ClientSOAPHandler.VerifyAddressingHeadersForAnonymousResponsesAssertion"); - if (!TestConstants.TEST_ANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION - .equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.TEST_ANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION - + ", Actual:" + action); - } - String to = null; - try { - to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - } catch (Exception e) { - } - if (to != null) { - if (!to.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI) - && !to.equals(W3CAddressingConstants.WSA_NONE_ADDRESS)) { - throw new AddressingPropertyException("Expected: wsa:To=" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI + " or " - + W3CAddressingConstants.WSA_NONE_ADDRESS + ", Actual: wsa:To=" - + to); - } - } - try { - String relatesTo = getRelatesTo(context); - TestUtil.logMsg("[RelatesTo=" + relatesTo + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:RelatesTo was not set (unexpected)"); - } - } - - private void VerifyAddressingHeadersForNonAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ClientSOAPHandler.VerifyAddressingHeadersForNonAnonymousResponsesAssertion"); - if (!TestConstants.TEST_NONANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION - .equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.TEST_NONANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION - + ", Actual:" + action); - } - String to = null; - try { - to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - } catch (Exception e) { - } - if (to != null - && to.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI)) { - throw new AddressingPropertyException("Expected: wsa:To=!" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI - + ", Actual: wsa:To=" + to); - } - try { - String relatesTo = getRelatesTo(context); - TestUtil.logMsg("[RelatesTo=" + relatesTo + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:RelatesTo was not set (unexpected)"); - } - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/NonAnonymousRespProcessor.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/NonAnonymousRespProcessor.java deleted file mode 100644 index 68341aac01..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/NonAnonymousRespProcessor.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: NonAnonymousRespProcessor.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous; - -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.*; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import java.util.Calendar; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.Exchanger; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.io.IOException; - -/** - * This class handles the non-anonymous ReplyTo responses - * - * @author Alan Frechette - */ -@WebServiceProvider -@ServiceMode(value = Service.Mode.MESSAGE) -public class NonAnonymousRespProcessor implements Provider { - Exchanger msgExchanger; - - public NonAnonymousRespProcessor() { - } - - public NonAnonymousRespProcessor(Exchanger msgExchanger) { - this.msgExchanger = msgExchanger; - } - - public SOAPMessage invoke(SOAPMessage request) { - System.out.printf("====%s[start:%tc]====\n", getClass().getName(), - Calendar.getInstance()); - try { - request.writeTo(System.out); - } catch (SOAPException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - System.out.printf("====%s[end:%tc]====\n", getClass().getName(), - Calendar.getInstance()); - try { - msgExchanger.exchange(request, 30L, TimeUnit.SECONDS); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (TimeoutException e) { - e.printStackTrace(); - } - return null; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/NonAnonymousRespProcessor2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/NonAnonymousRespProcessor2.java deleted file mode 100644 index 5464065182..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/NonAnonymousRespProcessor2.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: NonAnonymousRespProcessor2.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous; - -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.*; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import java.util.Calendar; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.Exchanger; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.io.IOException; - -/** - * This class handles the non-anonymous FaultTo responses - * - * @author Alan Frechette - */ -@WebServiceProvider -@ServiceMode(value = Service.Mode.MESSAGE) -public class NonAnonymousRespProcessor2 implements Provider { - Exchanger msgExchanger; - - public NonAnonymousRespProcessor2() { - } - - public NonAnonymousRespProcessor2(Exchanger msgExchanger) { - this.msgExchanger = msgExchanger; - } - - public SOAPMessage invoke(SOAPMessage request) { - System.out.printf("====%s[start:%tc]====\n", getClass().getName(), - Calendar.getInstance()); - try { - request.writeTo(System.out); - } catch (SOAPException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - System.out.printf("====%s[end:%tc]====\n", getClass().getName(), - Calendar.getInstance()); - try { - msgExchanger.exchange(request, 30L, TimeUnit.SECONDS); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (TimeoutException e) { - e.printStackTrace(); - } - return null; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/ServerSOAPHandler.java deleted file mode 100644 index 4b9565594b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/ServerSOAPHandler.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2007-01-24 02:29:49Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, "testAnonymousResponsesAssertion")) { - VerifyAddressingHeadersForAnonymousResponsesAssertion(context, action); - } else if (Handler_Util.checkForMsg(context, - "testNonAnonymousResponsesAssertion")) { - VerifyAddressingHeadersForNonAnonymousResponsesAssertion(context, action); - } - } - - private void VerifyAddressingHeadersForAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ServerSOAPHandler.VerifyAddressingHeadersForAnonymousResponsesAssertion"); - System.out.println( - "ServerSOAPHandler.VerifyAddressingHeadersForAnonymousResponsesAssertion"); - if (!TestConstants.TEST_ANONYMOUS_RESPONSES_ASSERTION_IN_ACTION - .equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.TEST_ANONYMOUS_RESPONSES_ASSERTION_IN_ACTION - + ", Actual:" + action); - } - try { - String to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - System.out.println("[To=" + to + "]"); - } catch (Exception e) { - } - String replyTo = null; - try { - replyTo = getReplyTo(context); - TestUtil.logMsg("[ReplyTo=" + replyTo + "]"); - System.out.println("[ReplyTo=" + replyTo + "]"); - } catch (Exception e) { - } - if (replyTo != null) { - if (!replyTo.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI) - && !replyTo.equals(W3CAddressingConstants.WSA_NONE_ADDRESS)) { - throw new AddressingPropertyException("Expected: wsa:ReplyTo=" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI + " or " - + W3CAddressingConstants.WSA_NONE_ADDRESS + ", Actual: wsa:ReplyTo=" - + replyTo); - } - } - try { - String messageID = getMessageId(context); - TestUtil.logMsg("[MessageID=" + messageID + "]"); - System.out.println("[MessageID=" + messageID + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:MessageID was not set (unexpected)"); - } - } - - private void VerifyAddressingHeadersForNonAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ServerSOAPHandler.VerifyAddressingHeadersForNonAnonymousResponsesAssertion"); - System.out.println( - "ServerSOAPHandler.VerifyAddressingHeadersForNonAnonymousResponsesAssertion"); - if (!TestConstants.TEST_NONANONYMOUS_RESPONSES_ASSERTION_IN_ACTION - .equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.TEST_NONANONYMOUS_RESPONSES_ASSERTION_IN_ACTION - + ", Actual:" + action); - } - try { - String to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - System.out.println("[To=" + to + "]"); - } catch (Exception e) { - } - String replyTo; - try { - replyTo = getReplyTo(context); - TestUtil.logMsg("[ReplyTo=" + replyTo + "]"); - System.out.println("[ReplyTo=" + replyTo + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:ReplyTo was not set (unexpected)"); - } - if (replyTo.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI)) - throw new AddressingPropertyException("Expected: wsa:ReplyTo=!" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI - + ", Actual: wsa:ReplyTo=" + replyTo); - try { - String messageID = getMessageId(context); - TestUtil.logMsg("[MessageID=" + messageID + "]"); - System.out.println("[MessageID=" + messageID + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:MessageID was not set (unexpected)"); - } - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/TestConstants.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/TestConstants.java deleted file mode 100644 index 39fc5851f8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/TestConstants.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2007-01-24 02:29:49Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous; - -public class TestConstants { - public static final String TEST_ANONYMOUS_RESPONSES_ASSERTION_IN_ACTION = "http://example.com/AddNumbersPortType3/add"; - - public static final String TEST_ANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION = "http://example.com/AddNumbersPortType3/addResponse"; - - public static final String TEST_NONANONYMOUS_RESPONSES_ASSERTION_IN_ACTION = "http://example.com/AddNumbersPortType4/add"; - - public static final String TEST_NONANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION = "http://example.com/AddNumbersPortType4/addResponse"; -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/build.xml deleted file mode 100644 index 87b3811527..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/build.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/jakartaEE.tokens deleted file mode 100644 index 62719e4027..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/jakartaEE.tokens +++ /dev/null @@ -1,19 +0,0 @@ -WSREFSEJBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSAJ2WDLAnonymousTest3", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService3.class, wsdlLocation="META-INF/wsdl/AddNumbersService3.wsdl"), @WebServiceRef(name="service/WSAJ2WDLAnonymousTest4", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService4.class, wsdlLocation="META-INF/wsdl/AddNumbersService4.wsdl")}) - -WSREFSAPPCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSAJ2WDLAnonymousTest3", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService3.class, wsdlLocation="META-INF/wsdl/AddNumbersService3.wsdl"), @WebServiceRef(name="service/WSAJ2WDLAnonymousTest4", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService4.class, wsdlLocation="META-INF/wsdl/AddNumbersService4.wsdl")}) - -WSREFSWEBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSAJ2WDLAnonymousTest3", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService3.class, wsdlLocation="WEB-INF/wsdl/AddNumbersService3.wsdl"), @WebServiceRef(name="service/WSAJ2WDLAnonymousTest4", type=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService4.class, wsdlLocation="WEB-INF/wsdl/AddNumbersService4.wsdl")}) - -SERVICE=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService3 -SERVICE2=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersService4 -SEI=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType3 -SEI2=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersPortType4 -IMPL=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersImpl3 -IMPL2=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersImpl4 -URLALIAS=/jaxws/AddNumbers3 -URLALIAS2=/jaxws/AddNumbers4 -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersImpl3 -SERVLETNAME2=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.AddNumbersImpl4 -NAMESPACEURI=http://example.com/ -PORT=AddNumbersPort3 -PORT2=AddNumbersPort4 diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/server-handler.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/server-handler.xml deleted file mode 100644 index 648e854e32..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/anonymous/server-handler.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.anonymous.ServerSOAPHandler - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/build.xml deleted file mode 100644 index 5b60bde749..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/Client.java deleted file mode 100644 index a204356f9f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/Client.java +++ /dev/null @@ -1,1475 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 51075 2003-03-27 10:44:21Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.epr; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; - -import jakarta.xml.ws.*; -import jakarta.xml.soap.*; -import java.util.Properties; -import javax.xml.namespace.QName; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.*; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import jakarta.xml.ws.soap.AddressingFeature; -import jakarta.xml.ws.soap.SOAPFaultException; -import jakarta.xml.bind.JAXBContext; -import jakarta.xml.bind.JAXBElement; -import javax.xml.transform.Source; -import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.stream.StreamSource; -import javax.xml.transform.stream.StreamResult; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.j2w.document.literal.epr."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsaj2wdleprtest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsaj2wdleprtest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - // service and port information - private static final String NAMESPACEURI = "http://foobar.org/"; - - private static final String SERVICE_NAME = "AddNumbersService"; - - private static final String PORT_NAME = "AddNumbersPort"; - - private static final String PORT_TYPE_NAME = "AddNumbers"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private QName PORT_TYPE_QNAME = new QName(NAMESPACEURI, PORT_TYPE_NAME); - - private WebServiceFeature[] wsftrue = { new AddressingFeature(true, true) }; - - private WebServiceFeature[] wsffalse = { - new AddressingFeature(false, false) }; - - AddNumbers port = null; - - BindingProvider bp = null; - - static AddNumbersService service = null; - - private Source source = null; - - private Dispatch dispatchJaxb = null; - - private Dispatch dispatchSrc = null; - - private Dispatch dispatchSM = null; - - private String doAddNumbersRequest = "1010"; - - private String doAddNumbersRequestSM = "1010"; - - private static final Class JAXB_OBJECT_FACTORY = com.sun.ts.tests.jaxws.wsa.j2w.document.literal.epr.ObjectFactory.class; - - private JAXBContext createJAXBContext() { - try { - return JAXBContext.newInstance(JAXB_OBJECT_FACTORY); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - private Dispatch createDispatchJAXB(W3CEndpointReference myepr, - WebServiceFeature[] wsf) throws Exception { - if (wsf == null) - return service.createDispatch(myepr, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD); - else - return service.createDispatch(myepr, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD, wsf); - } - - private Dispatch createDispatchSource(W3CEndpointReference myepr, - WebServiceFeature[] wsf) throws Exception { - if (wsf == null) - return service.createDispatch(myepr, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD); - else - return service.createDispatch(myepr, Source.class, - jakarta.xml.ws.Service.Mode.PAYLOAD, wsf); - } - - private Dispatch createDispatchSOAPMessage( - W3CEndpointReference myepr, WebServiceFeature[] wsf) throws Exception { - if (wsf == null) - return service.createDispatch(myepr, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE); - else - return service.createDispatch(myepr, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE, wsf); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - TestUtil.logMsg("Obtain service via Service.create(URL, QName)"); - service = (AddNumbersService) JAXWS_Util.getService(wsdlurl, SERVICE_QNAME, - AddNumbersService.class); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Obtain port"); - port = (AddNumbers) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddNumbersService.class, PORT_QNAME, AddNumbers.class, wsftrue); - bp = (BindingProvider) port; - JAXWS_Util.setTargetEndpointAddress(port, url); - JAXWS_Util.dumpTargetEndpointAddress(port); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("bindingProvider=" + bp); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Obtain port"); - port = (AddNumbers) service.getPort(AddNumbers.class, wsftrue); - bp = (BindingProvider) port; - JAXWS_Util.dumpTargetEndpointAddress(port); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("bindingProvider=" + bp); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg("WebServiceRef is not set in Client " - + "(get it from specific vehicle)"); - service = (AddNumbersService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server in " + "config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: EPRGetEPRViaWSCTest1 - * - * @assertion_ids: WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:158; JAXWS:SPEC:4027.3; JAXWS:SPEC:4027.4; JAXWS:SPEC:4027.5; - * WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; WSAMD:SPEC:2001; - * WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; WSAMD:SPEC:2002; - * WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; WSAMD:SPEC:2002.4; - * JAXWS:SPEC:5027; JAXWS:SPEC:5028; - * - * @test_Strategy: Retrieve EPR via WebServiceContext.getEndpointReference(). - * - */ - public void EPRGetEPRViaWSCTest1() throws Fault { - TestUtil.logMsg("EPRGetEPRViaWSCTest1"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via WebServiceContext.getEndpointReference()"); - W3CEndpointReference epr = port.getW3CEPR1(); - if (epr != null) { - TestUtil.logMsg("---------------------------"); - TestUtil.logMsg("DUMP OF ENDPOINT REFERENCE"); - TestUtil.logMsg("---------------------------"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - DOMResult dr = new DOMResult(); - epr.writeTo(dr); - XMLUtils.xmlDumpDOMNodes(dr.getNode(), false); - TestUtil.logMsg("Validate the EPR for correctness)"); - if (!EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.TRUE, wsdlurl.toString())) - pass = false; - } else { - TestUtil.logErr("EPR is null (unexpected)"); - pass = false; - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRGetEPRViaWSCTest1 failed"); - } - - /* - * @testName: EPRGetEPRViaWSCTest2 - * - * @assertion_ids: WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:159; JAXWS:SPEC:4027.3; JAXWS:SPEC:4027.4; JAXWS:SPEC:4027.5; - * WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; WSAMD:SPEC:2001; - * WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; WSAMD:SPEC:2002; - * WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; WSAMD:SPEC:2002.4; - * JAXWS:SPEC:5027; JAXWS:SPEC:5028; - * - * @test_Strategy: Retrieve EPR via WebServiceContext.getEndpointReference( - * java.lang.Class). - */ - public void EPRGetEPRViaWSCTest2() throws Fault { - TestUtil.logMsg("EPRGetEPRViaWSCTest2"); - boolean pass = true; - try { - TestUtil.logMsg( - "Retrieve EPR via WebServiceContext.getEndpointReference(java.lang.Class)"); - W3CEndpointReference epr = port.getW3CEPR2(); - if (epr != null) { - TestUtil.logMsg("---------------------------"); - TestUtil.logMsg("DUMP OF ENDPOINT REFERENCE"); - TestUtil.logMsg("---------------------------"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - DOMResult dr = new DOMResult(); - epr.writeTo(dr); - XMLUtils.xmlDumpDOMNodes(dr.getNode(), false); - if (!EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.TRUE, wsdlurl.toString())) - pass = false; - } else { - TestUtil.logErr("EPR is null (unexpected)"); - pass = false; - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRGetEPRViaWSCTest2 failed"); - } - - /* - * @testName: EPRGetEPRViaBPTest1 - * - * @assertion_ids: WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:186; JAXWS:SPEC:4027.3; JAXWS:SPEC:4027.4; JAXWS:SPEC:4027.5; - * WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; WSAMD:SPEC:2001; - * WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; WSAMD:SPEC:2002; - * WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; WSAMD:SPEC:2002.4; - * JAXWS:SPEC:5027; JAXWS:SPEC:4022; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference(). - * - */ - public void EPRGetEPRViaBPTest1() throws Fault { - TestUtil.logMsg("EPRGetEPRViaBPTest1"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via BindingProvider.getEndpointReference()"); - W3CEndpointReference epr = (W3CEndpointReference) bp - .getEndpointReference(); - if (epr != null) { - TestUtil.logMsg("---------------------------"); - TestUtil.logMsg("DUMP OF ENDPOINT REFERENCE"); - TestUtil.logMsg("---------------------------"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - DOMResult dr = new DOMResult(); - epr.writeTo(dr); - XMLUtils.xmlDumpDOMNodes(dr.getNode(), false); - if (!EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.TRUE, wsdlurl.toString())) - pass = false; - } else { - TestUtil.logErr("EPR is null (unexpected)"); - pass = false; - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRGetEPRViaBPTest1 failed"); - } - - /* - * @testName: EPRGetEPRViaBPTest2 - * - * @assertion_ids: WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:187; JAXWS:SPEC:4027.3; JAXWS:SPEC:4027.4; JAXWS:SPEC:4027.5; - * WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; WSAMD:SPEC:2001; - * WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; WSAMD:SPEC:2002; - * WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; WSAMD:SPEC:2002.4; - * JAXWS:SPEC:5027; JAXWS:SPEC:4022; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference( - * java.lang.Class). - */ - public void EPRGetEPRViaBPTest2() throws Fault { - TestUtil.logMsg("EPRGetEPRViaBPTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Retrieve EPR via BindingProvider.getEndpointReference(" - + "java.lang.Class)"); - W3CEndpointReference epr = (W3CEndpointReference) bp.getEndpointReference( - jakarta.xml.ws.wsaddressing.W3CEndpointReference.class); - if (epr != null) { - TestUtil.logMsg("---------------------------"); - TestUtil.logMsg("DUMP OF ENDPOINT REFERENCE"); - TestUtil.logMsg("---------------------------"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - DOMResult dr = new DOMResult(); - epr.writeTo(dr); - XMLUtils.xmlDumpDOMNodes(dr.getNode(), false); - if (!EprUtil.validateEPR(epr, url, SERVICE_QNAME, PORT_QNAME, - PORT_TYPE_QNAME, Boolean.TRUE, wsdlurl.toString())) - pass = false; - } else { - TestUtil.logErr("EPR is null (unexpected)"); - pass = false; - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRGetEPRViaBPTest2 failed"); - } - - /* - * @testName: EPRGetEPRViaBPWithUnsupportedEPRClassTest - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:187; JAXWS:SPEC:4027.3; JAXWS:SPEC:4027.4; JAXWS:SPEC:4027.5; - * JAXWS:SPEC:4027.6; JAXWS:SPEC:5024.3; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference( - * java.lang.Class). Pass in an invalid Class. Expect a WebServiceException to - * be thrown. - */ - public void EPRGetEPRViaBPWithUnsupportedEPRClassTest() throws Fault { - TestUtil.logMsg("EPRGetEPRViaBPWithUnsupportedEPRClassTest"); - boolean pass = true; - try { - TestUtil.logMsg("Retrieve EPR via BindingProvider.getEndpointReference(" - + "java.lang.Class)"); - TestUtil.logMsg( - "Pass in unsupported EPR Class and expect WebServiceException"); - MyEPR epr = (MyEPR) bp.getEndpointReference(MyEPR.class); - TestUtil.logErr("Did not throw expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRGetEPRViaBPWithUnsupportedEPRClassTest failed"); - } - - /* - * @testName: EPRWriteToAndReadFromTest - * - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:141; JAXWS:JAVADOC:142; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference(). - * Write EPR as an XML Infoset Object using writeTo() method and then read EPR - * back from the XML Infoset Object using readfrom() method. - */ - public void EPRWriteToAndReadFromTest() throws Fault { - TestUtil.logMsg("EPRWriteToAndReadFromTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via BindingProvider.getEndpointReference()"); - W3CEndpointReference epr = (W3CEndpointReference) bp - .getEndpointReference(); - TestUtil.logMsg("Write the EPR to a ByteArrayOutputStream Object"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - TestUtil.logMsg("Read the EPR from a ByteArrayInputStream Object"); - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - epr = (W3CEndpointReference) EndpointReference - .readFrom(new StreamSource(bais)); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRWriteToAndReadFromTest failed"); - } - - /* - * @testName: ServiceGetPortViaWSCAndWSFTrueTest - * - * @assertion_ids: WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:SPEC:4028; JAXWS:SPEC:4028.1; JAXWS:JAVADOC:140; - * - * @test_Strategy: Retrieve EPR via WebServiceContext.getEndpointReference(). - * From the returned EPR get the port via Service.getPort(EPR, - * AddNumbers.class, wsf). WebServiceFeature is passed with Addressing=true. - * Verify invocation behavior. - * - */ - public void ServiceGetPortViaWSCAndWSFTrueTest() throws Fault { - TestUtil.logMsg("ServiceGetPortViaWSCAndWSFTrueTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via WebServiceContext.getEndpointReference()"); - W3CEndpointReference epr = port.getW3CEPR1(); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - TestUtil.logMsg("Retrieve the port from the EPR via Service.getPort()"); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=true"); - AddNumbers retport = (AddNumbers) service.getPort(epr, AddNumbers.class, - wsftrue); - if (retport == null) { - TestUtil.logErr( - "Service.getPort(EPR, Class, wsftrue) returned null (unexpected)"); - pass = false; - } else { - TestUtil.logMsg("Verify invocation behavior on port"); - int result = retport.doAddNumbers(10, 10); - TestUtil.logMsg("Invocation succeeded (expected) now check result"); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } else - TestUtil.logMsg("Got expected result=20"); - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("ServiceGetPortViaWSCAndWSFTrueTest failed"); - } - - /* - * @testName: ServiceGetPortViaWSCAndWSFFalseTest - * - * @assertion_ids: WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:SPEC:4028; JAXWS:SPEC:4028.1; JAXWS:JAVADOC:140; - * - * @test_Strategy: Retrieve EPR via WebServiceContext.getEndpointReference(). - * From the returned EPR get the port via Service.getPort(EPR, - * AddNumbers.class, wsf). WebServiceFeature is passed with Addressing=false. - * Verify invocation behavior. - * - */ - public void ServiceGetPortViaWSCAndWSFFalseTest() throws Fault { - TestUtil.logMsg("ServiceGetPortViaWSCAndWSFFalseTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via WebServiceContext.getEndpointReference()"); - W3CEndpointReference epr = port.getW3CEPR1(); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - TestUtil.logMsg("Retrieve the port from the EPR via Service.getPort()"); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=false"); - AddNumbers retport = (AddNumbers) service.getPort(epr, AddNumbers.class, - wsffalse); - if (retport == null) { - TestUtil.logErr( - "Service.getPort(EPR, Class, wsffalse) returned null (unexpected)"); - pass = false; - } else { - TestUtil.logMsg("Verify invocation behavior on port"); - int result = retport.doAddNumbers(10, 10); - TestUtil.logErr("Did not throw expected SOAPFaultException"); - pass = false; - } - } catch (SOAPFaultException e) { - TestUtil.logMsg("Caught expected SOAPFaultException: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("ServiceGetPortViaWSCAndWSFFalseTest failed"); - } - - /* - * @testName: ServiceGetPortViaBPAndWSFTrueTest - * - * @assertion_ids: WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:SPEC:4028; JAXWS:SPEC:4028.1; JAXWS:JAVADOC:140; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference(). - * From the returned EPR get the port via Service.getPort(EPR, - * AddNumbers.class, wsf). WebServiceFeature is passed with Addressing=true. - * Verify invocation behavior. - * - */ - public void ServiceGetPortViaBPAndWSFTrueTest() throws Fault { - TestUtil.logMsg("ServiceGetPortViaBPAndWSFTrueTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via BindingProvider.getEndpointReference()"); - W3CEndpointReference epr = (W3CEndpointReference) bp - .getEndpointReference(); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - TestUtil.logMsg("Retrieve the port from the EPR via Service.getPort()"); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=true"); - AddNumbers retport = (AddNumbers) service.getPort(epr, AddNumbers.class, - wsftrue); - if (retport == null) { - TestUtil.logErr( - "Service.getPort(EPR, Class, wsftrue) returned null (unexpected)"); - pass = false; - } else { - TestUtil.logMsg("Verify invocation behavior on port"); - int result = retport.doAddNumbers(10, 10); - TestUtil.logMsg("Invocation succeeded (expected) now check result"); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } else - TestUtil.logMsg("Got expected result=20"); - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("ServiceGetPortViaBPAndWSFTrueTest failed"); - } - - /* - * @testName: ServiceGetPortViaBPAndWSFFalseTest - * - * @assertion_ids: WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:SPEC:4028; JAXWS:SPEC:4028.1; JAXWS:JAVADOC:140; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference(). - * From the returned EPR get the port via Service.getPort(EPR, - * AddNumbers.class, wsf). WebServiceFeature is passed with Addressing=false. - * Verify invocation behavior. - * - */ - public void ServiceGetPortViaBPAndWSFFalseTest() throws Fault { - TestUtil.logMsg("ServiceGetPortViaBPAndWSFFalseTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via BindingProvider.getEndpointReference()"); - W3CEndpointReference epr = (W3CEndpointReference) bp - .getEndpointReference(); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - TestUtil.logMsg("Retrieve the port from the EPR via Service.getPort()"); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=false"); - AddNumbers retport = (AddNumbers) service.getPort(epr, AddNumbers.class, - wsffalse); - if (retport == null) { - TestUtil.logErr( - "Service.getPort(EPR, Class, wsffalse) returned null (unexpected)"); - pass = false; - } else { - TestUtil.logMsg("Verify invocation behavior on port"); - int result = retport.doAddNumbers(10, 10); - TestUtil.logErr("Did not throw expected SOAPFaultException"); - pass = false; - } - } catch (SOAPFaultException e) { - TestUtil.logMsg("Caught expected SOAPFaultException: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("ServiceGetPortViaBPAndWSFFalseTest failed"); - } - - /* - * @testName: EPRGetPortViaWSCAndNoWSFTest - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:SPEC:4028; JAXWS:SPEC:4028.1; JAXWS:JAVADOC:140; - * - * @test_Strategy: Retrieve EPR via WebServiceContext.getEndpointReference(). - * From the returned EPR get the port via EndpointReference.getPort - * (AddNumbers.class). No WebServiceFeature is passed (DEFAULT CASE). Verify - * invocation behavior. - * - */ - public void EPRGetPortViaWSCAndNoWSFTest() throws Fault { - TestUtil.logMsg("EPRGetPortViaWSCAndNoWSFTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via WebServiceContext.getEndpointReference()"); - W3CEndpointReference epr = port.getW3CEPR1(); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - TestUtil.logMsg("Retrieve port from EPR via EndpointReference.getPort()"); - TestUtil.logMsg("Don't pass a WebServiceFeature (DEFAULT CASE)"); - AddNumbers retport = (AddNumbers) epr.getPort(AddNumbers.class); - if (retport == null) { - TestUtil.logErr("EPR.getPort(Class) returned null (unexpected)"); - pass = false; - } else { - TestUtil.logMsg("Verify invocation behavior on port"); - int result = retport.doAddNumbers(10, 10); - TestUtil.logMsg("Invocation succeeded (expected) now check result"); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } else - TestUtil.logMsg("Got expected result=20"); - } - } catch (SOAPFaultException e) { - TestUtil.logMsg("Caught expected SOAPFaultException: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRGetPortViaWSCAndNoWSFTest failed"); - } - - /* - * @testName: EPRGetPortViaWSCAndWSFTrueTest - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:SPEC:4028; JAXWS:SPEC:4028.1; JAXWS:JAVADOC:140; - * - * @test_Strategy: Retrieve EPR via WebServiceContext.getEndpointReference(). - * From the returned EPR get the port via EndpointReference.getPort - * (AddNumbers.class, wsf). WebServiceFeature is passed with Addressing=true. - * Verify invocation behavior. - * - */ - public void EPRGetPortViaWSCAndWSFTrueTest() throws Fault { - TestUtil.logMsg("EPRGetPortViaWSCAndWSFTrueTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via WebServiceContext.getEndpointReference()"); - W3CEndpointReference epr = port.getW3CEPR1(); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - TestUtil.logMsg( - "Retrieve the port from the EPR via EndpointReference.getPort()"); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=true"); - AddNumbers retport = (AddNumbers) epr.getPort(AddNumbers.class, wsftrue); - if (retport == null) { - TestUtil - .logErr("EPR.getPort(Class, wsftrue) returned null (unexpected)"); - pass = false; - } else { - TestUtil.logMsg("Verify invocation behavior on port"); - int result = retport.doAddNumbers(10, 10); - TestUtil.logMsg("Invocation succeeded (expected) now check result"); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } else - TestUtil.logMsg("Got expected result=20"); - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRGetPortViaWSCAndWSFTrueTest failed"); - } - - /* - * @testName: EPRGetPortViaWSCAndWSFFalseTest - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:SPEC:4028; JAXWS:SPEC:4028.1; JAXWS:JAVADOC:140; - * - * @test_Strategy: Retrieve EPR via WebServiceContext.getEndpointReference(). - * From the returned EPR get the port via EndpointReference.getPort - * (AddNumbers.class, wsf). WebServiceFeature is passed with Addressing=false. - * Verify invocation behavior. - * - */ - public void EPRGetPortViaWSCAndWSFFalseTest() throws Fault { - TestUtil.logMsg("EPRGetPortViaWSCAndWSFFalseTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via WebServiceContext.getEndpointReference()"); - W3CEndpointReference epr = port.getW3CEPR1(); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - TestUtil.logMsg( - "Retrieve the port from the EPR via EndpointReference.getPort()"); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=false"); - AddNumbers retport = (AddNumbers) epr.getPort(AddNumbers.class, wsffalse); - if (retport == null) { - TestUtil - .logErr("EPR.getPort(Class, wsffalse) returned null (unexpected)"); - pass = false; - } else { - TestUtil.logMsg("Verify invocation behavior on port"); - int result = retport.doAddNumbers(10, 10); - TestUtil.logErr("Did not throw expected SOAPFaultException"); - pass = false; - } - } catch (SOAPFaultException e) { - TestUtil.logMsg("Caught expected SOAPFaultException: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRGetPortViaWSCAndWSFFalseTest failed"); - } - - /* - * @testName: EPRGetPortViaBPAndNoWSFTest - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:SPEC:4028; JAXWS:SPEC:4028.1; JAXWS:JAVADOC:140; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference(). - * From the returned EPR get the port via EndpointReference.getPort - * (AddNumbers.class). No WebServiceFeature is passed (DEFAULT CASE). Verify - * invocation behavior. - * - */ - public void EPRGetPortViaBPAndNoWSFTest() throws Fault { - TestUtil.logMsg("EPRGetPortViaBPAndNoWSFTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via BindingProvider.getEndpointReference()"); - W3CEndpointReference epr = (W3CEndpointReference) bp - .getEndpointReference(); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - TestUtil.logMsg("Retrieve port from EPR via EndpointReference.getPort()"); - TestUtil.logMsg("Don't pass a WebServiceFeature (DEFAULT CASE)"); - AddNumbers retport = (AddNumbers) epr.getPort(AddNumbers.class); - if (retport == null) { - TestUtil.logErr("EPR.getPort(Class) returned null (unexpected)"); - pass = false; - } else { - TestUtil.logMsg("Verify invocation behavior on port"); - int result = retport.doAddNumbers(10, 10); - TestUtil.logMsg("Invocation succeeded (expected) now check result"); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } else - TestUtil.logMsg("Got expected result=20"); - } - } catch (SOAPFaultException e) { - TestUtil.logMsg("Caught expected SOAPFaultException: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRGetPortViaBPAndNoWSFTest failed"); - } - - /* - * @testName: EPRGetPortViaBPAndWSFTrueTest - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:SPEC:4028; JAXWS:SPEC:4028.1; JAXWS:JAVADOC:140; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference(). - * From the returned EPR get the port via EndpointReference.getPort - * (AddNumbers.class, wsf). WebServiceFeature is passed with Addressing=true. - * Verify invocation behavior. - * - */ - public void EPRGetPortViaBPAndWSFTrueTest() throws Fault { - TestUtil.logMsg("EPRGetPortViaBPAndWSFTrueTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via BindingProvider.getEndpointReference()"); - W3CEndpointReference epr = (W3CEndpointReference) bp - .getEndpointReference(); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - TestUtil.logMsg( - "Retrieve the port from the EPR via EndpointReference.getPort()"); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=true"); - AddNumbers retport = (AddNumbers) epr.getPort(AddNumbers.class, wsftrue); - if (retport == null) { - TestUtil - .logErr("EPR.getPort(Class, wsftrue) returned null (unexpected)"); - pass = false; - } else { - TestUtil.logMsg("Verify invocation behavior on port"); - int result = retport.doAddNumbers(10, 10); - TestUtil.logMsg("Invocation succeeded (expected) now check result"); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } else - TestUtil.logMsg("Got expected result=20"); - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRGetPortViaBPAndWSFTrueTest failed"); - } - - /* - * @testName: EPRGetPortViaBPAndWSFFalseTest - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:SPEC:4028; JAXWS:SPEC:4028.1; JAXWS:JAVADOC:140; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference(). - * From the returned EPR get the port via EndpointReference.getPort - * (AddNumbers.class, wsf). WebServiceFeature is passed with Addressing=false. - * Verify invocation behavior. - * - */ - public void EPRGetPortViaBPAndWSFFalseTest() throws Fault { - TestUtil.logMsg("EPRGetPortViaBPAndWSFFalseTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Retrieve EPR via BindingProvider.getEndpointReference()"); - W3CEndpointReference epr = (W3CEndpointReference) bp - .getEndpointReference(); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - TestUtil.logMsg( - "Retrieve the port from the EPR via EndpointReference.getPort()"); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=false"); - AddNumbers retport = (AddNumbers) epr.getPort(AddNumbers.class, wsffalse); - if (retport == null) { - TestUtil - .logErr("EPR.getPort(Class, wsffalse) returned null (unexpected)"); - pass = false; - } else { - TestUtil.logMsg("Verify invocation behavior on port"); - int result = retport.doAddNumbers(10, 10); - TestUtil.logErr("Did not throw expected SOAPFaultException"); - pass = false; - } - } catch (SOAPFaultException e) { - TestUtil.logMsg("Caught expected SOAPFaultException: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRGetPortViaBPAndWSFFalseTest failed"); - } - - /* - * @testName: EPRViaWSCCreateDispatchWSFTrueAndInvokeTest1 - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:154; JAXWS:SPEC:4030; - * - * @test_Strategy: Retrieve EPR via WebServiceContext.getEndpointReference(). - * Create a Dispatch object via Service.createDispatch() using the returned - * EPR, perform invocation via Dispatch.invoke() and then verify the result. - * Pass WebServiceFeature with Addressing=true. - * - */ - public void EPRViaWSCCreateDispatchWSFTrueAndInvokeTest1() throws Fault { - TestUtil.logMsg("EPRViaWSCCreateDispatchWSFTrueAndInvokeTest1"); - boolean pass = true; - try { - TestUtil.logMsg("Create a Dispatch object of type Source"); - W3CEndpointReference myepr = port.getW3CEPR1(); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=true"); - dispatchSrc = createDispatchSource(myepr, wsftrue); - Source requestMsg = JAXWS_Util.makeSource(doAddNumbersRequest, - "StreamSource"); - TestUtil.logMsg("Perform Dispatch invocation"); - Source responseMsg = dispatchSrc.invoke(requestMsg); - TestUtil - .logMsg("Dispatch invocation succeeded (expected) now check result"); - String responseStr = JAXWS_Util - .getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(responseMsg)); - TestUtil.logMsg("responseStr=" + responseStr); - if (responseStr.indexOf("doAddNumbersResponse") == -1 - || responseStr.indexOf("return") == -1 - || responseStr.indexOf("20") == -1) { - TestUtil.logErr("Unexpected response results"); - pass = false; - } else - TestUtil.logMsg("Got expected response results"); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRViaWSCCreateDispatchWSFTrueAndInvokeTest1 failed"); - } - - /* - * @testName: EPRViaWSCCreateDispatchWSFTrueAndInvokeTest2 - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:154; JAXWS:SPEC:4030; - * - * @test_Strategy: Retrieve EPR via WebServiceContext.getEndpointReference( - * java.lang.Class). Create a Dispatch object via Service. createDispatch() - * using the returned EPR, perform invocation via Dispatch.invoke() and then - * verify the result. Pass WebServiceFeature with Addressing=true. - * - */ - public void EPRViaWSCCreateDispatchWSFTrueAndInvokeTest2() throws Fault { - TestUtil.logMsg("EPRViaWSCCreateDispatchWSFTrueAndInvokeTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Create a Dispatch object of type Source"); - W3CEndpointReference myepr = port.getW3CEPR2(); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=true"); - dispatchSrc = createDispatchSource(myepr, wsftrue); - Source requestMsg = JAXWS_Util.makeSource(doAddNumbersRequest, - "StreamSource"); - TestUtil.logMsg("Perform Dispatch invocation"); - Source responseMsg = dispatchSrc.invoke(requestMsg); - TestUtil - .logMsg("Dispatch invocation succeeded (expected) now check result"); - String responseStr = JAXWS_Util - .getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(responseMsg)); - TestUtil.logMsg("responseStr=" + responseStr); - if (responseStr.indexOf("doAddNumbersResponse") == -1 - || responseStr.indexOf("return") == -1 - || responseStr.indexOf("20") == -1) { - TestUtil.logErr("Unexpected response results"); - pass = false; - } else - TestUtil.logMsg("Got expected response results"); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRViaWSCCreateDispatchWSFTrueAndInvokeTest2 failed"); - } - - /* - * @testName: EPRViaWSCCreateDispatchWSFFalseAndInvokeTest3 - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:154; JAXWS:SPEC:4030; - * - * @test_Strategy: Retrieve EPR via WebServiceContext.getEndpointReference(). - * Create a Dispatch object via Service.createDispatch() using the returned - * EPR. Pass WebServiceFeature with Addressing=false. Expect a - * WebServiceException to be thrown. - * - */ - public void EPRViaWSCCreateDispatchWSFFalseAndInvokeTest3() throws Fault { - TestUtil.logMsg("EPRViaWSCCreateDispatchWSFFalseAndInvokeTest3"); - boolean pass = true; - try { - TestUtil.logMsg("Create a Dispatch object of type Source"); - W3CEndpointReference myepr = port.getW3CEPR1(); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=false"); - dispatchSrc = createDispatchSource(myepr, wsffalse); - Source requestMsg = JAXWS_Util.makeSource(doAddNumbersRequest, - "StreamSource"); - TestUtil.logMsg("Perform Dispatch invocation"); - Source responseMsg = dispatchSrc.invoke(requestMsg); - TestUtil.logErr("Did not throw expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRViaWSCCreateDispatchWSFFalseAndInvokeTest3 failed"); - } - - /* - * @testName: EPRViaWSCCreateJAXBDispatchWSFTrueAndInvokeTest1 - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:154; JAXWS:SPEC:4030; - * - * @test_Strategy: Retrieve EPR via WebServiceContext.getEndpointReference(). - * Create a JAXB Dispatch object via Service.createDispatch() using the - * returned EPR, perform invocation via Dispatch.invoke() and then verify the - * result. Pass WebServiceFeature with Addressing=true. - * - */ - public void EPRViaWSCCreateJAXBDispatchWSFTrueAndInvokeTest1() throws Fault { - TestUtil.logMsg("EPRViaWSCCreateJAXBDispatchWSFTrueAndInvokeTest1"); - boolean pass = true; - try { - TestUtil.logMsg("Create a Dispatch object of type JAXB"); - W3CEndpointReference myepr = port.getW3CEPR1(); - ObjectFactory of = new ObjectFactory(); - DoAddNumbers numbers = of.createDoAddNumbers(); - numbers.setArg0(10); - numbers.setArg1(10); - JAXBElement request = of.createDoAddNumbers(numbers); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=true"); - dispatchJaxb = createDispatchJAXB(myepr, wsftrue); - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - TestUtil.logMsg("Perform Dispatch invocation"); - JAXBElement response = (JAXBElement) dispatchJaxb - .invoke(request); - TestUtil - .logMsg("Dispatch invocation succeeded (expected) now check result"); - int result = response.getValue().getReturn(); - TestUtil.logMsg("result=" + result); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } else - TestUtil.logMsg("Got expected response results"); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault( - "EPRViaWSCCreateJAXBDispatchWSFTrueAndInvokeTest1 failed"); - } - - /* - * @testName: EPRViaWSCCreateJAXBDispatchWSFFalseAndInvokeTest2 - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:154; JAXWS:SPEC:4030; - * - * @test_Strategy: Retrieve EPR via WebServiceContext.getEndpointReference(). - * Create a JAXB Dispatch object via Service.createDispatch() using the - * returned EPR, perform invocation via Dispatch. invoke() and then verify the - * result. Pass WebServiceFeature with Addressing=false. Expect a - * WebServiceException to be thrown. - * - */ - public void EPRViaWSCCreateJAXBDispatchWSFFalseAndInvokeTest2() throws Fault { - TestUtil.logMsg("EPRViaWSCCreateJAXBDispatchWSFFalseAndInvokeTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Create a Dispatch object of type JAXB"); - W3CEndpointReference myepr = port.getW3CEPR1(); - ObjectFactory of = new ObjectFactory(); - DoAddNumbers numbers = of.createDoAddNumbers(); - numbers.setArg0(10); - numbers.setArg1(10); - JAXBElement request = of.createDoAddNumbers(numbers); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=false"); - dispatchJaxb = createDispatchJAXB(myepr, wsffalse); - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - TestUtil.logMsg("Perform Dispatch invocation"); - JAXBElement response = (JAXBElement) dispatchJaxb - .invoke(request); - TestUtil.logErr("Did not throw expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault( - "EPRViaWSCCreateJAXBDispatchWSFFalseAndInvokeTest2 failed"); - } - - /* - * @testName: EPRViaBPCreateDispatchWSFTrueAndInvokeTest1 - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:154; JAXWS:SPEC:4030; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference(). - * Create a Dispatch object via Service.createDispatch() using the returned - * EPR, perform invocation via Dispatch.invoke() and then verify the result. - * Pass WebServiceFeature with Addressing=true. - * - */ - public void EPRViaBPCreateDispatchWSFTrueAndInvokeTest1() throws Fault { - TestUtil.logMsg("EPRViaBPCreateDispatchWSFTrueAndInvokeTest1"); - boolean pass = true; - try { - TestUtil.logMsg("Create a Dispatch object of type Source"); - W3CEndpointReference myepr = (W3CEndpointReference) bp - .getEndpointReference(); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=true"); - dispatchSrc = createDispatchSource(myepr, wsftrue); - Source requestMsg = JAXWS_Util.makeSource(doAddNumbersRequest, - "StreamSource"); - TestUtil.logMsg("Perform Dispatch invocation"); - Source responseMsg = dispatchSrc.invoke(requestMsg); - TestUtil - .logMsg("Dispatch invocation succeeded (expected) now check result"); - String responseStr = JAXWS_Util - .getDOMResultAsString(JAXWS_Util.getSourceAsDOMResult(responseMsg)); - TestUtil.logMsg("responseStr=" + responseStr); - if (responseStr.indexOf("doAddNumbersResponse") == -1 - || responseStr.indexOf("return") == -1 - || responseStr.indexOf("20") == -1) { - TestUtil.logErr("Unexpected response results"); - pass = false; - } else - TestUtil.logMsg("Got expected response results"); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRViaBPCreateDispatchWSFTrueAndInvokeTest1 failed"); - } - - /* - * @testName: EPRViaBPCreateDispatchWSFTrueAndInvokeTest2 - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:154; JAXWS:SPEC:4030; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference( - * java.lang.Class). Create a Dispatch object via Service. createDispatch() - * using the returned EPR, perform invocation and then verify the result. Pass - * WebServiceFeature with Addressing=true. - * - */ - public void EPRViaBPCreateDispatchWSFTrueAndInvokeTest2() throws Fault { - TestUtil.logMsg("EPRViaBPCreateDispatchWSFTrueAndInvokeTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Create a Dispatch object of type SOAPMessage"); - W3CEndpointReference myepr = (W3CEndpointReference) bp - .getEndpointReference( - jakarta.xml.ws.wsaddressing.W3CEndpointReference.class); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=true"); - dispatchSM = createDispatchSOAPMessage(myepr, wsftrue); - SOAPMessage requestMsg = JAXWS_Util - .makeSOAPMessage(doAddNumbersRequestSM); - TestUtil.logMsg("Perform Dispatch invocation"); - SOAPMessage responseMsg = dispatchSM.invoke(requestMsg); - TestUtil - .logMsg("Dispatch invocation succeeded (expected) now check result"); - String responseStr = JAXWS_Util.getSOAPMessageAsString(responseMsg); - TestUtil.logMsg("responseStr=" + responseStr); - if (responseStr.indexOf("doAddNumbersResponse") == -1 - || responseStr.indexOf("return") == -1 - || responseStr.indexOf("20") == -1) { - TestUtil.logErr("Unexpected response results"); - pass = false; - } else - TestUtil.logMsg("Got expected response results"); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRViaBPCreateDispatchWSFTrueAndInvokeTest2 failed"); - } - - /* - * @testName: EPRViaBPCreateDispatchWSFFalseAndInvokeTest3 - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:154; JAXWS:SPEC:4030; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference( - * java.lang.Class). Create a Dispatch object via Service. createDispatch() - * using the returned EPR, perform invocation via Dispatch.invoke() and then - * verify the result. Pass WebServiceFeature with Addressing=false. Expect a - * WebServiceException to be thrown. - * - */ - public void EPRViaBPCreateDispatchWSFFalseAndInvokeTest3() throws Fault { - TestUtil.logMsg("EPRViaBPCreateDispatchWSFFalseAndInvokeTest3"); - boolean pass = true; - try { - TestUtil.logMsg("Create a Dispatch object of type SOAPMessage"); - W3CEndpointReference myepr = (W3CEndpointReference) bp - .getEndpointReference( - jakarta.xml.ws.wsaddressing.W3CEndpointReference.class); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=false"); - dispatchSM = createDispatchSOAPMessage(myepr, wsffalse); - SOAPMessage requestMsg = JAXWS_Util - .makeSOAPMessage(doAddNumbersRequestSM); - TestUtil.logMsg("Perform Dispatch invocation"); - SOAPMessage responseMsg = dispatchSM.invoke(requestMsg); - TestUtil.logErr("Did not throw expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRViaBPCreateDispatchWSFFalseAndInvokeTest3 failed"); - } - - /* - * @testName: EPRViaBPCreateJAXBDispatchWSFTrueAndInvokeTest1 - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:154; JAXWS:SPEC:4030; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference( - * java.lang.Class). Create a JAXB Dispatch object via Service. - * createDispatch() using the returned EPR, perform invocation via - * Dispatch.invoke() and then verify the result. Pass WebServiceFeature with - * Addressing=true. - * - */ - public void EPRViaBPCreateJAXBDispatchWSFTrueAndInvokeTest1() throws Fault { - TestUtil.logMsg("EPRViaBPCreateJAXBDispatchWSFTrueAndInvokeTest1"); - boolean pass = true; - try { - TestUtil.logMsg("Create a Dispatch object of type JAXB"); - W3CEndpointReference myepr = (W3CEndpointReference) bp - .getEndpointReference( - jakarta.xml.ws.wsaddressing.W3CEndpointReference.class); - ObjectFactory of = new ObjectFactory(); - DoAddNumbers numbers = of.createDoAddNumbers(); - numbers.setArg0(10); - numbers.setArg1(10); - JAXBElement request = of.createDoAddNumbers(numbers); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=true"); - dispatchJaxb = createDispatchJAXB(myepr, wsftrue); - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - TestUtil.logMsg("Perform Dispatch invocation"); - JAXBElement response = (JAXBElement) dispatchJaxb - .invoke(request); - TestUtil - .logMsg("Dispatch invocation succeeded (expected) now check result"); - int result = response.getValue().getReturn(); - TestUtil.logMsg("result=" + result); - if (result != 20) { - TestUtil.logErr("Expected result=20, got result=" + result); - pass = false; - } else - TestUtil.logMsg("Got expected response results"); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault("EPRViaBPCreateJAXBDispatchWSFTrueAndInvokeTest1 failed"); - } - - /* - * @testName: EPRViaBPCreateJAXBDispatchWSFFalseAndInvokeTest2 - * - * @assertion_ids: WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; WSAMD:SPEC:2000.2; - * WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; WSAMD:SPEC:2001.3; - * WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; WSAMD:SPEC:2002.3; - * WSAMD:SPEC:2002.4; WSACORE:SPEC:2007; WSACORE:SPEC:2008; WSACORE:SPEC:2009; - * JAXWS:JAVADOC:154; JAXWS:SPEC:4030; - * - * @test_Strategy: Retrieve EPR via BindingProvider.getEndpointReference( - * java.lang.Class). Create a JAXB Dispatch object via Service. - * createDispatch() using the returned EPR, perform invocation via - * Dispatch.invoke() and then verify the result. Pass WebServiceFeature with - * Addressing=false. Expect a WebServiceException to be thrown. - * - */ - public void EPRViaBPCreateJAXBDispatchWSFFalseAndInvokeTest2() throws Fault { - TestUtil.logMsg("EPRViaBPCreateJAXBDispatchWSFFalseAndInvokeTest2"); - boolean pass = true; - try { - TestUtil.logMsg("Create a Dispatch object of type JAXB"); - W3CEndpointReference myepr = (W3CEndpointReference) bp - .getEndpointReference( - jakarta.xml.ws.wsaddressing.W3CEndpointReference.class); - ObjectFactory of = new ObjectFactory(); - DoAddNumbers numbers = of.createDoAddNumbers(); - numbers.setArg0(10); - numbers.setArg1(10); - JAXBElement request = of.createDoAddNumbers(numbers); - TestUtil.logMsg("Pass WebServiceFeature with Addressing=false"); - dispatchJaxb = createDispatchJAXB(myepr, wsffalse); - java.util.Map reqContext = dispatchJaxb - .getRequestContext(); - TestUtil.logMsg("Perform Dispatch invocation"); - JAXBElement response = (JAXBElement) dispatchJaxb - .invoke(request); - TestUtil.logErr("Did not throw expected WebServiceException"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - pass = false; - TestUtil.logErr("Caught unexpected exception: ", e); - } - if (!pass) - throw new Fault( - "EPRViaBPCreateJAXBDispatchWSFFalseAndInvokeTest2 failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/MyEPR.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/MyEPR.java deleted file mode 100644 index 0c03385756..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/MyEPR.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: MyEPR.java 51075 2003-03-27 10:44:21Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.epr; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -public class MyEPR extends jakarta.xml.ws.EndpointReference { - - public void writeTo(javax.xml.transform.Result result) { - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/build.xml deleted file mode 100644 index 12540d3a61..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/build.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/jakartaEE.tokens deleted file mode 100644 index f75cc17832..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsaj2wdleprtest") -SERVICE=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.epr.AddNumbersService -IMPL=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.epr.AddNumbersImpl -SEI=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.epr.AddNumbers -NAMESPACEURI=http://foobar.org/ -PORT=AddNumbersPort -URLALIAS=/jaxws/AddNumbers -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.epr.AddNumbersImpl -WEBSERVICEDESCRIPTION=AddNumbersService -SERVICEREFNAMEWSSERVLET=service/wsaj2wdleprtest -SERVICEREFNAMEWSEJB=service/wsaj2wdleprtest -SERVICEREFNAMEWSAPPCLIENT=service/wsaj2wdleprtest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/standalone-sun-jaxws.xml deleted file mode 100644 index 9b49c9a563..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/standalone.web.xml deleted file mode 100644 index 77f3dbf9ea..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/epr/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSAJ2WDLEPRTest - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddNumbers - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbers - /jaxws/AddNumbers - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/Client.java deleted file mode 100644 index 2fd745b507..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/Client.java +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 51837 2006-11-09 16:48:53Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.refps; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.*; - -import org.w3c.dom.Attr; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; -import org.w3c.dom.Document; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; -import java.util.Iterator; - -import java.net.URL; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.xml.ws.wsaddressing.*; -import jakarta.xml.soap.*; -import java.io.*; - -import java.util.Properties; -import java.util.UUID; -import java.text.MessageFormat; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.j2w.document.literal.refps."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsaj2wdlreferenceparamstest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsaj2wdlreferenceparamstest.wsdlloc.1"; - - private String url = null; - - // service and port information - private static final String NAMESPACEURI = "http://example.com"; - - private static final String SERVICE_NAME = "AddNumbersService"; - - private static final String PORT_NAME = "AddNumbersPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private static final String CORRECT_ACTION = "addInAction"; - - private Dispatch dispatchSM; - - private URL wsdlurl = null; - - AddNumbersPortType port = null; - - static AddNumbersService service = null; - - private static String xmlInterfaceName = "myns:AddNumbersPortType"; - - private static String xmlRefParam1 = "Hello"; - - private static String xmlRefParam2 = "There"; - - public static final String REQUEST_REFERENCE_PARAMETERS = "" + "" - + "{0}\n" + "uuid:{1}\n" - + "\n" + " {2}\n" - + "\n" + "{3}\n" + "\n" - + "\n" - + "\n" - + " 10\n" + " 10\n" - + " RequestReferenceParamaters\n" - + "\n" + ""; - - public static final String REPLY_TO_REFPS_MESSAGE = "" + "" - + "{0}\n" + "uuid:{1}\n" - + "\n" + " {2}\n" - + " \n" - + " Key#123456789\n" - + " " + "\n" - + "{3}\n" + "\n" + "\n" - + "\n" - + " 10\n" + " 10\n" - + "\n" + ""; - - public static final String FAULT_TO_REFPS_MESSAGE = "" + "\n" - + "{0}\n" + "uuid:{1}\n" - + "\n" + " {2}\n" - + " \n" - + " Key#123456789\n" - + " " + "\n" + "\n" - + " {3}\n" + " \n" - + " Fault#123456789\n" - + " " + "\n" - + "{4}\n" + "\n" + "\n" - + "\n" - + " -10\n" + " 10\n" - + "\n" + ""; - - private static AddressingFeature ENABLED_ADDRESSING_FEATURE = new AddressingFeature( - true, true); - - private static AddressingFeature DISABLED_ADDRESSING_FEATURE = new AddressingFeature( - false); - - private static WebServiceFeature[] enabledRequiredwsf = { - new AddressingFeature(true, true) }; - - // Reference parameter constants - private QName CUSTOMER_KEY = new QName("http://example.org/customer", - "CustomerKey"); - - private static final String CUSTOMER_KEY_VALUE = "Key#123456789"; - - private QName IS_REF_PARAM = new QName("http://www.w3.org/2005/08/addressing", - "IsReferenceParameter"); - - private static final String IS_REF_PARAM_VALUE = "1"; - - private boolean validate(SOAPMessage sm, QName refp, String refp_value, - QName isRefParam, String isRefParam_value) { - try { - TestUtil.logMsg("get SOAPHeader"); - SOAPHeader header = sm.getSOAPHeader(); - TestUtil.logMsg("get Child Element for " + refp); - Iterator iter = header.getChildElements(refp); - if (!iter.hasNext()) { - TestUtil.logErr("SOAPMessage response does not contain" + refp); - return false; - } - Element element = (Element) iter.next(); - TestUtil.logMsg("get Attribute node for " + isRefParam); - Attr attr = element.getAttributeNodeNS(isRefParam.getNamespaceURI(), - isRefParam.getLocalPart()); - if (attr == null) { - TestUtil.logErr("attribute not found: " + isRefParam); - return false; - } - TestUtil.logMsg("get all Child Nodes"); - NodeList nodes = element.getChildNodes(); - boolean found = false; - for (int i = 0; i < nodes.getLength(); i++) { - Node node = (Node) nodes.item(i); - if (node instanceof Text) { - TestUtil.logMsg("got TEXT node"); - String value = node.getNodeValue(); - TestUtil.logMsg("value=[" + value + "]"); - if (!value.equals(CUSTOMER_KEY_VALUE)) { - TestUtil.logErr("CUSTOMER_KEY_VALUE: expected: " - + CUSTOMER_KEY_VALUE + ", received: " + value); - return false; - } else - found = true; - } - } - if (!found) { - TestUtil - .logErr("Did not found CUSTOMER_KEY_VALUE: " + CUSTOMER_KEY_VALUE); - return false; - } - } catch (Exception e) { - e.printStackTrace(); - return false; - } - return true; - } - - private Dispatch createDispatchSOAPMessage(QName port, - boolean enabled) throws Exception { - if (enabled) - return service.createDispatch(port, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE, ENABLED_ADDRESSING_FEATURE); - else - return service.createDispatch(port, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE, DISABLED_ADDRESSING_FEATURE); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (AddNumbersPortType) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddNumbersService.class, PORT_QNAME, AddNumbersPortType.class, - enabledRequiredwsf); - TestUtil.logMsg("port=" + port); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (AddNumbersPortType) service.getAddNumbersPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - service = (AddNumbersService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, AddNumbersService.class); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (AddNumbersService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: testReplyToRefps - * - * @assertion_ids: WSACORE:SPEC:3012; WSACORE:SPEC:3012.1; - * WSACORE:SPEC:3012.2; WSACORE:SPEC:2004; WSACORE:SPEC:2004.3; - * WSACORE:SPEC:3021; - * - * @test_Strategy: - * - */ - public void testReplyToRefps() throws Fault { - boolean pass = true; - try { - - String soapmsg = MessageFormat.format(REPLY_TO_REFPS_MESSAGE, url, - UUID.randomUUID(), WsaSOAPUtils.getAddrVerAnonUri(), CORRECT_ACTION); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME, false); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - SOAPMessage response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - pass = validate(response, CUSTOMER_KEY, CUSTOMER_KEY_VALUE, IS_REF_PARAM, - IS_REF_PARAM_VALUE); - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testReplyToRefps failed", e); - } - - if (!pass) - throw new Fault("testReplyToRefps failed"); - } - - /* - * @testName: testFaultToRefps - * - * @assertion_ids: WSACORE:SPEC:3012; WSACORE:SPEC:3012.1; - * WSACORE:SPEC:3012.2; WSACORE:SPEC:2004; WSACORE:SPEC:2004.3; - * WSACORE:SPEC:3021; - * - * @test_Strategy: - * - */ - public void testFaultToRefps() throws Fault { - boolean pass = true; - - try { - String soapmsg = MessageFormat.format(FAULT_TO_REFPS_MESSAGE, url, - UUID.randomUUID(), WsaSOAPUtils.getAddrVerAnonUri(), - WsaSOAPUtils.getAddrVerAnonUri(), CORRECT_ACTION); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME, false); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - SOAPMessage response = dispatchSM.invoke(request); - JAXWS_Util.dumpSOAPMessage(response, false); - pass = false; - TestUtil.logErr("SOAPFaultException must be thrown"); - } catch (SOAPFaultException e) { - TestUtil.logMsg("Caught expected SOAPFaultException: " + e.getMessage()); - try { - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(e)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(e)); - String faultdetail[] = WsaSOAPUtils.getFaultDetail(e); - if (faultdetail != null) { - StringBuffer output = new StringBuffer("FaultDetail:"); - for (int i = 0; faultdetail[i] != null; i++) { - output.append(" " + faultdetail[i]); - } - TestUtil.logMsg(output.toString()); - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - throw new Fault("testFaultToRefps failed", e2); - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testFaultToRefps failed", e); - } - - if (!pass) - throw new Fault("testFaultToRefps failed"); - } - - /* - * @testName: RequestReferenceParametersTest - * - * @assertion_ids: JAXWS:SPEC:9042; JAXWS:SPEC:9042.1; - * - * @test_Strategy: Send reference paramaters on soap request - */ - public void RequestReferenceParametersTest() throws Fault { - TestUtil.logMsg("RequestReferenceParametersTest"); - boolean pass = true; - - try { - W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder(); - builder = builder.address(url); - DOMSource domsrc = (DOMSource) JAXWS_Util.makeSource(xmlInterfaceName, - "DOMSource"); - Document document = (Document) domsrc.getNode(); - builder = builder.metadata(document.getDocumentElement()); - builder = builder.serviceName(SERVICE_QNAME); - builder = builder.endpointName(PORT_QNAME); - builder = builder.wsdlDocumentLocation(wsdlurl.toString()); - domsrc = (DOMSource) JAXWS_Util.makeSource(xmlRefParam1, "DOMSource"); - document = (Document) domsrc.getNode(); - builder = builder.referenceParameter(document.getDocumentElement()); - domsrc = (DOMSource) JAXWS_Util.makeSource(xmlRefParam2, "DOMSource"); - document = (Document) domsrc.getNode(); - builder = builder.referenceParameter(document.getDocumentElement()); - W3CEndpointReference epr = builder.build(); - TestUtil.logMsg("---------------------------"); - TestUtil.logMsg("DUMP OF ENDPOINT REFERENCE"); - TestUtil.logMsg("---------------------------"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - AddNumbersPortType myport = (AddNumbersPortType) service.getPort(epr, - AddNumbersPortType.class, ENABLED_ADDRESSING_FEATURE); - myport.addNumbersAndPassString(10, 10, "RequestReferenceParametersTest"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("RequestReferenceParametersTest failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/ServerSOAPHandler.java deleted file mode 100644 index e106f3cc61..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/ServerSOAPHandler.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.refps; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.wsa.common.EprUtil; -import jakarta.xml.soap.*; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; -import org.w3c.dom.Element; -import java.util.List; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - protected void processInboundMessage(SOAPMessageContext context) { - TestUtil.logMsg("In ServerSOAPHandler:processInboundMessage"); - System.out.println("In ServerSOAPHandler:processInboundMessage"); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - JAXWS_Util.dumpSOAPMessage(msg, true); - JAXWS_Util.dumpSOAPMessage(msg, false); - if (Handler_Util.checkForMsg(context, "RequestReferenceParametersTest")) { - List rp = (List) context - .get(MessageContext.REFERENCE_PARAMETERS); - boolean result1 = false; - boolean result2 = false; - result1 = verifyReferenceParameters(rp, "MyParam1", "Hello"); - result2 = verifyReferenceParameters(rp, "MyParam2", "There"); - if ((!result1) && (!result2)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: Error: Reference Parameter MyParam1 and MyParam2 were either not found or their values were wrong"); - } else if (!result1) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: Error: Reference Parameter MyParam1 was not found or it's value was wrong"); - } else if (!result2) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: Error: Reference Parameter MyParam2 was not found or it's value was wrong"); - } - } - } - - protected boolean verifyReferenceParameters(List e, String name, - String value) { - boolean result = false; - TestUtil.logMsg("in ServerSOAPHandler:verifyReferenceParameters"); - TestUtil.logMsg("Number of elements=" + e.size()); - TestUtil.logMsg("Searching for Reference Parameter '" + name - + "' and its value '" + value + "'"); - System.out.println("in ServerSOAPHandler:verifyReferenceParameters"); - System.out.println("Number of elements=" + e.size()); - System.out.println("Searching for Reference Parameter '" + name - + "' and its value '" + value + "'"); - if (e.size() > 0) { - for (int i = 0; i < e.size(); i++) { - Element element = (Element) e.get(i); - boolean actual = EprUtil.validateReferenceParameter(element, name, - value); - if (actual) { - result = true; - break; - } - } - if (!result) { - TestUtil.logErr("Reference Parameter '" + name + "' with value '" - + value + "' was not found"); - System.err.println("Reference Parameter '" + name + "' with value '" - + value + "' was not found"); - } - } - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/build.xml deleted file mode 100644 index a5bc035af1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/build.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/jakartaEE.tokens deleted file mode 100644 index 392c0ee29a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdlreferenceparamstest") -SERVICE=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.refps.AddNumbersService -SEI=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.refps.AddNumbersPortType -IMPL=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.refps.AddNumbersImpl -URLALIAS=/jaxws/AddNumbers -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.j2w.document.literal.refps.AddNumbersImpl -NAMESPACEURI=http://example.com -PORT=AddNumbersPort -WEBSERVICEDESCRIPTION=AddNumbersService -SERVICEREFNAMEWSSERVLET=service/wsj2wdlreferenceparamstest -SERVICEREFNAMEWSEJB=service/wsj2wdlreferenceparamstest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdlreferenceparamstest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/server-handler.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/server-handler.xml deleted file mode 100644 index 2755366d15..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/refps/server-handler.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsa.j2w.document.literal.refps.ServerSOAPHandler - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/Client.java deleted file mode 100644 index 47901b1015..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/Client.java +++ /dev/null @@ -1,605 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.xml.soap.SOAPException; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.*; - -import java.net.URL; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.xml.soap.*; - -import java.util.Properties; -import java.util.UUID; -import java.text.MessageFormat; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsaj2wdlrequestresponsetest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsaj2wdlrequestresponsetest.wsdlloc.1"; - - private String url = null; - - // service and port information - private static final String NAMESPACEURI = "http://example.com"; - - private static final String SERVICE_NAME = "AddNumbersService"; - - private static final String PORT_NAME = "AddNumbersPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private URL wsdlurl = null; - - AddNumbersPortType port = null; - - static AddNumbersService service = null; - - String invalidCardinality = "{0}inputActionuuid:{1}
{2}
{3}
1010invalidCardinality
"; - - String actionMismatch = "{0}inputActionuuid:{1}
{2}
1010actionMismatch
"; - - String actionNotSupported = "{0}ActionNotSupporteduuid:{1}
{2}
1010actionNotSupported
"; - - String missingActionHeader = "{0}uuid:{1}
{2}
1010missingActionHeader
"; - - private static AddressingFeature ENABLED_ADDRESSING_FEATURE = new AddressingFeature( - true, true); - - private static AddressingFeature DISABLED_ADDRESSING_FEATURE = new AddressingFeature( - false); - - private WebServiceFeature[] enabledRequiredwsf = { - ENABLED_ADDRESSING_FEATURE }; - - private Dispatch createDispatchSOAPMessage(QName port) - throws Exception { - return service.createDispatch(port, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE, DISABLED_ADDRESSING_FEATURE); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (AddNumbersPortType) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddNumbersService.class, PORT_QNAME, AddNumbersPortType.class, - enabledRequiredwsf); - TestUtil.logMsg("port=" + port); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (AddNumbersPortType) service.getAddNumbersPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - service = (AddNumbersService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, AddNumbersService.class); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (AddNumbersService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: testDefaultRequestResponseAction - * - * @assertion_ids: WSACORE:SPEC:2001; WSACORE:SPEC:3002; WSACORE:SPEC:3003; - * WSACORE:SPEC:3003.1; WSACORE:SPEC:3003.2; WSACORE:SPEC:3003.3; - * WSACORE:SPEC:3005; WSACORE:SPEC:3007; WSACORE:SPEC:3009; WSACORE:SPEC:3010; - * WSACORE:SPEC:3010.1; WSACORE:SPEC:3010.2; WSACORE:SPEC:3017; - * WSACORE:SPEC:3022; WSACORE:SPEC:3022.2; WSACORE:SPEC:3022.2.1; - * WSACORE:SPEC:3002.2.2; WSACORE:SPEC:3023; WSACORE:SPEC:3023.1; - * WSACORE:SPEC:3023.1.1; WSACORE:SPEC:3023.1.2; WSACORE:SPEC:3023.4; - * WSACORE:SPEC:3023.4.1; WSASB:SPEC:5000; WSASB:SPEC:6000; WSAMD:SPEC:4001; - * WSAMD:SPEC:4001.1; WSAMD:SPEC:5001; - * - * @test_Strategy: Test default action pattern for WSDL input/output - * - */ - public void testDefaultRequestResponseAction() throws Fault { - TestUtil.logMsg("testDefaultRequestResponseAction"); - boolean pass = true; - - try { - int number = port.addNumbers(10, 10, - new Holder("testDefaultRequestResponseAction")); - TestUtil.logMsg("number=" + number); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testDefaultRequestResponseAction failed", e); - } - - if (!pass) - throw new Fault("testDefaultRequestResponseAction failed"); - } - - /* - * @testName: testExplicitRequestResponseAction - * - * @assertion_ids: WSACORE:SPEC:2001; WSACORE:SPEC:3002; WSACORE:SPEC:3003; - * WSACORE:SPEC:3003.1; WSACORE:SPEC:3003.2; WSACORE:SPEC:3003.3; - * WSACORE:SPEC:3005; WSACORE:SPEC:3007; WSACORE:SPEC:3009; WSACORE:SPEC:3010; - * WSACORE:SPEC:3010.1; WSACORE:SPEC:3010.2; WSACORE:SPEC:3017; - * WSACORE:SPEC:3022; WSACORE:SPEC:3022.2; WSACORE:SPEC:3022.2.1; - * WSACORE:SPEC:3002.2.2; WSACORE:SPEC:3023; WSACORE:SPEC:3023.1; - * WSACORE:SPEC:3023.1.1; WSACORE:SPEC:3023.1.2; WSACORE:SPEC:3023.4; - * WSACORE:SPEC:3023.4.1; WSASB:SPEC:5000; WSASB:SPEC:6000; - * - * @test_Strategy: Test explicit action pattern for WSDL input/output - * - */ - public void testExplicitRequestResponseAction() throws Fault { - TestUtil.logMsg("testExplicitRequestResponseAction"); - boolean pass = true; - - try { - int number = port.addNumbers2(10, 10, - new Holder("testExplicitRequestResponseAction")); - TestUtil.logMsg("number=" + number); - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testExplicitRequestResponseAction failed", e); - } - - if (!pass) - throw new Fault("testExplicitRequestResponseAction failed"); - } - - /* - * @testName: testMessageAddressingHeaderRequiredFault - * - * @assertion_ids: WSASB:SPEC:6005; WSASB:SPEC:6006; WSASB:SPEC:6013; - * WSASB:SPEC:6004.4; WSASB:SPEC:6004.1; WSASB:SPEC:6004.2; WSASB:SPEC:6001; - * - * @test_Strategy: Send a message that doesn't contain wsa:Action header. - * Expect MessageAddressingHeaderRequired fault. Cannot test missing wsa:To, - * wsa:ReplyTo, or wsa:MessageID headers as these are optional in WSA Core - * Spec. - */ - public void testMessageAddressingHeaderRequiredFault() throws Fault { - TestUtil.logMsg("testMessageAddressingHeaderRequiredFault"); - boolean pass = true; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format(missingActionHeader, url, - UUID.randomUUID(), WsaSOAPUtils.getAddrVerAnonUri()); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (SOAPFaultException e) { - try { - TestUtil.logMsg("Caught SOAPFaultException"); - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(e)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(e)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(e)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(e); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(e) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(e) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (SOAPException e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testMessageAddressingHeaderRequiredFault failed", e); - } - if (!pass) - throw new Fault("testMessageAddressingHeaderRequiredFault failed"); - } - - /* - * @testName: testInvalidCardinalityFault - * - * @assertion_ids: WSASB:SPEC:6005; WSASB:SPEC:6006; WSASB:SPEC:6013; - * WSASB:SPEC:6012.3; WSASB:SPEC:6004.4; WSASB:SPEC:6004.1; WSASB:SPEC:6004.2; - * WSASB:SPEC:6001; - * - * @test_Strategy: Test for InvalidCardinality fault. Send a message that - * contains two wsa:ReplyTo headers. Expect an InvalidCardinality fault. - */ - public void testInvalidCardinalityFault() throws Fault { - TestUtil.logMsg("testInvalidCardinalityFault"); - boolean pass = true; - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format(invalidCardinality, url, - UUID.randomUUID(), WsaSOAPUtils.getAddrVerAnonUri(), - WsaSOAPUtils.getAddrVerAnonUri()); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - TestUtil.logErr("No SOAPFaultException occurred which was expected"); - pass = false; - } catch (SOAPFaultException s) { - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(s)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(s)); - if (WsaSOAPUtils.isInvalidCARDINALITYFaultCode(s)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode InvalidCardinality"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(s); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: InvalidCardinality"); - pass = false; - } - String faultdetail[] = WsaSOAPUtils.getFaultDetail(s); - if (faultdetail != null) { - StringBuffer output = new StringBuffer("FaultDetail:"); - for (int i = 0; faultdetail[i] != null; i++) { - output.append(" " + faultdetail[i]); - } - TestUtil.logErr(output.toString()); - - if (WsaSOAPUtils.isProblemHeaderQNameFaultDetail(faultdetail[0])) - TestUtil.logMsg("FaultDetail contains expected ProblemHeaderQName"); - else { - TestUtil.logErr("FaultDetail contains unexpected value got: " - + faultdetail[0] + ", expected: ProblemHeaderQName"); - pass = false; - } - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - throw new Fault("testInvalidCardinalityFault failed", e2); - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - throw new Fault("testInvalidCardinalityFault failed", e); - } - if (!pass) - throw new Fault("testInvalidCardinalityFault failed"); - } - - /* - * @testName: testActionMismatchOrActionNotSupportedFaultCase1 - * - * @assertion_ids: WSASB:SPEC:6005; WSASB:SPEC:6006; WSASB:SPEC:6015; - * WSASB:SPEC:6004.4; WSASB:SPEC:6004.1; WSASB:SPEC:6004.2; WSASB:SPEC:6001; - * JAXWS:SPEC:10027; - * - * @test_Strategy: Test for ActionMismatch or ActionNotSupportedfault. Set the - * SOAPACTIONURI to a wrong value. - * - */ - public void testActionMismatchOrActionNotSupportedFaultCase1() throws Fault { - TestUtil.logMsg("testActionMismatchOrActionNotSupportedFaultCase1"); - boolean pass = true; - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format(actionMismatch, url, - UUID.randomUUID(), WsaSOAPUtils.getAddrVerAnonUri()); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME); - JAXWS_Util.setSOAPACTIONURI(dispatchSM, "ActionMismatch"); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - TestUtil.logErr("No SOAPFaultException occurred which was expected"); - pass = false; - } catch (SOAPFaultException s) { - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(s)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(s)); - if (WsaSOAPUtils.isActionMismatchFaultCode(s) - || WsaSOAPUtils.isActionNotSupportedFaultCode(s)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode ActionMismatch or ActionNotSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(s); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: ActionMismatch or ActionNotSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(s) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(s) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - throw new Fault( - "testActionMismatchOrActionNotSupportedFaultCase1 failed", e2); - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - throw new Fault("testActionMismatchOrActionNotSupportedFaultCase1 failed", - e); - } - if (!pass) - throw new Fault( - "testActionMismatchOrActionNotSupportedFaultCase1 failed"); - } - - /* - * @testName: testActionMismatchOrActionNotSupportedFaultCase2 - * - * @assertion_ids: WSASB:SPEC:6005; WSASB:SPEC:6006; WSASB:SPEC:6015; - * WSASB:SPEC:6004.4; WSASB:SPEC:6004.1; WSASB:SPEC:6004.2; WSASB:SPEC:6001; - * JAXWS:SPEC:10027; - * - * @test_Strategy: Test for ActionMismatch or ActionNotSupportedfault. Set the - * SOAPACTIONURI to a wrong value. - * - */ - public void testActionMismatchOrActionNotSupportedFaultCase2() throws Fault { - TestUtil.logMsg("testActionMismatchOrActionNotSupportedFaultCase2"); - boolean pass = true; - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format(actionNotSupported, url, - UUID.randomUUID(), WsaSOAPUtils.getAddrVerAnonUri()); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME); - JAXWS_Util.setSOAPACTIONURI(dispatchSM, "ActionNotSupported1"); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - TestUtil.logErr("No SOAPFaultException occurred which was expected"); - pass = false; - } catch (SOAPFaultException s) { - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(s)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(s)); - if (WsaSOAPUtils.isActionMismatchFaultCode(s) - || WsaSOAPUtils.isActionNotSupportedFaultCode(s)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode ActionMismatch or ActionNotSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(s); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: ActionMismatch or ActionNotSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(s) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(s) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - throw new Fault( - "testActionMismatchOrActionNotSupportedFaultCase2 failed", e2); - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - throw new Fault("testActionMismatchOrActionNotSupportedFaultCase2 failed", - e); - } - if (!pass) - throw new Fault( - "testActionMismatchOrActionNotSupportedFaultCase2 failed"); - } - - /* - * @testName: testActionMismatchOrActionNotSupportedFaultCase3 - * - * @assertion_ids: WSASB:SPEC:6005; WSASB:SPEC:6006; WSASB:SPEC:6015; - * WSASB:SPEC:6004.4; WSASB:SPEC:6004.1; WSASB:SPEC:6004.2; WSASB:SPEC:6001; - * JAXWS:SPEC:10027; - * - * @test_Strategy: Test for ActionMismatch or ActionNotSupportedfault. Set the - * SOAPACTIONURI to a wrong value. - * - */ - public void testActionMismatchOrActionNotSupportedFaultCase3() throws Fault { - TestUtil.logMsg("testActionMismatchOrActionNotSupportedFaultCase3"); - boolean pass = true; - try { - JAXWS_Util.setSOAPACTIONURI(port, "ActionNotSupported2"); - int number = port.addNumbers2(10, 10, new Holder("ActionNotSupported2")); - TestUtil.logErr("No SOAPFaultException occurred which was expected"); - pass = false; - } catch (SOAPFaultException s) { - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(s)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(s)); - if (WsaSOAPUtils.isActionMismatchFaultCode(s) - || WsaSOAPUtils.isActionNotSupportedFaultCode(s)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode ActionMismatch or ActionNotSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(s); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: ActionMismatch or ActionNotSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(s) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(s) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - throw new Fault( - "testActionMismatchOrActionNotSupportedFaultCase3 failed", e2); - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - throw new Fault("testActionMismatchOrActionNotSupportedFaultCase3 failed", - e); - } - if (!pass) - throw new Fault( - "testActionMismatchOrActionNotSupportedFaultCase3 failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/ClientSOAPHandler.java deleted file mode 100644 index 382bfcbb89..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/ClientSOAPHandler.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientSOAPHandler.java 52769 2007-02-21 19:46:02Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.requestresponse; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.ws.handler.MessageContext.Scope; -import jakarta.xml.soap.*; -import java.util.*; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - String testName = null; - - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, "testDefaultRequestResponseAction")) { - checkAddressingHeadersExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "testExplicitRequestResponseAction")) { - checkAddressingHeadersExist(context, action); - } - } - - private void verifyAction(String action) { - TestUtil.logMsg("ClientSOAPHandler.verifyAction: [action=" + action + "]"); - if (testName.equals("testDefaultRequestResponseAction")) { - if (!action.equals(TestConstants.ADD_NUMBERS_OUT_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS_OUT_ACTION + ", Actual:" + action); - } - } else if (testName.equals("testExplicitRequestResponseAction")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_OUT_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS2_OUT_ACTION + ", Actual:" + action); - } - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersExist"); - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - - protected void processOutboundMessage(SOAPMessageContext context, String oper, - String testName) { - if (testName != null && testName.equals("actionMismatch")) { - TestUtil.logMsg("ClientSOAPHandler.processOutboundMessage: operation=" - + oper + ", testName=" + testName); - Map> headers = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - if (headers == null) - headers = new Hashtable>(); - List values = new Vector(); - values.add("ActionNotSupported"); - headers.put("Soapaction", values); - context.put(MessageContext.HTTP_REQUEST_HEADERS, headers); - context.setScope(MessageContext.HTTP_REQUEST_HEADERS, Scope.APPLICATION); - } - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - testName = (String) context.get("test.name"); - TestUtil.logMsg("ClientSOAPHandler.getAction(): testName=" + testName); - if (testName == null) - return super.getAction(context); - else if (!testName.equals("missingActionHeader")) - return super.getAction(context); - else - return null; - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/build.xml deleted file mode 100644 index db8da86f0c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/requestresponse/build.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/Client.java deleted file mode 100644 index 3fbce1ad36..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/j2w/document/literal/typesubstitution/Client.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 51063 2006-08-11 19:56:36Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.j2w.document.literal.typesubstitution; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; - -import java.net.URL; - -import java.util.Properties; -import java.util.List; -import java.util.Iterator; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.j2w.document.literal.typesubstitution."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsaj2wdltypesubstitution.endpoint.1"; - - private static final String WSDLLOC_URL = "wsaj2wdltypesubstitution.wsdlloc.1"; - - private String url = null; - - // service and port information - private static final String NAMESPACEURI = "http://typesubstitution/wsdl"; - - private static final String SERVICE_NAME = "CarDealerService"; - - private static final String PORT_NAME = "CarDealerPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private URL wsdlurl = null; - - CarDealer port = null; - - static CarDealerService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (CarDealer) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - CarDealerService.class, PORT_QNAME, CarDealer.class); - TestUtil.logMsg("port=" + port); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (CarDealer) service.getCarDealerPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (CarDealerService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: getCars - * - * @assertion_ids: JAXWS:SPEC:2076; - * - * @test_Strategy - * - */ - public void getCars() throws Fault { - TestUtil.logMsg("getCars"); - boolean pass = true; - - try { - List cars = port.getSedans(); - Iterator i = cars.iterator(); - int ncars = 0; - while (i.hasNext()) { - Car car = i.next(); - ncars++; - String make = car.getMake(); - String model = car.getModel(); - String year = car.getYear(); - String color; - TestUtil.logMsg("Make=" + make); - TestUtil.logMsg("Model=" + model); - TestUtil.logMsg("Year=" + year); - if (car instanceof Toyota) { - Toyota t = (Toyota) car; - color = t.getColor(); - TestUtil.logMsg("Color=" + color); - if (!make.equals("Toyota") && !model.equals("Camry") - && !year.equals("1998") && !color.equals("white")) { - TestUtil.logErr("data mismatch expected Toyota Camry 1998 white"); - pass = false; - } else - TestUtil.logMsg("Toyota car matches"); - } else if (car instanceof Ford) { - Ford t = (Ford) car; - color = t.getColor(); - TestUtil.logMsg("Color=" + color); - if (!make.equals("Ford") && !model.equals("Mustang") - && !year.equals("1999") && !color.equals("red")) { - TestUtil.logErr("data mismatch expected Ford Mustang 1999 red"); - pass = false; - } else - TestUtil.logMsg("Ford car matches"); - } else { - TestUtil.logErr("data mismatch - no car of this type expected"); - pass = false; - } - } - TestUtil.logMsg("List returned " + ncars + " cars"); - if (ncars != 2) { - TestUtil.logErr("expected only 2 cars"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getCars failed", e); - } - - if (!pass) - throw new Fault("getCars failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/build.xml deleted file mode 100644 index 10abbc4d66..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/build.xml deleted file mode 100644 index 4f2bc6f650..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/AddNumbersImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/AddNumbersImpl.java deleted file mode 100644 index 95e63ed267..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/AddNumbersImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersImpl.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; - -@WebService(portName = "AddNumbersPort", serviceName = "AddNumbersService", targetNamespace = "http://example.com/", wsdlLocation = "WEB-INF/wsdl/WSAW2JDLActionTest.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action.AddNumbersPortType") -public class AddNumbersImpl implements AddNumbersPortType { - public int addNumbers(int number1, int number2) - throws AddNumbersFault_Exception, TooBigNumbersFault_Exception { - if (number1 < 0 || number2 < 0) { - AddNumbersFault faultInfo = createAddNumbersFault(number1, number2); - throw new AddNumbersFault_Exception(faultInfo.getMessage(), faultInfo); - } - - if (number1 > 10 || number2 > 10) { - TooBigNumbersFault faultInfo = createTooBigNumbersFaultInfo(number1, - number2); - throw new TooBigNumbersFault_Exception(faultInfo.getMessage(), faultInfo); - } - - return number1 + number2; - } - - public int addNumbers2(int number1, int number2) - throws AddNumbers2Fault, TooBigNumbers2Fault { - if (number1 < 0 || number2 < 0) { - AddNumbersFault faultInfo = createAddNumbersFault(number1, number2); - throw new AddNumbers2Fault(faultInfo.getMessage(), faultInfo); - } - - if (number1 > 10 || number2 > 10) { - TooBigNumbersFault faultInfo = createTooBigNumbersFaultInfo(number1, - number2); - throw new TooBigNumbers2Fault(faultInfo.getMessage(), faultInfo); - } - - return number1 + number2; - } - - public int addNumbers3(int number1, int number2) - throws AddNumbers3Fault, TooBigNumbers3Fault { - if (number1 < 0 || number2 < 0) { - AddNumbersFault faultInfo = createAddNumbersFault(number1, number2); - throw new AddNumbers3Fault(faultInfo.getMessage(), faultInfo); - } - - if (number1 > 10 || number2 > 10) { - TooBigNumbersFault faultInfo = createTooBigNumbersFaultInfo(number1, - number2); - throw new TooBigNumbers3Fault(faultInfo.getMessage(), faultInfo); - } - - return number1 + number2; - } - - public int addNumbers4(int number1, int number2) - throws AddNumbers4Fault, TooBigNumbers4Fault { - if (number1 < 0 || number2 < 0) { - AddNumbersFault faultInfo = createAddNumbersFault(number1, number2); - throw new AddNumbers4Fault(faultInfo.getMessage(), faultInfo); - } - - if (number1 > 10 || number2 > 10) { - TooBigNumbersFault faultInfo = createTooBigNumbersFaultInfo(number1, - number2); - throw new TooBigNumbers4Fault(faultInfo.getMessage(), faultInfo); - } - - return number1 + number2; - } - - public int addNumbers5(int number1, int number2) throws AddNumbers5Fault { - if (number1 < 0 || number2 < 0) { - AddNumbersFault faultInfo = createAddNumbersFault(number1, number2); - throw new AddNumbers5Fault(faultInfo.getMessage(), faultInfo); - } - - return number1 + number2; - } - - public int addNumbers6(int number1, int number2) throws AddNumbers6Fault { - if (number1 < 0 || number2 < 0) { - AddNumbersFault faultInfo = createAddNumbersFault(number1, number2); - throw new AddNumbers6Fault(faultInfo.getMessage(), faultInfo); - } - - return number1 + number2; - } - - AddNumbersFault createAddNumbersFault(int number1, int number2) { - ObjectFactory of = new ObjectFactory(); - AddNumbersFault faultInfo = of.createAddNumbersFault(); - faultInfo.setDetail("Negative numbers cant be added!"); - faultInfo.setMessage("Numbers: " + number1 + ", " + number2); - - return faultInfo; - } - - TooBigNumbersFault createTooBigNumbersFaultInfo(int number1, int number2) { - ObjectFactory of = new ObjectFactory(); - TooBigNumbersFault faultInfo = of.createTooBigNumbersFault(); - faultInfo.setDetail("Too Big numbers cant be added!"); - faultInfo.setMessage("Numbers: " + number1 + ", " + number2); - - return faultInfo; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/Client.java deleted file mode 100644 index 6165d2c045..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/Client.java +++ /dev/null @@ -1,595 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.net.*; -import java.util.Properties; -import javax.xml.namespace.QName; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action."; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsaw2jdlactiontest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsaw2jdlactiontest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - // service and port information - private static final String NAMESPACEURI = "http://example.com/"; - - private static final String SERVICE_NAME = "AddNumbersService"; - - private static final String PORT_NAME = "AddNumbersPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - AddNumbersPortType port = null; - - static AddNumbersService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (AddNumbersPortType) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddNumbersService.class, PORT_QNAME, AddNumbersPortType.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (AddNumbersPortType) service.getPort(AddNumbersPortType.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg("WebServiceRef is not set in Client " - + "(get it from specific vehicle)"); - service = (AddNumbersService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server in " + "config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: testAddNumbersDefaultAddNumbersFaultAction - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; JAXWS:SPEC:2089; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:10027; - * - * @test_Strategy: Test default action pattern for WSDL fault element - * - */ - public void testAddNumbersDefaultAddNumbersFaultAction() throws Fault { - TestUtil.logMsg("testAddNumbersDefaultAddNumbersFaultAction"); - boolean pass = true; - try { - port.addNumbers(-10, 10); - TestUtil.logErr("AddNumbersFault_Exception must be thrown"); - pass = false; - } catch (AddNumbersFault_Exception ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (TooBigNumbersFault_Exception ex) { - TestUtil.logErr("Caught unexpected TooBigNumbersFault_Exception"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testAddNumbersDefaultAddNumbersFaultAction failed", ex); - } - if (!pass) - throw new Fault("testAddNumbersDefaultAddNumbersFaultAction failed"); - } - - /* - * @testName: testAddNumbersDefaultTooBigNumbersFaultAction - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; JAXWS:SPEC:2089; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:10027; - * - * @test_Strategy: Test default action pattern for WSDL fault element - * - */ - public void testAddNumbersDefaultTooBigNumbersFaultAction() throws Fault { - TestUtil.logMsg("testAddNumbersDefaultTooBigNumbersFaultAction"); - boolean pass = true; - try { - port.addNumbers(20, 20); - TestUtil.logErr("TooBigNumbersFault_Exception must be thrown"); - pass = false; - } catch (TooBigNumbersFault_Exception ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (AddNumbersFault_Exception ex) { - TestUtil.logErr("Caught unexpected AddNumbersFault_Exception"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testAddNumbersDefaultTooBigNumbersFaultAction failed", - ex); - } - if (!pass) - throw new Fault("testAddNumbersDefaultTooBigNumbersFaultAction failed"); - } - - /* - * @testName: testAddNumbers2ExplicitAddNumbers2FaultAction - * - * @assertion_ids: WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; JAXWS:SPEC:2089; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:10027; - * - * @test_Strategy: Test explicit association for WSDL fault element - * - */ - public void testAddNumbers2ExplicitAddNumbers2FaultAction() throws Fault { - TestUtil.logMsg("testAddNumbers2ExplicitAddNumbers2FaultAction"); - boolean pass = true; - try { - port.addNumbers2(-10, 10); - TestUtil.logErr("AddNumbers2Fault must be thrown"); - pass = false; - } catch (AddNumbers2Fault ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (TooBigNumbers2Fault ex) { - TestUtil.logErr("Caught unexpected TooBigNumbers2Fault"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testAddNumbers2ExplicitAddNumbers2FaultAction failed", - ex); - } - if (!pass) - throw new Fault("testAddNumbers2ExplicitAddNumbers2FaultAction failed"); - } - - /* - * @testName: testAddNumbers2ExplicitTooBigNumbers2FaultAction - * - * @assertion_ids: WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; JAXWS:SPEC:2089; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:10027; - * - * @test_Strategy: Test explicit association for WSDL fault element - * - */ - public void testAddNumbers2ExplicitTooBigNumbers2FaultAction() throws Fault { - TestUtil.logMsg("testAddNumbers2ExplicitTooBigNumbers2FaultAction"); - boolean pass = true; - try { - port.addNumbers2(20, 20); - TestUtil.logErr("TooBigNumbers2Fault must be thrown"); - pass = false; - } catch (TooBigNumbers2Fault ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (AddNumbers2Fault ex) { - TestUtil.logErr("Caught unexpected AddNumbers2Fault"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testAddNumbers2ExplicitTooBigNumbers2FaultAction failed", - ex); - } - if (!pass) - throw new Fault( - "testAddNumbers2ExplicitTooBigNumbers2FaultAction failed"); - } - - /* - * @testName: testAddNumbers3ExplicitAddNumbers3FaultAction - * - * @assertion_ids: WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; JAXWS:SPEC:2089; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:10027; - * - * @test_Strategy: Test explicit association for WSDL fault element - * - */ - public void testAddNumbers3ExplicitAddNumbers3FaultAction() throws Fault { - TestUtil.logMsg("testAddNumbers3ExplicitAddNumbers3FaultAction"); - boolean pass = true; - try { - port.addNumbers3(-10, 10); - TestUtil.logErr("AddNumbers3Fault must be thrown"); - pass = false; - } catch (AddNumbers3Fault ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (TooBigNumbers3Fault ex) { - TestUtil.logErr("Caught unexpected TooBigNumbers3Fault"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testAddNumbers3ExplicitAddNumbers3FaultAction failed", - ex); - } - if (!pass) - throw new Fault("testAddNumbers3ExplicitAddNumbers3FaultAction failed"); - } - - /* - * @testName: testAddNumbers3DefaultTooBigNumbers3FaultAction - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; JAXWS:SPEC:2089; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:10027; - * - * @test_Strategy: Test default action pattern for WSDL fault element - * - */ - public void testAddNumbers3DefaultTooBigNumbers3FaultAction() throws Fault { - TestUtil.logMsg("testAddNumbers3DefaultTooBigNumbers3FaultAction"); - boolean pass = true; - try { - port.addNumbers3(20, 20); - TestUtil.logErr("TooBigNumbers3Fault must be thrown"); - pass = false; - } catch (TooBigNumbers3Fault ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (AddNumbers3Fault ex) { - TestUtil.logErr("Caught unexpected AddNumbers3Fault"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testAddNumbers3DefaultTooBigNumbers3FaultAction failed", - ex); - } - if (!pass) - throw new Fault("testAddNumbers3DefaultTooBigNumbers3FaultAction failed"); - } - - /* - * @testName: testAddNumbers4DefaultAddNumbers4FaultAction - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; JAXWS:SPEC:2089; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:10027; - * - * @test_Strategy: Test default action pattern for WSDL fault element - * - */ - public void testAddNumbers4DefaultAddNumbers4FaultAction() throws Fault { - TestUtil.logMsg("testAddNumbers4DefaultAddNumbers4FaultAction"); - boolean pass = true; - try { - port.addNumbers4(-10, 10); - TestUtil.logErr("AddNumbers4Fault must be thrown"); - pass = false; - } catch (AddNumbers4Fault ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (TooBigNumbers4Fault ex) { - TestUtil.logErr("Caught unexpected TooBigNumbers4Fault"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testAddNumbers4DefaultAddNumbers4FaultAction failed", - ex); - } - if (!pass) - throw new Fault("testAddNumbers4DefaultAddNumbers4FaultAction failed"); - } - - /* - * @testName: testAddNumbers4ExplicitTooBigNumbers4FaultAction - * - * @assertion_ids: WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; JAXWS:SPEC:2089; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:10027; - * - * @test_Strategy: Test explicit association for WSDL fault element - * - */ - public void testAddNumbers4ExplicitTooBigNumbers4FaultAction() throws Fault { - TestUtil.logMsg("testAddNumbers4ExplicitTooBigNumbers4FaultAction"); - boolean pass = true; - try { - port.addNumbers4(20, 20); - TestUtil.logErr("TooBigNumbers4Fault must be thrown"); - pass = false; - } catch (TooBigNumbers4Fault ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (AddNumbers4Fault ex) { - TestUtil.logErr("Caught unexpected AddNumbers4Fault"); - pass = false; - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testAddNumbers4ExplicitTooBigNumbers4FaultAction failed", - ex); - } - if (!pass) - throw new Fault( - "testAddNumbers4ExplicitTooBigNumbers4FaultAction failed"); - } - - /* - * @testName: testAddNumbers5ExplicitAddNumbers5FaultAction - * - * @assertion_ids: WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; JAXWS:SPEC:2089; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:10027; - * - * @test_Strategy: Test explicit association for WSDL fault element - * - */ - public void testAddNumbers5ExplicitAddNumbers5FaultAction() throws Fault { - TestUtil.logMsg("testAddNumbers5ExplicitAddNumbers5FaultAction"); - boolean pass = true; - try { - port.addNumbers5(-10, 20); - TestUtil.logErr("AddNumbers5Fault must be thrown"); - pass = false; - } catch (AddNumbers5Fault ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testAddNumbers5ExplicitAddNumbers5FaultAction failed", - ex); - } - if (!pass) - throw new Fault("testAddNumbers5ExplicitAddNumbers5FaultAction failed"); - } - - /* - * @testName: testAddNumbers6EmptyAddNumbers6FaultAction - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; JAXWS:SPEC:2089; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:10027; - * - * @test_Strategy: Test default association for WSDL fault element when an the - * Action value is empty string "" - * - */ - public void testAddNumbers6EmptyAddNumbers6FaultAction() throws Fault { - TestUtil.logMsg("testAddNumbers6EmptyAddNumbers6FaultAction"); - boolean pass = true; - try { - port.addNumbers6(-10, 20); - TestUtil.logErr("AddNumbers6Fault must be thrown"); - pass = false; - } catch (AddNumbers6Fault ex) { - TestUtil.logMsg("WSA:Action headers are correct"); - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testAddNumbers6EmptyAddNumbers6FaultAction failed", ex); - } - if (!pass) - throw new Fault("testAddNumbers6EmptyAddNumbers6FaultAction failed"); - } - - /* - * @testName: testDefaultInputOutputActionExplicitMessageNames - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.1; WSAMD:SPEC:4004.2; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:2089; JAXWS:SPEC:10027; - * - * @test_Strategy: Test default association for WSDL input/output elements and - * explicit message names specified - * - */ - public void testDefaultInputOutputActionExplicitMessageNames() throws Fault { - TestUtil.logMsg("testDefaultInputOutputActionExplicitMessageNames"); - boolean pass = true; - try { - port.addNumbers2(10, 10); - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testDefaultInputOutputActionExplicitMessageNames failed", - ex); - } - if (!pass) - throw new Fault( - "testDefaultInputOutputActionExplicitMessageNames failed"); - } - - /* - * @testName: testDefaultInputOutputAction - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; JAXWS:SPEC:2089; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:10027; - * - * @test_Strategy: Test default association for WSDL input/output elements and - * no message names specified - * - */ - public void testDefaultInputOutputAction() throws Fault { - TestUtil.logMsg("testDefaultInputOutputAction"); - boolean pass = true; - try { - port.addNumbers3(10, 10); - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testDefaultInputOutputAction failed", ex); - } - if (!pass) - throw new Fault("testDefaultInputOutputAction failed"); - } - - /* - * @testName: testEmptyInputOutputAction - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; JAXWS:SPEC:2089; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:10027; - * - * @test_Strategy: Test default association for WSDL input/output elements - * when the Action value is empty string "" - * - */ - public void testEmptyInputOutputAction() throws Fault { - TestUtil.logMsg("testEmptyInputOutputAction"); - boolean pass = true; - try { - port.addNumbers4(10, 10); - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testEmptyInputOutputAction failed", ex); - } - if (!pass) - throw new Fault("testEmptyInputOutputAction failed"); - } - - /* - * @testName: testExplicitInputOutputActions - * - * @assertion_ids: WSAMD:SPEC:4003; WSAMD:SPEC:4003.1; WSAMD:SPEC:4003.2; - * JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; - * JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; JAXWS:SPEC:2089; JAXWS:SPEC:10027; - * - * @test_Strategy: Test explicit association for WSDL input/output elements - * - */ - public void testExplicitInputOutputActions() throws Fault { - TestUtil.logMsg("testExplicitInputOutputActions"); - boolean pass = true; - try { - port.addNumbers5(10, 10); - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testExplicitInputOutputActions failed", ex); - } - if (!pass) - throw new Fault("testExplicitInputOutputActions failed"); - } - - /* - * @testName: testExplicitInputDefaultOutputAction - * - * @assertion_ids: WSAMD:SPEC:4003; WSAMD:SPEC:4003.1; WSAMD:SPEC:4004; - * WSAMD:SPEC:4004.2; JAXWS:SPEC:2089; JAXWS:SPEC:7018; JAXWS:SPEC:7018.1; - * JAXWS:SPEC:7018.2; JAXWS:SPEC:7017; JAXWS:SPEC:7017.1; JAXWS:SPEC:7017.3; - * JAXWS:SPEC:10027; - * - * @test_Strategy: Test explicit association for WSDL input element and - * default association for WSDL output element - * - */ - public void testExplicitInputDefaultOutputAction() throws Fault { - TestUtil.logMsg("testExplicitInputDefaultOutputAction"); - boolean pass = true; - try { - port.addNumbers6(10, 10); - } catch (Exception ex) { - TestUtil.logErr("Caught unexpected Exception " + ex.getMessage()); - throw new Fault("testExplicitInputDefaultOutputAction failed", ex); - } - if (!pass) - throw new Fault("testExplicitInputDefaultOutputAction failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/ClientSOAPHandler.java deleted file mode 100644 index dd2b83861a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/ClientSOAPHandler.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", action=" + action + "]"); - TestUtil.logMsg("Verify output action: [" + action + "]"); - if (oper.equals("addNumbersResponse2")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_OUT_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS2_OUT_ACTION, - action); - } - } else if (oper.equals("addNumbersResponse3")) { - if (!action.equals(TestConstants.ADD_NUMBERS3_OUT_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS3_OUT_ACTION, - action); - } - } else if (oper.equals("addNumbersResponse4")) { - if (!action.equals(TestConstants.ADD_NUMBERS4_OUT_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS4_OUT_ACTION, - action); - } - } else if (oper.equals("addNumbersResponse5")) { - if (!action.equals(TestConstants.ADD_NUMBERS5_OUT_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS5_OUT_ACTION, - action); - } - } else if (oper.equals("addNumbersReeponse6")) { - if (!action.equals(TestConstants.ADD_NUMBERS6_OUT_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS6_OUT_ACTION, - action); - } - } - } - - @Override - protected void checkFaultActions(String requestName, String detailName, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkFaultActions: [input=" + requestName - + ", fault=" + detailName + ", action=" + action + "]"); - TestUtil.logMsg("Verify fault action: [" + action + "]"); - if (requestName.equals("addNumbers") - && detailName.equals("AddNumbersFault")) { - if (!action.equals(TestConstants.ADD_NUMBERS_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_ADDNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbers") - && detailName.equals("TooBigNumbersFault")) { - if (!action.equals(TestConstants.ADD_NUMBERS_TOOBIGNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS_TOOBIGNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbers2") - && detailName.equals("AddNumbers2Fault")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS2_ADDNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbers2") - && detailName.equals("TooBigNumbers2Fault")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_TOOBIGNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS2_TOOBIGNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbers3") - && detailName.equals("AddNumbers3Fault")) { - if (!action.equals(TestConstants.ADD_NUMBERS3_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS3_ADDNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbers3") - && detailName.equals("TooBigNumbers3Fault")) { - if (!action.equals(TestConstants.ADD_NUMBERS3_TOOBIGNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS3_TOOBIGNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbers4") - && detailName.equals("AddNumbers4Fault")) { - if (!action.equals(TestConstants.ADD_NUMBERS4_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS4_ADDNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbers4") - && detailName.equals("TooBigNumbers4Fault")) { - if (!action.equals(TestConstants.ADD_NUMBERS4_TOOBIGNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS4_TOOBIGNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbers5") - && detailName.equals("AdNumbers5Fault")) { - if (!action.equals(TestConstants.ADD_NUMBERS5_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS5_ADDNUMBERS_ACTION, action); - } - } else if (requestName.equals("addNumbers6") - && detailName.equals("AddNumbers6Fault")) { - if (!action.equals(TestConstants.ADD_NUMBERS6_ADDNUMBERS_ACTION)) { - ThrowActionNotSupportedException( - TestConstants.ADD_NUMBERS6_ADDNUMBERS_ACTION, action); - } - } - } - - private void ThrowActionNotSupportedException(String expected, - String actual) { - throw new ActionNotSupportedException( - "Expected:" + expected + ", Actual:" + actual); - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/ServerSOAPHandler.java deleted file mode 100644 index f6bd62cab6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/ServerSOAPHandler.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", action=" + action + "]"); - TestUtil.logMsg("Verify input action: [" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", action=" + action + "]"); - System.out.println("Verify input action: [" + action + "]"); - if (oper.equals("addNumbers")) { - if (!action.equals(TestConstants.ADD_NUMBERS_IN_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS_IN_ACTION, - action); - } - } else if (oper.equals("addNumbers2")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_IN_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS2_IN_ACTION, - action); - } - } else if (oper.equals("addNumbers3")) { - if (!action.equals(TestConstants.ADD_NUMBERS3_IN_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS3_IN_ACTION, - action); - } - } else if (oper.equals("addNumbers4")) { - if (!action.equals(TestConstants.ADD_NUMBERS4_IN_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS4_IN_ACTION, - action); - } - } else if (oper.equals("addNumbers5")) { - if (!action.equals(TestConstants.ADD_NUMBERS5_IN_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS5_IN_ACTION, - action); - } - } else if (oper.equals("addNumbers6")) { - if (!action.equals(TestConstants.ADD_NUMBERS6_IN_ACTION)) { - ThrowActionNotSupportedException(TestConstants.ADD_NUMBERS6_IN_ACTION, - action); - } - } - } - - private void ThrowActionNotSupportedException(String expected, - String actual) { - throw new ActionNotSupportedException( - "Expected:" + expected + ", Actual:" + actual); - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/TestConstants.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/TestConstants.java deleted file mode 100644 index 1f61ec1e10..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/TestConstants.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action; - -public class TestConstants { - public static final String ADD_NUMBERS_IN_ACTION = "http://example.com/AddNumbersPortType/add"; - - public static final String ADD_NUMBERS_OUT_ACTION = "http://example.com/AddNumbersPortType/addResponse"; - - public static final String ADD_NUMBERS2_IN_ACTION = "http://example.com/AddNumbersPortType/add2"; - - public static final String ADD_NUMBERS2_OUT_ACTION = "http://example.com/AddNumbersPortType/addResponse2"; - - public static final String ADD_NUMBERS3_IN_ACTION = "http://example.com/AddNumbersPortType/addNumbers3Request"; - - public static final String ADD_NUMBERS3_OUT_ACTION = "http://example.com/AddNumbersPortType/addNumbers3Response"; - - public static final String ADD_NUMBERS4_IN_ACTION = "http://example.com/AddNumbersPortType/addNumbers4Request"; - - public static final String ADD_NUMBERS4_OUT_ACTION = "http://example.com/AddNumbersPortType/addNumbers4Response"; - - public static final String ADD_NUMBERS5_IN_ACTION = "ExplicitInput5"; - - public static final String ADD_NUMBERS5_OUT_ACTION = "ExplicitOutput5"; - - public static final String ADD_NUMBERS6_IN_ACTION = "ExplicitInput6"; - - public static final String ADD_NUMBERS6_OUT_ACTION = "http://example.com/AddNumbersPortType/addNumbers6Response"; - - public static final String ADD_NUMBERS_ADDNUMBERS_ACTION = "http://example.com/AddNumbersPortType/addNumbers/Fault/addFault"; - - public static final String ADD_NUMBERS_TOOBIGNUMBERS_ACTION = "http://example.com/AddNumbersPortType/addNumbers/Fault/tooBigFault"; - - public static final String ADD_NUMBERS2_ADDNUMBERS_ACTION = "add2fault"; - - public static final String ADD_NUMBERS2_TOOBIGNUMBERS_ACTION = "toobig2fault"; - - public static final String ADD_NUMBERS3_ADDNUMBERS_ACTION = "add3fault"; - - public static final String ADD_NUMBERS3_TOOBIGNUMBERS_ACTION = "http://example.com/AddNumbersPortType/addNumbers3/Fault/tooBig3Fault"; - - public static final String ADD_NUMBERS4_ADDNUMBERS_ACTION = "http://example.com/AddNumbersPortType/addNumbers4/Fault/add4Fault"; - - public static final String ADD_NUMBERS4_TOOBIGNUMBERS_ACTION = "toobig4fault"; - - public static final String ADD_NUMBERS5_ADDNUMBERS_ACTION = "fault5"; - - public static final String ADD_NUMBERS6_ADDNUMBERS_ACTION = "http://example.com/AddNumbersPortType/addNumbers6/Fault/add6Fault"; -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/WSAW2JDLActionTest.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/WSAW2JDLActionTest.wsdl deleted file mode 100644 index 7de540a3fc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/WSAW2JDLActionTest.wsdl +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/build.xml deleted file mode 100644 index f56a52593b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/build.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/custom-client.xml deleted file mode 100644 index eb38a6ab97..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/custom-client.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - ns2:AddNumbersPort - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action.ClientSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/custom-server.xml deleted file mode 100644 index a5946cf100..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/custom-server.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - ns2:AddNumbersPort - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action.ServerSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/jakartaEE.tokens deleted file mode 100644 index 7551584164..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsaw2jdlactiontest") -SERVICE=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action.AddNumbersService -SEI=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action.AddNumbersPortType -IMPL=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action.AddNumbersImpl -URLALIAS=/jaxws/AddNumbers -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.action.AddNumbersImpl -NAMESPACEURI=http://example.com/ -PORT=AddNumbersPort -WEBSERVICEDESCRIPTION=AddNumbersService -SERVICEREFNAMEWSSERVLET=service/wsaw2jdlactiontest -SERVICEREFNAMEWSEJB=service/wsaw2jdlactiontest -SERVICEREFNAMEWSAPPCLIENT=service/wsaw2jdlactiontest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/standalone-sun-jaxws.xml deleted file mode 100644 index 0da1ce6f98..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/standalone.web.xml deleted file mode 100644 index 935a0c88a2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/action/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSAW2JDLActionTest - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddNumbersPortType - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbersPortType - /jaxws/AddNumbers - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureException.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureException.java deleted file mode 100644 index 8eb90c45fa..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureException.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingFeatureException.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature; - -import jakarta.xml.ws.WebServiceException; - -public class AddressingFeatureException extends WebServiceException { - String detail; - - public AddressingFeatureException(String message) { - super(message); - } - - public AddressingFeatureException(String message, String detail) { - super(message); - this.detail = detail; - } - - public String getDetail() { - return detail; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestImpl1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestImpl1.java deleted file mode 100644 index ec5680d163..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestImpl1.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingFeatureTestImpl1.java 51128 2005-11-12 22:05:31Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.soap.Addressing; - -@WebService(portName = "AddressingFeatureTest1Port", serviceName = "AddressingFeatureTestService", targetNamespace = "http://addressingfeatureservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/AddressingFeatureTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTest1") - -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing - -public class AddressingFeatureTestImpl1 implements AddressingFeatureTest1 { - public int addNumbers(Holder testname, int number1, int number2) { - if (number1 < 0 || number2 < 0) { - throw new AddressingFeatureException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestImpl2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestImpl2.java deleted file mode 100644 index 47245d22b4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestImpl2.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id:$ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.Holder; - -@WebService(portName = "AddressingFeatureTest2Port", serviceName = "AddressingFeatureTestService", targetNamespace = "http://addressingfeatureservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/AddressingFeatureTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTest2") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) - -public class AddressingFeatureTestImpl2 implements AddressingFeatureTest2 { - - public int addNumbers(Holder testname, int number1, int number2) { - if (number1 < 0 || number2 < 0) { - throw new AddressingFeatureException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestImpl3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestImpl3.java deleted file mode 100644 index 418be8874f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestImpl3.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddressingFeatureTestImpl3.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.soap.Addressing; - -@WebService(portName = "AddressingFeatureTest3Port", serviceName = "AddressingFeatureTestService", targetNamespace = "http://addressingfeatureservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/AddressingFeatureTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTest3") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = false) - -public class AddressingFeatureTestImpl3 implements AddressingFeatureTest3 { - - public int addNumbers(Holder testname, int number1, int number2) { - if (number1 < 0 || number2 < 0) { - throw new AddressingFeatureException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestService.wsdl deleted file mode 100644 index 463425e7b9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/AddressingFeatureTestService.wsdl +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/Client.java deleted file mode 100644 index c3321fb526..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/Client.java +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 52695 2007-02-13 14:24:45Z sdimilla $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.xml.ws.soap.SOAPFaultException; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -import java.net.URL; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.AddressingFeature; - -import java.util.Properties; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature."; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL1 = "wsaw2jdladdressingfeature.endpoint.1"; - - private static final String ENDPOINT_URL2 = "wsaw2jdladdressingfeature.endpoint.2"; - - private static final String ENDPOINT_URL3 = "wsaw2jdladdressingfeature.endpoint.3"; - - private static final String WSDLLOC_URL = "wsaw2jdladdressingfeature.wsdlloc.1"; - - // service and port information - private static final String NAMESPACEURI = "http://addressingfeatureservice.org/wsdl"; - - private static final String SERVICE_NAME = "AddressingFeatureTestService"; - - private static final String PORT_NAME1 = "AddressingFeatureTest1Port"; - - private static final String PORT_NAME2 = "AddressingFeatureTest2Port"; - - private static final String PORT_NAME3 = "AddressingFeatureTest3Port"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private QName PORT_QNAME2 = new QName(NAMESPACEURI, PORT_NAME2); - - private QName PORT_QNAME3 = new QName(NAMESPACEURI, PORT_NAME3); - - private String url1 = null; - - private String url2 = null; - - private String url3 = null; - - private URL wsdlurl = null; - - private String ctxroot = null; - - private AddressingFeatureTest1 port1a = null; - - private AddressingFeatureTest1 port1b = null; - - private AddressingFeatureTest1 port1c = null; - - private AddressingFeatureTest2 port2a = null; - - private AddressingFeatureTest2 port2b = null; - - private AddressingFeatureTest2 port2c = null; - - private AddressingFeatureTest3 port3a = null; - - private AddressingFeatureTest3 port3b = null; - - private WebServiceFeature[] nonEnabledwsf = { new AddressingFeature(false) }; - - private WebServiceFeature[] enabledRequiredwsf = { - new AddressingFeature(true, true) }; - - private WebServiceFeature[] enabledNotRequiredwsf = { - new AddressingFeature(true, false) }; - - static AddressingFeatureTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL1); - url1 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL2); - url2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL3); - url3 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL1: " + url1); - TestUtil.logMsg("Service Endpoint URL2: " + url2); - TestUtil.logMsg("Service Endpoint URL3: " + url3); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - TestUtil.logMsg( - "******************************Retrieving Port 1************************\n"); - // client side Addressing enabled/NotRequired; server side - // Addressing/NotRequired - port1a = (AddressingFeatureTest1) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddressingFeatureTestService.class, PORT_QNAME1, - AddressingFeatureTest1.class, enabledNotRequiredwsf); - JAXWS_Util.setTargetEndpointAddress(port1a, url1); - - TestUtil.logMsg( - "******************************Retrieving Port 2************************\n"); - // client side Addressing enabled/Required; server side - // Addressing/NotRequired - port1b = (AddressingFeatureTest1) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddressingFeatureTestService.class, PORT_QNAME1, - AddressingFeatureTest1.class, enabledRequiredwsf); - JAXWS_Util.setTargetEndpointAddress(port1b, url1); - - TestUtil.logMsg( - "******************************Retrieving Port 3************************\n"); - // client side Addressing off; server side Addressing/NotRequired - port1c = (AddressingFeatureTest1) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddressingFeatureTestService.class, PORT_QNAME1, - AddressingFeatureTest1.class, nonEnabledwsf); - JAXWS_Util.setTargetEndpointAddress(port1c, url1); - - TestUtil.logMsg( - "******************************Retrieving Port 4************************\n"); - // client side Addressing enabled/NotRequired; server side - // Addressing/Required - port2a = (AddressingFeatureTest2) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddressingFeatureTestService.class, PORT_QNAME2, - AddressingFeatureTest2.class, enabledNotRequiredwsf); - JAXWS_Util.setTargetEndpointAddress(port2a, url2); - - TestUtil.logMsg( - "******************************Retrieving Port 5************************\n"); - // client side Addressing enabled/Required; server side Addressing/Required - port2b = (AddressingFeatureTest2) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddressingFeatureTestService.class, PORT_QNAME2, - AddressingFeatureTest2.class, enabledRequiredwsf); - JAXWS_Util.setTargetEndpointAddress(port2b, url2); - - TestUtil.logMsg( - "******************************Retrieving Port 6************************\n"); - // client side Addressing off; server side Addressing/Required - port2c = (AddressingFeatureTest2) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddressingFeatureTestService.class, PORT_QNAME2, - AddressingFeatureTest2.class, nonEnabledwsf); - JAXWS_Util.setTargetEndpointAddress(port2c, url2); - - TestUtil.logMsg( - "******************************Retrieving Port 7************************\n"); - // client side Addressing enabled/NotRequired; server side off (in WSDL - // enabled, but overridden to false in IMPL to turn it off) - port3a = (AddressingFeatureTest3) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddressingFeatureTestService.class, PORT_QNAME3, - AddressingFeatureTest3.class, enabledNotRequiredwsf); - JAXWS_Util.setTargetEndpointAddress(port3a, url3); - - TestUtil.logMsg( - "******************************Retrieving Port 8************************\n"); - // client side Addressing enabled/Required; server side off (in WSDL - // enabled, but overridden to false in IMPL to turn it off) - port3b = (AddressingFeatureTest3) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddressingFeatureTestService.class, PORT_QNAME3, - AddressingFeatureTest3.class, enabledRequiredwsf); - JAXWS_Util.setTargetEndpointAddress(port3b, url3); - } - - private void getPortJavaEE() throws Exception { - try { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - - port1a = (AddressingFeatureTest1) service - .getPort(AddressingFeatureTest1.class, enabledNotRequiredwsf); - JAXWS_Util.dumpTargetEndpointAddress(port1a); - JAXWS_Util.setSOAPLogging(port1a); - port1b = (AddressingFeatureTest1) service - .getPort(AddressingFeatureTest1.class, enabledRequiredwsf); - JAXWS_Util.dumpTargetEndpointAddress(port1b); - JAXWS_Util.setSOAPLogging(port1b); - port1c = (AddressingFeatureTest1) service - .getPort(AddressingFeatureTest1.class, nonEnabledwsf); - JAXWS_Util.dumpTargetEndpointAddress(port1c); - JAXWS_Util.setSOAPLogging(port1c); - - port2a = (AddressingFeatureTest2) service - .getPort(AddressingFeatureTest2.class, enabledNotRequiredwsf); - JAXWS_Util.dumpTargetEndpointAddress(port2a); - JAXWS_Util.setSOAPLogging(port2a); - port2b = (AddressingFeatureTest2) service - .getPort(AddressingFeatureTest2.class, enabledRequiredwsf); - JAXWS_Util.dumpTargetEndpointAddress(port2b); - JAXWS_Util.setSOAPLogging(port2b); - port2c = (AddressingFeatureTest2) service - .getPort(AddressingFeatureTest2.class, nonEnabledwsf); - JAXWS_Util.dumpTargetEndpointAddress(port2c); - JAXWS_Util.setSOAPLogging(port2c); - - port3a = (AddressingFeatureTest3) service - .getPort(AddressingFeatureTest3.class, enabledNotRequiredwsf); - JAXWS_Util.dumpTargetEndpointAddress(port3a); - JAXWS_Util.setSOAPLogging(port3a); - port3b = (AddressingFeatureTest3) service - .getPort(AddressingFeatureTest3.class, enabledRequiredwsf); - JAXWS_Util.dumpTargetEndpointAddress(port3b); - JAXWS_Util.setSOAPLogging(port3b); - - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault(t.toString()); - } - - // debug dumping of ports - Object[] portsTodump = new Object[] { port1a, port1b, port1c, port2a, - port2b, port2c, port3a, port3b }; - dumpTargetEndpointAddressForPort(portsTodump); - } - - private void dumpTargetEndpointAddressForPort(Object[] portsTodump) { - try { - for (int i = 0; i < portsTodump.length; i++) { - TestUtil.logMsg("port=" + portsTodump[i]); - TestUtil.logMsg("Obtained port" + i); - JAXWS_Util.dumpTargetEndpointAddress(portsTodump[i]); - } - } catch (java.lang.Exception e) { - TestUtil.printStackTrace(e); - TestUtil.logErr("Error dumping EndpointAddress for port"); - } - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) { - pass = false; - } else if (hostname.equals("")) { - pass = false; - } - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg("WebServiceRef is not set in Client " - + "(get it from specific vehicle)"); - service = (AddressingFeatureTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: afClientEnabledNotREQServerEnabledNotREQTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.2; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6011; JAXWS:SPEC:6011.2; JAXWS:SPEC:6012; JAXWS:SPEC:6012.1; - * JAXWS:SPEC:6012.2; JAXWS:SPEC:6012.4; JAXWS:SPEC:6012.5; JAXWS:SPEC:7020; - * JAXWS:SPEC:7020.2; JAXWS:SPEC:10025; JAXWS:JAVADOC:190; - * - * @test_Strategy: Test Addressing Feature. Client enabled/NotRequired, Server - * enabled/NotRequired. Addressing headers MAY be present on SOAPRequest and - * SOAPResponse since Addressing is Optional. If addressing headers exist - * check them otherwise don't. - */ - public void afClientEnabledNotREQServerEnabledNotREQTest() throws Fault { - TestUtil.logMsg("afClientEnabledNotREQServerEnabledNotREQTest"); - TestUtil.logMsg( - "Verify Addressing headers may be present on SOAPRequest and SOAPResponse"); - boolean pass = true; - try { - port1a.addNumbers(new Holder("ClientEnabledNotREQServerEnabledNotREQ"), - 10, 10); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientEnabledNotREQServerEnabledNotREQTest failed", e); - } - - if (!pass) { - throw new Fault("afClientEnabledNotREQServerEnabledNotREQTest failed"); - } - } - - /* - * @testName: afClientEnabledREQServerEnabledNotREQTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.2; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6011; JAXWS:SPEC:6011.2; JAXWS:SPEC:6012; JAXWS:SPEC:6012.1; - * JAXWS:SPEC:6012.2; JAXWS:SPEC:6012.4; JAXWS:SPEC:6012.5; JAXWS:SPEC:7020; - * JAXWS:SPEC:7020.2; JAXWS:SPEC:10025; JAXWS:SPEC:4031; JAXWS:JAVADOC:190; - * - * @test_Strategy: Test Addressing Feature. Client enabled/Required, Server - * enabled/NotRequired. Addressing headers MUST be present on SOAPRequest and - * SOAPResponse. - */ - public void afClientEnabledREQServerEnabledNotREQTest() throws Fault { - TestUtil.logMsg("afClientEnabledREQServerEnabledNotREQTest"); - TestUtil.logMsg( - "Verify Addressing headers are present on SOAPRequest and SOAPResponse"); - boolean pass = true; - try { - port1b.addNumbers(new Holder("ClientEnabledREQServerEnabledNotREQ"), 10, - 10); - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientEnabledREQServerEnabledNotREQTest failed", e); - } - - if (!pass) { - throw new Fault("afClientEnabledREQServerEnabledNotREQTest failed"); - } - } - - /* - * @testName: afClientNotEnabledServerEnabledNotREQTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.3; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6011; JAXWS:SPEC:6011.2; JAXWS:SPEC:6012; JAXWS:SPEC:6012.1; - * JAXWS:SPEC:6012.3; JAXWS:SPEC:6012.5; JAXWS:SPEC:7020; JAXWS:SPEC:4031; - * JAXWS:SPEC:7020.2; JAXWS:SPEC:10025; JAXWS:JAVADOC:190; - * - * @test_Strategy: Test Addressing Feature. Client Not Enabled, Server - * enabled/NotRequired. Addressing headers MUST not be present on SOAPRequest - * and SOAPResponse. - */ - public void afClientNotEnabledServerEnabledNotREQTest() throws Fault { - TestUtil.logMsg("afClientNotEnabledServerEnabledNotREQTest"); - TestUtil.logMsg( - "Verify Addressing headers are not present on SOAPRequest and SOAPResponse"); - boolean pass = true; - try { - port1c.addNumbers(new Holder("ClientNotEnabledServerEnabledNotREQ"), 10, - 10); - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientNotEnabledServerEnabledNotREQTest failed", e); - } - - if (!pass) { - throw new Fault("afClientNotEnabledServerEnabledNotREQTest failed"); - } - } - - /* - * @testName: afClientEnabledNotREQServerEnabledREQTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.2; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6011; JAXWS:SPEC:6011.2; JAXWS:SPEC:6012; JAXWS:SPEC:6012.1; - * JAXWS:SPEC:6012.2; JAXWS:SPEC:6012.4; JAXWS:SPEC:6012.5; JAXWS:SPEC:3046; - * - * @test_Strategy: Test Addressing Feature. Client enabled/NotRequired, Server - * enabled/Required. If the Client does not send Addressing headers then the - * Server MUST throw back a SOAP Fault with a MessageAddressingHeaderRequired - * fault code since the Server mandates Addressing Required. If the Client - * does send Addressing headers then they MUST be present on SOAPRequest and - * SOAPResponse since the Server mandates requires addressing. - */ - public void afClientEnabledNotREQServerEnabledREQTest() throws Fault { - TestUtil.logMsg("afClientEnabledNotREQServerEnabledREQTest"); - TestUtil.logMsg( - "Verify Addressing headers may be present on SOAPRequest and SOAPResponse"); - TestUtil.logMsg( - "or a MessageAddressingHeaderRequired soap fault is thrown by endpoint"); - boolean pass = true; - try { - port2a.addNumbers(new Holder("ClientEnabledNotREQServerEnabledREQ"), 10, - 10); - } catch (SOAPFaultException sfe) { - try { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientEnabledNotREQServerEnabledREQTest failed", e); - } - - if (!pass) { - throw new Fault("afClientEnabledNotREQServerEnabledREQTest failed"); - } - } - - /* - * @testName: afClientEnabledREQServerEnabledREQTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.2; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6011; JAXWS:SPEC:6011.2; JAXWS:SPEC:6012; JAXWS:SPEC:6012.1; - * JAXWS:SPEC:6012.2; JAXWS:SPEC:6012.4; JAXWS:SPEC:6012.5; JAXWS:SPEC:3046; - * - * @test_Strategy: Test Addressing Feature. Client enabled/Required, Server - * enabled/Required. Addressing headers MUST be present on SOAPRequest and - * SOAPResponse. - */ - public void afClientEnabledREQServerEnabledREQTest() throws Fault { - TestUtil.logMsg("afClientEnabledREQServerEnabledREQTest"); - TestUtil.logMsg( - "Verify Addressing headers are present on SOAPRequest and SOAPResponse"); - boolean pass = true; - try { - port2b.addNumbers(new Holder("ClientEnabledREQServerEnabledREQ"), 10, 10); - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientEnabledREQServerEnabledREQTest failed", e); - } - - if (!pass) { - throw new Fault("afClientEnabledREQServerEnabledREQTest failed"); - } - } - - /* - * @testName: afClientNotEnabledServerEnabledREQTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.3; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:4031; JAXWS:SPEC:6011; JAXWS:SPEC:6011.2; JAXWS:SPEC:6012; - * JAXWS:SPEC:6012.1; JAXWS:SPEC:6012.3; JAXWS:SPEC:6012.5; JAXWS:SPEC:3046; - * WSASB:SPEC:6004.3; - * - * @test_Strategy: Test Addressing Feature. Client Not Enabled, Server - * enabled/Required. This scenario MUST throw back a SOAP Fault. Make sure the - * SOAP Fault has the correct information in it. The SOAP Fault faultcode must - * be: MessageAddressingHeaderRequired. - */ - public void afClientNotEnabledServerEnabledREQTest() throws Fault { - TestUtil.logMsg("afClientNotEnabledServerEnabledREQTest"); - TestUtil.logMsg( - "Verify MessageAddressingHeaderRequired soap fault is thrown by endpoint"); - boolean pass = true; - try { - port2c.addNumbers(new Holder("ClientNotEnabledServerEnabledREQ"), 10, 10); - TestUtil.logErr("SOAPFaultException was not thrown back"); - pass = false; - } catch (SOAPFaultException sfe) { - try { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - throw new Fault("afClientNotEnabledServerEnabledREQTest failed", e2); - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientNotEnabledServerEnabledREQTest failed", e); - } - - if (!pass) { - throw new Fault("afClientNotEnabledServerEnabledREQTest failed"); - } - } - - /* - * @testName: afClientEnabledNotREQServerNotEnabledTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.2; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6012.2; JAXWS:SPEC:6012.3; JAXWS:SPEC:6012.4; JAXWS:SPEC:6012.6; - * JAXWS:SPEC:6016.1; JAXWS:SPEC:7020; JAXWS:SPEC:7020.1; JAXWS:JAVADOC:191; - * - * @test_Strategy: Test Addressing Feature. Client enabled/NotRequired, Server - * notenabled. Addressing headers MAY be present in the SOAPRequest but MUST - * not be present in the SOAPResponse. - */ - public void afClientEnabledNotREQServerNotEnabledTest() throws Fault { - TestUtil.logMsg("afClientEnabledNotREQServerEnableNotREQTest"); - TestUtil - .logMsg("Verify Addressing headers are NOT present on SOAPResponse"); - boolean pass = true; - try { - port3a.addNumbers(new Holder("ClientEnabledNotREQServerNotEnabled"), 10, - 10); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientEnabledNotREQServerNotEnabledTest failed", e); - } - - if (!pass) { - throw new Fault("afClientEnabledNotREQServerNotEnabledTest failed"); - } - } - - /* - * @testName: afClientEnabledREQServerNotEnabledTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.2; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6012.2; JAXWS:SPEC:6012.3; JAXWS:SPEC:6012.4; JAXWS:SPEC:6012.6; - * JAXWS:SPEC:6016.1; JAXWS:SPEC:7020; JAXWS:SPEC:7020.1; JAXWS:JAVADOC:191; - * - * @test_Strategy: Test Addressing Feature. Client enabled/Required, Server - * not enabled. This scenario MUST throw back a WebServiceException. - */ - public void afClientEnabledREQServerNotEnabledTest() throws Fault { - TestUtil.logMsg("afClientEnabledREQServerNotEnabledTest"); - TestUtil.logMsg("Verify WebServiceException is thrown"); - boolean pass = true; - try { - port3b.addNumbers(new Holder("ClientEnabledREQServerNotEnabled"), 10, 10); - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("afClientEnabledREQServerNotEnabledTest failed", e); - } - - if (!pass) { - throw new Fault("afClientEnabledREQServerNotEnabledTest failed"); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/ClientSOAPHandler.java deleted file mode 100644 index e54ea7ba5b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/ClientSOAPHandler.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.SOAPException; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - // figure out which testname i'm checking for and call appropropriate - // verify*(...) - if (Handler_Util.checkForMsg(context, - "ClientEnabledREQServerEnabledNotREQ")) { - verifyClientEnabledREQServerEnabledNotREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientNotEnabledServerEnabledNotREQ")) { - verifyClientNotEnabledServerEnabledNotREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledREQServerEnabledREQ")) { - verifyClientEnabledREQServerEnabledREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerNotEnabled")) { - verifyClientEnabledNotREQServerNotEnabled(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerEnabledREQ")) { - verifyClientEnabledNotREQServerEnabledREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerEnabledNotREQ")) { - verifyClientEnabledNotREQServerEnabledNotREQ(context, action); - } - } - - private void verifyClientEnabledREQServerEnabledNotREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledREQServerEnabledNotREQ here... - checkAddressingHeadersExist(context, action); - } - - private void verifyClientNotEnabledServerEnabledNotREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientNotEnabledServerEnabledNotREQ here... - checkAddressingHeadersDoNotExist(context, action); - } - - private void verifyClientEnabledREQServerEnabledREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledREQServerEnabledREQ here... - checkAddressingHeadersExist(context, action); - } - - private void verifyClientEnabledNotREQServerNotEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerNotEnabled here... - checkAddressingHeadersDoNotExist(context, action); - } - - private void verifyClientEnabledNotREQServerEnabledREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerEnabledREQ here... - checkAddressingHeadersMayExist(context, action); - } - - private void verifyClientEnabledNotREQServerEnabledNotREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerEnabledNotREQ - // here... - checkAddressingHeadersMayExist(context, action); - } - - private void verifyAction(String action) { - TestUtil.logMsg("ClientSOAPHandler.verifyAction: [action=" + action + "]"); - if (!TestConstants.ADD_NUMBERS_OUT_ACTION.equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS_OUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersMayExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersMayExist"); - // If Addressing headers exist then check them otherwise don't - if (action != null) { - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersExist"); - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersDoNotExist"); - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundRelatesToDoesNotExist(context); - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ClientSOAPHandler.getAction(): testName=" + testName); - if (testName == null) { - return super.getAction(context); - } - /* Headers MAY be present on SOAPResponse */ - else if (testName.equals("ClientEnabledNotREQServerEnabledNotREQ") - || testName.equals("ClientEnabledNotREQServerEnabledREQ")) { - try { - return super.getAction(context); - } catch (Exception e) { - return null; - } - } - /* Headers MUST be present on SOAPResponse */ - else if (testName.equals("ClientEnabledREQServerEnabledNotREQ") - || testName.equals("ClientEnabledREQServerEnabledREQ")) { - return super.getAction(context); - } - /* Headers MUST NOT be present on SOAPResponse */ - else if (testName.equals("ClientNotEnabledServerEnabledNotREQ") - || testName.equals("ClientEnabledNotREQServerNotEnabled")) { - return super.getActionDoesNotExist(context); - } - /* Fault case just return null */ - else - return null; - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/ServerSOAPHandler.java deleted file mode 100644 index a2af5ecc1d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/ServerSOAPHandler.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature; - -import com.sun.ts.lib.util.TestUtil; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.SOAPException; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - // figure out which testname i'm checking for and call appropropriate - // verifyBlah(...) - if (Handler_Util.checkForMsg(context, - "ClientEnabledREQServerEnabledNotREQ")) { - verifyClientEnabledREQServerEnabledNotREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledREQServerNotEnabled")) { - verifyClientEnabledREQServerNotEnabled(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientNotEnabledServerEnabledNotREQ")) { - verifyClientNotEnabledServerEnabledNotREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledREQServerEnabledREQ")) { - verifyClientEnabledREQServerEnabledREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerEnabledREQ")) { - verifyClientEnabledNotREQServerEnabledREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerEnabledNotREQ")) { - verifyClientEnabledNotREQServerEnabledNotREQ(context, action); - } else if (Handler_Util.checkForMsg(context, - "ClientEnabledNotREQServerNotEnabled")) { - verifyClientEnabledNotREQServerNotEnabled(context, action); - } - } - - private void verifyClientEnabledREQServerEnabledNotREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledREQServerEnabledNotREQ here... - checkAddressingHeadersExist(context, action); - } - - private void verifyClientEnabledREQServerNotEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledREQServerNotEnabled here... - checkAddressingHeadersExist(context, action); - } - - private void verifyClientNotEnabledServerEnabledNotREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientNotEnabledServerEnabledNotRequire - // here... - checkAddressingHeadersDoNotExist(context, action); - } - - private void verifyClientEnabledREQServerEnabledREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledREQServerEnabledREQ here... - checkAddressingHeadersExist(context, action); - } - - private void verifyClientEnabledNotREQServerEnabledREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerEnabledREQ here... - checkAddressingHeadersMayExist(context, action); - } - - private void verifyClientEnabledNotREQServerEnabledNotREQ( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerEnabledNotREQ - // here... - checkAddressingHeadersMayExist(context, action); - } - - private void verifyClientEnabledNotREQServerNotEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for ClientEnabledNotREQServerNotEnabled here... - checkAddressingHeadersMayExist(context, action); - } - - private void verifyAction(String action) { - TestUtil.logMsg("ServerSOAPHandler.verifyAction: [action=" + action + "]"); - System.out - .println("ServerSOAPHandler.verifyAction: [action=" + action + "]"); - if (!action.equals(TestConstants.ADD_NUMBERS_IN_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS_IN_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersMayExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersMayExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersMayExist"); - // If Addressing headers exist then check them otherwise don't - if (action != null) { - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersExist"); - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersDoNotExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersDoNotExist"); - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundMessageIdDoesNotExist(context); - checkInboundReplyToDoesNotExist(context); - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ServerSOAPHandler.getAction(): testName=" + testName); - System.out.println("ServerSOAPHandler.getAction(): testName=" + testName); - if (testName == null) - return super.getAction(context); - /* Headers MAY be present on SOAPRequest */ - else if (testName.equals("ClientEnabledNotREQServerEnabledREQ") - || testName.equals("ClientEnabledNotREQServerEnabledNotREQ") - || testName.equals("ClientEnabledNotREQServerNotEnabled")) { - try { - return super.getAction(context); - } catch (Exception e) { - return null; - } - } - /* Headers MUST be present on SOAPRequest */ - else if (testName.equals("ClientEnabledREQServerEnabledNotREQ") - || testName.equals("ClientEnabledREQServerNotEnabled") - || testName.equals("ClientEnabledREQServerEnabledREQ")) { - return super.getAction(context); - } - /* Headers MUST NOT be present on SOAPRequest */ - else if (testName.equals("ClientNotEnabledServerEnabledNotREQ")) { - return super.getActionDoesNotExist(context); - } - /* Fault case just return null */ - else - return null; - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/TestConstants.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/TestConstants.java deleted file mode 100644 index 09116e291d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/TestConstants.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature; - -public class TestConstants { - public static final String ADD_NUMBERS_IN_ACTION_URI = "http://addressingfeatureservice.org/AddNumbersPortType/addRequest"; - - public static final String ADD_NUMBERS_IN_ACTION = "inputAction"; - - public static final String ADD_NUMBERS_OUT_ACTION_URI = "http://addressingfeatureservice.org/AddNumbersPortType/addResponse"; - - public static final String ADD_NUMBERS_OUT_ACTION = "outputAction"; -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/build.xml deleted file mode 100644 index 941c09fad5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/build.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/custom-client.xml deleted file mode 100644 index 24a4c48776..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/custom-client.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.ClientSOAPHandler - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/custom-server.xml deleted file mode 100644 index 8e31e29334..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/custom-server.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.ServerSOAPHandler - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/jakartaEE.tokens deleted file mode 100644 index b787c919ef..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/jakartaEE.tokens +++ /dev/null @@ -1,22 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdladdressingfeaturetest") -SERVICE=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTestService -SEI=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTest1 -SEI2=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTest2 -SEI3=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTest3 -IMPL=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTestImpl1 -IMPL2=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTestImpl2 -IMPL3=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTestImpl3 -NAMESPACEURI=http://addressingfeatureservice.org/wsdl -PORT=AddressingFeatureTest1Port -PORT2=AddressingFeatureTest2Port -PORT3=AddressingFeatureTest3Port -URLALIAS=/jaxws/AddressingFeatureTest1 -URLALIAS2=/jaxws/AddressingFeatureTest2 -URLALIAS3=/jaxws/AddressingFeatureTest3 -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTestImpl1 -SERVLETNAME2=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTestImpl2 -SERVLETNAME3=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.addressingfeature.AddressingFeatureTestImpl3 -WEBSERVICEDESCRIPTION=AddressingFeatureTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jdladdressingfeaturetest -SERVICEREFNAMEWSEJB=service/wsw2jdladdressingfeaturetest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdladdressingfeaturetest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/jakartaEE.web.xml deleted file mode 100644 index f301dadfb8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/jakartaEE.web.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME3@ - @IMPL3@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - @SERVLETNAME3@ - @URLALIAS3@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/standalone-sun-jaxws.xml deleted file mode 100644 index a8e06f7e95..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/standalone-sun-jaxws.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/standalone.web.xml deleted file mode 100644 index a6935a1626..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/addressingfeature/standalone.web.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - WSW2JDLAddressingFeatureTestApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddressingFeatureTest1 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - AddressingFeatureTest2 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - AddressingFeatureTest3 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - AddressingFeatureTest1 - /jaxws/AddressingFeatureTest1 - - - AddressingFeatureTest2 - /jaxws/AddressingFeatureTest2 - - - AddressingFeatureTest3 - /jaxws/AddressingFeatureTest3 - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/AddNumbersImpl3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/AddNumbersImpl3.java deleted file mode 100644 index 715f6c8570..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/AddNumbersImpl3.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersImpl3.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; - -@WebService(portName = "AddNumbersPort3", serviceName = "AddNumbersService", targetNamespace = "http://example.com/", wsdlLocation = "WEB-INF/wsdl/WSAW2JDLAnonymousTest.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous.AddNumbersPortType3") - -public class AddNumbersImpl3 implements AddNumbersPortType3 { - - public int addNumbers(int number1, int number2, String testName) - throws AddNumbersFault_Exception { - if (number1 < 0 || number2 < 0) { - AddNumbersFault faultInfo = createAddNumbersFault(number1, number2); - throw new AddNumbersFault_Exception(faultInfo.getMessage(), faultInfo); - } - - return number1 + number2; - } - - AddNumbersFault createAddNumbersFault(int number1, int number2) { - ObjectFactory of = new ObjectFactory(); - AddNumbersFault faultInfo = of.createAddNumbersFault(); - faultInfo.setDetail("Negative numbers cant be added!"); - faultInfo.setMessage("Numbers: " + number1 + ", " + number2); - - return faultInfo; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/AddNumbersImpl4.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/AddNumbersImpl4.java deleted file mode 100644 index 038a2c6f18..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/AddNumbersImpl4.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersImpl4.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; - -@WebService(portName = "AddNumbersPort4", serviceName = "AddNumbersService", targetNamespace = "http://example.com/", wsdlLocation = "WEB-INF/wsdl/WSAW2JDLAnonymousTest.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous.AddNumbersPortType4") - -public class AddNumbersImpl4 implements AddNumbersPortType4 { - - public int addNumbers(int number1, int number2, String testName) - throws AddNumbersFault_Exception { - if (number1 < 0 || number2 < 0) { - AddNumbersFault faultInfo = createAddNumbersFault(number1, number2); - throw new AddNumbersFault_Exception(faultInfo.getMessage(), faultInfo); - } - - return number1 + number2; - } - - AddNumbersFault createAddNumbersFault(int number1, int number2) { - ObjectFactory of = new ObjectFactory(); - AddNumbersFault faultInfo = of.createAddNumbersFault(); - faultInfo.setDetail("Negative numbers cant be added!"); - faultInfo.setMessage("Numbers: " + number1 + ", " + number2); - - return faultInfo; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/Client.java deleted file mode 100644 index ef9af6c0ff..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/Client.java +++ /dev/null @@ -1,1108 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.*; -import com.sun.javatest.Status; - -import java.text.MessageFormat; -import java.net.*; -import java.util.UUID; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.xml.soap.*; -import java.util.Properties; -import javax.xml.namespace.QName; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.Exchanger; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String ENDPOINTPUBLISHPROP = "http.server.supports.endpoint.publish"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private boolean endpointPublishSupport; - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous."; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private static final String MINPORT = "port.range.min"; - - private int minPort = -1; - - private static final String MAXPORT = "port.range.max"; - - private int maxPort = -1; - - private int javaseServerPort; - - // URL properties used by the test - private static final String ENDPOINT_URL3 = "wsaw2jdlanonymoustest.endpoint.3"; - - private static final String WSDLLOC_URL3 = "wsaw2jdlanonymoustest.wsdlloc.3"; - - private static final String ENDPOINT_URL4 = "wsaw2jdlanonymoustest.endpoint.4"; - - private static final String WSDLLOC_URL4 = "wsaw2jdlanonymoustest.wsdlloc.4"; - - // NonAnonymousProcessor's - private static final String NONANONYMOUSPROCESSOR = "/NonAnonymousProcessor"; - - private static final String NONANONYMOUSPROCESSOR2 = "/NonAnonymousProcessor2"; - - // service and port information - private static final String NAMESPACEURI = "http://example.com/"; - - private static final String TARGET_NAMESPACE = NAMESPACEURI; - - private static final String SERVICE_NAME = "AddNumbersService"; - - private static final String PORT_NAME3 = "AddNumbersPort3"; - - private static final String PORT_NAME4 = "AddNumbersPort4"; - - private static QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private static QName PORT_QNAME3 = new QName(NAMESPACEURI, PORT_NAME3); - - private static QName PORT_QNAME4 = new QName(NAMESPACEURI, PORT_NAME4); - - private static AddressingFeature ENABLED_ADDRESSING_FEATURE = new AddressingFeature( - true, true); - - private static AddressingFeature DISABLED_ADDRESSING_FEATURE = new AddressingFeature( - false); - - private String file = null; - - private String urlToNonAnonymousProcessor = null; - - private String urlToNonAnonymousProcessor2 = null; - - private String url3 = null; - - private String url4 = null; - - private URL wsdlurl = null; - - AddNumbersPortType3 port3 = null; - - AddNumbersPortType4 port4 = null; - - static AddNumbersService service = null; - - String ReplyToHeaderForAnonymousResponsesSoapMsg = "{0}uuid:{1}
{2}
http://example.com/AddNumbersPortType3/add
1010testAnonymousResponsesReplyToHeader
"; - - String FaultToHeaderForAnonymousResponsesSoapMsg = "{0}uuid:{1}
{2}
{3}
http://example.com/AddNumbersPortType3/add
-10-10testAnonymousResponsesFaultToHeader
"; - - String ReplyToHeaderForNonAnonymousResponsesSoapMsg = "{0}uuid:{1}
{2}
http://example.com/AddNumbersPortType4/add
1010testNonAnonymousResponsesReplyToHeader
"; - - String FaultToHeaderForNonAnonymousResponsesSoapMsg = "{0}uuid:{1}
{2}
{3}
http://example.com/AddNumbersPortType4/add
-10-10testNonAnonymousResponsesFaultToHeader
"; - - String TestNonAnonymousResponsesAssertionSoapMsg = "{0}uuid:{1}
{2}
http://example.com/AddNumbersPortType4/add
1010testNonAnonymousResponsesAssertion
"; - - private Dispatch createDispatchSOAPMessage(QName port) - throws Exception { - return service.createDispatch(port, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE, DISABLED_ADDRESSING_FEATURE); - } - - private Dispatch createAnonymousResponsesDispatch() { - return service.createDispatch(PORT_QNAME3, SOAPMessage.class, - Service.Mode.MESSAGE, ENABLED_ADDRESSING_FEATURE); - } - - private Dispatch createNonAnonymousResponsesDispatch() { - return service.createDispatch(PORT_QNAME4, SOAPMessage.class, - Service.Mode.MESSAGE, ENABLED_ADDRESSING_FEATURE); - } - - private Dispatch createAnonymousResponsesDispatchWithoutAddressing() { - return service.createDispatch(PORT_QNAME3, SOAPMessage.class, - Service.Mode.MESSAGE, DISABLED_ADDRESSING_FEATURE); - } - - private Dispatch createNonAnonymousResponsesDispatchWithoutAddressing() { - return service.createDispatch(PORT_QNAME4, SOAPMessage.class, - Service.Mode.MESSAGE, DISABLED_ADDRESSING_FEATURE); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL3); - url3 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL4); - url4 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - if (endpointPublishSupport) { - urlToNonAnonymousProcessor = ctsurl.getURLString(PROTOCOL, hostname, - javaseServerPort, NONANONYMOUSPROCESSOR); - urlToNonAnonymousProcessor2 = ctsurl.getURLString(PROTOCOL, hostname, - javaseServerPort, NONANONYMOUSPROCESSOR2); - } else { - urlToNonAnonymousProcessor = ctsurl.getURLString(PROTOCOL, hostname, - portnum, NONANONYMOUSPROCESSOR); - urlToNonAnonymousProcessor2 = ctsurl.getURLString(PROTOCOL, hostname, - portnum, NONANONYMOUSPROCESSOR2); - } - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL3); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg( - "NonAnonymousProcessor Endpoint: " + urlToNonAnonymousProcessor); - TestUtil.logMsg( - "NonAnonymousProcessor2 Endpoint: " + urlToNonAnonymousProcessor2); - TestUtil.logMsg("Service Endpoint URL3: " + url3); - TestUtil.logMsg("Service Endpoint URL4: " + url4); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortsStandalone() throws Exception { - port3 = (AddNumbersPortType3) JAXWS_Util.getPort(service, PORT_QNAME3, - AddNumbersPortType3.class); - port4 = (AddNumbersPortType4) JAXWS_Util.getPort(service, PORT_QNAME4, - AddNumbersPortType4.class); - TestUtil.logMsg("port3=" + port3); - TestUtil.logMsg("port4=" + port4); - JAXWS_Util.setTargetEndpointAddress(port3, url3); - JAXWS_Util.setTargetEndpointAddress(port4, url4); - JAXWS_Util.setSOAPLogging(port3); - JAXWS_Util.setSOAPLogging(port4); - } - - private void getPortsJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port3 = (AddNumbersPortType3) service.getAddNumbersPort3(); - port4 = (AddNumbersPortType4) service.getAddNumbersPort4(); - TestUtil.logMsg("port3=" + port3); - TestUtil.logMsg("port4=" + port4); - JAXWS_Util.dumpTargetEndpointAddress(port3); - JAXWS_Util.dumpTargetEndpointAddress(port4); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * port.range.min; port.range.max; http.server.supports.endpoint.publish; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - endpointPublishSupport = Boolean - .parseBoolean(p.getProperty(ENDPOINTPUBLISHPROP)); - modeProperty = p.getProperty(MODEPROP); - - if (endpointPublishSupport) { - - try { - maxPort = Integer.parseInt(p.getProperty(MAXPORT)); - } catch (Exception e) { - maxPort = -1; - } - try { - minPort = Integer.parseInt(p.getProperty(MINPORT)); - } catch (Exception e) { - minPort = -1; - } - - TestUtil.logMsg("minPort=" + minPort); - TestUtil.logMsg("maxPort=" + maxPort); - - javaseServerPort = JAXWS_Util.getFreePort(); - if (javaseServerPort <= 0) { - TestUtil.logMsg("Free port not found, use standard webserver port."); - javaseServerPort = portnum; - pass = false; - } - getTestURLs(); - service = (AddNumbersService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, AddNumbersService.class); - getPortsStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - getTestURLs(); - service = (AddNumbersService) getSharedObject(); - getPortsJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: testAnonymousResponsesAssertion - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * - * @test_Strategy: Invocation on port marked with AnonymousResponses assertion - * Verify that wsa:ReplyTo in the SOAPRequest is the anonymous URI. Verify - * that wsa:To in the SOAPResponse is the anonymous URI. - */ - public void testAnonymousResponsesAssertion() throws Fault { - TestUtil.logMsg("testAnonymousResponsesAssertion"); - boolean pass = true; - - try { - port3.addNumbers(10, 10, "testAnonymousResponsesAssertion"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testAnonymousResponsesAssertion failed", e); - } - - if (!pass) - throw new Fault("testAnonymousResponsesAssertion failed"); - } - - /* - * @testName: testNonAnonymousResponsesAssertion - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.3; - * - * @test_Strategy: Invocation on port marked with NonAnonymousResponses - * assertion. The header may or may not be set by default depending - * on the implementation. The test has to account for this. - */ - public void testNonAnonymousResponsesAssertion() throws Fault { - TestUtil.logMsg("testNonAnonymousResponsesAssertion"); - boolean pass = true; - - try { - TestUtil.logMsg("Expect a WebServiceException on port invocation"); - port4.addNumbers(10, 10, "testNonAnonymousResponsesAssertion"); - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testNonAnonymousResponsesAssertion failed", e); - } - - if (!pass) - throw new Fault("testNonAnonymousResponsesAssertion failed"); - } - - /* - * @testName: testNonAnonymousResponsesWithReplyToSetToValidProviderEndpoint - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for NonAnonymousResponses assertion where - * header is set to a NonAnonymousProvider which will process the SOAP - * response. Verify that the NonAnonymousProvider recieved the SOAP response. - */ - public void testNonAnonymousResponsesWithReplyToSetToValidProviderEndpoint() - throws Fault { - TestUtil.logMsg( - "testNonAnonymousResponsesWithReplyToSetToValidProviderEndpoint"); - boolean pass = true; - - SOAPMessage request = null, response = null; - Dispatch dispatchSM; - Endpoint responseProcessor = null; - Exchanger respMsgExchanger = new Exchanger(); - - try { - if (modeProperty.equals("standalone") && endpointPublishSupport) { - responseProcessor = Endpoint - .create(new NonAnonymousRespProcessor(respMsgExchanger)); - responseProcessor.publish(urlToNonAnonymousProcessor); - String soapmsg = MessageFormat.format( - ReplyToHeaderForNonAnonymousResponsesSoapMsg, url4, - UUID.randomUUID(), urlToNonAnonymousProcessor); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME4); - request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - dispatchSM.invokeAsync(request); - response = respMsgExchanger.exchange(null, 30L, TimeUnit.SECONDS); - if (response != null) { - System.out.println("****************************"); - response.writeTo(System.out); - System.out.println("\n****************************"); - } else { - pass = false; - } - } - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "testNonAnonymousResponsesWithReplyToSetToValidProviderEndpoint failed", - e); - } finally { - if (responseProcessor != null) - responseProcessor.stop(); - } - if (!pass) - throw new Fault( - "testNonAnonymousResponsesWithReplyToSetToValidProviderEndpoint failed"); - } - - /* - * @testName: testNonAnonymousResponsesWithFaultToSetToValidProviderEndpoint - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for NonAnonymousResponses assertion where - * header is set to a NonAnonymousProvider which will process the SOAP - * response. Verify that the NonAnonymousProvider received the SOAPFault - * message. - */ - public void testNonAnonymousResponsesWithFaultToSetToValidProviderEndpoint() - throws Fault { - TestUtil.logMsg( - "testNonAnonymousResponsesWithFaultToSetToValidProviderEndpoint"); - boolean pass = true; - - SOAPMessage request = null, response = null; - Dispatch dispatchSM; - Endpoint responseProcessor = null; - Exchanger respMsgExchanger = new Exchanger(); - Endpoint responseProcessor2 = null; - Exchanger respMsgExchanger2 = new Exchanger(); - - try { - if (modeProperty.equals("standalone") && endpointPublishSupport) { - responseProcessor = Endpoint - .create(new NonAnonymousRespProcessor(respMsgExchanger)); - responseProcessor.publish(urlToNonAnonymousProcessor); - responseProcessor2 = Endpoint - .create(new NonAnonymousRespProcessor2(respMsgExchanger2)); - responseProcessor2.publish(urlToNonAnonymousProcessor2); - String soapmsg = MessageFormat.format( - FaultToHeaderForNonAnonymousResponsesSoapMsg, url4, - UUID.randomUUID(), urlToNonAnonymousProcessor2, - urlToNonAnonymousProcessor); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME4); - request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - dispatchSM.invokeAsync(request); - response = respMsgExchanger2.exchange(null, 30L, TimeUnit.SECONDS); - if (response != null) { - System.out.println("****************************"); - response.writeTo(System.out); - System.out.println("\n****************************"); - } else { - pass = false; - } - } - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "testNonAnonymousResponsesWithFaultToSetToValidProviderEndpoint failed", - e); - } finally { - if (responseProcessor != null) - responseProcessor.stop(); - if (responseProcessor2 != null) - responseProcessor2.stop(); - } - if (!pass) - throw new Fault( - "testNonAnonymousResponsesWithFaultToSetToValidProviderEndpoint failed"); - } - - /* - * @testName: testAnonymousResponsesWithReplyToSetToNone - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for AnonymousResponses assertion where - * header is set to the None URI. This value must be accepted. - * - */ - public void testAnonymousResponsesWithReplyToSetToNone() throws Fault { - TestUtil.logMsg("testAnonymousResponsesWithReplyToSetToNone"); - boolean pass = true; - boolean done = false; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - ReplyToHeaderForAnonymousResponsesSoapMsg, url3, UUID.randomUUID(), - W3CAddressingConstants.WSA_NONE_ADDRESS); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME3); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testAnonymousResponsesWithReplyToSetToNone failed", e); - } - if (!pass) - throw new Fault("testAnonymousResponsesWithReplyToSetToNone failed"); - } - - /* - * @testName: testAnonymousResponsesWithFaultToSetToNone - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for AnonymousResponses assertion where - * header is set to the None URI. This value must be accepted. - * - */ - public void testAnonymousResponsesWithFaultToSetToNone() throws Fault { - TestUtil.logMsg("testAnonymousResponsesWithFaultToSetToNone"); - boolean pass = true; - boolean done = false; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - FaultToHeaderForAnonymousResponsesSoapMsg, url3, UUID.randomUUID(), - W3CAddressingConstants.WSA_NONE_ADDRESS, - W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME3); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testAnonymousResponsesWithFaultToSetToNone failed", e); - } - if (!pass) - throw new Fault("testAnonymousResponsesWithFaultToSetToNone failed"); - } - - /* - * @testName: testNonAnonymousResponsesWithReplyToSetToNone - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for NonAnonymousResponses assertion where - * header is set to the None URI. This value must be accepted. - */ - public void testNonAnonymousResponsesWithReplyToSetToNone() throws Fault { - TestUtil.logMsg("testNonAnonymousResponsesWithReplyToSetToNone"); - boolean pass = true; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - ReplyToHeaderForNonAnonymousResponsesSoapMsg, url4, UUID.randomUUID(), - W3CAddressingConstants.WSA_NONE_ADDRESS); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME4); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testNonAnonymousResponsesWithReplyToSetToNone failed", - e); - } - if (!pass) - throw new Fault("testNonAnonymousResponsesWithReplyToSetToNone failed"); - } - - /* - * @testName: testNonAnonymousResponsesWithFaultToSetToNone - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for NonAnonymousResponses assertion where - * header is set to the None URI. This value must be accepted. - */ - public void testNonAnonymousResponsesWithFaultToSetToNone() throws Fault { - TestUtil.logMsg("testNonAnonymousResponsesWithFaultToSetToNone"); - boolean pass = true; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - FaultToHeaderForNonAnonymousResponsesSoapMsg, url4, UUID.randomUUID(), - W3CAddressingConstants.WSA_NONE_ADDRESS, - W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME4); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (WebServiceException e) { - TestUtil.logMsg("Caught WebServiceException ignore: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testNonAnonymousResponsesWithFaultToSetToNone failed", - e); - } - if (!pass) - throw new Fault("testNonAnonymousResponsesWithFaultToSetToNone failed"); - } - - /* - * @testName: testOnlyAnonymousAddressSupportedFaultBadReplyTo - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for OnlyAnonymousAddressSupported fault from client - * runtime. Pass in soap message with header not equal to Anonymous - * URI. Expect SOAPFault. - * - */ - public void testOnlyAnonymousAddressSupportedFaultBadReplyTo() throws Fault { - TestUtil.logMsg("testOnlyAnonymousAddressSupportedFaultBadReplyTo"); - boolean pass = true; - boolean done = false; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - ReplyToHeaderForAnonymousResponsesSoapMsg, url3, UUID.randomUUID(), - url3 + "/badurl"); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME3); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (SOAPFaultException e) { - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(e)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(e)); - if (WsaSOAPUtils.isOnlyAnonymousAddressSupportedFaultCode(e)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(e); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(e) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(e) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - done = true; - } catch (SOAPException e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testOnlyAnonymousAddressSupportedFaultBadReplyTo failed", - e); - } - if (!pass) - throw new Fault( - "testOnlyAnonymousAddressSupportedFaultBadReplyTo failed"); - if (done) - return; - - try { - if (response == null) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - if (!response.getSOAPPart().getEnvelope().getBody().hasFault()) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } catch (SOAPException e) { - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(response)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(response)); - if (WsaSOAPUtils.isOnlyAnonymousAddressSupportedFaultCode(response)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(response); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(response) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(response) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - throw new Fault("testOnlyAnonymousAddressSupportedFaultBadReplyTo failed", - e); - } - - if (!pass) - throw new Fault( - "testOnlyAnonymousAddressSupportedFaultBadReplyTo failed"); - } - - /* - * @testName: testOnlyAnonymousAddressSupportedFaultBadFaultTo - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.2; - * WSASB:SPEC:6012; WSASB:SPEC:6012.7; WSASB:SPEC:6013; - * - * @test_Strategy: Test for OnlyAnonymousAddressSupported fault from client - * runtime. Pass in soap message with header not equal to Anonymous - * URI. Expect SOAPFault. - * - */ - public void testOnlyAnonymousAddressSupportedFaultBadFaultTo() throws Fault { - TestUtil.logMsg("testOnlyAnonymousAddressSupportedFaultBadFaultTo"); - boolean pass = true; - boolean done = false; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - FaultToHeaderForAnonymousResponsesSoapMsg, url3, UUID.randomUUID(), - url3 + "/badurl", W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME3); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (SOAPFaultException e) { - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(e)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(e)); - if (WsaSOAPUtils.isOnlyAnonymousAddressSupportedFaultCode(e)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(e); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(e) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(e) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - done = true; - } catch (SOAPException e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testOnlyAnonymousAddressSupportedFaultBadFaultTo failed", - e); - } - if (!pass) - throw new Fault( - "testOnlyAnonymousAddressSupportedFaultBadFaultTo failed"); - if (done) - return; - - try { - if (response == null) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - if (!response.getSOAPPart().getEnvelope().getBody().hasFault()) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } catch (SOAPException e) { - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } - - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(response)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(response)); - if (WsaSOAPUtils.isOnlyAnonymousAddressSupportedFaultCode(response)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(response); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(response) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(response) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - throw new Fault("testOnlyAnonymousAddressSupportedFaultBadFaultTo failed", - e); - } - - if (!pass) - throw new Fault( - "testOnlyAnonymousAddressSupportedFaultBadFaultTo failed"); - } - - /* - * @testName: testOnlyNonAnonymousAddressSupportedFaultBadReplyTo - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.3; - * WSASB:SPEC:6012; WSASB:SPEC:6012.8; WSASB:SPEC:6013; - * - * @test_Strategy: Test for OnlyNonAnonymousAddressSupported fault from client - * runtime. Pass in soap message with header equal to Anonymous URI. - * Expect SOAPFault. - * - */ - public void testOnlyNonAnonymousAddressSupportedFaultBadReplyTo() - throws Fault { - TestUtil.logMsg("testOnlyNonAnonymousAddressSupportedFaultBadReplyTo"); - boolean pass = true; - boolean done = false; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - ReplyToHeaderForNonAnonymousResponsesSoapMsg, url4, UUID.randomUUID(), - W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME4); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (SOAPFaultException e) { - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(e)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(e)); - if (WsaSOAPUtils.isOnlyNonAnonymousAddressSupportedFaultCode(e)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyNonAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(e); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyNonAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(e) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(e) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - done = true; - } catch (SOAPException e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "testOnlyNonAnonymousAddressSupportedFaultBadReplyTo failed", e); - } - - if (!pass) - throw new Fault( - "testOnlyNonAnonymousAddressSupportedFaultBadReplyTo failed"); - - if (done) - return; - - try { - if (response == null) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - if (!response.getSOAPPart().getEnvelope().getBody().hasFault()) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } catch (SOAPException e) { - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(response)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(response)); - if (WsaSOAPUtils.isOnlyNonAnonymousAddressSupportedFaultCode(response)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyNonAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(response); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyNonAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(response) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(response) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - throw new Fault( - "testOnlyNonAnonymousAddressSupportedFaultBadReplyTo failed", e); - } - - if (!pass) - throw new Fault( - "testOnlyNonAnonymousAddressSupportedFaultBadReplyTo failed"); - } - - /* - * @testName: testOnlyNonAnonymousAddressSupportedFaultBadFaultTo - * - * @assertion_ids: WSAMD:SPEC:3003; WSAMD:SPEC:3003.1; WSAMD:SPEC:3003.3; - * WSASB:SPEC:6012; WSASB:SPEC:6012.8; WSASB:SPEC:6013; - * - * @test_Strategy: Test for OnlyNonAnonymousAddressSupported fault from client - * runtime. Pass in soap message with header equal to Anonymous URI. - * Expect SOAPFault. - * - */ - public void testOnlyNonAnonymousAddressSupportedFaultBadFaultTo() - throws Fault { - TestUtil.logMsg("testOnlyNonAnonymousAddressSupportedFaultBadFaultTo"); - boolean pass = true; - boolean done = false; - - SOAPMessage response = null; - Dispatch dispatchSM; - try { - String soapmsg = MessageFormat.format( - FaultToHeaderForNonAnonymousResponsesSoapMsg, url4, UUID.randomUUID(), - W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS, - W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME4); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (SOAPFaultException e) { - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(e)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(e)); - if (WsaSOAPUtils.isOnlyNonAnonymousAddressSupportedFaultCode(e)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyNonAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(e); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyNonAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(e) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(e) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - done = true; - } catch (SOAPException e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "testOnlyNonAnonymousAddressSupportedFaultBadFaultTo failed", e); - } - - if (!pass) - throw new Fault( - "testOnlyNonAnonymousAddressSupportedFaultBadFaultTo failed"); - - if (done) - return; - - try { - if (response == null) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - if (!response.getSOAPPart().getEnvelope().getBody().hasFault()) - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } catch (SOAPException e) { - throw new Fault("Expected a SOAPFault to be returned in SOAPResponse"); - } - try { - TestUtil.logMsg("Verify the SOAPFault faultcode"); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(response)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(response)); - if (WsaSOAPUtils.isOnlyNonAnonymousAddressSupportedFaultCode(response)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode OnlyNonAnonymousAddressSupported"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(response); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: OnlyNonAnonymousAddressSupported"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(response) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(response) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - throw new Fault( - "testOnlyNonAnonymousAddressSupportedFaultBadFaultTo failed", e); - } - - if (!pass) - throw new Fault( - "testOnlyNonAnonymousAddressSupportedFaultBadFaultTo failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/ClientSOAPHandler.java deleted file mode 100644 index b249da5555..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/ClientSOAPHandler.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientSOAPHandler.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, "testAnonymousResponsesAssertion")) { - VerifyAddressingHeadersForAnonymousResponsesAssertion(context, action); - } else if (Handler_Util.checkForMsg(context, - "testNonAnonymousResponsesAssertion")) { - VerifyAddressingHeadersForNonAnonymousResponsesAssertion(context, action); - } - } - - private void VerifyAddressingHeadersForAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ClientSOAPHandler.VerifyAddressingHeadersForAnonymousResponsesAssertion"); - if (!TestConstants.TEST_ANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION - .equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.TEST_ANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION - + ", Actual:" + action); - } - String to = null; - try { - to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - } catch (Exception e) { - TestUtil.logMsg("Exception occurred: " + e); - } - if (to != null) { - if (!to.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI) - && !to.equals(W3CAddressingConstants.WSA_NONE_ADDRESS)) { - throw new AddressingPropertyException("Expected: wsa:To=" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI + " or " - + W3CAddressingConstants.WSA_NONE_ADDRESS + ", Actual: wsa:To=" - + to); - } - } - try { - String relatesTo = getRelatesTo(context); - TestUtil.logMsg("[RelatesTo=" + relatesTo + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:RelatesTo was not set (unexpected)"); - } - } - - private void VerifyAddressingHeadersForNonAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ClientSOAPHandler.VerifyAddressingHeadersForNonAnonymousResponsesAssertion"); - if (!TestConstants.TEST_NONANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION - .equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.TEST_NONANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION - + ", Actual:" + action); - } - String to = null; - try { - to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - } catch (Exception e) { - TestUtil.logMsg("Exception occurred: " + e); - } - if (to != null - && to.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI)) { - throw new AddressingPropertyException("Expected: wsa:To=!" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI - + ", Actual: wsa:To=" + to); - } - try { - String relatesTo = getRelatesTo(context); - TestUtil.logMsg("[RelatesTo=" + relatesTo + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:RelatesTo was not set (unexpected)"); - } - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/NonAnonymousRespProcessor.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/NonAnonymousRespProcessor.java deleted file mode 100644 index 164204b28b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/NonAnonymousRespProcessor.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: NonAnonymousRespProcessor.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous; - -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.*; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import java.util.Calendar; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.Exchanger; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.io.IOException; - -/** - * This class handles the non-anonymous ReplyTo responses - * - * @author Alan Frechette - */ -@WebServiceProvider -@ServiceMode(value = Service.Mode.MESSAGE) -public class NonAnonymousRespProcessor implements Provider { - Exchanger msgExchanger; - - public NonAnonymousRespProcessor() { - } - - public NonAnonymousRespProcessor(Exchanger msgExchanger) { - this.msgExchanger = msgExchanger; - } - - public SOAPMessage invoke(SOAPMessage request) { - System.out.printf("====%s[start:%tc]====\n", getClass().getName(), - Calendar.getInstance()); - try { - request.writeTo(System.out); - } catch (SOAPException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - System.out.printf("====%s[end:%tc]====\n", getClass().getName(), - Calendar.getInstance()); - try { - msgExchanger.exchange(request, 30L, TimeUnit.SECONDS); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (TimeoutException e) { - e.printStackTrace(); - } - return null; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/NonAnonymousRespProcessor2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/NonAnonymousRespProcessor2.java deleted file mode 100644 index 0ba5a34f36..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/NonAnonymousRespProcessor2.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: NonAnonymousRespProcessor2.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous; - -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.*; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import java.util.Calendar; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.Exchanger; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.io.IOException; - -/** - * This class handles the non-anonymous FaultTo responses - * - * @author Alan Frechette - */ -@WebServiceProvider -@ServiceMode(value = Service.Mode.MESSAGE) -public class NonAnonymousRespProcessor2 implements Provider { - Exchanger msgExchanger; - - public NonAnonymousRespProcessor2() { - } - - public NonAnonymousRespProcessor2(Exchanger msgExchanger) { - this.msgExchanger = msgExchanger; - } - - public SOAPMessage invoke(SOAPMessage request) { - System.out.printf("====%s[start:%tc]====\n", getClass().getName(), - Calendar.getInstance()); - try { - request.writeTo(System.out); - } catch (SOAPException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - System.out.printf("====%s[end:%tc]====\n", getClass().getName(), - Calendar.getInstance()); - try { - msgExchanger.exchange(request, 30L, TimeUnit.SECONDS); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (TimeoutException e) { - e.printStackTrace(); - } - return null; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/ServerSOAPHandler.java deleted file mode 100644 index 0ab9eb38e3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/ServerSOAPHandler.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous; - -import com.sun.ts.lib.util.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, "testAnonymousResponsesAssertion")) { - VerifyAddressingHeadersForAnonymousResponsesAssertion(context, action); - } else if (Handler_Util.checkForMsg(context, - "testNonAnonymousResponsesAssertion")) { - VerifyAddressingHeadersForNonAnonymousResponsesAssertion(context, action); - } - } - - private void VerifyAddressingHeadersForAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ServerSOAPHandler.VerifyAddressingHeadersForAnonymousResponsesAssertion"); - System.out.println( - "ServerSOAPHandler.VerifyAddressingHeadersForAnonymousResponsesAssertion"); - if (!TestConstants.TEST_ANONYMOUS_RESPONSES_ASSERTION_IN_ACTION - .equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.TEST_ANONYMOUS_RESPONSES_ASSERTION_IN_ACTION - + ", Actual:" + action); - } - try { - String to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - System.out.println("[To=" + to + "]"); - } catch (Exception e) { - TestUtil.logMsg("Exception occurred: " + e); - } - String replyTo = null; - try { - replyTo = getReplyTo(context); - TestUtil.logMsg("[ReplyTo=" + replyTo + "]"); - System.out.println("[ReplyTo=" + replyTo + "]"); - } catch (Exception e) { - TestUtil.logMsg("Exception occurred: " + e); - } - if (replyTo != null) { - if (!replyTo.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI) - && !replyTo.equals(W3CAddressingConstants.WSA_NONE_ADDRESS)) { - throw new AddressingPropertyException("Expected: wsa:ReplyTo=" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI + " or " - + W3CAddressingConstants.WSA_NONE_ADDRESS + ", Actual: wsa:ReplyTo=" - + replyTo); - } - } - try { - String messageID = getMessageId(context); - TestUtil.logMsg("[MessageID=" + messageID + "]"); - System.out.println("[MessageID=" + messageID + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:MessageID was not set (unexpected)"); - } - } - - private void VerifyAddressingHeadersForNonAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ServerSOAPHandler.VerifyAddressingHeadersForNonAnonymousResponsesAssertion"); - System.out.println( - "ServerSOAPHandler.VerifyAddressingHeadersForNonAnonymousResponsesAssertion"); - if (!TestConstants.TEST_NONANONYMOUS_RESPONSES_ASSERTION_IN_ACTION - .equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.TEST_NONANONYMOUS_RESPONSES_ASSERTION_IN_ACTION - + ", Actual:" + action); - } - try { - String to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - System.out.println("[To=" + to + "]"); - } catch (Exception e) { - TestUtil.logMsg("Exception occurred: " + e); - } - String replyTo; - try { - replyTo = getReplyTo(context); - TestUtil.logMsg("[ReplyTo=" + replyTo + "]"); - System.out.println("[ReplyTo=" + replyTo + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:ReplyTo was not set (unexpected)"); - } - if (replyTo.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI)) - throw new AddressingPropertyException("Expected: wsa:ReplyTo=!" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI - + ", Actual: wsa:ReplyTo=" + replyTo); - try { - String messageID = getMessageId(context); - TestUtil.logMsg("[MessageID=" + messageID + "]"); - System.out.println("[MessageID=" + messageID + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:MessageID was not set (unexpected)"); - } - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/TestConstants.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/TestConstants.java deleted file mode 100644 index 68f7a31b0f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/TestConstants.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2007-01-24 02:29:49Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous; - -public class TestConstants { - public static final String TEST_ANONYMOUS_RESPONSES_ASSERTION_IN_ACTION = "http://example.com/AddNumbersPortType3/add"; - - public static final String TEST_ANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION = "http://example.com/AddNumbersPortType3/addResponse"; - - public static final String TEST_NONANONYMOUS_RESPONSES_ASSERTION_IN_ACTION = "http://example.com/AddNumbersPortType4/add"; - - public static final String TEST_NONANONYMOUS_RESPONSES_ASSERTION_OUT_ACTION = "http://example.com/AddNumbersPortType4/addResponse"; -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/WSAW2JDLAnonymousTest.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/WSAW2JDLAnonymousTest.wsdl deleted file mode 100644 index bc77d7eb5b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/WSAW2JDLAnonymousTest.wsdl +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/build.xml deleted file mode 100644 index 71e23b1103..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/build.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/custom-client.xml deleted file mode 100644 index 645f9fe190..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/custom-client.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous.ClientSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/custom-server.xml deleted file mode 100644 index 0f7fbed7bc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/custom-server.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous.ServerSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/jakartaEE.tokens deleted file mode 100644 index acefb5e1cf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsaw2jdlanonymoustest") -SERVICE=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous.AddNumbersService -SEI=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous.AddNumbersPortType3 -SEI2=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous.AddNumbersPortType4 -IMPL=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous.AddNumbersImpl3 -IMPL2=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous.AddNumbersImpl4 -URLALIAS=/jaxws/AddNumbers3 -URLALIAS2=/jaxws/AddNumbers4 -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous.AddNumbersImpl3 -SERVLETNAME2=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.anonymous.AddNumbersImpl4 -NAMESPACEURI=http://example.com/ -PORT=AddNumbersPort3 -PORT2=AddNumbersPort4 -WEBSERVICEDESCRIPTION=AddNumbersService -SERVICEREFNAMEWSSERVLET=service/wsaw2jdlanonymoustest -SERVICEREFNAMEWSEJB=service/wsaw2jdlanonymoustest -SERVICEREFNAMEWSAPPCLIENT=service/wsaw2jdlanonymoustest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/standalone-sun-jaxws.xml deleted file mode 100644 index 7c405a871b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/standalone.web.xml deleted file mode 100644 index e8f42e8146..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/anonymous/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSAnonymousTest - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddNumbersPortType3 - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbersPortType4 - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbersPortType3 - /jaxws/AddNumbers3 - - - AddNumbersPortType4 - /jaxws/AddNumbers4 - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/build.xml deleted file mode 100644 index a2168343ed..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/AddNumbersImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/AddNumbersImpl.java deleted file mode 100644 index 30ddd37e34..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/AddNumbersImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersImpl.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; - -@WebService(portName = "AddNumbersPort", serviceName = "AddNumbersService", targetNamespace = "urn:example.com", wsdlLocation = "WEB-INF/wsdl/WSAW2JDLDelimiterTest.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter.AddNumbersPortType") -public class AddNumbersImpl implements AddNumbersPortType { - - public int addNumbers(int number1, int number2) - throws AddNumbersFault_Exception { - if (number1 < 0 || number2 < 0) { - AddNumbersFault faultInfo = createAddNumbersFault(number1, number2); - throw new AddNumbersFault_Exception(faultInfo.getMessage(), faultInfo); - } - - return number1 + number2; - } - - public int addNumbers2(int number1, int number2) - throws AddNumbersFault_Exception { - if (number1 < 0 || number2 < 0) { - AddNumbersFault faultInfo = createAddNumbersFault(number1, number2); - throw new AddNumbersFault_Exception(faultInfo.getMessage(), faultInfo); - } - - return number1 + number2; - } - - AddNumbersFault createAddNumbersFault(int number1, int number2) { - ObjectFactory of = new ObjectFactory(); - AddNumbersFault faultInfo = of.createAddNumbersFault(); - faultInfo.setDetail("Negative numbers cant be added!"); - faultInfo.setMessage("Numbers: " + number1 + ", " + number2); - - return faultInfo; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/Client.java deleted file mode 100644 index 63f5a3ecc3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/Client.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; - -import java.net.URL; - -import java.util.Properties; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter."; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsaw2jdldelimitertest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsaw2jdldelimitertest.wsdlloc.1"; - - private String url = null; - - // service and port information - private static final String NAMESPACEURI = "urn:example.com"; - - private static final String SERVICE_NAME = "AddNumbersService"; - - private static final String PORT_NAME = "AddNumbersPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private URL wsdlurl = null; - - AddNumbersPortType port = null; - - static AddNumbersService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (AddNumbersPortType) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddNumbersService.class, PORT_QNAME, AddNumbersPortType.class); - TestUtil.logMsg("port=" + port); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (AddNumbersPortType) service.getAddNumbersPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (AddNumbersService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: testURNDefaultInputOutputActions - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.1; WSAMD:SPEC:4004.2; - * - * @test_Strategy: Test default action pattern for WSDL input/output with URN - * targetNamespace - * - */ - public void testURNDefaultInputOutputActions() throws Fault { - TestUtil.logMsg("testURNDefaultInputOutputActions"); - boolean pass = true; - - try { - int result = port.addNumbers(10, 10); - if (result != 20) { - TestUtil.logErr("result mismatch, expected 20, received " + result); - pass = false; - } else - TestUtil.logMsg("result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testURNDefaultInputOutputActions failed", e); - } - - if (!pass) - throw new Fault("testURNDefaultInputOutputActions failed"); - } - - /* - * @testName: testURNDefaultFaultAction - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4004.3; - * - * @test_Strategy: Test default action pattern for WSDL fault with URN - * targetNamespace - * - */ - public void testURNDefaultFaultAction() throws Fault { - TestUtil.logMsg("testURNDefaultFaultAction"); - boolean pass = true; - - try { - port.addNumbers(-10, 10); - TestUtil.logErr("AddNumbersFault_Exception must be thrown"); - pass = false; - } catch (AddNumbersFault_Exception ex) { - TestUtil.logMsg("AddNumbersFault_Exception was thrown as expected"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testURNDefaultFaultAction failed", e); - } - - if (!pass) - throw new Fault("testURNDefaultAddFaultAction failed"); - } - - /* - * @testName: testURNExplicitInputOutputActions - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4003; WSAMD:SPEC:4003.1; - * WSAMD:SPEC:4003.1; JAXWS:SPEC:2077; JAXWS:SPEC:2078; JAXWS:SPEC:2079; - * - * @test_Strategy: Test explicit association for WSDL input/output with URN - * targetNamespace - * - */ - public void testURNExplicitInputOutputActions() throws Fault { - TestUtil.logMsg("testURNExplicitInputOutputActions"); - boolean pass = true; - - try { - int result = port.addNumbers2(10, 10); - if (result != 20) { - TestUtil.logErr("result mismatch, expected 20, received " + result); - pass = false; - } else - TestUtil.logMsg("result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testURNExplicitInputOutputActions failed", e); - } - - if (!pass) - throw new Fault("testURNExplicitInputOutputActions failed"); - } - - /* - * @testName: testURNExplicitFaultAction - * - * @assertion_ids: WSAMD:SPEC:4004; WSAMD:SPEC:4003; WSAMD:SPEC:4003.3; - * JAXWS:SPEC:2080; JAXWS:SPEC:2081; JAXWS:SPEC:2082; JAXWS:SPEC:2083; - * - * @test_Strategy: Test explicit association for WSDL fault with URN - * targetNamespace - * - */ - public void testURNExplicitFaultAction() throws Fault { - TestUtil.logMsg("testURNExplicitFaultAction"); - boolean pass = true; - - try { - int result = port.addNumbers2(-10, 10); - TestUtil.logErr("AddNumbersFault_Exception must be thrown"); - pass = false; - } catch (AddNumbersFault_Exception ex) { - TestUtil.logMsg("AddNumbersFault_Exception was thrown as expected"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testURNExplicitFaultAction failed", e); - } - - if (!pass) - throw new Fault("testURNExplicitFaultAction failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/ClientSOAPHandler.java deleted file mode 100644 index 15c51b1a55..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/ClientSOAPHandler.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import com.sun.ts.lib.util.*; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", action=" + action + "]"); - if (oper.equals("addNumbersResponse")) { - if (!action.equals(TestConstants.ADD_NUMBERS_OUT_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers2Response")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_OUT_ACTION)) { - throw new ActionNotSupportedException(action); - } - } - } - - @Override - protected void checkFaultActions(String requestName, String detailName, - String action) { - TestUtil.logMsg( - "ClientSOAPHandler.checkFaultActions: [requestName=" + requestName - + ", fault=" + detailName + ", fault action=" + action + "]"); - if (requestName.equals("addNumbers") - && detailName.equals("AddNumbersFault")) { - if (!action.equals(TestConstants.ADD_NUMBERS_ADDNUMBERS_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (requestName.equals("addNumbers2") - && detailName.equals("AddNumbersFault")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_ADDNUMBERS_ACTION)) { - throw new ActionNotSupportedException(action); - } - } - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/ServerSOAPHandler.java deleted file mode 100644 index 3995f700f8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/ServerSOAPHandler.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import com.sun.ts.lib.util.*; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (oper.equals("addNumbers")) { - if (!action.equals(TestConstants.ADD_NUMBERS_IN_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers2")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_IN_ACTION)) { - throw new ActionNotSupportedException(action); - } - } - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/TestConstants.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/TestConstants.java deleted file mode 100644 index dbe4cd67bf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/TestConstants.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter; - -public class TestConstants { - public static final String ADD_NUMBERS_IN_ACTION = "urn:example.com:AddNumbersPortType:add"; - - public static final String ADD_NUMBERS2_IN_ACTION = "urn:addNumbers"; - - public static final String ADD_NUMBERS_OUT_ACTION = "urn:example.com:AddNumbersPortType:addResponse"; - - public static final String ADD_NUMBERS2_OUT_ACTION = "urn:addNumbersResponse"; - - public static final String ADD_NUMBERS_ADDNUMBERS_ACTION = "urn:example.com:AddNumbersPortType:addNumbers:Fault:addFault"; - - public static final String ADD_NUMBERS2_ADDNUMBERS_ACTION = "urn:addNumbersFault"; -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/WSAW2JDLDelimiterTest.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/WSAW2JDLDelimiterTest.wsdl deleted file mode 100644 index 285d27252a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/WSAW2JDLDelimiterTest.wsdl +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/build.xml deleted file mode 100644 index 010b063f76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/build.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/custom-client.xml deleted file mode 100644 index b31d30d5a9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/custom-client.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - ns2:AddNumbersPort - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter.ClientSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/custom-server.xml deleted file mode 100644 index a2d4dcf906..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/custom-server.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - ns2:AddNumbersPort - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter.ServerSOAPHandler - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/jakartaEE.tokens deleted file mode 100644 index 878531ddc9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdldelimitertest") -SERVICE=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter.AddNumbersService -SEI=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter.AddNumbersPortType -IMPL=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter.AddNumbersImpl -URLALIAS=/jaxws/AddNumbers -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.delimiter.AddNumbersImpl -NAMESPACEURI=urn:example.com -PORT=AddNumbersPort -WEBSERVICEDESCRIPTION=AddNumbersService -SERVICEREFNAMEWSSERVLET=service/wsw2jdldelimitertest -SERVICEREFNAMEWSEJB=service/wsw2jdldelimitertest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdldelimitertest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/standalone-sun-jaxws.xml deleted file mode 100644 index 6ad5004150..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/standalone.web.xml deleted file mode 100644 index 554fa315fd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/delimiter/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSAW2JDLDelimiterTest - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddNumbers - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbers - /jaxws/AddNumbers - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/Client.java deleted file mode 100644 index 7e3732d163..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/Client.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.eprinwsdl; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.AddressingFeature; -import javax.xml.namespace.QName; - -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import com.sun.ts.tests.jaxws.wsa.common.EprUtil; - -import java.util.Properties; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.eprinwsdl."; - - // service and port information - private static final String NAMESPACEURI = "http://eprinwsdltestservice.org/wsdl"; - - private static final String SERVICE_NAME = "EPRInWsdlTestService"; - - private static final String PORT_NAME1 = "Test1Port"; - - private static final String PORT_TYPE_NAME1 = "Test1"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private QName PORT_TYPE_QNAME1 = new QName(NAMESPACEURI, PORT_TYPE_NAME1); - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL1 = "eprinwsdl.endpoint.1"; - - private static final String WSDLLOC_URL = "eprinwsdl.wsdlloc.1"; - - private String url1 = null; - - private URL wsdlurl = null; - - private Test1 port1 = null; - - private WebServiceFeature[] addressingenabled = { - new AddressingFeature(true) }; - - static EPRInWsdlTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL1); - url1 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL1: " + url1); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - service = (EPRInWsdlTestService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, EPRInWsdlTestService.class); - port1 = (Test1) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - EPRInWsdlTestService.class, PORT_QNAME1, Test1.class, - addressingenabled); - JAXWS_Util.setTargetEndpointAddress(port1, url1); - - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port1 = (Test1) service.getPort(Test1.class, addressingenabled); - TestUtil.logMsg("port=" + port1); - TestUtil.logMsg("Obtained port1"); - JAXWS_Util.dumpTargetEndpointAddress(port1); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (EPRInWsdlTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: GetEPRAndVerifyMetaDataAndRefParamsTest1 - * - * @assertion_ids: WSAMD:SPEC:4002; WSAMD:SPEC:2000; WSAMD:SPEC:2000.1; - * WSAMD:SPEC:2000.2; WSAMD:SPEC:2001; WSAMD:SPEC:2001.1; WSAMD:SPEC:2001.2; - * WSAMD:SPEC:2001.3; WSAMD:SPEC:2002; WSAMD:SPEC:2002.1; WSAMD:SPEC:2002.2; - * WSAMD:SPEC:2002.3; WSAMD:SPEC:2002.4; WSACORE:SPEC:2003; - * - * @test_Strategy: Retrieve EPR via BinderProvider.getEndpointReference(). - * Verify that the returned EPR matches the EPR defined in the WSDL. Perform - * invocation and verify the reference parameters defined in the EPR in the - * WSDL are sent across. - */ - public void GetEPRAndVerifyMetaDataAndRefParamsTest1() throws Fault { - TestUtil.logMsg("GetEPRAndVerifyMetaDataAndRefParamsTest1"); - boolean pass = true; - - try { - BindingProvider bp = (BindingProvider) port1; - TestUtil - .logMsg("Retrieve EPR via BindingProvider.getEndpointReference()"); - W3CEndpointReference epr = (W3CEndpointReference) bp - .getEndpointReference(); - TestUtil.logMsg("---------------------------"); - TestUtil.logMsg("DUMP OF ENDPOINT REFERENCE"); - TestUtil.logMsg("---------------------------"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - epr.writeTo(new StreamResult(baos)); - TestUtil.logMsg(baos.toString()); - DOMResult dr = new DOMResult(); - epr.writeTo(dr); - TestUtil.logMsg("Validate the EPR for correctness (Verify MetaData)"); - if (!EprUtil.validateEPR(epr, url1, SERVICE_QNAME, PORT_QNAME1, - PORT_TYPE_QNAME1, Boolean.TRUE)) - pass = false; - TestUtil.logMsg("Validate the EPR reference parameters for correctness"); - if (dr != null) { - String name = "MyParam1"; - String value = "Hello"; - TestUtil.logTrace("name=" + name); - TestUtil.logTrace("value=" + value); - boolean success = EprUtil.validateReferenceParameter(dr.getNode(), name, - value); - if (!success) - pass = false; - - name = "MyParam2"; - value = "There"; - TestUtil.logTrace("name=" + name); - TestUtil.logTrace("value=" + value); - success = EprUtil.validateReferenceParameter(dr.getNode(), name, value); - if (!success) - pass = false; - DataType data = new DataType(); - data.setParam("GetEPRAndVerifyMetaDataAndRefParamsTest1"); - Holder hdt = new Holder(); - hdt.value = data; - TestUtil - .logMsg("Verify EPR reference parameters are sent on invocation"); - port1.testOperation(hdt); - TestUtil.logMsg("Invocation succeeded (expected)"); - } else { - pass = false; - TestUtil.logErr("No Reference Parameters were found"); - } - - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("GetEPRAndVerifyMetaDataAndRefParamsTest1 failed"); - } - - /* - * @testName: GetPortAndVerifyRefParamsAreSentTest1 - * - * @assertion_ids: WSAMD:SPEC:4002; - * - * @test_Strategy: Call Service.getPort(Class, AddressingFeature(true)). - * Perform invocation and verify that the reference parameters of the inlined - * EPR in wsdl are sent across. - */ - public void GetPortAndVerifyRefParamsAreSentTest1() throws Fault { - TestUtil.logMsg("GetPortAndVerifyRefParamsAreSentTest1"); - boolean pass = true; - try { - DataType datatype = new DataType(); - datatype.setParam("GetPortAndVerifyRefParamsAreSentTest1"); - Holder data = new Holder(); - data.value = datatype; - TestUtil.logMsg( - "Get port via Service.getPort(Class, AddressingFeature(true))"); - Test1 retport = (Test1) service.getPort(Test1.class, addressingenabled); - if (retport == null) { - TestUtil.logErr("Service.getPort() returned null (unexpected)"); - pass = false; - } else { - TestUtil - .logMsg("Verify EPR reference parameters are sent on invocation"); - retport.testOperation(data); - TestUtil.logMsg("Invocation succeeded (expected)"); - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetPortAndVerifyRefParamsAreSentTest1 failed", e); - } - if (!pass) - throw new Fault("GetPortAndVerifyRefParamsAreSentTest1 failed"); - } - - /* - * @testName: GetPortAndVerifyRefParamsAreSentTest2 - * - * @assertion_ids: WSAMD:SPEC:4002; - * - * @test_Strategy: Call Service.getPort(EPR, Class, AddressingFeature(true)). - * Perform invocation and verify that the reference parameters of the inlined - * EPR in wsdl are sent across. - */ - public void GetPortAndVerifyRefParamsAreSentTest2() throws Fault { - TestUtil.logMsg("GetPortAndVerifyRefParamsAreSentTest2"); - boolean pass = true; - try { - DataType datatype = new DataType(); - datatype.setParam("GetPortAndVerifyRefParamsAreSentTest2"); - Holder data = new Holder(); - data.value = datatype; - BindingProvider bp = (BindingProvider) port1; - TestUtil - .logMsg("Retrieve EPR via BindingProvider.getEndpointReference()"); - W3CEndpointReference epr = (W3CEndpointReference) bp - .getEndpointReference(); - TestUtil.logMsg( - "Get port via Service.getPort(EPR, Class, AddressingFeature(true))"); - Test1 retport = (Test1) service.getPort(epr, Test1.class, - addressingenabled); - if (retport == null) { - TestUtil.logErr("Service.getPort() returned null (unexpected)"); - pass = false; - } else { - TestUtil - .logMsg("Verify EPR reference parameters are sent on invocation"); - retport.testOperation(data); - TestUtil.logMsg("Invocation succeeded (expected)"); - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetPortAndVerifyRefParamsAreSentTest2 failed", e); - } - if (!pass) - throw new Fault("GetPortAndVerifyRefParamsAreSentTest2 failed"); - } - - /* - * @testName: GetPortAndVerifyModifiedRefParamsAreSentTest3 - * - * @assertion_ids: WSAMD:SPEC:4002; - * - * @test_Strategy: Retrieve EPR via BinderProvider.getEndpointReference(). - * Modify the EPR to change the reference parameters. Call - * Service.getPort(EPR, Class, AddressingFeature(true)). Perform invocation - * and verify that the modified reference parameters are sent across. - */ - public void GetPortAndVerifyModifiedRefParamsAreSentTest3() throws Fault { - TestUtil.logMsg("GetPortAndVerifyModifiedRefParamsAreSentTest3"); - boolean pass = true; - try { - DataType datatype = new DataType(); - datatype.setParam("GetPortAndVerifyModifiedRefParamsAreSentTest3"); - Holder data = new Holder(); - data.value = datatype; - BindingProvider bp = (BindingProvider) port1; - TestUtil - .logMsg("Retrieve EPR via BindingProvider.getEndpointReference()"); - W3CEndpointReference epr = (W3CEndpointReference) bp - .getEndpointReference(); - TestUtil.logMsg("Modify EPR by changing the reference parameters"); - DOMResult dr = new DOMResult(); - epr.writeTo(dr); - XMLUtils.changeNodeValue_(dr.getNode(), "MyParam1", "MyValue1"); - XMLUtils.changeNodeValue_(dr.getNode(), "MyParam2", "MyValue2"); - epr = (W3CEndpointReference) EndpointReference - .readFrom(new DOMSource(dr.getNode())); - TestUtil.logMsg( - "Get port via Service.getPort(EPR, Class, AddressingFeature(true))"); - Test1 retport = (Test1) service.getPort(epr, Test1.class, - addressingenabled); - if (retport == null) { - TestUtil.logErr("Service.getPort() returned null (unexpected)"); - pass = false; - } else { - TestUtil - .logMsg("Verify EPR reference parameters are sent on invocation"); - retport.testOperation(data); - TestUtil.logMsg("Invocation succeeded (expected)"); - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetPortAndVerifyModifiedRefParamsAreSentTest3 failed", - e); - } - if (!pass) - throw new Fault("GetPortAndVerifyModifiedRefParamsAreSentTest3 failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/EPRInWsdlTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/EPRInWsdlTestService.wsdl deleted file mode 100644 index 8531cc3315..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/EPRInWsdlTestService.wsdl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://www.w3.org/2005/08/addressing/none - - Hello - There - - - tns:EPRInWsdlTestService - tns:Test1 - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/ServerSOAPHandler.java deleted file mode 100644 index 04ffe597ea..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/ServerSOAPHandler.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.eprinwsdl; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.wsa.common.EprUtil; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.soap.*; -import org.w3c.dom.Element; -import com.sun.ts.lib.util.*; -import java.util.List; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - protected void processInboundMessage(SOAPMessageContext context) { - TestUtil.logMsg("In ServerSOAPHandler:processInboundMessage"); - System.out.println("In ServerSOAPHandler:processInboundMessage"); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - JAXWS_Util.dumpSOAPMessage(msg, true); - JAXWS_Util.dumpSOAPMessage(msg, false); - - if (Handler_Util.checkForMsg(context, - "GetEPRAndVerifyMetaDataAndRefParamsTest1") - || Handler_Util.checkForMsg(context, - "GetPortAndVerifyRefParamsAreSentTest1") - || Handler_Util.checkForMsg(context, - "GetPortAndVerifyRefParamsAreSentTest2") - || Handler_Util.checkForMsg(context, - "GetPortAndVerifyModifiedRefParamsAreSentTest3")) { - List rp = (List) context - .get(MessageContext.REFERENCE_PARAMETERS); - boolean result1 = false; - boolean result2 = false; - if (Handler_Util.checkForMsg(context, - "GetPortAndVerifyModifiedRefParamsAreSentTest3")) { - result1 = verifyReferenceParameters(rp, "MyParam1", "MyValue1"); - result2 = verifyReferenceParameters(rp, "MyParam2", "MyValue2"); - } else { - result1 = verifyReferenceParameters(rp, "MyParam1", "Hello"); - result2 = verifyReferenceParameters(rp, "MyParam2", "There"); - } - if ((!result1) && (!result2)) { - throw new RuntimeException( - "Error: Reference Parameter MyParam1 and MyParam2 were either not found or their values were wrong"); - } else if (!result1) { - throw new RuntimeException( - "Error: Reference Parameter MyParam1 was not found or it's value was wrong"); - } else if (!result2) { - throw new RuntimeException( - "Error: Reference Parameter MyParam2 was not found or it's value was wrong"); - } - } - } - - protected boolean verifyReferenceParameters(List e, String name, - String value) { - boolean result = false; - TestUtil.logMsg("In ServerSOAPHandler:verifyReferenceParameters"); - TestUtil.logMsg("Number of elements=" + e.size()); - TestUtil.logMsg("Searching for Reference Parameter '" + name - + "' and its value '" + value + "'"); - System.out.println("In ServerSOAPHandler:verifyReferenceParameters"); - System.out.println("Number of elements=" + e.size()); - System.out.println("Searching for Reference Parameter '" + name - + "' and its value '" + value + "'"); - if (e.size() > 0) { - for (int i = 0; i < e.size(); i++) { - Element element = (Element) e.get(i); - boolean actual = EprUtil.validateReferenceParameter(element, name, - value); - if (actual) { - TestUtil.logMsg("Found Reference Parameter '" + name - + "' and its value '" + value + "'"); - System.out.println("Found Reference Parameter '" + name - + "' and its value '" + value + "'"); - result = true; - break; - } - } - } - return result; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/TestImpl1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/TestImpl1.java deleted file mode 100644 index 5318db02ed..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/TestImpl1.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestImpl1.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.eprinwsdl; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.Addressing; - -@WebService(portName = "Test1Port", serviceName = "EPRInWsdlTestService", targetNamespace = "http://eprinwsdltestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/EPRInWsdlTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.eprinwsdl.Test1") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = true, required = false) - -public class TestImpl1 implements Test1 { - - public void testOperation(Holder data) { - System.out.println("--------------------------"); - System.out.println("In TestImpl1:testOperation"); - - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/build.xml deleted file mode 100644 index a3a96c0cbf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/build.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/custom-client.xml deleted file mode 100644 index 75bc535871..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/custom-client.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/custom-server.xml deleted file mode 100644 index 5f34cf5bb8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/custom-server.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.eprinwsdl.ServerSOAPHandler - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/jakartaEE.tokens deleted file mode 100644 index 273d1e9f1b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdleprinwsdltest") -SERVICE=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.eprinwsdl.EPRInWsdlTestService -SEI=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.eprinwsdl.Test1 -IMPL=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.eprinwsdl.TestImpl1 -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.eprinwsdl.TestImpl1 -URLALIAS=/jaxws/Test1 -NAMESPACEURI=http://eprinwsdltestservice.org/wsdl -PORT=Test1Port -WEBSERVICEDESCRIPTION=WSAEPRInWsdlTestService -SERVICEREFNAMEWSSERVLET=service/wsw2jdleprinwsdltest -SERVICEREFNAMEWSEJB=service/wsw2jdleprinwsdltest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdleprinwsdltest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/standalone-sun-jaxws.xml deleted file mode 100644 index 9b4bebb6ca..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/standalone-sun-jaxws.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/standalone.web.xml deleted file mode 100644 index ae9fb1c85b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/eprinwsdl/standalone.web.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - WSW2JDLMTOMFeatureTestApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - Test1 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - Test1 - /jaxws/Test1 - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/AddNumbersClient1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/AddNumbersClient1.java deleted file mode 100644 index 0428b62473..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/AddNumbersClient1.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.oneway; - -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.lib.harness.EETest; - -public class AddNumbersClient1 extends SOAPClient { - - public AddNumbersClient1(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public AddNumbersClient1(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://example.com/"); - stubContext.setService("AddNumbersService"); - stubContext.setPort("AddNumbersPort"); - stubContext.setEndpointInterface(AddNumbersPortType.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsaw2jdlonewaytest.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsaw2jdlonewaytest.wsdlloc.1"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/AddNumbersImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/AddNumbersImpl.java deleted file mode 100644 index 8bf5f0bb12..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/AddNumbersImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersImpl.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.oneway; - -import jakarta.jws.WebService; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; - -/** - * @author JAX-WSA Development Team - */ -@WebService(portName = "AddNumbersPort", serviceName = "AddNumbersService", targetNamespace = "http://example.com", wsdlLocation = "WEB-INF/wsdl/WSAW2JDLOneWayTest.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.oneway.AddNumbersPortType") -public class AddNumbersImpl implements AddNumbersPortType { - public void addNumbers(int number1, int number2) { - if (number1 < 0 || number2 < 0) { - throw new ActionNotSupportedException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - } - - public void addNumbers2(int number1, int number2) { - if (number1 < 0 || number2 < 0) { - throw new ActionNotSupportedException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/Client.java deleted file mode 100644 index 3d1cee6fdf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/Client.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.oneway; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.text.MessageFormat; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.sharedclients.*; - -import java.net.URL; - -import jakarta.xml.ws.soap.*; -import jakarta.xml.soap.*; - -import java.util.Properties; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.oneway."; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsaw2jdlonewaytest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsaw2jdlonewaytest.wsdlloc.1"; - - private String url = null; - - // service and port information - private static final String NAMESPACEURI = "http://example.com"; - - private static final String SERVICE_NAME = "AddNumbersService"; - - private static final String PORT_NAME = "AddNumbersPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private URL wsdlurl = null; - - private AddNumbersClient1 client1; - - AddNumbersPortType port = null; - - String noToHeaderSoapmsg = "http://example.com/AddNumbersPortType/add1010"; - - String noActionHeaderSoapmsg = "{0}1010"; - - static AddNumbersService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (AddNumbersPortType) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddNumbersService.class, PORT_QNAME, AddNumbersPortType.class); - TestUtil.logMsg("port=" + port); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (AddNumbersPortType) service.getAddNumbersPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - client1 = (AddNumbersClient1) ClientFactory - .getClient(AddNumbersClient1.class, p, this, service); - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (AddNumbersService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: testDefaultOneWayAction - * - * @assertion_ids: WSACORE:SPEC:3001; WSACORE:SPEC:3005; WSACORE:SPEC:3017; - * WSACORE:SPEC:3022.2; WSACORE:SPEC:3022.2.1; WSACORE:SPEC:3022.2.2; - * WSAMD:SPEC:5000 - * - * @test_Strategy: Test default action pattern for WSDL input - * - */ - public void testDefaultOneWayAction() throws Fault { - TestUtil.logMsg("testDefaultOneWayAction"); - boolean pass = true; - - try { - port.addNumbers(10, 10); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testDefaultOneWayAction failed", e); - } - - if (!pass) - throw new Fault("testDefaultOneWayAction failed"); - } - - /* - * @testName: testExplicitOneWayAction - * - * @assertion_ids: WSACORE:SPEC:3001; WSACORE:SPEC:3005; WSACORE:SPEC:3009; - * WSACORE:SPEC:3017; WSACORE:SPEC:3022.2; WSACORE:SPEC:3022.2.1; - * WSACORE:SPEC:3022.2.2; WSAMD:SPEC:5000 - * - * @test_Strategy: Test default action pattern for WSDL input - * - */ - public void testExplicitOneWayAction() throws Fault { - TestUtil.logMsg("testExplicitOneWayAction"); - boolean pass = true; - - try { - port.addNumbers2(10, 10); - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testExplicitOneWayAction failed", e); - } - - if (!pass) - throw new Fault("testExplicitOneWayAction failed"); - } - - /* - * @testName: noToHeaderOneWayTest - * - * @assertion_ids: WSASB:SPEC:6005; WSASB:SPEC:6006; WSASB:SPEC:6013; - * - * @test_Strategy: Send a message that doesn't contain wsa:To - * - */ - public void noToHeaderOneWayTest() throws Fault { - TestUtil.logMsg("noToHeaderOneWayTest"); - boolean pass = true; - - SOAPMessage response = null; - try { - String soapmsg = noToHeaderSoapmsg; - response = client1.makeSaajRequest(soapmsg); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("noToHeaderOneWayTest failed", e); - } - if (!pass) - throw new Fault("noToHeaderOneWayTest failed"); - } - - /* - * @testName: noActionHeaderOneWayTest - * - * @assertion_ids: WSASB:SPEC:6005; WSASB:SPEC:6006; WSASB:SPEC:6013; - * - * @test_Strategy: Send a message that doesn't contain wsa:Action - * - */ - public void noActionHeaderOneWayTest() throws Fault { - TestUtil.logMsg("noActionHeaderOneWayTest"); - boolean pass = true; - - String soapmsg = MessageFormat.format(noActionHeaderSoapmsg, url); - SOAPMessage response = null; - try { - response = client1.makeSaajRequest(soapmsg); - JAXWS_Util.dumpSOAPMessage(response, false); - } catch (SOAPFaultException e) { - TestUtil.logMsg("Caught expected SOAPFaultException: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("noActionHeaderOneWayTest failed", e); - } - if (!pass) - throw new Fault("noActionHeaderOneWayTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/ServerSOAPHandler.java deleted file mode 100644 index 36a447500b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/ServerSOAPHandler.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.oneway; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import com.sun.ts.lib.util.*; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (oper.equals("addNumbers")) { - if (!action.equals(TestConstants.ADD_NUMBERS_IN_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS_IN_ACTION + ", Actual:" + action); - } - } else if (oper.equals("addNumbers2")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_IN_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS2_IN_ACTION + ", Actual:" + action); - } - } - } - - protected void checkInboundTo(SOAPMessageContext context) { - checkInboundToExist(context); - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/TestConstants.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/TestConstants.java deleted file mode 100644 index c4790d0a43..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/TestConstants.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.oneway; - -public class TestConstants { - public static final String ADD_NUMBERS_IN_ACTION = "http://example.com/AddNumbersPortType/add"; - - public static final String ADD_NUMBERS2_IN_ACTION = "inputAction"; - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/WSAW2JDLOneWayTest.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/WSAW2JDLOneWayTest.wsdl deleted file mode 100644 index a5471684d6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/WSAW2JDLOneWayTest.wsdl +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/build.xml deleted file mode 100644 index 532875fca7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/build.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/custom-client.xml deleted file mode 100644 index 9ef10414ce..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/custom-server.xml deleted file mode 100644 index 24fb436a43..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/custom-server.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - ns2:AddNumbersPort - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.oneway.ServerSOAPHandler - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/jakartaEE.tokens deleted file mode 100644 index 37327ce352..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlonewaytest") -SERVICE=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.oneway.AddNumbersService -SEI=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.oneway.AddNumbersPortType -IMPL=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.oneway.AddNumbersImpl -URLALIAS=/jaxws/AddNumbers -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.oneway.AddNumbersImpl -NAMESPACEURI=http://example.com -PORT=AddNumbersPort -WEBSERVICEDESCRIPTION=AddNumbersService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlonewaytest -SERVICEREFNAMEWSEJB=service/wsw2jdlonewaytest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlonewaytest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/standalone-sun-jaxws.xml deleted file mode 100644 index 7e08c56a52..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/standalone.web.xml deleted file mode 100644 index 484dd56b91..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/oneway/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSAW2JDLOneWayTest - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddNumbers - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbers - /jaxws/AddNumbers - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/Client.java deleted file mode 100644 index dcac1fb6a7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/Client.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.providertest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.net.*; - -import jakarta.xml.ws.*; -import java.util.Properties; -import com.sun.ts.tests.jaxws.common.*; - -import javax.xml.namespace.QName; -import jakarta.xml.bind.JAXBContext; - -import jakarta.xml.ws.soap.AddressingFeature; -import jakarta.xml.ws.soap.MTOMFeature; -import jakarta.xml.ws.RespectBindingFeature; -import jakarta.xml.ws.WebServiceFeature; - -public class Client extends ServiceEETest { - - private static final ObjectFactory of = new ObjectFactory(); - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - // ServiceName and PortName mapping configuration going java-to-wsdl - private static final String SERVICE_NAME = "ProviderTestService"; - - private static final String PORT_NAME = "ProviderTestPort"; - - private static final String PORT_TYPE_NAME = "ProviderTest"; - - private static final String INPUT_MSG_NAME = "helloRequest"; - - private static final String NAMESPACEURI = "http://providertestservice.org/wsdl"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - // URL properties used by the test - private static final String ENDPOINT_URL = "providertest.endpoint.1"; - - private static final String WSDLLOC_URL = "providertest.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - ProviderTest port = null; - - private WebServiceFeature[] wsf = { new AddressingFeature(true), - new MTOMFeature(true), new RespectBindingFeature(true) }; - - static ProviderTestService service = null; - - private TSURL ctsurl = new TSURL(); - - private Dispatch dispatchJaxb = null; - - private static final Class SERVICE_CLASS = com.sun.ts.tests.jaxws.wsa.w2j.document.literal.providertest.ProviderTestService.class; - - private static final Class JAXB_OBJECT_FACTORY = com.sun.ts.tests.jaxws.wsa.w2j.document.literal.providertest.ObjectFactory.class; - - private JAXBContext createJAXBContext() { - try { - return JAXBContext.newInstance(JAXB_OBJECT_FACTORY); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - private Dispatch createDispatchJAXB() throws Exception { - return service.createDispatch(PORT_QNAME, createJAXBContext(), - jakarta.xml.ws.Service.Mode.PAYLOAD, wsf); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortJavaEE() throws Exception { - port = (ProviderTest) service.getPort(ProviderTest.class, wsf); - TestUtil.logMsg("port=" + port); - } - - private void getPortStandalone() throws Exception { - port = (ProviderTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - ProviderTestService.class, PORT_QNAME, ProviderTest.class, wsf); - JAXWS_Util.setTargetEndpointAddress(port, url); - service = (ProviderTestService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, SERVICE_CLASS); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (ProviderTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: WebServiceFeaturesOnProviderTest - * - * @assertion_ids: JAXWS:SPEC:6017; JAXWS:SPEC:5025; JAXWS:JAVADOC:189 - * - * @test_Strategy: enable the webservice features on the impl then ensure the - * endpoint can be reached - */ - public void WebServiceFeaturesOnProviderTest() throws Fault { - TestUtil.logMsg("WebServiceFeaturesOnProviderTest"); - boolean pass = true; - HelloRequest helloReq = null; - try { - helloReq = of.createHelloRequest(); - helloReq.setArgument("WebServiceFeaturesOnProviderTest"); - } catch (Exception e) { - e.printStackTrace(); - } - HelloResponse helloRes = null; - try { - dispatchJaxb = createDispatchJAXB(); - dispatchJaxb.invoke(helloReq); - } catch (Throwable t) { - t.printStackTrace(); - throw new Fault(t.toString()); - } - - if (!pass) - throw new Fault("WebServiceFeaturesOnProviderTest failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/ProviderTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/ProviderTestImpl.java deleted file mode 100644 index bd12154186..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/ProviderTestImpl.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.providertest; - -import jakarta.xml.ws.*; -import java.io.ByteArrayInputStream; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; -import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.dom.DOMSource; - -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.soap.MTOM; -import jakarta.xml.ws.RespectBinding; - -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -@WebServiceProvider(serviceName = "ProviderTestService", portName = "ProviderTestPort", targetNamespace = "http://providertestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/ProviderTestService.wsdl") -@BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http") -@Addressing(enabled = true) -@MTOM(enabled = true) -@RespectBinding(enabled = true) -@ServiceMode(value = jakarta.xml.ws.Service.Mode.PAYLOAD) - -public class ProviderTestImpl implements Provider { - - private static final jakarta.xml.bind.JAXBContext jaxbContext = createJAXBContext(); - - public jakarta.xml.bind.JAXBContext getJAXBContext() { - return jaxbContext; - } - - private static jakarta.xml.bind.JAXBContext createJAXBContext() { - try { - return jakarta.xml.bind.JAXBContext.newInstance( - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.providertest.ObjectFactory.class); - } catch (jakarta.xml.bind.JAXBException e) { - throw new WebServiceException(e.getMessage(), e); - } - } - - public Source invoke(Source req) { - System.out.println("**** Received in Provider Impl ******"); - DOMResult dr = null; - try { - dr = JAXWS_Util.getSourceAsDOMResult(req); - System.out.println("-> Source=" + JAXWS_Util.getDOMResultAsString(dr)); - - } catch (Exception e) { - System.out.println("Exception: failed getDOMResultAsString ... " + e); - } - try { - HelloRequest request = recvBean(new DOMSource(dr.getNode())); - String arg = request.getArgument(); - String response = "" - + arg + ""; - System.out.println("Sending response=" + response); - Source source = new StreamSource( - new ByteArrayInputStream(response.getBytes())); - return source; - } catch (Exception e) { - e.printStackTrace(); - throw new WebServiceException("Provider endpoint failed", e); - } - } - - private HelloRequest recvBean(Source req) { - System.out.println("*** recvBean ***"); - HelloRequest helloReq = null; - try { - helloReq = (HelloRequest) jaxbContext.createUnmarshaller().unmarshal(req); - System.out.println("argument=" + helloReq.getArgument()); - } catch (Exception e) { - System.out.println("Received an exception while parsing the source"); - e.printStackTrace(); - } - return helloReq; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/ProviderTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/ProviderTestService.wsdl deleted file mode 100644 index 20924e9a62..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/ProviderTestService.wsdl +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/build.xml deleted file mode 100644 index 6f90e82b47..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/build.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/customfile.xml deleted file mode 100644 index 0fc7d7d112..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/customfile.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/jakartaEE.tokens deleted file mode 100644 index 3dec02c25f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsaprovidertest") -SERVICE=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.providertest.ProviderTestService -IMPL=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.providertest.ProviderTestImpl -SEI=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.providertest.ProviderTest -NAMESPACEURI=http://providertestservice.org/wsdl -PORT=ProviderTestPort -URLALIAS=/jaxws/ProviderTest -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.providertest.ProviderTestImpl -WEBSERVICEDESCRIPTION=ProviderTest -SERVICEREFNAMEWSSERVLET=service/wsaprovidertest -SERVICEREFNAMEWSEJB=service/wsaprovidertest -SERVICEREFNAMEWSAPPCLIENT=service/wsaprovidertest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/standalone-sun-jaxws.xml deleted file mode 100644 index 723af14ab7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/standalone.web.xml deleted file mode 100644 index f7c161d494..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/providertest/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSAProviderServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -ProviderTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -ProviderTest -/jaxws/ProviderTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/AddNumbersImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/AddNumbersImpl.java deleted file mode 100644 index 5f1a51bb88..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/AddNumbersImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersImpl.java 51679 2006-10-30 20:53:11Z af70133 $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.refps; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; - -@WebService(portName = "AddNumbersPort", serviceName = "AddNumbersService", targetNamespace = "http://example.com", wsdlLocation = "WEB-INF/wsdl/WSAW2JDLReferenceParamsTest.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.refps.AddNumbersPortType") -public class AddNumbersImpl implements AddNumbersPortType { - public int addNumbers(int number1, int number2) - throws AddNumbersFault_Exception { - return doStuff(number1, number2); - } - - public int addNumbers2(int number1, int number2) - throws AddNumbersFault_Exception { - return doStuff(number1, number2); - } - - public int addNumbers3(int number1, int number2) - throws AddNumbersFault_Exception { - return doStuff(number1, number2); - } - - public int addNumbers4(int number1, int number2) - throws AddNumbersFault_Exception { - return doStuff(number1, number2); - } - - public void addNumbers5(int number1, int number2) { - System.out.println("addNumbers5"); - } - - int doStuff(int number1, int number2) throws AddNumbersFault_Exception { - if (number1 < 0 || number2 < 0) { - ObjectFactory of = new ObjectFactory(); - AddNumbersFault fb = of.createAddNumbersFault(); - fb.setDetail("Negative numbers cant be added!"); - fb.setMessage("Numbers: " + number1 + ", " + number2); - - throw new AddNumbersFault_Exception(fb.getMessage(), fb); - } - return number1 + number2; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/Client.java deleted file mode 100644 index c78ff71757..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/Client.java +++ /dev/null @@ -1,386 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 51837 2006-11-09 16:48:53Z adf $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.refps; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.*; - -import org.w3c.dom.Attr; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; -import java.util.Iterator; - -import java.net.URL; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.xml.soap.*; - -import java.util.Properties; -import java.util.UUID; -import java.text.MessageFormat; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.refps."; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsaw2jdlreferenceparamstest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsaw2jdlreferenceparamstest.wsdlloc.1"; - - private String url = null; - - // service and port information - private static final String NAMESPACEURI = "http://example.com"; - - private static final String SERVICE_NAME = "AddNumbersService"; - - private static final String PORT_NAME = "AddNumbersPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private static final String CORRECT_ACTION = "http://example.com/AddNumbersPortType/addNumbersRequest"; - - private Dispatch dispatchSM; - - private URL wsdlurl = null; - - AddNumbersPortType port = null; - - static AddNumbersService service = null; - - public static final String REPLY_TO_REFPS_MESSAGE = "" + "" - + "{0}\n" + "uuid:{1}\n" - + "\n" + " {2}\n" - + " \n" - + " Key#123456789\n" - + " " + "\n" - + "{3}\n" + "\n" + "\n" - + "\n" - + " 10\n" + " 10\n" - + "\n" + ""; - - public static final String FAULT_TO_REFPS_MESSAGE = "" + "\n" - + "{0}\n" + "uuid:{1}\n" - + "\n" + " {2}\n" - + " \n" - + " Key#123456789\n" - + " " + "\n" + "\n" - + " {3}\n" + " \n" - + " Fault#123456789\n" - + " " + "\n" - + "{4}\n" + "\n" + "\n" - + "\n" - + " -10\n" + " 10\n" - + "\n" + ""; - - private static AddressingFeature ENABLED_ADDRESSING_FEATURE = new AddressingFeature( - true, true); - - private static AddressingFeature DISABLED_ADDRESSING_FEATURE = new AddressingFeature( - false); - - // Reference parameter constants - private QName CUSTOMER_KEY = new QName("http://example.org/customer", - "CustomerKey"); - - private static final String CUSTOMER_KEY_VALUE = "Key#123456789"; - - private QName IS_REF_PARAM = new QName("http://www.w3.org/2005/08/addressing", - "IsReferenceParameter"); - - private static final String IS_REF_PARAM_VALUE = "1"; - - private boolean validate(SOAPMessage sm, QName refp, String refp_value, - QName isRefParam, String isRefParam_value) { - try { - TestUtil.logMsg("get SOAPHeader"); - SOAPHeader header = sm.getSOAPHeader(); - TestUtil.logMsg("get Child Element for " + refp); - Iterator iter = header.getChildElements(refp); - if (!iter.hasNext()) { - TestUtil.logErr("SOAPMessage response does not contain" + refp); - return false; - } - Element element = (Element) iter.next(); - TestUtil.logMsg("get Attribute node for " + isRefParam); - Attr attr = element.getAttributeNodeNS(isRefParam.getNamespaceURI(), - isRefParam.getLocalPart()); - if (attr == null) { - TestUtil.logErr("attribute not found: " + isRefParam); - return false; - } - TestUtil.logMsg("get all Child Nodes"); - NodeList nodes = element.getChildNodes(); - boolean found = false; - for (int i = 0; i < nodes.getLength(); i++) { - Node node = (Node) nodes.item(i); - if (node instanceof Text) { - TestUtil.logMsg("got TEXT node"); - String value = node.getNodeValue(); - TestUtil.logMsg("value=[" + value + "]"); - if (!value.equals(CUSTOMER_KEY_VALUE)) { - TestUtil.logErr("CUSTOMER_KEY_VALUE: expected: " - + CUSTOMER_KEY_VALUE + ", received: " + value); - return false; - } else - found = true; - } - } - if (!found) { - TestUtil - .logErr("Did not found CUSTOMER_KEY_VALUE: " + CUSTOMER_KEY_VALUE); - return false; - } - } catch (Exception e) { - e.printStackTrace(); - return false; - } - return true; - } - - private Dispatch createDispatchSOAPMessage(QName port, - boolean enabled) throws Exception { - if (enabled) - return service.createDispatch(port, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE, ENABLED_ADDRESSING_FEATURE); - else - return service.createDispatch(port, SOAPMessage.class, - jakarta.xml.ws.Service.Mode.MESSAGE, DISABLED_ADDRESSING_FEATURE); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (AddNumbersPortType) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddNumbersService.class, PORT_QNAME, AddNumbersPortType.class); - TestUtil.logMsg("port=" + port); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (AddNumbersPortType) service.getAddNumbersPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - service = (AddNumbersService) JAXWS_Util.getService(wsdlurl, - SERVICE_QNAME, AddNumbersService.class); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (AddNumbersService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: testReplyToRefps - * - * @assertion_ids: WSACORE:SPEC:3012; WSACORE:SPEC:3012.1; - * WSACORE:SPEC:3012.2; WSACORE:SPEC:2004; WSACORE:SPEC:2004.3; - * WSACORE:SPEC:3021; - * - * @test_Strategy: - * - */ - - public void testReplyToRefps() throws Fault { - boolean pass = true; - try { - - String soapmsg = MessageFormat.format(REPLY_TO_REFPS_MESSAGE, url, - UUID.randomUUID(), WsaSOAPUtils.getAddrVerAnonUri(), CORRECT_ACTION); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME, false); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - SOAPMessage response = dispatchSM.invoke(request); - TestUtil.logMsg("Dumping SOAP Response ..."); - JAXWS_Util.dumpSOAPMessage(response, false); - pass = validate(response, CUSTOMER_KEY, CUSTOMER_KEY_VALUE, IS_REF_PARAM, - IS_REF_PARAM_VALUE); - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testReplyToRefps failed", e); - } - - if (!pass) - throw new Fault("testReplyToRefps failed"); - } - - /* - * @testName: testFaultToRefps - * - * @assertion_ids: WSACORE:SPEC:3012; WSACORE:SPEC:3012.1; - * WSACORE:SPEC:3012.2; WSACORE:SPEC:2004; WSACORE:SPEC:2004.3; - * WSACORE:SPEC:3021; - * - * @test_Strategy: - * - */ - - public void testFaultToRefps() throws Fault { - boolean pass = true; - - try { - String soapmsg = MessageFormat.format(FAULT_TO_REFPS_MESSAGE, url, - UUID.randomUUID(), WsaSOAPUtils.getAddrVerAnonUri(), - WsaSOAPUtils.getAddrVerAnonUri(), CORRECT_ACTION); - dispatchSM = createDispatchSOAPMessage(PORT_QNAME, false); - SOAPMessage request = JAXWS_Util.makeSOAPMessage(soapmsg); - TestUtil.logMsg("Dumping SOAP Request ..."); - JAXWS_Util.dumpSOAPMessage(request, false); - SOAPMessage response = dispatchSM.invoke(request); - JAXWS_Util.dumpSOAPMessage(response, false); - pass = false; - TestUtil.logErr("SOAPFaultException must be thrown"); - } catch (SOAPFaultException e) { - TestUtil.logMsg("Caught expected SOAPFaultException: " + e.getMessage()); - try { - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(e)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(e)); - String faultdetail[] = WsaSOAPUtils.getFaultDetail(e); - if (faultdetail != null) { - String output = "FaultDetail:"; - for (int i = 0; faultdetail[i] != null; i++) { - output += " " + faultdetail[i]; - } - TestUtil.logMsg("" + output); - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - throw new Fault("testFaultToRefps failed", e2); - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testFaultToRefps failed", e); - } - - if (!pass) - throw new Fault("testFaultToRefps failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/WSAW2JDLReferenceParamsTest.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/WSAW2JDLReferenceParamsTest.wsdl deleted file mode 100644 index dbc647b370..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/WSAW2JDLReferenceParamsTest.wsdl +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/build.xml deleted file mode 100644 index d78560279c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/build.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/custom-client.xml deleted file mode 100644 index 5ed16699f8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/custom-server.xml deleted file mode 100644 index 2a603131a6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/custom-server.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/jakartaEE.tokens deleted file mode 100644 index e4fc6ddc26..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlreferenceparamstest") -SERVICE=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.refps.AddNumbersService -SEI=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.refps.AddNumbersPortType -IMPL=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.refps.AddNumbersImpl -URLALIAS=/jaxws/AddNumbers -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.refps.AddNumbersImpl -NAMESPACEURI=http://example.com -PORT=AddNumbersPort -WEBSERVICEDESCRIPTION=AddNumbersService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlreferenceparamstest -SERVICEREFNAMEWSEJB=service/wsw2jdlreferenceparamstest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlreferenceparamstest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/standalone-sun-jaxws.xml deleted file mode 100644 index 698d2a2bf8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/standalone.web.xml deleted file mode 100644 index 6da8fac4d6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/refps/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSAW2JDLReferenceParamsTest - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddNumbers - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbers - /jaxws/AddNumbers - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/AddNumbersImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/AddNumbersImpl.java deleted file mode 100644 index 0ba2640296..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/AddNumbersImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: AddNumbersImpl.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; - -@WebService(portName = "AddNumbersPort", serviceName = "AddNumbersService", targetNamespace = "http://example.com/", wsdlLocation = "WEB-INF/wsdl/WSAW2JDLRequiredFalseTest.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse.AddNumbersPortType") -public class AddNumbersImpl { - - public int addNumbers(int number1, int number2) - throws AddNumbersFault_Exception { - return doStuff(number1, number2); - } - - public int addNumbers2(int number1, int number2) - throws AddNumbersFault_Exception { - return doStuff(number1, number2); - } - - public int addNumbers3(int number1, int number2) - throws AddNumbersFault_Exception { - return doStuff(number1, number2); - } - - public int addNumbers4(int number1, int number2) - throws AddNumbersFault_Exception { - return doStuff(number1, number2); - } - - public int addNumbers5(int number1, int number2) - throws AddNumbersFault_Exception { - return doStuff(number1, number2); - } - - public int addNumbers6(int number1, int number2) - throws AddNumbersFault_Exception { - return doStuff(number1, number2); - } - - public int addNumbers7(int number1, int number2) - throws AddNumbersFault_Exception { - return doStuff(number1, number2); - } - - public int addNumbers8(int number1, int number2) - throws AddNumbersFault_Exception { - return doStuff(number1, number2); - } - - int doStuff(int number1, int number2) throws AddNumbersFault_Exception { - if (number1 < 0 || number2 < 0) { - ObjectFactory of = new ObjectFactory(); - AddNumbersFault fb = of.createAddNumbersFault(); - fb.setDetail("Negative numbers cant be added!"); - fb.setMessage("Numbers: " + number1 + ", " + number2); - throw new AddNumbersFault_Exception(fb.getMessage(), fb); - } - return number1 + number2; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/Client.java deleted file mode 100644 index f82d22e83c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/Client.java +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; - -import java.net.URL; - -import java.util.Properties; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse."; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsaw2jdlrequiredfalsetest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsaw2jdlrequiredfalsetest.wsdlloc.1"; - - private String url = null; - - // service and port information - private static final String NAMESPACEURI = "http://example.com/"; - - private static final String SERVICE_NAME = "AddNumbersService"; - - private static final String PORT_NAME = "AddNumbersPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private URL wsdlurl = null; - - AddNumbersPortType port = null; - - static AddNumbersService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (AddNumbersPortType) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - AddNumbersService.class, PORT_QNAME, AddNumbersPortType.class); - TestUtil.logMsg("port=" + port); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (AddNumbersPortType) service.getAddNumbersPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (AddNumbersService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: testDefaultActions - * - * @assertion_ids: WSAMD:SPEC:3000; WSAMD:SPEC:3000.1; WSAMD:SPEC:3000.2; - * WSAMD:SPEC:3000.3; WSAMD:SPEC:3000.4; WSAMD:SPEC:4004; WSAMD:SPEC:4004.1; - * WSAMD:SPEC:4004.2; - * - * @test_Strategy: - * - */ - public void testDefaultActions() throws Fault { - TestUtil.logMsg("testDefaultActions"); - boolean pass = true; - - try { - int result = port.addNumbers(10, 10); - if (result != 20) { - TestUtil.logErr("result mismatch, expected 20, received " + result); - pass = false; - } else - TestUtil.logMsg("result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testDefaultActions failed", e); - } - - if (!pass) - throw new Fault("testDefaultActions failed"); - } - - /* - * @testName: testActionWithExplicitNames - * - * @assertion_ids: WSAMD:SPEC:3000; WSAMD:SPEC:3000.1; WSAMD:SPEC:3000.2; - * WSAMD:SPEC:3000.3; WSAMD:SPEC:3000.4; WSAMD:SPEC:4004; - * - * @test_Strategy: - * - */ - public void testActionWithExplicitNames() throws Fault { - TestUtil.logMsg("testActionWithExplicitNames"); - boolean pass = true; - - try { - int result = port.addNumbers2(10, 10); - if (result != 20) { - TestUtil.logErr("result mismatch, expected 20, received " + result); - pass = false; - } else - TestUtil.logMsg("result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testActionWithExplicitNames failed", e); - } - - if (!pass) - throw new Fault("testActionWithExplicitNames failed"); - } - - /* - * @testName: testActionWithInputNameOnly - * - * @assertion_ids: WSAMD:SPEC:3000; WSAMD:SPEC:3000.1; WSAMD:SPEC:3000.2; - * WSAMD:SPEC:3000.3; WSAMD:SPEC:3000.4; WSAMD:SPEC:4004; WSAMD:SPEC:4004.2; - * - * @test_Strategy: - * - */ - public void testActionWithInputNameOnly() throws Fault { - TestUtil.logMsg("testActionWithInputNameOnly"); - boolean pass = true; - - try { - int result = port.addNumbers3(10, 10); - if (result != 20) { - TestUtil.logErr("result mismatch, expected 20, received " + result); - pass = false; - } else - TestUtil.logMsg("result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testActionWithInputNameOnly failed", e); - } - - if (!pass) - throw new Fault("testActionWithInputNameOnly failed"); - } - - /* - * @testName: testActionWithOutputNameOnly - * - * @assertion_ids: WSAMD:SPEC:3000; WSAMD:SPEC:3000.1; WSAMD:SPEC:3000.2; - * WSAMD:SPEC:3000.3; WSAMD:SPEC:3000.4; WSAMD:SPEC:4004; WSAMD:SPEC:4004.1; - * - * @test_Strategy: - * - */ - public void testActionWithOutputNameOnly() throws Fault { - TestUtil.logMsg("testActionWithOutputNameOnly"); - boolean pass = true; - - try { - int result = port.addNumbers4(10, 10); - if (result != 20) { - TestUtil.logErr("result mismatch, expected 20, received " + result); - pass = false; - } else - TestUtil.logMsg("result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testActionWithOutputNameOnly failed", e); - } - - if (!pass) - throw new Fault("testActionWithOutputNameOnly failed"); - } - - /* - * @testName: testExplicitActionsBoth - * - * @assertion_ids: WSAMD:SPEC:3000; WSAMD:SPEC:3000.1; WSAMD:SPEC:3000.2; - * WSAMD:SPEC:3000.3; WSAMD:SPEC:3000.4; WSAMD:SPEC:4003; WSAMD:SPEC:4003.1; - * WSAMD:SPEC:4003.2; - * - * @test_Strategy: - * - */ - public void testExplicitActionsBoth() throws Fault { - TestUtil.logMsg("testExplicitActionsBoth"); - boolean pass = true; - - try { - int result = port.addNumbers5(10, 10); - if (result != 20) { - TestUtil.logErr("result mismatch, expected 20, received " + result); - pass = false; - } else - TestUtil.logMsg("result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testExplicitActionsBoth failed", e); - } - - if (!pass) - throw new Fault("testExplicitActionsBoth failed"); - } - - /* - * @testName: testExplicitActionsInputOnly - * - * @assertion_ids: WSAMD:SPEC:3000; WSAMD:SPEC:3000.1; WSAMD:SPEC:3000.2; - * WSAMD:SPEC:3000.3; WSAMD:SPEC:3000.4; WSAMD:SPEC:4000; WSAMD:SPEC:4003; - * WSAMD:SPEC:4003.1; - * - * @test_Strategy: - * - */ - public void testExplicitActionsInputOnly() throws Fault { - TestUtil.logMsg("testExplicitActionsInputOnly"); - boolean pass = true; - - try { - int result = port.addNumbers6(10, 10); - if (result != 20) { - TestUtil.logErr("result mismatch, expected 20, received " + result); - pass = false; - } else - TestUtil.logMsg("result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testExplicitActionsInputOnly failed", e); - } - - if (!pass) - throw new Fault("testExplicitActionsInputOnly failed"); - } - - /* - * @testName: testExplicitActionsOutputOnly - * - * @assertion_ids: WSAMD:SPEC:3000; WSAMD:SPEC:3000.1; WSAMD:SPEC:3000.2; - * WSAMD:SPEC:3000.3; WSAMD:SPEC:3000.4; WSAMD:SPEC:4000; WSAMD:SPEC:4003; - * WSAMD:SPEC:4003.2; - * - * @test_Strategy: - * - */ - public void testExplicitActionsOutputOnly() throws Fault { - TestUtil.logMsg("testExplicitActionsOutputOnly"); - boolean pass = true; - - try { - int result = port.addNumbers7(10, 10); - if (result != 20) { - TestUtil.logErr("result mismatch, expected 20, received " + result); - pass = false; - } else - TestUtil.logMsg("result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("testExplicitActionsOutputOnly failed", e); - } - - if (!pass) - throw new Fault("testExplicitActionsOutputOnly failed"); - } - - /* - * @testName: TestEmptyActions - * - * @assertion_ids: WSAMD:SPEC:3000; WSAMD:SPEC:3000.1; WSAMD:SPEC:3000.2; - * WSAMD:SPEC:3000.3; WSAMD:SPEC:3000.4; WSAMD:SPEC:4004; WSAMD:SPEC:4003; - * WSAMD:SPEC:4003.1; WSAMD:SPEC:4003.2; - * - * @test_Strategy: - * - */ - public void TestEmptyActions() throws Fault { - TestUtil.logMsg("TestEmptyActions"); - boolean pass = true; - - try { - int result = port.addNumbers8(10, 10); - if (result != 20) { - TestUtil.logErr("result mismatch, expected 20, received " + result); - pass = false; - } else - TestUtil.logMsg("result match"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestEmptyActions failed", e); - } - - if (!pass) - throw new Fault("TestEmptyActions failed"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/ClientSOAPHandler.java deleted file mode 100644 index 8753b19704..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/ClientSOAPHandler.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import com.sun.ts.lib.util.*; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", action=" + action + "]"); - if (oper.equals("addNumbersResponse")) { - if (!action.equals(TestConstants.ADD_NUMBERS_OUT_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers2Response")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_OUT_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers3Response")) { - if (!action.equals(TestConstants.ADD_NUMBERS3_OUT_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers4Response")) { - if (!action.equals(TestConstants.ADD_NUMBERS4_OUT_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers5Response")) { - if (!action.equals(TestConstants.ADD_NUMBERS5_OUT_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers6Response")) { - if (!action.equals(TestConstants.ADD_NUMBERS6_OUT_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers7Response")) { - if (!action.equals(TestConstants.ADD_NUMBERS7_OUT_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers8Response")) { - if (!action.equals(TestConstants.ADD_NUMBERS8_OUT_ACTION)) { - throw new ActionNotSupportedException(action); - } - } - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/ServerSOAPHandler.java deleted file mode 100644 index 19d7598329..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/ServerSOAPHandler.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import com.sun.ts.lib.util.*; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (oper.equals("addNumbers")) { - if (!action.equals(TestConstants.ADD_NUMBERS_IN_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers2")) { - if (!action.equals(TestConstants.ADD_NUMBERS2_IN_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers3")) { - if (!action.equals(TestConstants.ADD_NUMBERS3_IN_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers4")) { - if (!action.equals(TestConstants.ADD_NUMBERS4_IN_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers5")) { - if (!action.equals(TestConstants.ADD_NUMBERS5_IN_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers6")) { - if (!action.equals(TestConstants.ADD_NUMBERS6_IN_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers7")) { - if (!action.equals(TestConstants.ADD_NUMBERS7_IN_ACTION)) { - throw new ActionNotSupportedException(action); - } - } else if (oper.equals("addNumbers8")) { - if (!action.equals(TestConstants.ADD_NUMBERS8_IN_ACTION)) { - throw new ActionNotSupportedException(action); - } - } - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/TestConstants.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/TestConstants.java deleted file mode 100644 index 901778bc2d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/TestConstants.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse; - -public interface TestConstants { - public static final String ADD_NUMBERS_IN_ACTION = "http://example.com/AddNumbersPortType/addNumbersRequest"; - - public static final String ADD_NUMBERS2_IN_ACTION = "http://example.com/AddNumbersPortType/add2In"; - - public static final String ADD_NUMBERS3_IN_ACTION = "http://example.com/AddNumbersPortType/add3"; - - public static final String ADD_NUMBERS4_IN_ACTION = "http://example.com/AddNumbersPortType/addNumbers4Request"; - - public static final String ADD_NUMBERS5_IN_ACTION = "5in"; - - public static final String ADD_NUMBERS6_IN_ACTION = "6in"; - - public static final String ADD_NUMBERS7_IN_ACTION = "http://example.com/AddNumbersPortType/addNumbers7Request"; - - public static final String ADD_NUMBERS8_IN_ACTION = "http://example.com/AddNumbersPortType/addNumbers8Request"; - - public static final String ADD_NUMBERS_OUT_ACTION = "http://example.com/AddNumbersPortType/addNumbersResponse"; - - public static final String ADD_NUMBERS2_OUT_ACTION = "http://example.com/AddNumbersPortType/add2Out"; - - public static final String ADD_NUMBERS3_OUT_ACTION = "http://example.com/AddNumbersPortType/addNumbers3Response"; - - public static final String ADD_NUMBERS4_OUT_ACTION = "http://example.com/AddNumbersPortType/add4"; - - public static final String ADD_NUMBERS5_OUT_ACTION = "5out"; - - public static final String ADD_NUMBERS6_OUT_ACTION = "http://example.com/AddNumbersPortType/addNumbers6Response"; - - public static final String ADD_NUMBERS7_OUT_ACTION = "7out"; - - public static final String ADD_NUMBERS8_OUT_ACTION = "http://example.com/AddNumbersPortType/addNumbers8Response"; -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/WSAW2JDLRequiredFalseTest.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/WSAW2JDLRequiredFalseTest.wsdl deleted file mode 100644 index c1133f6f38..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/WSAW2JDLRequiredFalseTest.wsdl +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/build.xml deleted file mode 100644 index 3aaff145ea..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/build.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/custom-client.xml deleted file mode 100644 index 181f342604..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/custom-client.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - ns2:AddNumbersPort - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse.ClientSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/custom-server.xml deleted file mode 100644 index 2d72a67964..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/custom-server.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - ns2:AddNumbersPort - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse.ServerSOAPHandler - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/jakartaEE.tokens deleted file mode 100644 index 62cdc8aeb2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdlrequiredfalsetest") -SERVICE=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse.AddNumbersService -SEI=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse.AddNumbersPortType -IMPL=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse.AddNumbersImpl -URLALIAS=/jaxws/AddNumbers -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.requiredfalse.AddNumbersImpl -NAMESPACEURI=http://example.com/ -PORT=AddNumbersPort -WEBSERVICEDESCRIPTION=AddNumbersService -SERVICEREFNAMEWSSERVLET=service/wsw2jdlrequiredfalsetest -SERVICEREFNAMEWSEJB=service/wsw2jdlrequiredfalsetest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdlrequiredfalsetest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/standalone-sun-jaxws.xml deleted file mode 100644 index d903021247..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/standalone.web.xml deleted file mode 100644 index 4f04ad2341..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/requiredfalse/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSAW2JDLRequiredFalseTest - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - AddNumbers - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - AddNumbers - /jaxws/AddNumbers - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/Client.java deleted file mode 100644 index 05b63597ba..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/Client.java +++ /dev/null @@ -1,600 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 52702 2007-02-13 17:07:20Z adf $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.xml.ws.soap.SOAPFaultException; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -import java.net.URL; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.AddressingFeature; -import jakarta.xml.ws.RespectBindingFeature; - -import java.util.Properties; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature."; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL2 = "wsaw2jdlrespectbindingfeature.endpoint.1"; - - private static final String ENDPOINT_URL21 = "wsaw2jdlrespectbindingfeature.endpoint.2"; - - private static final String ENDPOINT_URL3 = "wsaw2jdlrespectbindingfeature.endpoint.3"; - - private static final String ENDPOINT_URL31 = "wsaw2jdlrespectbindingfeature.endpoint.4"; - - private static final String WSDLLOC_URL = "wsaw2jdlrespectbindingfeature.wsdlloc.2"; - - // service and port information - private static final String NAMESPACEURI = "http://respectbindingfeatureservice.org/wsdl"; - - private static final String SERVICE_NAME = "RespectBindingFeatureTestService"; - - private static final String PORT_NAME2 = "RespectBindingFeatureTest2Port"; - - private static final String PORT_NAME21 = "RespectBindingFeatureTest21Port"; - - private static final String PORT_NAME3 = "RespectBindingFeatureTest3Port"; - - private static final String PORT_NAME31 = "RespectBindingFeatureTest31Port"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME2 = new QName(NAMESPACEURI, PORT_NAME2); - - private QName PORT_QNAME21 = new QName(NAMESPACEURI, PORT_NAME21); - - private QName PORT_QNAME3 = new QName(NAMESPACEURI, PORT_NAME3); - - private QName PORT_QNAME31 = new QName(NAMESPACEURI, PORT_NAME31); - - private String url2 = null; - - private String url21 = null; - - private String url3 = null; - - private String url31 = null; - - private URL wsdlurl = null; - - private String ctxroot = null; - - private RespectBindingFeatureTest2 port4a = null; - - private RespectBindingFeatureTest2 port5a = null; - - private RespectBindingFeatureTest2 port6a = null; - - private RespectBindingFeatureTest3 port7a = null; - - private RespectBindingFeatureTest3 port8a = null; - - private WebServiceFeature[] nonEnabledAddressingEnabledRespectBindingwsf = { - new AddressingFeature(false), new RespectBindingFeature(true) }; - - private WebServiceFeature[] enabledRequiredAddressingEnabledRespectBindingwsf = { - new AddressingFeature(true, true), new RespectBindingFeature(true) }; - - private WebServiceFeature[] enabledNotRequiredAddressingEnabledRespectBindingwsf = { - new AddressingFeature(true, false), new RespectBindingFeature(true) }; - - static RespectBindingFeatureTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL2); - url2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL21); - url21 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL3); - url3 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL31); - url31 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL2: " + url2); - TestUtil.logMsg("Service Endpoint URL21: " + url21); - TestUtil.logMsg("Service Endpoint URL3: " + url3); - TestUtil.logMsg("Service Endpoint URL31: " + url31); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - /************************************************************************************************* - * Table to cover RespectBinding/RespectBindingFeature which has only - * enabled/disabled param. - * - * These scenarios exist for RespectBinding/RespectBindingFeatures (using - * addressingfeature tests (scenarios) as my starting point and converting - * that test into RespectBinding/Feature by copying and modifying it - * appropriately corresponding to this scenario table): - * - * There exist the following 20+ scenarios for RespectBindingFeature: - * - * ------------------- ------------------- --------------------- - * --------------- Client Server RespectBindingFeature Expected Result - * ------------------- ------------------- --------------------- - * --------------- 1). Enabled/NotRequired Enabled/NotRequired N/A N/A-not TCK - * test 2). Enabled/Required Enabled/NotRequired N/A N/A-not TCK test 3). - * NotEnabled Enabled/NotRequired N/A N/A-not TCK test 4a) Enabled/NotRequired - * Enabled/Required S-Enabled/C-Enabled Expect No Error 4b) - * Enabled/NotRequired Enabled/Required S-Enabled/C-Disabled N/A-not TCK test - * 4c) Enabled/NotRequired Enabled/Required S-Disabled/C-Enabled N/A-not TCK - * test 4d) Enabled/NotRequired Enabled/Required S-Disabled/C-Disabled N/A-not - * TCK test 5a) Enabled/Required Enabled/Required S-Enabled/C-Enabled Expect - * No Error 5b) Enabled/Required Enabled/Required S-Enabled/C-Disabled N/A-not - * TCK test 5c) Enabled/Required Enabled/Required S-Disabled/C-Enabled N/A-not - * TCK test 5d) Enabled/Required Enabled/Required S-Disabled/C-Disabled - * N/A-not TCK test 6a) NotEnabled Enabled/Required S-Enabled/C-Enabled Expect - * Exception 6b) NotEnabled Enabled/Required S-Enabled/C-Disabled N/A-not TCK - * test 6c) NotEnabled Enabled/Required S-Disabled/C-Enabled N/A-not TCK test - * 6d) NotEnabled Enabled/Required S-Disabled/C-Disabled N/A-not TCK test 7a) - * Enabled/NotRequired NotEnabled S-Enabled/C-Enabled Expect No Error 7b) - * Enabled/NotRequired NotEnabled S-Enabled/C-Disabled N/A-not TCK test 7c) - * Enabled/NotRequired NotEnabled S-Disabled/C-Enabled N/A-not TCK test 7d) - * Enabled/NotRequired NotEnabled S-Disabled/C-Disabled N/A-not TCK test 8a) - * Enabled/Required NotEnabled S-Enabled/C-Enabled Expect Exception 8b) - * Enabled/Required NotEnabled S-Enabled/C-Disabled N/A-not TCK test 8c) - * Enabled/Required NotEnabled S-Disabled/C-Enabled N/A-not TCK test 8d) - * Enabled/Required NotEnabled S-Disabled/C-Disabled N/A-not TCK test - * - * test scenarios 4a-b, 5a-b, 6a-b use port2 test scenarios 4c-d, 5c-d, 6c-d - * use port21 test scenarios 7a-b, 8a-b use port3 test scenarios 7c-d, 8c-d - * use port31 - * - * where port2 is configured via- WSDL: Impl2.java: - * - * @BindingType(value=SOAPBinding.SOAP11HTTP_BINDING) @RespectBinding(enabled=true) - * - * where port21 is - * configured via- WSDL: - * - * Impl21.java: - * @BindingType(value=SOAPBinding.SOAP11HTTP_BINDING) @RespectBinding(enabled=false) - * - * where port3 is - * configured via- WSDL: - * - * Impl3.java: - * @BindingType(value=SOAPBinding.SOAP11HTTP_BINDING) @Addressing(enabled=false) @RespectBinding(enabled=true) - * - * where port31 is - * configured via- WSDL: - * - * Impl31.java: @BindingType(value=SOAPBinding.SOAP11HTTP_BINDING) @Addressing(enabled=false) @RespectBinding(enabled=false) - *************************************************************************************************/ - - private void getPortStandalone() throws Exception { - TestUtil.logMsg( - "******************************Retrieving Port 4a************************\n"); - // client side Addressing enabled/NotRequired; server side - // Addressing/Required - port4a = (RespectBindingFeatureTest2) JAXWS_Util.getPort(wsdlurl, - SERVICE_QNAME, RespectBindingFeatureTestService.class, PORT_QNAME2, - RespectBindingFeatureTest2.class, - enabledNotRequiredAddressingEnabledRespectBindingwsf); - JAXWS_Util.setTargetEndpointAddress(port4a, url2); - - TestUtil.logMsg( - "******************************Retrieving Port 5a************************\n"); - // client side Addressing enabled/Required; server side Addressing/Required - port5a = (RespectBindingFeatureTest2) JAXWS_Util.getPort(wsdlurl, - SERVICE_QNAME, RespectBindingFeatureTestService.class, PORT_QNAME2, - RespectBindingFeatureTest2.class, - enabledRequiredAddressingEnabledRespectBindingwsf); - JAXWS_Util.setTargetEndpointAddress(port5a, url2); - - TestUtil.logMsg( - "******************************Retrieving Port 6a************************\n"); - // client side Addressing off; server side Addressing/Required - port6a = (RespectBindingFeatureTest2) JAXWS_Util.getPort(wsdlurl, - SERVICE_QNAME, RespectBindingFeatureTestService.class, PORT_QNAME2, - RespectBindingFeatureTest2.class, - nonEnabledAddressingEnabledRespectBindingwsf); - JAXWS_Util.setTargetEndpointAddress(port6a, url2); - - TestUtil.logMsg( - "******************************Retrieving Port 7a************************\n"); - // client side Addressing enabled/NotRequired; server side off (in WSDL - // enabled, but overridden to false in IMPL to turn it off) - port7a = (RespectBindingFeatureTest3) JAXWS_Util.getPort(wsdlurl, - SERVICE_QNAME, RespectBindingFeatureTestService.class, PORT_QNAME3, - RespectBindingFeatureTest3.class, - enabledNotRequiredAddressingEnabledRespectBindingwsf); - JAXWS_Util.setTargetEndpointAddress(port7a, url3); - - TestUtil.logMsg( - "******************************Retrieving Port 8a************************\n"); - // client side Addressing enabled/Required; server side off (in WSDL - // enabled, but overridden to false in IMPL to turn it off) - port8a = (RespectBindingFeatureTest3) JAXWS_Util.getPort(wsdlurl, - SERVICE_QNAME, RespectBindingFeatureTestService.class, PORT_QNAME3, - RespectBindingFeatureTest3.class, - enabledRequiredAddressingEnabledRespectBindingwsf); - JAXWS_Util.setTargetEndpointAddress(port8a, url3); - - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - - port4a = (RespectBindingFeatureTest2) service.getPort( - RespectBindingFeatureTest2.class, - enabledNotRequiredAddressingEnabledRespectBindingwsf); - port5a = (RespectBindingFeatureTest2) service.getPort( - RespectBindingFeatureTest2.class, - enabledRequiredAddressingEnabledRespectBindingwsf); - port6a = (RespectBindingFeatureTest2) service.getPort( - RespectBindingFeatureTest2.class, - nonEnabledAddressingEnabledRespectBindingwsf); - port7a = (RespectBindingFeatureTest3) service.getPort( - RespectBindingFeatureTest3.class, - enabledNotRequiredAddressingEnabledRespectBindingwsf); - port8a = (RespectBindingFeatureTest3) service.getPort( - RespectBindingFeatureTest3.class, - enabledRequiredAddressingEnabledRespectBindingwsf); - - // debug dumping of ports - Object[] portsTodump = new Object[] { port4a, port5a, port6a, port7a, - port8a }; - dumpTargetEndpointAddressForPort(portsTodump); - } - - private void dumpTargetEndpointAddressForPort(Object[] portsTodump) { - try { - for (int i = 0; i < portsTodump.length; i++) { - TestUtil.logMsg("port=" + portsTodump[i]); - TestUtil.logMsg("Obtained port" + i); - JAXWS_Util.dumpTargetEndpointAddress(portsTodump[i]); - } - } catch (java.lang.Exception e) { - TestUtil.printStackTrace(e); - TestUtil.logErr("Error dumping EndpointAddress for port"); - } - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) { - pass = false; - } else if (hostname.equals("")) { - pass = false; - } - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (RespectBindingFeatureTestService) getSharedObject(); - // service = (AddNumbersService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: afCltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.2; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6011; JAXWS:SPEC:6011.2; JAXWS:SPEC:6012; JAXWS:SPEC:6012.1; - * JAXWS:SPEC:6012.2; JAXWS:SPEC:6012.4; JAXWS:SPEC:6012.5; JAXWS:SPEC:7022; - * JAXWS:SPEC:7022.1; JAXWS:SPEC:7022; JAXWS:JAVADOC:189; - * - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client - * Enabled/NotRequired, Server Enabled/Required; RespectBinding Server - * Enabled, Client Enabled. Addressing headers MUST be present on SOAPRequest - * and SOAPResponse. - */ - public void afCltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabledTest() - throws Fault { - TestUtil - .logMsg("afCltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - TestUtil.logMsg( - "Verify Addressing headers are present on SOAPRequest and SOAPResponse"); - boolean pass = true; - try { - // 4a) Enabled/NotRequired Enabled/Required S-Enabled/C-Enabled - port4a.addNumbers( - new Holder( - "afCltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"), - 10, 10); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "afCltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabledTest failed", - e); - } - - if (!pass) { - throw new Fault( - "afCltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabledTest failed"); - } - } - - /* - * @testName: afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.2; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6011; JAXWS:SPEC:6011.2; JAXWS:SPEC:6012; JAXWS:SPEC:6012.1; - * JAXWS:SPEC:6012.2; JAXWS:SPEC:6012.4; JAXWS:SPEC:6012.5; JAXWS:SPEC:7022; - * JAXWS:SPEC:7022.1; JAXWS:JAVADOC:189; - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client - * Enabled/Required, Server Enabled/Required; RespectBinding Server Enabled, - * Client Enabled. Addressing headers MUST be present on SOAPRequest and - * SOAPResponse. - */ - public void afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest() - throws Fault { - TestUtil.logMsg("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - TestUtil.logMsg( - "Verify Addressing headers are present on SOAPRequest and SOAPResponse"); - boolean pass = true; - try { - // 5a) Enabled/Required Enabled/Required S-Enabled/C-Enabled - port5a.addNumbers( - new Holder("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"), - 10, 10); - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest failed", e); - } - - if (!pass) { - throw new Fault( - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest failed"); - } - } - - /* - * @testName: afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.3; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6011; JAXWS:SPEC:6011.2; JAXWS:SPEC:6012; JAXWS:SPEC:6012.1; - * JAXWS:SPEC:6012.3; JAXWS:SPEC:6012.5; JAXWS:SPEC:7022; JAXWS:SPEC:7022.1; - * JAXWS:JAVADOC:189; - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client NotEnabled, - * Server Enabled/Required; RespectBinding Server Enabled, Client Enabled. - * This scenario MUST throw back a SOAP Fault. Make sure the SOAP Fault has - * the correct information in it. The SOAP Fault faultcode must be: - * MessageAddressingHeaderRequired. - */ - public void afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest() - throws Fault { - TestUtil.logMsg("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - TestUtil.logMsg( - "Verify MessageAddressingHeaderRequired soap fault is thrown by endpoint"); - boolean pass = true; - try { - // 6a) NotEnabled Enabled/Required S-Enabled/C-Enabled - port6a.addNumbers( - new Holder("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest"), - 10, 10); - TestUtil.logErr("SOAPFaultException was not thrown back"); - pass = false; - } catch (SOAPFaultException sfe) { - try { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - String faultString = WsaSOAPUtils.getFaultString(sfe); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil.logErr("FaultString MUST EXIST via SOAP Specification"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("FaultDetail MUST NOT EXIST via SOAP Specification"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - throw new Fault( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest failed", - e2); - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest failed", e); - } - - if (!pass) { - throw new Fault( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest failed"); - } - } - - /* - * @testName: afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.2; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6012.2; JAXWS:SPEC:6012.3; JAXWS:SPEC:6012.4; JAXWS:SPEC:6012.6; - * JAXWS:SPEC:6016.1; JAXWS:SPEC:7020; JAXWS:SPEC:7020.1; JAXWS:JAVADOC:191; - * JAXWS:SPEC:7022; JAXWS:SPEC:7022.1; JAXWS:JAVADOC:189; - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client - * Enabled/NotRequired, Server NotEnabled; RespectBinding Server Enabled, - * Client Enabled. Addressing headers MAY be present on SOAPRequest and MUST - * NOT be present on SOAPResponse - */ - public void afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() - throws Fault { - TestUtil - .logMsg("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - TestUtil.logMsg( - "Verify Addressing headers are present on SOAPRequest and not present on SOAPResponse"); - boolean pass = true; - try { - // 7a) Enabled/NotRequired NotEnabled S-Enabled/C-Enabled - port7a.addNumbers( - new Holder( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"), - 10, 10); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest failed", - e); - } - - if (!pass) { - throw new Fault( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest failed"); - } - } - - /* - * @testName: afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WSAMD:SPEC:3001.1; WSAMD:SPEC:3001.2; WSAMD:SPEC:3001.4; - * JAXWS:SPEC:6012.2; JAXWS:SPEC:6012.3; JAXWS:SPEC:6012.4; JAXWS:SPEC:6012.6; - * JAXWS:SPEC:6016.1; JAXWS:SPEC:7020; JAXWS:SPEC:7020.1; JAXWS:JAVADOC:191; - * JAXWS:SPEC:7022; JAXWS:SPEC:7022.1; JAXWS:JAVADOC:189; - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client - * Enabled/Required, Server NotEnabled; RespectBinding Server Enabled, Client - * Enabled. This scenario MUST throw back a WebServiceException. - */ - public void afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() - throws Fault { - TestUtil.logMsg("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - TestUtil.logMsg("Verify WebServiceException thrown"); - boolean pass = true; - try { - // 8a) Enabled/Required NotEnabled S-Enabled/C-Enabled - port8a.addNumbers( - new Holder("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"), - 10, 10); - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest failed", e); - } - - if (!pass) { - throw new Fault( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest failed"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/ClientSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/ClientSOAPHandler.java deleted file mode 100644 index 1fc63f3359..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/ClientSOAPHandler.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature; - -import com.sun.ts.lib.util.TestUtil; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -import jakarta.xml.soap.SOAPException; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - // figure out which testname i'm checking for and call appropropriate - // verify*(...) - if (Handler_Util.checkForMsg(context, - "afCltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - verifyCltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabled(context, - action); - } else if (Handler_Util.checkForMsg(context, - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - verifyCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabled(context, action); - } else if (Handler_Util.checkForMsg(context, - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - verifyCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabled(context, action); - } else if (Handler_Util.checkForMsg(context, - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) { - verifyCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabled(context, - action); - } else if (Handler_Util.checkForMsg(context, - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) { - verifyCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabled(context, action); - } else { - if (action.equals(TestConstants.ADD_NUMBERS_IN_ACTION_URI)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS_IN_ACTION_URI + ", Actual:" + action); - } - } - } - - private void verifyCltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for - // CltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabled here... - checkAddressingHeadersExist(context, action); - } - - private void verifyCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for - // CltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabled here... - checkAddressingHeadersExist(context, action); - } - - private void verifyCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for - // CltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabled here... - checkAddressingHeadersExist(context, action); - } - - private void verifyCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for - // CltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabled here... - checkAddressingHeadersDoNotExist(context, action); - } - - private void verifyCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for - // CltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabled here... - checkAddressingHeadersDoNotExist(context, action); - } - - private void verifyAction(String action) { - TestUtil.logMsg("ClientSOAPHandler.verifyAction: [action=" + action + "]"); - if (!TestConstants.ADD_NUMBERS_OUT_ACTION.equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS_OUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersExist"); - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersDoNotExist"); - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundRelatesToDoesNotExist(context); - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - try { - return super.getAction(context); - } catch (Exception e) { - return null; - } - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureException.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureException.java deleted file mode 100644 index b76df384c1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureException.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: RespectBindingFeatureException.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature; - -import jakarta.xml.ws.WebServiceException; - -public class RespectBindingFeatureException extends WebServiceException { - String detail; - - public RespectBindingFeatureException(String message) { - super(message); - } - - public RespectBindingFeatureException(String message, String detail) { - super(message); - this.detail = detail; - } - - public String getDetail() { - return detail; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestImpl2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestImpl2.java deleted file mode 100644 index c800f7e07a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestImpl2.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: RespectBindingFeatureTestImpl2.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.RespectBinding; - -@WebService(portName = "RespectBindingFeatureTest2Port", serviceName = "RespectBindingFeatureTestService", targetNamespace = "http://respectbindingfeatureservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/RespectBindingFeatureTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTest2") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@RespectBinding(enabled = true) - -public class RespectBindingFeatureTestImpl2 - implements RespectBindingFeatureTest2 { - - public int addNumbers(Holder testname, int number1, int number2) { - if (number1 < 0 || number2 < 0) { - throw new RespectBindingFeatureException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestImpl21.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestImpl21.java deleted file mode 100644 index b1ba5c02e7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestImpl21.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: RespectBindingFeatureTestImpl21.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.RespectBinding; - -@WebService(portName = "RespectBindingFeatureTest21Port", serviceName = "RespectBindingFeatureTestService", targetNamespace = "http://respectbindingfeatureservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/RespectBindingFeatureTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTest21") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@RespectBinding(enabled = false) - -public class RespectBindingFeatureTestImpl21 - implements RespectBindingFeatureTest21 { - - public int addNumbers(Holder testname, int number1, int number2) { - if (number1 < 0 || number2 < 0) { - throw new RespectBindingFeatureException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestImpl3.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestImpl3.java deleted file mode 100644 index 9388006b76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestImpl3.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: RespectBindingFeatureTestImpl3.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.RespectBinding; - -@WebService(portName = "RespectBindingFeatureTest3Port", serviceName = "RespectBindingFeatureTestService", targetNamespace = "http://respectbindingfeatureservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/RespectBindingFeatureTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTest3") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = false) -@RespectBinding(enabled = true) - -public class RespectBindingFeatureTestImpl3 - implements RespectBindingFeatureTest3 { - - public int addNumbers(Holder testname, int number1, int number2) { - if (number1 < 0 || number2 < 0) { - throw new RespectBindingFeatureException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestImpl31.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestImpl31.java deleted file mode 100644 index 5b8cf70534..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestImpl31.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: RespectBindingFeatureTestImpl31.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.RespectBinding; - -@WebService(portName = "RespectBindingFeatureTest31Port", serviceName = "RespectBindingFeatureTestService", targetNamespace = "http://respectbindingfeatureservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/RespectBindingFeatureTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTest31") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@Addressing(enabled = false) -@RespectBinding(enabled = false) - -public class RespectBindingFeatureTestImpl31 - implements RespectBindingFeatureTest31 { - - public int addNumbers(Holder testname, int number1, int number2) { - if (number1 < 0 || number2 < 0) { - throw new RespectBindingFeatureException( - "One of the numbers received was negative:" + number1 + ", " - + number2); - } - System.out.printf("Adding %s and %s\n", number1, number2); - return number1 + number2; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestService.wsdl deleted file mode 100644 index 150fca728f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/RespectBindingFeatureTestService.wsdl +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/ServerSOAPHandler.java deleted file mode 100644 index 364e3a59b2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/ServerSOAPHandler.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature; - -import com.sun.ts.lib.util.TestUtil; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; - -import jakarta.xml.soap.SOAPException; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - // figure out which testname i'm checking for and call appropropriate - // verify*(...) - if (Handler_Util.checkForMsg(context, - "afCltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - verifyCltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabled(context, - action); - } else if (Handler_Util.checkForMsg(context, - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - verifyCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabled(context, action); - } else if (Handler_Util.checkForMsg(context, - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - verifyCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabled(context, action); - } else if (Handler_Util.checkForMsg(context, - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) { - verifyCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabled(context, action); - } else { - if (TestConstants.ADD_NUMBERS_IN_ACTION_URI.equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS_IN_ACTION_URI + ", Actual:" + action); - - } - } - } - - private void verifyCltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for - // CltEnabledNotREQSvrEnabledREQrbfSvrEnabledCltEnabled here... - checkAddressingHeadersExist(context, action); - } - - private void verifyCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for - // CltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabled here... - checkAddressingHeadersExist(context, action); - } - - private void verifyCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for - // CltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabled here... - checkAddressingHeadersDoNotExist(context, action); - } - - private void verifyCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabled( - SOAPMessageContext context, String action) { - // verify specific headers for - // CltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabled here... - checkAddressingHeadersExist(context, action); - } - - private void verifyAction(String action) { - TestUtil.logMsg("ServerSOAPHandler.verifyAction: [action=" + action + "]"); - System.out - .println("ServerSOAPHandler.verifyAction: [action=" + action + "]"); - if (!TestConstants.ADD_NUMBERS_IN_ACTION.equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ADD_NUMBERS_IN_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersExist"); - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersDoNotExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersDoNotExist"); - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundMessageIdDoesNotExist(context); - checkInboundReplyToDoesNotExist(context); - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - try { - return super.getAction(context); - } catch (Exception e) { - return null; - } - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/TestConstants.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/TestConstants.java deleted file mode 100644 index c7256e59e0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/TestConstants.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2007-01-24 02:29:49Z lschwenk $ - */ -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature; - -public class TestConstants { - public static final String ADD_NUMBERS_IN_ACTION_URI = "http://respectbindingfeatureservice.org/AddNumbersPortType/addRequest"; - - public static final String ADD_NUMBERS_IN_ACTION = "inputAction"; - - public static final String ADD_NUMBERS_OUT_ACTION_URI = "http://respectbindingfeatureservice.org/AddNumbersPortType/addResponse"; - - public static final String ADD_NUMBERS_OUT_ACTION = "outputAction"; -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/build.xml deleted file mode 100644 index 02a3da07d6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/build.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/custom-client.xml deleted file mode 100644 index c339ae22cf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/custom-client.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.ClientSOAPHandler - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/custom-server.xml deleted file mode 100644 index d33298fe13..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/custom-server.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.ServerSOAPHandler - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/jakartaEE.tokens deleted file mode 100644 index 7672e5aa97..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/jakartaEE.tokens +++ /dev/null @@ -1,28 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsws2dlrespectbindingfeaturetest") -SERVICE=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTestService -IMPL=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTestImpl2 -IMPL2=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTestImpl21 -IMPL3=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTestImpl3 -IMPL4=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTestImpl31 -SEI=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTest2 -SEI2=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTest21 -SEI3=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTest3 -SEI4=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTest31 -NAMESPACEURI=http://respectbindingfeatureservice.org/wsdl -PORT=RespectBindingFeatureTest2Port -PORT2=RespectBindingFeatureTest21Port -PORT3=RespectBindingFeatureTest3Port -PORT4=RespectBindingFeatureTest31Port -URLALIAS=/jaxws/RespectBindingFeatureTest2 -URLALIAS2=/jaxws/RespectBindingFeatureTest21 -URLALIAS3=/jaxws/RespectBindingFeatureTest3 -URLALIAS4=/jaxws/RespectBindingFeatureTest31 -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTestImpl2 -SERVLETNAME2=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTestImpl21 -SERVLETNAME3=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTestImpl3 -SERVLETNAME4=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.respectbindingfeature.RespectBindingFeatureTestImpl31 -WEBSERVICEDESCRIPTION=RespectBindingFeatureTestService -SERVICEREFNAMEWSSERVLET=service/wsws2dlrespectbindingfeaturetest -SERVICEREFNAMEWSEJB=service/wsws2dlrespectbindingfeaturetest -SERVICEREFNAMEWSAPPCLIENT=service/wsws2dlrespectbindingfeaturetest - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/jakartaEE.web.xml deleted file mode 100644 index 090948745e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/jakartaEE.web.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME3@ - @IMPL3@ - 0 - - - @SERVLETNAME4@ - @IMPL4@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - @SERVLETNAME3@ - @URLALIAS3@ - - - @SERVLETNAME4@ - @URLALIAS4@ - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/standalone-sun-jaxws.xml deleted file mode 100644 index 50f4c0bf2f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/standalone-sun-jaxws.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/standalone.web.xml deleted file mode 100644 index a28b218384..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/respectbindingfeature/standalone.web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - WSW2JDLRespectBindingFeatureTestApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - RespectBindingFeatureTest2 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - RespectBindingFeatureTest21 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - RespectBindingFeatureTest3 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - RespectBindingFeatureTest31 - com.sun.xml.ws.transport.http.servlet.WSServlet - - - RespectBindingFeatureTest2 - /jaxws/RespectBindingFeatureTest2 - - - RespectBindingFeatureTest21 - /jaxws/RespectBindingFeatureTest21 - - - RespectBindingFeatureTest3 - /jaxws/RespectBindingFeatureTest3 - - - RespectBindingFeatureTest31 - /jaxws/RespectBindingFeatureTest31 - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/Client.java deleted file mode 100644 index 70ee371800..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/Client.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 51063 2006-08-11 19:56:36Z lschwenk $ - */ - -package com.sun.ts.tests.jaxws.wsa.w2j.document.literal.typesubstitution; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; - -import java.net.URL; - -import java.util.Properties; -import java.util.List; -import java.util.Iterator; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsa.w2j.document.literal.typesubstitution."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsaw2jdltypesubstitution.endpoint.1"; - - private static final String WSDLLOC_URL = "wsaw2jdltypesubstitution.wsdlloc.1"; - - private String url = null; - - // service and port information - private static final String NAMESPACEURI = "http://typesubstitution/wsdl"; - - private static final String SERVICE_NAME = "CarDealerService"; - - private static final String PORT_NAME = "CarDealerPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private URL wsdlurl = null; - - CarDealer port = null; - - static CarDealerService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPortStandalone() throws Exception { - port = (CarDealer) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - CarDealerService.class, PORT_QNAME, CarDealer.class); - TestUtil.logMsg("port=" + port); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (CarDealer) service.getCarDealerPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (CarDealerService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: getCars - * - * @assertion_ids: JAXWS:SPEC:2076; - * - * @test_Strategy: - * - */ - public void getCars() throws Fault { - TestUtil.logMsg("getCars"); - boolean pass = true; - - try { - List cars = port.getSedans(); - Iterator i = cars.iterator(); - int ncars = 0; - while (i.hasNext()) { - Car car = i.next(); - ncars++; - String make = car.getMake(); - String model = car.getModel(); - String year = car.getYear(); - String color; - TestUtil.logMsg("Make=" + make); - TestUtil.logMsg("Model=" + model); - TestUtil.logMsg("Year=" + year); - if (car instanceof Toyota) { - Toyota t = (Toyota) car; - color = t.getColor(); - TestUtil.logMsg("Color=" + color); - if (!make.equals("Toyota") && !model.equals("Camry") - && !year.equals("1998") && !color.equals("white")) { - TestUtil.logErr("data mismatch expected Toyota Camry 1998 white"); - pass = false; - } else - TestUtil.logMsg("Toyota car matches"); - } else if (car instanceof Ford) { - Ford t = (Ford) car; - color = t.getColor(); - TestUtil.logMsg("Color=" + color); - if (!make.equals("Ford") && !model.equals("Mustang") - && !year.equals("1999") && !color.equals("red")) { - TestUtil.logErr("data mismatch expected Ford Mustang 1999 red"); - pass = false; - } else - TestUtil.logMsg("Ford car matches"); - } else { - TestUtil.logErr("data mismatch - no car of this type expected"); - pass = false; - } - } - TestUtil.logMsg("List returned " + ncars + " cars"); - if (ncars != 2) { - TestUtil.logErr("expected only 2 cars"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("getCars failed", e); - } - - if (!pass) - throw new Fault("getCars failed"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/WSAW2JDLTypeSubstitutionTest.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/WSAW2JDLTypeSubstitutionTest.wsdl deleted file mode 100644 index da27a5b0bf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/WSAW2JDLTypeSubstitutionTest.wsdl +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/build.xml deleted file mode 100644 index 6e54ea6569..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/build.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/cars.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/cars.xsd deleted file mode 100644 index 7f24a3613c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/cars.xsd +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-client.xml deleted file mode 100644 index eada4350b4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-client.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-client2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-client2.xml deleted file mode 100644 index f6a9318cdd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-client2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-server.xml deleted file mode 100644 index fabef978df..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-server.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-server2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-server2.xml deleted file mode 100644 index f6a9318cdd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/custom-server2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/jakartaEE.tokens deleted file mode 100644 index 90de98605e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsw2jdltypesubstitutiontest") -SERVICE=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.typesubstitution.CarDealerService -SEI=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.typesubstitution.CarDealer -IMPL=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.typesubstitution.CarDealerImpl -URLALIAS=/jaxws/CarDealer -SERVLETNAME=com.sun.ts.tests.jaxws.wsa.w2j.document.literal.typesubstitution.CarDealerImpl -NAMESPACEURI=http://typesubstitution/wsdl -PORT=CarDealerPort -WEBSERVICEDESCRIPTION=CarDealerService -SERVICEREFNAMEWSSERVLET=service/wsw2jdltypesubstitutiontest -SERVICEREFNAMEWSEJB=service/wsw2jdltypesubstitutiontest -SERVICEREFNAMEWSAPPCLIENT=service/wsw2jdltypesubstitutiontest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/standalone-sun-jaxws.xml deleted file mode 100644 index d4783a4015..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/standalone.web.xml deleted file mode 100644 index 1283df4117..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsa/w2j/document/literal/typesubstitution/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSAW2JDLTypeSubstitutionTest - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - CarDealer - com.sun.xml.ws.transport.http.servlet.WSServlet - 1 - - - CarDealer - /jaxws/CarDealer - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/build.xml deleted file mode 100644 index babb0a5bb2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/NamespaceAttributeVerifier.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/NamespaceAttributeVerifier.java deleted file mode 100644 index 7c23475fd4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/NamespaceAttributeVerifier.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w; - -import java.net.MalformedURLException; -import java.net.URL; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -/** - */ -public class NamespaceAttributeVerifier - implements DescriptionConstants, SOAPConstants { - /** - * The document. - */ - private Document document; - - /** - * The requirement. - */ - private int requirement; - - /** - * The style (document or rpc). - */ - private String style; - - /** - * The WSDL targets. - */ - private String[] wsdlTargets; - - /** - * The SOAP targets. - */ - private String[] soapTargets; - - /** - * The forbidden flag. - */ - private boolean forbidden; - - /** - * - * @param document - * @param requirement - */ - public NamespaceAttributeVerifier(Document document, int requirement) { - super(); - this.document = document; - this.requirement = requirement; - } - - /** - * - * @throws EETest.Fault - */ - public void verify() throws EETest.Fault { - switch (requirement) { - case 2716: - style = SOAP_DOCUMENT; - wsdlTargets = new String[] { WSDL_INPUT_LOCAL_NAME, - WSDL_OUTPUT_LOCAL_NAME, WSDL_FAULT_LOCAL_NAME }; - soapTargets = new String[] { SOAP_BODY_LOCAL_NAME, SOAP_HEADER_LOCAL_NAME, - SOAP_HEADERFAULT_LOCAL_NAME, SOAP_FAULT_LOCAL_NAME }; - forbidden = true; - break; - - case 2717: - style = SOAP_RPC; - wsdlTargets = new String[] { WSDL_INPUT_LOCAL_NAME, - WSDL_OUTPUT_LOCAL_NAME }; - soapTargets = new String[] { SOAP_BODY_LOCAL_NAME }; - forbidden = false; - break; - - case 2726: - style = SOAP_RPC; - wsdlTargets = new String[] { WSDL_INPUT_LOCAL_NAME, - WSDL_OUTPUT_LOCAL_NAME, WSDL_FAULT_LOCAL_NAME }; - soapTargets = new String[] { SOAP_HEADER_LOCAL_NAME, - SOAP_HEADERFAULT_LOCAL_NAME, SOAP_FAULT_LOCAL_NAME }; - forbidden = true; - break; - - default: - throw new EETest.Fault( - "The requirement 'R" + requirement + "' not supported"); - } - - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - } - - protected void verifyBinding(Element binding) throws EETest.Fault { - Element soapBinding = DescriptionUtils.getChildElement(binding, - SOAP_NAMESPACE_URI, SOAP_BINDING_LOCAL_NAME); - if (soapBinding == null) { - return; - } - String style = soapBinding.getAttribute(SOAP_STYLE_ATTR); - if (!style.equals(this.style)) { - throw new EETest.Fault( - "The literal style attribute does not match, expected " + this.style - + "-literal, received " + style - + "-literal, no further parsing test failed ..."); - } - Element[] operations = DescriptionUtils.getChildElements(binding, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - verifyOperation(operations[i]); - } - } - - protected void verifyOperation(Element operation) throws EETest.Fault { - Element[] children = DescriptionUtils.getChildElements(operation, - WSDL_NAMESPACE_URI, null); - for (int i = 0; i < children.length; i++) { - String localName = children[i].getLocalName(); - for (int j = 0; j < wsdlTargets.length; j++) { - if (localName.equals(wsdlTargets[j])) { - verifyElement(children[i]); - break; - } - } - } - } - - protected void verifyElement(Element element) throws EETest.Fault { - Element[] children = DescriptionUtils.getChildElements(element, - SOAP_NAMESPACE_URI, null); - for (int i = 0; i < children.length; i++) { - String localName = children[i].getLocalName(); - for (int j = 0; j < soapTargets.length; j++) { - if (localName.equals(soapTargets[j])) { - verifySOAPElement(children[i]); - break; - } - } - } - } - - protected void verifySOAPElement(Element element) throws EETest.Fault { - String use = element.getAttribute(SOAP_USE_ATTR); - if (use.length() == 0) { - use = SOAP_LITERAL; - } - if (!use.equals(SOAP_LITERAL)) { - return; - } - Attr attr = element.getAttributeNode(SOAP_NAMESPACE_ATTR); - if (attr != null) { - if (forbidden) { - throw new EETest.Fault("The " + style + "-literal element 'soap:" - + element.getLocalName() - + "' has 'namespace' attribute defined (BP-R" + requirement + ")"); - } - String namespace = attr.getValue(); - try { - URL url = new URL(namespace); - } catch (MalformedURLException e) { - throw new EETest.Fault( - "The " + style + "-literal element 'soap:" + element.getLocalName() - + "' namespace attribute '" + namespace - + "' is not a valid, absolute URI (BP-R" + requirement + ")", - e); - } - } else { - if (!forbidden) { - throw new EETest.Fault( - "The " + style + "-literal element 'soap:" + element.getLocalName() - + "' does not have 'namespace' attribute defined (BP-R" - + requirement + ")"); - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/PartAttributeVerifier.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/PartAttributeVerifier.java deleted file mode 100644 index a931f500cd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/PartAttributeVerifier.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w; - -import java.util.StringTokenizer; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -/** - * - */ -public class PartAttributeVerifier - implements DescriptionConstants, SOAPConstants { - /** - * The WSDL targets. - */ - private static final String[] WSDL_TARGETS = { WSDL_INPUT_LOCAL_NAME, - WSDL_OUTPUT_LOCAL_NAME, WSDL_FAULT_LOCAL_NAME }; - - /** - * The SOAP targets. - */ - private static final String[] SOAP_TARGETS = { SOAP_BODY_LOCAL_NAME, - SOAP_HEADER_LOCAL_NAME, SOAP_HEADERFAULT_LOCAL_NAME }; - - /** - * The document. - */ - private Document document; - - /** - * The requirement. - */ - private int requirement; - - /** - * The style (document or rpc). - */ - private String style; - - /** - * The attribute (element or type). - */ - private String attribute; - - /** - * The WSDL targets. - */ - private String[] wsdlTargets; - - /** - * The SOAP targets. - */ - private String[] soapTargets; - - /** - * The reverse check flag. - */ - private boolean reverse; - - /** - * - * @param document - * @param requirement - */ - public PartAttributeVerifier(Document document, int requirement) { - super(); - this.document = document; - this.requirement = requirement; - } - - public void verify() throws EETest.Fault { - switch (requirement) { - case 2203: - style = SOAP_RPC; - attribute = WSDL_TYPE_ATTR; - wsdlTargets = new String[] { WSDL_INPUT_LOCAL_NAME, - WSDL_OUTPUT_LOCAL_NAME }; - soapTargets = new String[] { SOAP_BODY_LOCAL_NAME }; - reverse = false; - break; - - case 2204: - style = SOAP_DOCUMENT; - attribute = WSDL_ELEMENT_ATTR; - wsdlTargets = new String[] { WSDL_INPUT_LOCAL_NAME, - WSDL_OUTPUT_LOCAL_NAME }; - soapTargets = new String[] { SOAP_BODY_LOCAL_NAME }; - reverse = false; - break; - - case 2205: - style = null; - attribute = WSDL_ELEMENT_ATTR; - wsdlTargets = new String[] { WSDL_INPUT_LOCAL_NAME, - WSDL_OUTPUT_LOCAL_NAME, WSDL_FAULT_LOCAL_NAME }; - soapTargets = new String[] { SOAP_HEADER_LOCAL_NAME, - SOAP_HEADERFAULT_LOCAL_NAME, SOAP_FAULT_LOCAL_NAME }; - reverse = false; - break; - - case 2207: - style = SOAP_RPC; - attribute = WSDL_ELEMENT_ATTR; - wsdlTargets = new String[] { WSDL_INPUT_LOCAL_NAME, - WSDL_OUTPUT_LOCAL_NAME }; - soapTargets = new String[] { SOAP_BODY_LOCAL_NAME }; - reverse = true; - break; - - default: - throw new EETest.Fault( - "The requirement 'R" + requirement + "' not supported"); - } - System.out.println("Check for bindings on wsdl ..."); - Element[] bindings = DescriptionUtils.getBindings(document); - if (!doBindings(bindings)) { - System.out.println("Check for bindings on wsdl imports ..."); - Element[] imports = DescriptionUtils.getImports(document); - for (int i = 0; i < imports.length; i++) { - bindings = getBindingFromImport(imports[i]); - if (doBindings(bindings)) - break; - } - } - } - - protected boolean doBindings(Element[] bindings) throws EETest.Fault { - boolean done; - if (bindings.length != 0) { - System.out.println("Got bindings so verify ..."); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - done = true; - } else - done = false; - return done; - } - - protected Element[] getBindingFromImport(Element element) - throws EETest.Fault { - String location = element.getAttribute(WSDL_LOCATION_ATTR); - String namespace = element.getAttribute(WSDL_NAMESPACE_ATTR); - Document document = DescriptionUtils.getDocumentFromLocation(location); - return DescriptionUtils.getBindings(document); - } - - protected void verifyBinding(Element binding) throws EETest.Fault { - Element soapBinding = DescriptionUtils.getChildElement(binding, - SOAP_NAMESPACE_URI, SOAP_BINDING_LOCAL_NAME); - if (soapBinding == null) { - return; - } - String style = soapBinding.getAttribute(SOAP_STYLE_ATTR); - if ((this.style != null) && (!this.style.equals(style))) { - return; - } - Element[] operations = DescriptionUtils.getChildElements(binding, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - verifyOperation(binding, operations[i]); - } - } - - protected void verifyOperation(Element binding, Element operation) - throws EETest.Fault { - Element[] children = DescriptionUtils.getChildElements(operation, - WSDL_NAMESPACE_URI, null); - for (int i = 0; i < children.length; i++) { - if (isWSDLTarget(children[i])) { - verifyElement(binding, operation, children[i]); - } - } - } - - protected void verifyElement(Element binding, Element operation, - Element element) throws EETest.Fault { - String name = element.getAttribute(WSDL_NAME_ATTR); - Element message = getMessage(binding, operation, element.getLocalName(), - name); - Element[] children = DescriptionUtils.getChildElements(element, - SOAP_NAMESPACE_URI, null); - for (int i = 0; i < children.length; i++) { - if (isSOAPTarget(children[i])) { - verifySOAPElement(children[i], message); - } - } - } - - protected Element getMessage(Element binding, Element operation, - String localName, String name) throws EETest.Fault { - String type; - int index; - type = binding.getAttribute(WSDL_TYPE_ATTR); - index = type.indexOf(':'); - if (index > 0) { - type = type.substring(index + 1); - } - Element portType = DescriptionUtils.getPortType(document, type); - if (portType == null) { - throw new EETest.Fault("Required wsdl:portType element named '" + type - + "' not found (BP-R" + requirement + ")"); - } - String operationName = operation.getAttribute(WSDL_NAME_ATTR); - operation = DescriptionUtils.getNamedChildElement(portType, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME, operationName); - if (operation == null) { - throw new EETest.Fault("Required wsdl:operation element named '" - + operationName + "' not found (BP-R" + requirement + ")"); - } - Element element = DescriptionUtils.getNamedChildElement(operation, - WSDL_NAMESPACE_URI, localName, name); - if (element == null) { - throw new EETest.Fault("Required wsdl:" + localName + " element named '" - + name + "' not found (BP-R" + requirement + ")"); - } - type = element.getAttribute(WSDL_MESSAGE_ATTR); - index = type.indexOf(':'); - if (index > 0) { - type = type.substring(index + 1); - } - Element message = DescriptionUtils.getMessage(document, type); - if (message == null) { - throw new EETest.Fault("Required wsdl:message named '" + type - + "' not found (BP-R" + requirement + ")"); - } - return message; - } - - protected void verifySOAPElement(Element element, Element message) - throws EETest.Fault { - String use = element.getAttribute(SOAP_USE_ATTR); - if (use.length() == 0) { - use = SOAP_LITERAL; - } - if (!use.equals(SOAP_LITERAL)) { - return; - } - Attr attr = element.getAttributeNode(SOAP_PARTS_ATTR); - if (attr == null) { - return; - } - String parts = attr.getValue(); - StringTokenizer tokenizer = new StringTokenizer(parts, " "); - while (tokenizer.hasMoreTokens()) { - String part = tokenizer.nextToken(); - verifyMessagePart(message, part); - } - } - - protected void verifyMessagePart(Element message, String name) - throws EETest.Fault { - Element part = DescriptionUtils.getNamedChildElement(message, - WSDL_NAMESPACE_URI, WSDL_PART_LOCAL_NAME, name); - if (part == null) { - throw new EETest.Fault("Referenced wsdl:part named '" + name - + "' not found (BP-R" + requirement + ")"); - } - Attr attr = part.getAttributeNode(attribute); - if (attr != null) { - if (reverse) { - throw new EETest.Fault( - "Referenced wsdl:part named '" + name + "' defined using '" - + attribute + "' attribute (BP-R" + requirement + ")"); - } - } else { - if (!reverse) { - throw new EETest.Fault( - "Referenced wsdl:part named '" + name + "' not defined using '" - + attribute + "' attribute (BP-R" + requirement + ")"); - } - } - } - - protected boolean isWSDLTarget(Element element) { - if (!element.getNamespaceURI().equals(WSDL_NAMESPACE_URI)) { - return false; - } - String localName = element.getLocalName(); - for (int i = 0; i < wsdlTargets.length; i++) { - if (localName.equals(wsdlTargets[i])) { - return true; - } - } - return false; - } - - protected boolean isSOAPTarget(Element element) { - if (!element.getNamespaceURI().equals(SOAP_NAMESPACE_URI)) { - return false; - } - String localName = element.getLocalName(); - for (int i = 0; i < soapTargets.length; i++) { - if (localName.equals(soapTargets[i])) { - return true; - } - } - return false; - } - - protected void logMsg(String message) { - TestUtil.logMsg(message); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/build.xml deleted file mode 100644 index 62d6844d81..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/build.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/build.xml deleted file mode 100644 index 83648575ae..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2201/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2201/Client.java deleted file mode 100644 index 7ae108f297..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2201/Client.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.document.literal.R2201; - -import java.util.Properties; -import java.util.StringTokenizer; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import com.sun.ts.lib.harness.*; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.doclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WDLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WDLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testPartAttributeContents - * - * @assertion_ids: WSI:SPEC:R2201 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all binding elements' operation elements' soap:body - * elements, ensuring that no more than one part is listed in - * each part attribute - if present. - * - * @throws Fault - */ - public void testPartAttributeContents() throws Fault { - Document document = client.getDocument(); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - } - - protected void verifyBinding(Element binding) throws Fault { - Element[] operations = DescriptionUtils.getChildElements(binding, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - verifyOperation(operations[i]); - } - } - - protected void verifyOperation(Element operation) throws Fault { - NodeList list = operation.getElementsByTagNameNS(SOAP_NAMESPACE_URI, - SOAP_BODY_LOCAL_NAME); - for (int i = 0; i < list.getLength(); i++) { - verifySOAPBody((Element) list.item(i)); - } - } - - protected void verifySOAPBody(Element body) throws Fault { - Attr attr = body.getAttributeNode(SOAP_PARTS_ATTR); - if (attr == null) { - return; - } - String parts = attr.getValue(); - StringTokenizer tokenizer = new StringTokenizer(parts, " "); - int count = tokenizer.countTokens(); - if (count > 1) { - throw new Fault("soap:body element encountered with " + count - + " parts listed in its part attribute (BP-R2201)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2201/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2201/build.xml deleted file mode 100644 index 9d5557f869..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2201/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2201/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2201/jakartaEE.tokens deleted file mode 100644 index 060bf5077f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2201/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclitclient.J2WDLShared -URLALIAS=/jaxws/J2WDLShared -WEBSERVICEDESCRIPTION=J2WDLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wdlshared -SERVICEREFNAMEWSEJB=service/wsj2wdlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2204/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2204/Client.java deleted file mode 100644 index 11c887358b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2204/Client.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.document.literal.R2204; - -import java.util.Properties; - -import org.w3c.dom.Document; - -import com.sun.ts.lib.harness.*; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.doclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.j2w.PartAttributeVerifier; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WDLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.err, System.out); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WDLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testDocumentLiteralParts - * - * @assertion_ids: WSI:SPEC:R2204 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all binding elements that are document style and - * verify all literal use soap:body elements, ensuring that - * the part(s) the reference - if any - are defined using the - * element attribute. - * - * @throws Fault - */ - public void testDocumentLiteralParts() throws Fault { - Document document = client.getDocument(); - PartAttributeVerifier verifier = new PartAttributeVerifier(document, 2204); - verifier.verify(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2204/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2204/build.xml deleted file mode 100644 index e7d48e4247..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2204/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2204/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2204/jakartaEE.tokens deleted file mode 100644 index 060bf5077f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2204/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclitclient.J2WDLShared -URLALIAS=/jaxws/J2WDLShared -WEBSERVICEDESCRIPTION=J2WDLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wdlshared -SERVICEREFNAMEWSEJB=service/wsj2wdlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2210/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2210/Client.java deleted file mode 100644 index babf57a255..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2210/Client.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.document.literal.R2210; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.doclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WDLShared service = null; - - /** - * The document. - */ - private Document document; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WDLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testPartlessBodies - * - * @assertion_ids: WSI:SPEC:R2210 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all soap:body elements, in document-literal - * bindings, ensuring that if they do not specify the parts - * attribute, that the corresponding message defines exactly - * one part. - * - * @throws Fault - */ - public void testPartlessBodies() throws Fault { - document = client.getDocument(); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - } - - protected void verifyBinding(Element binding) throws Fault { - Element soapBinding = DescriptionUtils.getChildElement(binding, - SOAP_NAMESPACE_URI, SOAP_BINDING_LOCAL_NAME); - if (soapBinding == null) { - return; - } - String style = soapBinding.getAttribute(SOAP_STYLE_ATTR); - if (!style.equals(SOAP_DOCUMENT)) { - return; - } - Element[] operations = DescriptionUtils.getChildElements(binding, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - verifyOperation(binding, operations[i]); - } - } - - protected void verifyOperation(Element binding, Element operation) - throws Fault { - Element[] children = DescriptionUtils.getChildElements(operation, - WSDL_NAMESPACE_URI, null); - for (int i = 0; i < children.length; i++) { - String localName = children[i].getLocalName(); - if ((localName.equals(WSDL_INPUT_LOCAL_NAME)) - || (localName.equals(WSDL_OUTPUT_LOCAL_NAME))) { - verifyInputOutput(binding, operation, children[i]); - } - } - } - - protected void verifyInputOutput(Element binding, Element operation, - Element io) throws Fault { - Element soapBody = DescriptionUtils.getChildElement(io, SOAP_NAMESPACE_URI, - SOAP_BODY_LOCAL_NAME); - if (soapBody == null) { - return; - } - String use = soapBody.getAttribute(SOAP_USE_ATTR); - if (use.length() == 0) { - use = SOAP_LITERAL; - } - if (!use.equals(SOAP_LITERAL)) { - return; - } - String parts = soapBody.getAttribute(SOAP_PARTS_ATTR); - if (parts.length() > 0) { - return; - } - Element message = getMessage(binding, operation, io); - verifyMessage(message); - } - - protected void verifyMessage(Element message) throws Fault { - Element[] parts = DescriptionUtils.getChildElements(message, - WSDL_NAMESPACE_URI, WSDL_PART_LOCAL_NAME); - if (parts.length > 1) { - String name = message.getAttribute(WSDL_NAME_ATTR); - throw new Fault("wsdl:message named '" + name - + "' referenced without a soap:body 'parts' attribute defines more than one part (BP-R2210)"); - } - } - - protected Element getMessage(Element binding, Element operation, Element io) - throws Fault { - String name = binding.getAttribute(WSDL_TYPE_ATTR); - int index; - index = name.indexOf(':'); - if (index > 0) { - name = name.substring(index + 1); - } - Element portType = DescriptionUtils.getPortType(document, name); - if (portType == null) { - throw new Fault("Required wsdl:portType element named '" + name - + "' not found (BP-R2210)"); - } - name = operation.getAttribute(WSDL_NAME_ATTR); - operation = DescriptionUtils.getNamedChildElement(portType, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME, name); - if (name == null) { - throw new Fault( - "Required wsdl:operation element is named 'null' (BP-R2210)"); - } - name = io.getAttribute(WSDL_NAME_ATTR); - String localName = io.getLocalName(); - io = DescriptionUtils.getNamedChildElement(operation, WSDL_NAMESPACE_URI, - localName, name); - if (io == null) { - throw new Fault("Required wsdl:" + localName + " element named '" + name - + "' not found (BP-R2210)"); - } - name = io.getAttribute(WSDL_MESSAGE_ATTR); - index = name.indexOf(':'); - if (index > 0) { - name = name.substring(index + 1); - } - Element message = DescriptionUtils.getMessage(document, name); - if (message == null) { - throw new Fault("Required wsdl:message element named '" + name - + "' not found (BP-R2210)"); - } - return message; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2210/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2210/build.xml deleted file mode 100644 index 62f517e999..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2210/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2210/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2210/jakartaEE.tokens deleted file mode 100644 index 060bf5077f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2210/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclitclient.J2WDLShared -URLALIAS=/jaxws/J2WDLShared -WEBSERVICEDESCRIPTION=J2WDLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wdlshared -SERVICEREFNAMEWSEJB=service/wsj2wdlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2716/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2716/Client.java deleted file mode 100644 index a842e2d607..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2716/Client.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.document.literal.R2716; - -import java.util.Properties; - -import org.w3c.dom.Document; - -import com.sun.ts.lib.harness.*; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.doclitclient.*; -import com.sun.ts.tests.jaxws.wsi.j2w.NamespaceAttributeVerifier; - -public class Client extends ServiceEETest { - /** - * The client. - */ - private SOAPClient client; - - static J2WDLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WDLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSOAPElementNamespace - * - * @assertion_ids: WSI:SPEC:R2716 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the document-literal wsdl:binding elements to - * ensure that their input- and output elements' soap:body, - * soap:header, soap:headerfault and soap:fault elements do - * not have a namespace attribute defined. - * - * @throws Fault - */ - public void testSOAPElementNamespace() throws Fault { - Document document = client.getDocument(); - NamespaceAttributeVerifier verifier = new NamespaceAttributeVerifier( - document, 2716); - verifier.verify(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2716/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2716/build.xml deleted file mode 100644 index d1e4c941ea..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2716/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2716/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2716/jakartaEE.tokens deleted file mode 100644 index 060bf5077f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/R2716/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wdlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.doclitclient.J2WDLShared -URLALIAS=/jaxws/J2WDLShared -WEBSERVICEDESCRIPTION=J2WDLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wdlshared -SERVICEREFNAMEWSEJB=service/wsj2wdlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wdlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/build.xml deleted file mode 100644 index 9e56889134..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/document/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/build.xml deleted file mode 100644 index 30d1613cb9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1000/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1000/Client.java deleted file mode 100644 index f765df2128..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1000/Client.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R1000; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.faultclient.*; -import com.sun.ts.tests.jaxws.wsi.utils.SOAPUtils; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPElement; -import java.util.Properties; -import java.util.Iterator; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements SOAPRequests { - - private FaultTestClient client; - - static FaultTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (FaultTestClient) ClientFactory.getClient(FaultTestClient.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSoapFaultChildrenDummyException - * - * @assertion_ids: WSI:SPEC:R1000 - * - * @test_Strategy: Make a request and inspect response to ensure the - * soap:Fault only has children of faultcode , faultstring , - * faultactor and detail. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testSoapFaultChildrenDummyException() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(ALWAYS_THROWS_EXCEPTION); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateFaultChildrenNames(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - client.logMessageInHarness(response); - } - - /** - * @testName: testSoapFaultChildrenServerException - * - * @assertion_ids: WSI:SPEC:R1000 - * - * @test_Strategy: Make a request and inspect response to ensure the - * soap:Fault only has children of faultcode , faultstring , - * faultactor and detail. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testSoapFaultChildrenServerException() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(ALWAYS_THROWS_SERVER_EXCEPTION); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateFaultChildrenNames(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - client.logMessageInHarness(response); - } - - private void validateFaultChildrenNames(SOAPMessage response) - throws EETest.Fault, SOAPException { - Iterator children = response.getSOAPPart().getEnvelope().getBody() - .getFault().getChildElements(); - SOAPElement child; - while (children.hasNext()) { - child = (SOAPElement) children.next(); - if (!(SOAPUtils.isValidSoapFaultChildName(child))) { - client.logMessageInHarness(response); - throw new EETest.Fault("Invalid soap:Fault child name (BP-R1000): " - + child.getElementName().getLocalName()); - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1000/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1000/build.xml deleted file mode 100644 index 4d69489158..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1000/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1000/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1000/jakartaEE.tokens deleted file mode 100644 index c7e1d5e4b0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1000/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wfaulttest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.faultclient.FaultTest -URLALIAS=/jaxws/FaultTest -WEBSERVICEDESCRIPTION=FaultTest -SERVICEREFNAMEWSSERVLET=service/wsj2wfaulttest -SERVICEREFNAMEWSEJB=service/wsj2wfaulttest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wfaulttest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1001/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1001/Client.java deleted file mode 100644 index 4e7a1c8226..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1001/Client.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R1001; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.faultclient.*; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPElement; -import java.util.Properties; -import java.util.Iterator; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements SOAPRequests { - - private FaultTestClient client; - - static FaultTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (FaultTestClient) ClientFactory.getClient(FaultTestClient.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSoapFaultUnqualifiedChildrenDummyException - * - * @assertion_ids: WSI:SPEC:R1001 - * - * @test_Strategy: Make a request and inspect response to ensure When a - * MESSAGE contains a soap:Fault element its element children - * MUST be unqualified. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testSoapFaultUnqualifiedChildrenDummyException() - throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(ALWAYS_THROWS_EXCEPTION); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateUnqualifiedFaultChildrenNames(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - client.logMessageInHarness(response); - } - - /** - * @testName: testSoapFaultUnqualifiedChildrenServerException - * - * @assertion_ids: WSI:SPEC:R1001 - * - * @test_Strategy: Make a request and inspect response to ensure When a - * MESSAGE contains a soap:Fault element its element children - * MUST be unqualified. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testSoapFaultUnqualifiedChildrenServerException() - throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(ALWAYS_THROWS_SERVER_EXCEPTION); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateUnqualifiedFaultChildrenNames(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - client.logMessageInHarness(response); - } - - private void validateUnqualifiedFaultChildrenNames(SOAPMessage response) - throws EETest.Fault, SOAPException { - Iterator children = response.getSOAPPart().getEnvelope().getBody() - .getFault().getChildElements(); - SOAPElement child; - String prefix; - while (children.hasNext()) { - child = (SOAPElement) children.next(); - prefix = child.getElementName().getPrefix(); - if (!(prefix == null || prefix.equals(""))) { - client.logMessageInHarness(response); - throw new EETest.Fault( - "Invalid soap:Fault child : must be unqualified (BP-R1001): " - + child.getElementName().getQualifiedName()); - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1001/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1001/build.xml deleted file mode 100644 index a734cbef56..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1001/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1001/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1001/jakartaEE.tokens deleted file mode 100644 index c7e1d5e4b0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1001/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wfaulttest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.faultclient.FaultTest -URLALIAS=/jaxws/FaultTest -WEBSERVICEDESCRIPTION=FaultTest -SERVICEREFNAMEWSSERVLET=service/wsj2wfaulttest -SERVICEREFNAMEWSEJB=service/wsj2wfaulttest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wfaulttest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1002/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1002/Client.java deleted file mode 100644 index ae7a7df4fc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1002/Client.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R1002; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.faultclient.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.soap.SOAPFaultException; -import java.util.Properties; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - - private FaultTestClient client; - - static FaultTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (FaultTestClient) ClientFactory.getClient(FaultTestClient.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSOAPFaultExceptionDetailNoChildren - * - * @assertion_ids: WSI:SPEC:R1002; JAXWS:SPEC:10010; - * - * @test_Strategy: Make a request that generates a soap:Fault with a detail - * element with no children. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testSOAPFaultExceptionDetailNoChildren() throws EETest.Fault { - try { - client.alwaysThrowsSOAPFaultExceptionDetailNoChildren(); - } catch (SOAPFaultException sfe) { - // expected result - } catch (jakarta.xml.ws.WebServiceException re) { - // expected result - } catch (Exception e) { - e.printStackTrace(); - throw new EETest.Fault( - "Error processing received fault: should have accepted a soap:Fault" - + "with a detail element with no children (BP-R1002)"); - } - } - - /** - * @testName: testSOAPFaultExceptionDetailQualifiedChildren - * - * @assertion_ids: WSI:SPEC:R1002; JAXWS:SPEC:10010; - * - * @test_Strategy: Make a request that generates a soap:Fault with a detail - * element with qualified children. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testSOAPFaultExceptionDetailQualifiedChildren() - throws EETest.Fault { - try { - client.alwaysThrowsSOAPFaultExceptionDetailQualifiedChildren(); - } catch (SOAPFaultException sfe) { - // expected result - } catch (jakarta.xml.ws.WebServiceException re) { - // expected result - } catch (Exception e) { - e.printStackTrace(); - throw new EETest.Fault( - "Error processing received fault: should have accepted a soap:Fault" - + "with a detail element with qualified children (BP-R1002)"); - } - } - - /** - * @testName: testSOAPFaultExceptionDetailUnqualifiedChildren - * - * @assertion_ids: WSI:SPEC:R1002; JAXWS:SPEC:10010; - * - * @test_Strategy: Make a request that generates a soap:Fault with a detail - * element with unqualified children. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testSOAPFaultExceptionDetailUnqualifiedChildren() - throws EETest.Fault { - try { - client.alwaysThrowsSOAPFaultExceptionDetailUnqualifiedChildren(); - } catch (SOAPFaultException sfe) { - // expected result - } catch (jakarta.xml.ws.WebServiceException re) { - // expected result - } catch (Exception e) { - e.printStackTrace(); - throw new EETest.Fault( - "Error processing received fault: should have accepted a soap:Fault" - + "with a detail element with unqualified children (BP-R1002)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1002/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1002/build.xml deleted file mode 100644 index 58eeb7751f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1002/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1002/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1002/jakartaEE.tokens deleted file mode 100644 index c7e1d5e4b0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1002/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wfaulttest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.faultclient.FaultTest -URLALIAS=/jaxws/FaultTest -WEBSERVICEDESCRIPTION=FaultTest -SERVICEREFNAMEWSSERVLET=service/wsj2wfaulttest -SERVICEREFNAMEWSEJB=service/wsj2wfaulttest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wfaulttest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1003/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1003/Client.java deleted file mode 100644 index 2b5f26d72f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1003/Client.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R1003; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.faultclient.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.soap.SOAPFaultException; -import java.util.Properties; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - - private FaultTestClient client; - - static FaultTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (FaultTestClient) ClientFactory.getClient(FaultTestClient.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSOAPFaultExceptionDetailNoAttributes - * - * @assertion_ids: WSI:SPEC:R1003 - * - * @test_Strategy: Make a request that generates a soap:Fault with a detail - * element with no attributes. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testSOAPFaultExceptionDetailNoAttributes() throws EETest.Fault { - try { - client.alwaysThrowsSOAPFaultExceptionDetailNoAttributes(); - } catch (SOAPFaultException sfe) { - // expected result - } catch (jakarta.xml.ws.WebServiceException re) { - // expected result - } catch (Exception e) { - throw new EETest.Fault( - "Error processing received fault: should have accepted a soap:Fault" - + "with a detail element with no attributes (BP-R1003)"); - } - } - - /** - * @testName: testSOAPFaultExceptionDetailQualifiedAttributes - * - * @assertion_ids: WSI:SPEC:R1002 - * - * @test_Strategy: Make a request that generates a soap:Fault with a detail - * element with qualified attributes. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testSOAPFaultExceptionDetailQualifiedAttributes() - throws EETest.Fault { - try { - client.alwaysThrowsSOAPFaultExceptionDetailQualifiedAttributes(); - } catch (SOAPFaultException sfe) { - // expected result - } catch (jakarta.xml.ws.WebServiceException re) { - // expected result - } catch (Exception e) { - throw new EETest.Fault( - "Error processing received fault: should have accepted a soap:Fault" - + "with a detail element with qualified attributes (BP-R1003)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1003/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1003/build.xml deleted file mode 100644 index f740d3dcf8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1003/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1003/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1003/jakartaEE.tokens deleted file mode 100644 index c7e1d5e4b0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1003/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wfaulttest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.faultclient.FaultTest -URLALIAS=/jaxws/FaultTest -WEBSERVICEDESCRIPTION=FaultTest -SERVICEREFNAMEWSSERVLET=service/wsj2wfaulttest -SERVICEREFNAMEWSEJB=service/wsj2wfaulttest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wfaulttest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1010/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1010/Client.java deleted file mode 100644 index f7fb227be9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1010/Client.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R1010; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.simpleclient.*; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPElement; -import java.util.Properties; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements SOAPRequests { - - private SimpleTestClient client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (SimpleTestClient) ClientFactory.getClient(SimpleTestClient.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testXMLDeclaration - * - * @assertion_ids: WSI:SPEC:R1010 - * - * @test_Strategy: Make a request with XML declaration, inpsect response to - * make sure it is expected response (not a soap:Fault). - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testXMLDeclaration() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(HELLOWORLD); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateIsExpected(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - client.logMessageInHarness(response); - } - - private void validateIsExpected(SOAPMessage response) - throws EETest.Fault, SOAPException { - String responseMessage = getResponseValue(response); - if (responseMessage == null || !responseMessage.equals("hello world")) { - client.logMessageInHarness(response); - throw new EETest.Fault( - "Invalid response: instances must accept messages with an XML declaration" - + "(BP-R1010)"); - } - } - - private String getResponseValue(SOAPMessage response) throws SOAPException { - SOAPElement elem = (SOAPElement) response.getSOAPPart().getEnvelope() - .getBody().getChildElements().next(); - return ((SOAPElement) elem.getChildElements().next()).getValue(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1010/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1010/build.xml deleted file mode 100644 index 2e1c4ced80..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1010/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1010/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1010/jakartaEE.tokens deleted file mode 100644 index 2b1ed6fe22..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1010/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wsimpletest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.simpleclient.SimpleTest -URLALIAS=/jaxws/SimpleTest -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/wsj2wsimpletest -SERVICEREFNAMEWSEJB=service/wsj2wsimpletest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wsimpletest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1124/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1124/Client.java deleted file mode 100644 index f832ab846b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1124/Client.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R1124; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.simpleclient.*; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import java.util.Properties; -import java.io.InputStream; -import java.io.IOException; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements SOAPRequests { - - private SimpleTestClient client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (SimpleTestClient) ClientFactory.getClient(SimpleTestClient.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSuccessfulResponseStatusCode - * - * @assertion_ids: WSI:SPEC:R1124 - * - * @test_Strategy: Make a request that generates a successful outcome, inpsect - * HTTP response to make sure the status code is 2xx. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testSuccessfulResponseStatusCode() throws EETest.Fault { - InputStream response; - try { - response = client.makeHTTPRequest(HELLOWORLD); - client.logMessageInHarness(response); - if (!Integer.toString(client.getStatusCode()).startsWith("2")) { - throw new EETest.Fault( - "Invalid response: instances must return HTTP status code 200" - + " for a successful request (BP-R1124)."); - } - } catch (IOException e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1124/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1124/build.xml deleted file mode 100644 index 14f2c29e04..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1124/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1124/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1124/jakartaEE.tokens deleted file mode 100644 index 2b1ed6fe22..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1124/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wsimpletest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.simpleclient.SimpleTest -URLALIAS=/jaxws/SimpleTest -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/wsj2wsimpletest -SERVICEREFNAMEWSEJB=service/wsj2wsimpletest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wsimpletest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1126/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1126/Client.java deleted file mode 100644 index cb8e61fed2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1126/Client.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R1126; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.faultclient.*; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import java.util.Properties; -import java.io.InputStream; -import java.io.IOException; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements SOAPRequests { - - private FaultTestClient client; - - static FaultTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (FaultTestClient) ClientFactory.getClient(FaultTestClient.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testFaultResponseStatusCode - * - * @assertion_ids: WSI:SPEC:R1126 - * - * @test_Strategy: Make a request that generates a soap:Fault, inspect the - * HTTP response to make sure the status code is 500. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testFaultResponseStatusCode() throws EETest.Fault { - InputStream response; - try { - response = client.makeHTTPRequest(ALWAYS_THROWS_EXCEPTION); - client.logMessageInHarness(response); - if (client.getStatusCode() != 500) { - throw new EETest.Fault( - "Invalid response: instances must return HTTP status code 500" - + " when a soap:Fault is returned (BP-R1126)."); - } - } catch (IOException e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1126/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1126/build.xml deleted file mode 100644 index c8998396c8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1126/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1126/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1126/jakartaEE.tokens deleted file mode 100644 index c7e1d5e4b0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R1126/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wfaulttest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.faultclient.FaultTest -URLALIAS=/jaxws/FaultTest -WEBSERVICEDESCRIPTION=FaultTest -SERVICEREFNAMEWSSERVLET=service/wsj2wfaulttest -SERVICEREFNAMEWSEJB=service/wsj2wfaulttest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wfaulttest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2001/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2001/Client.java deleted file mode 100644 index 0288ae6b83..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2001/Client.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2001; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testWSDLImports - * - * @assertion_ids: WSI:SPEC:R2001 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all wsdl:import statements, ensuring that the - * resource at the specified location is a WSDL document. - * - * @throws Fault - */ - public void testWSDLImports() throws Fault { - Document document = client.getDocument(); - Element[] imports = DescriptionUtils.getImports(document); - for (int i = 0; i < imports.length; i++) { - verifyImport(imports[i]); - } - } - - protected void verifyImport(Element element) throws Fault { - String location = element.getAttribute(WSDL_LOCATION_ATTR); - Document document = DescriptionUtils.getDocumentFromLocation(location); - if (!DescriptionUtils.isDescription(document)) { - throw new Fault("Document imported from '" + location - + "' is not a description (BP-R2001)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2001/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2001/build.xml deleted file mode 100644 index 83d631547e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2001/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2001/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2001/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2001/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2002/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2002/Client.java deleted file mode 100644 index 5a39aa4298..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2002/Client.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2002; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testWSDLImports - * - * @assertion_ids: WSI:SPEC:R2002 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all wsdl:import statements, ensuring that the - * resource at the specified location is not a schema. - * - * @throws Fault - */ - public void testWSDLImports() throws Fault { - Document document = client.getDocument(); - Element[] imports = DescriptionUtils.getImports(document); - for (int i = 0; i < imports.length; i++) { - verifyImport(imports[i]); - } - } - - protected void verifyImport(Element element) throws Fault { - String location = element.getAttribute(WSDL_LOCATION_ATTR); - Document document = DescriptionUtils.getDocumentFromLocation(location); - if (!DescriptionUtils.isDescription(document)) { - throw new Fault("Document imported from '" + location - + "' is not a description (BP-R2002)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2002/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2002/build.xml deleted file mode 100644 index c3a488e293..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2002/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2002/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2002/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2002/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2003/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2003/Client.java deleted file mode 100644 index 32f97afbf3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2003/Client.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2003; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.ts.lib.harness.*; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -public class Client extends ServiceEETest - implements DescriptionConstants, SchemaConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSchemaImports - * - * @assertion_ids: WSI:SPEC:R2003 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all elements, ensuring that xsd:import elements are - * contained within xsd:schema elements. - * - * @throws Fault - */ - public void testSchemaImports() throws Fault { - Document document = client.getDocument(); - verifyImport(document.getDocumentElement()); - } - - protected void verifyImport(Element element) throws Fault { - if (DescriptionUtils.isElement(element, XSD_NAMESPACE_URI, - XSD_IMPORT_LOCAL_NAME)) { - verifyImportParent(element); - } - Element[] children = DescriptionUtils.getChildElements(element); - for (int i = 0; i < children.length; i++) { - verifyImport(children[i]); - } - } - - protected void verifyImportParent(Element element) throws Fault { - Element parent = (Element) element.getParentNode(); - if (!DescriptionUtils.isElement(parent, XSD_NAMESPACE_URI, - XSD_SCHEMA_LOCAL_NAME)) { - throw new Fault( - "Encountered xsd:import element that is not child of xsd:schema element (BP-R2003)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2003/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2003/build.xml deleted file mode 100644 index ecb9f3b180..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2003/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2003/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2003/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2003/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2004/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2004/Client.java deleted file mode 100644 index 3388e92b98..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2004/Client.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2004; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SchemaConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSchemaImports - * - * @assertion_ids: WSI:SPEC:R2004 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all elements, ensuring that xsd:import elements - * only import schemas. - * - * @throws Fault - */ - public void testSchemaImports() throws Fault { - Document document = client.getDocument(); - verifyImport(document.getDocumentElement()); - } - - protected void verifyImport(Element element) throws Fault { - if (DescriptionUtils.isElement(element, XSD_NAMESPACE_URI, - XSD_IMPORT_LOCAL_NAME)) { - String schemaLocation = element.getAttribute(XSD_SCHEMALOCATION_ATTR); - if (schemaLocation.length() > 0) { - try { - Document document = DescriptionUtils - .getDocumentFromLocation(schemaLocation); - if (!DescriptionUtils.isSchema(document)) { - throw new Fault("The document imported from '" + schemaLocation - + "' is not a schema (BP-R2004)"); - } - } catch (Exception e) { - // do not fail if unable to read schema - } - } - } - Element[] children = DescriptionUtils.getChildElements(element); - for (int i = 0; i < children.length; i++) { - verifyImport(children[i]); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2004/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2004/build.xml deleted file mode 100644 index e59b770c4d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2004/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2004/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2004/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2004/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2005/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2005/Client.java deleted file mode 100644 index 801099d64b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2005/Client.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2005; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testImportedNamespaces - * - * @assertion_ids: WSI:SPEC:R2005 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all wsdl:import elements, ensuring that the target - * namespace of the imported WSDL matches the namespace of the - * wsdl:import. - * - * @throws Fault - */ - public void testImportedNamespaces() throws Fault { - Document document = client.getDocument(); - Element[] imports = DescriptionUtils.getImports(document); - for (int i = 0; i < imports.length; i++) { - verifyImport(imports[i]); - } - } - - protected void verifyImport(Element element) throws Fault { - String location = element.getAttribute(WSDL_LOCATION_ATTR); - String namespace = element.getAttribute(WSDL_NAMESPACE_ATTR); - Document document = DescriptionUtils.getDocumentFromLocation(location); - if (!DescriptionUtils.isDescription(document)) { - throw new Fault("Document imported from '" + location - + "' is not a description (BP-R2005)"); - } - String targetNamespace = document.getDocumentElement() - .getAttribute(WSDL_TARGETNAMESPACE_ATTR); - if (!namespace.equals(targetNamespace)) { - throw new Fault( - "Target namespace '" + targetNamespace + "' of description at '" - + location + "' does not match specified namespace '" + namespace - + "' on wsdl:import (BP-R2005)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2005/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2005/build.xml deleted file mode 100644 index d6bf88aa28..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2005/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2005/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2005/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2005/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2007/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2007/Client.java deleted file mode 100644 index 7a4e34e319..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2007/Client.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2007; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Properties; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testImportLocations - * - * @assertion_ids: WSI:SPEC:R2007 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all wsdl:import elements, ensuring that the - * location attribute is non-empty and valid. - * - * @throws Fault - */ - public void testImportLocations() throws Fault { - Document document = client.getDocument(); - Element[] imports = DescriptionUtils.getImports(document); - for (int i = 0; i < imports.length; i++) { - verifyImport(imports[i]); - } - } - - protected void verifyImport(Element element) throws Fault { - Attr attr = element.getAttributeNode(WSDL_LOCATION_ATTR); - if (attr == null) { - throw new Fault( - "Required attribute 'location' on wsdl:import element not found (BP-R2007)"); - } - String location = attr.getValue().trim(); - if (location.length() == 0) { - throw new Fault( - "Required attribute 'location' on wsdl:import element is empty (BP-R2007)"); - } - try { - new URL(location); - } catch (MalformedURLException e) { - throw new Fault("The location '" + location + "' is not valid (BP-R2007)", - e); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2007/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2007/build.xml deleted file mode 100644 index 4ce67b7681..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2007/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2007/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2007/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2007/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2022/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2022/Client.java deleted file mode 100644 index 1ff89683ff..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2022/Client.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2022; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testImportPlacement - * - * @assertion_ids: WSI:SPEC:R2022 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all wsdl:import elements, ensuring that they appear - * where they need to be. - * - * @throws Fault - */ - public void testImportPlacement() throws Fault { - int imports = -1; - int documentations = -1; - int other = -1; - Document document = client.getDocument(); - Element[] children = DescriptionUtils.getChildElements( - document.getDocumentElement(), WSDL_NAMESPACE_URI, null); - for (int i = 0; i < children.length; i++) { - String localName = children[i].getLocalName(); - if (localName.equals(WSDL_IMPORT_LOCAL_NAME)) { - if (other != -1) { - throw new Fault( - "wsdl:import element encountered that follows element other that wsdl:documentation (BP-R2022)"); - } - if (documentations > imports) { - throw new Fault( - "wsdl:documentation element encountered that is embedded between wsdl:import elements (BP-R2022)"); - } - imports = i; - } else if (localName.equals(WSDL_DOCUMENTATION_LOCAL_NAME)) { - documentations = i; - } else { - other = i; - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2022/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2022/build.xml deleted file mode 100644 index cffcbd7679..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2022/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2022/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2022/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2022/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2023/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2023/Client.java deleted file mode 100644 index a2172075c6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2023/Client.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2023; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testTypesElements - * - * @assertion_ids: WSI:SPEC:R2023 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all wsdl:types elements, ensuring that they appear - * where they need to be. - * - * @throws Fault - */ - public void testTypesElements() throws Fault { - Document document = client.getDocument(); - verifyDefinitionsChildElementSequence(document.getDocumentElement()); - } - - protected void verifyDefinitionsChildElementSequence(Element element) - throws Fault { - int imports = -1; - int docs = -1; - int types = -1; - int other = -1; - Element[] children = DescriptionUtils.getChildElements(element); - for (int i = 0; i < children.length; i++) { - if (DescriptionUtils.isElement(children[i], WSDL_NAMESPACE_URI, - WSDL_IMPORT_LOCAL_NAME)) { - imports = i; - } else if (DescriptionUtils.isElement(children[i], WSDL_NAMESPACE_URI, - WSDL_DOCUMENTATION_LOCAL_NAME)) { - docs = i; - } else if (DescriptionUtils.isElement(children[i], WSDL_NAMESPACE_URI, - WSDL_TYPES_LOCAL_NAME)) { - if (other != -1) { - throw new Fault( - "A wsdl:types element encountered that doesn't immediately follow a wsdl:import or wsdl:documentation element (BP-R2023)"); - } - if ((types != -1) && ((imports > types) || (docs > types))) { - throw new Fault( - "Encountered wsdl:import/wsdl:documentation element(s) intermixed with wsdl:types elements (BP-R2023)"); - } - types = i; - } else { - other = i; - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2023/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2023/build.xml deleted file mode 100644 index 94651624a1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2023/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2023/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2023/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2023/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2101/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2101/Client.java deleted file mode 100644 index 7b9f0b47bb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2101/Client.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2101; - -import java.util.Properties; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testQNameReferences - * - * @assertion_ids: WSI:SPEC:R2101 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all element's attributes, and verify the namespace - * declaration for each QName. - * - * @throws Fault - */ - public void testQNameReferences() throws Fault { - Document document = client.getDocument(); - verifyElementAttributes(document.getDocumentElement()); - } - - protected void verifyElementAttributes(Element element) throws Fault { - Attr[] attributes = DescriptionUtils.getElementAttributes(element); - for (int i = 0; i < attributes.length; i++) { - String name = attributes[i].getName(); - String value = attributes[i].getValue(); - int index = value.indexOf(':'); - if (index > 0) { - if (value.indexOf('/') == -1) { - String prefix = value.substring(0, index); - if (!DescriptionUtils.isNamespacePrefixDeclared(element, prefix)) { - throw new Fault("The prefix '" + prefix + "' in QName attribute '" - + name + "' is not declared (BP-R2101)"); - } - } - } - } - verifyElementChildren(element); - } - - protected void verifyElementChildren(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element); - for (int i = 0; i < children.length; i++) { - verifyElementAttributes(children[i]); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2101/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2101/build.xml deleted file mode 100644 index 8040565daa..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2101/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2101/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2101/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2101/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2102/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2102/Client.java deleted file mode 100644 index 7790ca6414..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2102/Client.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2102; - -import java.util.Properties; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SchemaConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testQNameSchemaReferences - * - * @assertion_ids: WSI:SPEC:R2102 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all schema element attributes, and verify the - * namespace declaration for each QName. - * - * @throws Fault - */ - public void testQNameSchemaReferences() throws Fault { - Document document = client.getDocument(); - Element types = DescriptionUtils.getTypes(document); - Element[] schemas = DescriptionUtils.getChildElements(types, - XSD_NAMESPACE_URI, XSD_SCHEMA_LOCAL_NAME); - System.out.println("Number of schemas=" + schemas.length); - for (int i = 0; i < schemas.length; i++) { - verifyElementAttributes(schemas[i]); - } - } - - protected void verifyElementAttributes(Element element) throws Fault { - Attr[] attributes = DescriptionUtils.getElementAttributes(element); - for (int i = 0; i < attributes.length; i++) { - String name = attributes[i].getName(); - String value = attributes[i].getValue(); - System.out.println("attrname=" + name + ", attrvalue=" + value); - int index = value.indexOf(':'); - if (index > 0) { - if (value.indexOf('/') == -1) { - String prefix = value.substring(0, index); - if (!DescriptionUtils.isNamespacePrefixDeclared(element, prefix)) { - throw new Fault("The prefix '" + prefix + "' in QName attribute '" - + name + "' is not declared (BP-R2102)"); - } - } - - } - } - verifyElementChildren(element); - } - - protected void verifyElementChildren(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element); - for (int i = 0; i < children.length; i++) { - verifyElementAttributes(children[i]); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2102/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2102/build.xml deleted file mode 100644 index e73cbdb80d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2102/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2102/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2102/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2102/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2105/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2105/Client.java deleted file mode 100644 index 87d24cfe9a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2105/Client.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2105; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Properties; - -import org.w3c.dom.*; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SchemaConstants { - /** - * The client. - */ - private SOAPClient client; - - private String dstr, dstr2; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-lind arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSchemaTargetNamespace - * - * @assertion_ids: WSI:SPEC:R2105 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all wsdl:types xsd:schema elements and ensure that - * they have a valid, non-null targetNamespace attribute, - * unless the xsd:schema element has xsd:import and/or - * xsd:annotation as its only child element(s). - * - * - * @throws Fault - */ - public void testSchemaTargetNamespace() throws Fault { - Document document = client.getDocument(); - Element types = DescriptionUtils.getTypes(document); - Element[] schemas = DescriptionUtils.getChildElements(types, - XSD_NAMESPACE_URI, XSD_SCHEMA_LOCAL_NAME); - logMsg("Number of schema elements=" + schemas.length); - for (int i = 0; i < schemas.length; i++) { - dstr = null; - dstr2 = "schema[" + i + "] elements are: "; - verifySchemaTargetNamespace(schemas[i]); - } - } - - protected void verifySchemaTargetNamespace(Element element) throws Fault { - Attr attribute = element.getAttributeNode(XSD_TARGETNAMESPACE_ATTR); - if (!containsOnlyImportOrAnnotation(element)) { - if (attribute == null) { - throw new Fault( - "xsd:schema element encountered with no 'targetNamespace' attribute (BP-R2105)"); - } - String targetNamespace = attribute.getValue(); - try { - new URL(targetNamespace); - } catch (MalformedURLException e) { - throw new Fault("The targetNamespace '" + targetNamespace - + "' is not valid (BP-R2105)", e); - } - } - } - - protected boolean containsOnlyImportOrAnnotation(Element element) { - boolean result = true; - NodeList list = element.getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - Node node = list.item(i); - if (node.getNodeType() == Node.ELEMENT_NODE) { - Element child = (Element) node; - if (dstr == null) - dstr = child.getTagName(); - else - dstr = dstr + ", " + child.getTagName(); - String tagName = child.getTagName(); - if (tagName.indexOf(":") > -1) - tagName = tagName.substring(tagName.indexOf(":") + 1); - logMsg("tagName=" + tagName); - if (!tagName.equals(XSD_IMPORT_LOCAL_NAME) - && !tagName.equals(XSD_ANNOTATION_LOCAL_NAME)) { - result = false; - } - } - } - logMsg(dstr2 + dstr); - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2105/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2105/build.xml deleted file mode 100644 index 3774082731..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2105/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2105/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2105/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2105/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2110/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2110/Client.java deleted file mode 100644 index e6b2cd3b25..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2110/Client.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2110; - -import java.util.Properties; - -import org.w3c.dom.Attr; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SchemaConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testArrayType - * - * @assertion_ids: WSI:SPEC:R2110 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the array types, making sure they do not extend the - * soap-enc:Array type. - * - * @throws Fault - */ - public void testArrayType() throws Fault { - NodeList list = client.getDocument() - .getElementsByTagNameNS(XSD_NAMESPACE_URI, XSD_RESTRICTION_LOCAL_NAME); - for (int i = 0; i < list.getLength(); i++) { - verifyRestriction((Element) list.item(i)); - } - } - - protected void verifyRestriction(Element element) throws Fault { - Attr attribute = element.getAttributeNode(XSD_BASE_ATTR); - if (attribute == null) { - return; - } - String value = attribute.getValue(); - if (value.endsWith(":Array")) { - throw new Fault( - "Encountered complex type that extends 'soap-enc:Array' (BP-R2110)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2110/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2110/build.xml deleted file mode 100644 index c0ee1aff01..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2110/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2110/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2110/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2110/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2111/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2111/Client.java deleted file mode 100644 index c824d982f2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2111/Client.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2111; - -import java.util.Properties; - -import org.w3c.dom.Attr; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SchemaConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testArrayType - * - * @assertion_ids: WSI:SPEC:R2111 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the complex types, making sure they do not use the - * wsdl:ArrayType. - * - * @throws Fault - */ - public void testArrayType() throws Fault { - NodeList list = client.getDocument() - .getElementsByTagNameNS(XSD_NAMESPACE_URI, XSD_ATTRIBUTE_LOCAL_NAME); - for (int i = 0; i < list.getLength(); i++) { - verifyAttribute((Element) list.item(i)); - } - } - - protected void verifyAttribute(Element element) throws Fault { - Attr attribute = element.getAttributeNodeNS(WSDL_NAMESPACE_URI, - WSDL_ARRAY_TYPE_ATTR); - if (attribute != null) { - throw new Fault( - "Encountered comple type that uses attribute with 'wsdl:arrayType' (BP-R2111)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2111/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2111/build.xml deleted file mode 100644 index d60dbfa55f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2111/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2111/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2111/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2111/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2112/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2112/Client.java deleted file mode 100644 index fd3abde9c6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2112/Client.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2112; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SchemaConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testArrayTypeNames - * - * @assertion_ids: WSI:SPEC:R2007 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all xsd:complexType elements, making sure that they - * are not named ArrayOf[XXX]. - * - * @throws Fault - */ - public void testArrayTypeNames() throws Fault { - Document document = client.getDocument(); - Element[] types = DescriptionUtils.getChildElements( - document.getDocumentElement(), WSDL_NAMESPACE_URI, - WSDL_TYPES_LOCAL_NAME); - if (types.length != 0) { - verifyTypes(types[0]); - } - } - - protected void verifyTypes(Element types) throws Fault { - NodeList list = types.getElementsByTagNameNS(XSD_NAMESPACE_URI, - XSD_COMPLEXTYPE_LOCAL_NAME); - for (int i = 0; i < list.getLength(); i++) { - verifyComplexType((Element) list.item(i)); - } - } - - protected void verifyComplexType(Element complexType) throws Fault { - String name = complexType.getAttribute(XSD_NAME_ATTR); - if (name.startsWith("ArrayOf")) { - throw new Fault("xsd:complexType element encountered named '" + name - + "' (BP-R2112)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2112/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2112/build.xml deleted file mode 100644 index 8ad870fc57..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2112/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2112/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2112/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2112/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2203/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2203/Client.java deleted file mode 100644 index 05345259bb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2203/Client.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2203; - -import java.util.Properties; - -import org.w3c.dom.Document; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.j2w.*; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.err, System.out); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testRPCLiteralParts - * - * @assertion_ids: WSI:SPEC:R2203 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all binding elements that are rpc style and verify - * all literal use soap:body elements, ensuring that the - * part(s) the reference - if any - are defined using the type - * attribute. - * - * @throws Fault - */ - public void testRPCLiteralParts() throws Fault { - Document document = client.getDocument(); - PartAttributeVerifier verifier = new PartAttributeVerifier(document, 2203); - verifier.verify(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2203/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2203/build.xml deleted file mode 100644 index 8bce4d4139..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2203/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2203/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2203/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2203/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2205/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2205/Client.java deleted file mode 100644 index c05d28b664..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2205/Client.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2205; - -import java.util.Properties; - -import org.w3c.dom.Document; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.j2w.*; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testParts - * - * @assertion_ids: WSI:SPEC:R2205 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all binding elements and verify allsoap:header, - * soap:headerfault and soap:fault elements and ensure that - * their part(s) - if any - are defined using the element - * attribute. - * - * @throws Fault - */ - public void testParts() throws Fault { - Document document = client.getDocument(); - PartAttributeVerifier verifier = new PartAttributeVerifier(document, 2205); - verifier.verify(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2205/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2205/build.xml deleted file mode 100644 index 85e8f8d3b2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2205/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2205/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2205/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2205/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2206/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2206/Client.java deleted file mode 100644 index a89500d753..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2206/Client.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2206; - -import java.util.Properties; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SchemaConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * The document. - */ - private Document document; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testElementParts - * - * @assertion_ids: WSI:SPEC:R2206 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all message elements and verify all part elements, - * defined by the element attribute, ensuring that they - * reference a global element. - * - * @throws Fault - */ - public void testElementParts() throws Fault { - document = client.getDocument(); - Element[] messages = DescriptionUtils.getMessages(document); - for (int i = 0; i < messages.length; i++) { - verifyMessage(messages[i]); - } - } - - protected void verifyMessage(Element message) throws Fault { - Element[] parts = DescriptionUtils.getChildElements(message, - WSDL_NAMESPACE_URI, WSDL_PART_LOCAL_NAME); - for (int i = 0; i < parts.length; i++) { - verifyPart(parts[i]); - } - } - - protected void verifyPart(Element part) throws Fault { - Attr attr = part.getAttributeNode(WSDL_ELEMENT_ATTR); - if (attr == null) { - return; - } - String value = attr.getValue(); - int index = value.indexOf(':'); - String prefix = value.substring(0, index); - String name = value.substring(index + 1); - System.out.println("name =" + name); - System.out.println("prefix =" + prefix); - String namespaceURI = DescriptionUtils.getNamespaceURI(part, prefix); - System.out.println("namespaceURI =" + namespaceURI); - if (namespaceURI == null) { - throw new Fault("xmlns:" + prefix + " not defined (BP-R2206)"); - } - System.out.println("----------------------------"); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2206/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2206/build.xml deleted file mode 100644 index ea6b0553df..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2206/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2206/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2206/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2206/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2207/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2207/Client.java deleted file mode 100644 index 454238a066..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2207/Client.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2207; - -import java.util.Properties; - -import org.w3c.dom.Document; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.j2w.*; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testElementParts - * - * @assertion_ids: WSI:SPEC:R2207 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all message elements and verify all part elements, - * defined by the element attribute, ensuring that they're not - * referenced by a body in an rpc-literal binding. - * - * @throws Fault - */ - public void testElementParts() throws Fault { - Document document = client.getDocument(); - PartAttributeVerifier verifier = new PartAttributeVerifier(document, 2207); - verifier.verify(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2207/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2207/build.xml deleted file mode 100644 index 7e92b59584..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2207/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2207/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2207/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2207/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2301/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2301/Client.java deleted file mode 100644 index ac3288481d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2301/Client.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)Client.java 1.3 03/05/09 - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2301; - -import java.util.Iterator; -import java.util.Properties; - -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.SOAPMessage; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * The document. - */ - private Document document; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testOrder - * - * @assertion_ids: WSI:SPEC:R2301 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * locate the "getBean" operation, examine the response - * message and capture the part order. A request to the - * end-point should yield a response with the parts in that - * particular order. - * - * @throws Fault - */ - public void testOrder() throws Fault { - document = client.getDocument(); - Element operation = getOperation(); - Element output = getOutput(operation); - Element message = getMessage(output); - SOAPMessage response = makeRequest(); - verifyOrder(response, message); - } - - protected Element getOperation() throws Fault { - Element portType = DescriptionUtils.getPortType(document, - "J2WRLSharedEndpoint"); - if (portType == null) { - throw new Fault( - "Required portType 'J2WRLSharedEndpoint' not found (BP-R2301)"); - } - Element operation = DescriptionUtils.getNamedChildElement(portType, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME, "getBean"); - if (operation == null) { - throw new Fault("Required operation 'getBean' not found (BP-R2301)"); - } - return operation; - } - - protected Element getOutput(Element operation) throws Fault { - Element output = DescriptionUtils.getChildElement(operation, - WSDL_NAMESPACE_URI, WSDL_OUTPUT_LOCAL_NAME); - if (output == null) { - throw new Fault( - "Required output for operation 'getBean' not found (BP-R2301)"); - } - return output; - } - - protected Element getMessage(Element output) throws Fault { - String name = output.getAttribute(WSDL_MESSAGE_ATTR); - int index = name.indexOf(':'); - if (index > 0) { - name = name.substring(index + 1); - } - Element message = DescriptionUtils.getMessage(document, name); - if (message == null) { - throw new Fault( - "Requirement message '" + name + "' for output not found (BP-R2301)"); - } - return message; - } - - protected SOAPMessage makeRequest() throws Fault { - try { - return client.makeSaajRequest(SOAPRequests.R2301_REQUEST); - } catch (Exception e) { - throw new Fault("Unable to make request (BP-R2301)", e); - } - } - - protected void verifyOrder(SOAPMessage response, Element message) - throws Fault { - SOAPBody body; - try { - body = response.getSOAPBody(); - } catch (Exception e) { - throw new Fault("Unable to retrieve SOAP body from response (BP-R2301)", - e); - } - SOAPElement beanResponse = (SOAPElement) body.getFirstChild(); - Iterator responseParts = beanResponse.getChildElements(); - Element[] messageParts = DescriptionUtils.getChildElements(message); - for (int i = 0; i < messageParts.length; i++) { - if (!responseParts.hasNext()) { - throw new Fault( - "Message has additional part(s) but response has not (BP-R2301)"); - } - String partName1 = messageParts[i].getAttribute(WSDL_NAME_ATTR); - SOAPElement part = (SOAPElement) responseParts.next(); - String partName2 = part.getElementName().getLocalName(); - if (!partName2.equals(partName1)) { - throw new Fault("Expected part named '" + partName1 + "' but got '" - + partName2 + "' (BP-R2301)"); - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2301/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2301/build.xml deleted file mode 100644 index 64504bed26..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2301/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2301/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2301/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2301/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2303/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2303/Client.java deleted file mode 100644 index d5bea9901b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2303/Client.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2303; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testOperations - * - * @assertion_ids: WSI:SPEC:R2303 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the operation(s) making sure they are not - * Notification or Solicit-Response kinds. - * - * @throws Fault - */ - public void testOperations() throws Fault { - Document document = client.getDocument(); - Element[] portTypes = DescriptionUtils.getPortTypes(document); - for (int i = 0; i < portTypes.length; i++) { - verifyPortType(portTypes[i]); - } - } - - protected void verifyPortType(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < children.length; i++) { - verifyOperation(children[i]); - } - } - - protected void verifyOperation(Element element) throws Fault { - String name = element.getAttribute(WSDL_NAME_ATTR); - int input = -1; - int output = -1; - int fault = -1; - Element[] children = DescriptionUtils.getChildElements(element); - for (int i = 0; i < children.length; i++) { - String namespaceURI = children[i].getNamespaceURI(); - if (!WSDL_NAMESPACE_URI.equals(namespaceURI)) { - continue; - } - String localName = children[i].getLocalName(); - if (WSDL_FAULT_LOCAL_NAME.equals(localName)) { - if (fault != -1) { - throw new Fault("More than one wsdl:fault encountered in operation '" - + name + "' (BP-R2303)"); - } - fault = i; - } else if (WSDL_INPUT_LOCAL_NAME.equals(localName)) { - if (input != -1) { - throw new Fault("More than one wsdl:input encountered in operation '" - + name + "' (BP-R2303)"); - } - input = i; - } else if (WSDL_OUTPUT_LOCAL_NAME.equals(localName)) { - if (output != -1) { - throw new Fault("More than one wsdl:output encountered in operation '" - + name + "' (BP-R2303)"); - } - output = i; - } - } - if ((input == 0) && (output == -1)) { - // ONE WAY - } else if ((input == 0) && (output == 1)) { - // REQUEST/RESPONSE - } else if ((output == 0) && (input == 1)) { - // SOLICIT RESPONSE - throw new Fault( - "'Solicit Response' operation '" + name + "' encountered (BP-R2303)"); - } else if ((output == 0) && (input == -1)) { - // NOTIFICATION - throw new Fault( - "'Notification' operation '" + name + "' encountered (BP-R2303)"); - } else { - throw new Fault("Operation '" + name + "' has unknown type (BP-R2303)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2303/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2303/build.xml deleted file mode 100644 index ada3856f56..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2303/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2303/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2303/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2303/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2304/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2304/Client.java deleted file mode 100644 index b7eaba9989..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2304/Client.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2304; - -import java.util.ArrayList; -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * The names. - */ - private ArrayList names; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testOperations - * - * @assertion_ids: WSI:SPEC:R2304 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the operation(s) making sure they are uniquely - * named. - * - * @throws Fault - */ - public void testOperations() throws Fault { - names = new ArrayList(); - Document document = client.getDocument(); - Element[] portTypes = DescriptionUtils.getPortTypes(document); - for (int i = 0; i < portTypes.length; i++) { - verifyPortType(portTypes[i]); - } - } - - protected void verifyPortType(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < children.length; i++) { - verifyOperation(children[i]); - } - } - - protected void verifyOperation(Element element) throws Fault { - String name = element.getAttribute(WSDL_NAME_ATTR); - if (names.contains(name)) { - throw new Fault( - "Duplicate operation '" + name + "' encountered (BP-R2304)"); - } - names.add(name); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2304/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2304/build.xml deleted file mode 100644 index 3c5da9a693..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2304/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2304/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2304/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2304/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2305/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2305/Client.java deleted file mode 100644 index 9c4d15e056..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2305/Client.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2305; - -import java.util.ArrayList; -import java.util.Properties; -import java.util.StringTokenizer; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.simpleclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static SimpleTest service = null; - - /** - * The document. - */ - private Document document; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(SimpleTestClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testParameterOrder - * - * @assertion_ids: WSI:SPEC:R2305 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the operation(s) making sure they have correct - * parameterOrder attributes - if present. - * - * @throws Fault - */ - public void testParameterOrder() throws Fault { - document = client.getDocument(); - Element[] portTypes = DescriptionUtils.getPortTypes(document); - for (int i = 0; i < portTypes.length; i++) { - verifyPortType(portTypes[i]); - } - } - - protected void verifyPortType(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < children.length; i++) { - verifyOperation(children[i]); - } - } - - protected void verifyOperation(Element element) throws Fault { - Element output = getOutput(element); - if (output == null) { - return; - } - String parameterOrder = element.getAttribute(WSDL_PARAMETERORDER_ATTR) - .trim(); - if (parameterOrder.length() == 0) { - return; - } - String operationName = element.getAttribute(WSDL_NAME_ATTR); - Element input = getInput(element); - Element inputMessage = null; - if (input != null) { - inputMessage = getMessage(input); - } - Element outputMessage = getMessage(output); - ArrayList inputNames; - if (inputMessage != null) { - inputNames = getPartNames(inputMessage); - } else { - inputNames = new ArrayList(); - } - ArrayList outputNames = getPartNames(outputMessage); - StringTokenizer tokenizer = new StringTokenizer(parameterOrder, " "); - while (tokenizer.hasMoreTokens()) { - String name = tokenizer.nextToken(); - if ((!inputNames.contains(name)) && (!outputNames.contains(name))) { - throw new Fault("Parameter '" + name + "' of operation '" - + operationName + "' not a part of in- or output message"); - } - inputNames.remove(name); - outputNames.remove(name); - } - if (outputNames.size() > 1) { - throw new Fault("Parameter order of operation '" + operationName - + "' leaves out more than 1 output message part (BP-R2305)"); - } - } - - protected Element getOutput(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - WSDL_NAMESPACE_URI, WSDL_OUTPUT_LOCAL_NAME); - if (children.length > 0) { - return children[0]; - } - return null; - } - - protected Element getInput(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - WSDL_NAMESPACE_URI, WSDL_INPUT_LOCAL_NAME); - if (children.length > 0) { - return children[0]; - } - return null; - } - - protected Element getMessage(Element element) throws Fault { - String message = element.getAttribute(DescriptionUtils.WSDL_MESSAGE_ATTR); - int index = message.indexOf(':'); - if (index == -1) { - throw new Fault( - "In- or output element refers to unqualified message name '" + message - + "' (BP-R2305)"); - } - String localName = message.substring(index + 1); - Element[] children = DescriptionUtils.getChildElements(document, - WSDL_NAMESPACE_URI, WSDL_MESSAGE_LOCAL_NAME); - for (int i = 0; i < children.length; i++) { - String name = children[i].getAttribute(WSDL_NAME_ATTR); - if (name.equals(localName)) { - return children[i]; - } - } - throw new Fault("Message '" + localName + "' not found (BP-R2305)"); - } - - protected ArrayList getPartNames(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - WSDL_NAMESPACE_URI, WSDL_PART_LOCAL_NAME); - ArrayList names = new ArrayList(children.length); - for (int i = 0; i < children.length; i++) { - String name = children[i].getAttribute(WSDL_NAME_ATTR); - if (names.contains(name)) { - throw new Fault("Duplicate part name '" + name - + "' encountered on message (BP-R2305)"); - } - names.add(name); - } - return names; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2305/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2305/build.xml deleted file mode 100644 index 31010b8792..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2305/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2305/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2305/jakartaEE.tokens deleted file mode 100644 index 2b1ed6fe22..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2305/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wsimpletest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.simpleclient.SimpleTest -URLALIAS=/jaxws/SimpleTest -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/wsj2wsimpletest -SERVICEREFNAMEWSEJB=service/wsj2wsimpletest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wsimpletest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2306/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2306/Client.java deleted file mode 100644 index 16475a8ae3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2306/Client.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2306; - -import java.util.Properties; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * The document. - */ - private Document document; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testMessageParts - * - * @assertion_ids: WSI:SPEC:R2306 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the port type(s) making sure they have correct, - * valid messages. - * - * @throws Fault - */ - public void testMessageParts() throws Fault { - document = client.getDocument(); - Element[] portTypes = DescriptionUtils.getPortTypes(document); - for (int i = 0; i < portTypes.length; i++) { - verifyPortType(portTypes[i]); - } - } - - protected void verifyPortType(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < children.length; i++) { - verifyOperation(children[i]); - } - } - - protected void verifyOperation(Element element) throws Fault { - Element input = getInput(element); - if (input != null) { - Element message = getMessage(input); - verifyMessage(message); - } - Element output = getOutput(element); - if (output != null) { - Element message = getMessage(output); - verifyMessage(message); - } - } - - protected void verifyMessage(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - WSDL_NAMESPACE_URI, WSDL_PART_LOCAL_NAME); - for (int i = 0; i < children.length; i++) { - Attr attr; - attr = children[i].getAttributeNode(WSDL_TYPE_ATTR); - if (attr == null) { - return; - } - attr = children[i].getAttributeNode(WSDL_ELEMENT_ATTR); - if (attr != null) { - String messageName = element.getAttribute(WSDL_NAME_ATTR); - String partName = children[i].getAttribute(WSDL_NAME_ATTR); - throw new Fault("Part '" + partName + "' in message '" + messageName - + "' references both a type and an element (BP-R2306)"); - } - - } - } - - protected Element getOutput(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - WSDL_NAMESPACE_URI, WSDL_OUTPUT_LOCAL_NAME); - if (children.length > 0) { - return children[0]; - } - return null; - } - - protected Element getInput(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - WSDL_NAMESPACE_URI, WSDL_INPUT_LOCAL_NAME); - if (children.length > 0) { - return children[0]; - } - return null; - } - - protected Element getMessage(Element element) throws Fault { - String message = element.getAttribute(DescriptionUtils.WSDL_MESSAGE_ATTR); - int index = message.indexOf(':'); - if (index == -1) { - throw new Fault( - "In- or output element refers to unqualified message name '" + message - + "' (BP-R2306)"); - } - String localName = message.substring(index + 1); - Element[] children = DescriptionUtils.getChildElements(document, - WSDL_NAMESPACE_URI, WSDL_MESSAGE_LOCAL_NAME); - for (int i = 0; i < children.length; i++) { - String name = children[i].getAttribute(WSDL_NAME_ATTR); - if (name.equals(localName)) { - return children[i]; - } - } - throw new Fault("Message '" + localName + "' not found (BP-R2306)"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2306/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2306/build.xml deleted file mode 100644 index a0338f26e6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2306/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2306/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2306/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2306/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2401/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2401/Client.java deleted file mode 100644 index 286328fcad..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2401/Client.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2401; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testBindingConformance - * - * @assertion_ids: WSI:SPEC:R2401 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the wsdl:binding elements to ensure that they - * conform to the WSDL 1.1 section 3 specifics. - * - * @throws Fault - */ - public void testBindingConformance() throws Fault { - Document document = client.getDocument(); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - } - - protected void verifyBinding(Element element) throws Fault { - Element[] children; - children = DescriptionUtils.getChildElements(element, SOAP_NAMESPACE_URI, - SOAP_BINDING_LOCAL_NAME); - if (children.length == 0) { - throw new Fault("Required soap:binding element not present (BP-R2401)"); - } - verifySOAPBinding(children[0]); - children = DescriptionUtils.getChildElements(element, WSDL_NAMESPACE_URI, - WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < children.length; i++) { - verifyOperation(children[i]); - } - } - - protected void verifySOAPBinding(Element element) throws Fault { - String transport = element.getAttribute(SOAP_TRANSPORT_ATTR); - if (transport.length() > 0) { - verifyURI(transport); - } else { - throw new Fault("Required soap:binding attribute not present (BP-R2401)"); - } - String style = element.getAttribute(SOAP_STYLE_ATTR); - if (style.length() > 0) { - verifyStyle(style); - } - } - - protected void verifyOperation(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - SOAP_NAMESPACE_URI, SOAP_OPERATION_LOCAL_NAME); - if (children.length == 0) { - throw new Fault("Required soap:operation element not found (BP-R2401)"); - } - } - - protected void verifySOAPOperation(Element element) throws Fault { - String soapAction = element.getAttribute(SOAP_SOAPACTION_ATTR); - if (soapAction.length() > 0) { - verifyURI(soapAction); - } - String style = element.getAttribute(DescriptionUtils.SOAP_STYLE_ATTR); - if (style.length() > 0) { - verifyStyle(style); - } - Element[] children = DescriptionUtils.getChildElements(element, - WSDL_NAMESPACE_URI, null); - for (int i = 0; i < children.length; i++) { - String localName = children[i].getLocalName(); - if ((localName.equals(WSDL_INPUT_LOCAL_NAME)) - || (localName.equals(WSDL_OUTPUT_LOCAL_NAME))) { - verifyInputOutput(children[i]); - } - } - } - - protected void verifyInputOutput(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - SOAP_NAMESPACE_URI, SOAP_BODY_LOCAL_NAME); - if (children.length == 0) { - throw new Fault("Required soap:body element not found (BP-R2401)"); - } - verifySOAPBody(children[0]); - } - - protected void verifySOAPBody(Element element) throws Fault { - String use = element.getAttribute(SOAP_USE_ATTR); - if (use.length() > 0) { - verifyUse(use); - } - String encodingStyle = element.getAttribute(SOAP_ENCODINGSTYLE_ATTR); - if (encodingStyle.length() > 0) { - verifyURI(encodingStyle); - } - String namespace = element.getAttribute(SOAP_NAMESPACE_ATTR); - if (namespace.length() > 0) { - verifyURI(namespace); - } - } - - protected void verifyStyle(String style) throws Fault { - if (style.equals(SOAP_DOCUMENT)) { - return; - } - if (style.equals(SOAP_RPC)) { - return; - } - throw new Fault("The SOAP style '" + style + "' is invalid (BP-R2401)"); - } - - protected void verifyUse(String use) throws Fault { - if (use.equals(SOAP_ENCODED)) { - return; - } - if (use.equals(SOAP_LITERAL)) { - return; - } - throw new Fault("The SOAP use '" + use + "' is invalid (BP-R2401)"); - } - - protected void verifyURI(String uri) throws Fault { - try { - new URL(uri); - } catch (MalformedURLException e) { - throw new Fault("The URI '" + uri + "' is not valid (BP-R2401)", e); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2401/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2401/build.xml deleted file mode 100644 index 48fc291b34..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2401/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2401/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2401/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2401/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2701/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2701/Client.java deleted file mode 100644 index da22f7a3a7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2701/Client.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2701; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line argument. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testBindingTransport - * - * @assertion_ids: WSI:SPEC:R2701 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the wsdl:binding elements to ensure that their - * soap:binding element has a transport attribute specified. - * - * @throws Fault - */ - public void testBindingTransport() throws Fault { - Document document = client.getDocument(); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - } - - protected void verifyBinding(Element element) throws Fault { - Element[] children; - children = DescriptionUtils.getChildElements(element, SOAP_NAMESPACE_URI, - SOAP_BINDING_LOCAL_NAME); - if (children.length == 0) { - throw new Fault("Required soap:binding element not present (BP-R2701)"); - } - verifySOAPBinding(children[0]); - - } - - protected void verifySOAPBinding(Element element) throws Fault { - String transport = element.getAttribute(SOAP_TRANSPORT_ATTR); - if (transport.length() == 0) { - throw new Fault( - "The required soap:binding transport attribute not present (BP-R2701)"); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2701/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2701/build.xml deleted file mode 100644 index 36e76776c4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2701/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2701/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2701/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2701/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2702/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2702/Client.java deleted file mode 100644 index 0461ea284f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2702/Client.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2702; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line argument. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testBindingTransport - * - * @assertion_ids: WSI:SPEC:R2702 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the wsdl:binding elements to ensure that their - * soap:binding element has a transport that equals - * "http://schemas.xmlsoap.org/soap/http" - * - * @throws Fault - */ - public void testBindingTransport() throws Fault { - Document document = client.getDocument(); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - } - - protected void verifyBinding(Element element) throws Fault { - Element[] children; - children = DescriptionUtils.getChildElements(element, SOAP_NAMESPACE_URI, - SOAP_BINDING_LOCAL_NAME); - if (children.length == 0) { - throw new Fault("Required soap:binding element not present (BP-R2702)"); - } - verifySOAPBinding(children[0]); - - } - - protected void verifySOAPBinding(Element element) throws Fault { - String transport = element.getAttribute(SOAP_TRANSPORT_ATTR); - if (!transport.equals(SOAP_TRANSPORT)) { - throw new Fault( - "The SOAP transport '" + transport + "' is invalid (BP-R2702)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2702/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2702/build.xml deleted file mode 100644 index a7b9f3a751..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2702/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2702/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2702/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2702/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2705/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2705/Client.java deleted file mode 100644 index a9fe143c18..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2705/Client.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2705; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * The style. - */ - private String style; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testOperationStyles - * - * @assertion_ids: WSI:SPEC:R2705 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the wsdl:binding elements to ensure that their - * wsdl:operation's soap:operation elements have the same - * style. - * - * @throws Fault - */ - public void testOperationStyles() throws Fault { - Document document = client.getDocument(); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - } - - protected void verifyBinding(Element element) throws Fault { - style = null; - Element[] children; - children = DescriptionUtils.getChildElements(element, WSDL_NAMESPACE_URI, - WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < children.length; i++) { - verifyOperation(children[i]); - } - } - - protected void verifyOperation(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - SOAP_NAMESPACE_URI, SOAP_OPERATION_LOCAL_NAME); - if (children.length == 0) { - throw new Fault("Required soap:operation element not found (BP-R2705)"); - } - verifySOAPOperation(children[0]); - } - - protected void verifySOAPOperation(Element element) throws Fault { - String style = element.getAttribute(SOAP_STYLE_ATTR); - if (style.length() == 0) { - style = DescriptionUtils.SOAP_DOCUMENT; - } - if (this.style == null) { - this.style = style; - } else { - if (!this.style.equals(style)) { - throw new Fault("soap:operation style '" + style - + "' conflicts with previous style '" + this.style - + "' (BP-R2705)"); - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2705/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2705/build.xml deleted file mode 100644 index 547cc7bd3c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2705/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2705/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2705/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2705/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2710/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2710/Client.java deleted file mode 100644 index 8d4abd66dc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2710/Client.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2710; - -import java.util.ArrayList; -import java.util.Properties; -import java.util.StringTokenizer; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * The document. - */ - private Document document; - - /** - * The signatures. - */ - private ArrayList signatures; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testWireSignatures - * - * @assertion_ids: WSI:SPEC:R2710 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the wsdl:binding elements to ensure that their - * input- and output element's soap:body elements reference - * unique global part elements. - * - * @throws Fault - */ - public void testWireSignatures() throws Fault { - document = client.getDocument(); - signatures = new ArrayList(); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - } - - protected void verifyBinding(Element binding) throws Fault { - Element[] operations = DescriptionUtils.getChildElements(binding, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - verifyOperation(binding, operations[i]); - } - } - - protected void verifyOperation(Element binding, Element operation) - throws Fault { - Element[] children = DescriptionUtils.getChildElements(operation, - WSDL_NAMESPACE_URI, null); - for (int i = 0; i < children.length; i++) { - String localName = children[i].getLocalName(); - if ((localName.equals(WSDL_INPUT_LOCAL_NAME))) { - verifyInput(binding, operation, children[i]); - } - } - } - - protected void verifyInput(Element binding, Element operation, Element io) - throws Fault { - Element soapBody = DescriptionUtils.getChildElement(io, SOAP_NAMESPACE_URI, - SOAP_BODY_LOCAL_NAME); - if (soapBody == null) { - return; - } - String partName = ""; - String parts = soapBody.getAttribute(SOAP_PARTS_ATTR); - if (parts.length() > 0) { - StringTokenizer tokenizer = new StringTokenizer(parts, " "); - partName = tokenizer.nextToken(); - } - Element message = getMessage(binding, operation, io); - verifyMessage(binding, operation, io, message, partName); - } - - protected void verifyMessage(Element binding, Element operation, Element io, - Element message, String partName) throws Fault { - Element part = null; - if (partName.length() > 0) { - part = DescriptionUtils.getNamedChildElement(message, WSDL_NAMESPACE_URI, - WSDL_PART_LOCAL_NAME, partName); - if (part == null) { - throw new Fault("wsdl:message named '" - + message.getAttribute(WSDL_NAME_ATTR) - + "' does not contain part named '" + partName + "' (BP-R2710)"); - } - } else { - Element[] parts = DescriptionUtils.getChildElements(message, - WSDL_NAMESPACE_URI, WSDL_PART_LOCAL_NAME); - if (parts.length > 0) { - part = parts[0]; - } - } - String signature; - if (part == null) { - signature = ""; - } else { - signature = part.getAttribute(WSDL_ELEMENT_ATTR); - } - if (signature.length() == 0) { - return; - } - if (signatures.contains(signature)) { - throw new Fault( - "The wire signature '" + signature + "' is not unique (BP-R2710)"); - } else { - signatures.add(signature); - } - } - - protected Element getMessage(Element binding, Element operation, Element io) - throws Fault { - String name = binding.getAttribute(WSDL_TYPE_ATTR); - int index; - index = name.indexOf(':'); - if (index > 0) { - name = name.substring(index + 1); - } - Element portType = DescriptionUtils.getPortType(document, name); - if (portType == null) { - throw new Fault("Required wsdl:portType element named '" + name - + "' not found (BP-R2210)"); - } - name = operation.getAttribute(WSDL_NAME_ATTR); - operation = DescriptionUtils.getNamedChildElement(portType, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME, name); - if (name == null) { - throw new Fault( - "Required wsdl:operation element is named 'null' (BP-R2210)"); - } - name = io.getAttribute(WSDL_NAME_ATTR); - String localName = io.getLocalName(); - io = DescriptionUtils.getNamedChildElement(operation, WSDL_NAMESPACE_URI, - localName, name); - if (io == null) { - throw new Fault("Required wsdl:" + localName + " element named '" + name - + "' not found (BP-R2210)"); - } - name = io.getAttribute(WSDL_MESSAGE_ATTR); - index = name.indexOf(':'); - if (index > 0) { - name = name.substring(index + 1); - } - Element message = DescriptionUtils.getMessage(document, name); - if (message == null) { - throw new Fault("Required wsdl:message element named '" + name - + "' not found (BP-R2210)"); - } - return message; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2710/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2710/build.xml deleted file mode 100644 index 6d910fd89f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2710/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2710/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2710/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2710/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2717/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2717/Client.java deleted file mode 100644 index 58cb411c1c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2717/Client.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2717; - -import java.util.Properties; - -import org.w3c.dom.Document; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.j2w.NamespaceAttributeVerifier; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSOAPElementNamespace - * - * @assertion_ids: WSI:SPEC:R2717 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the rpc-literal wsdl:binding elements to ensure - * that their input- and output elements' soap:body elements - * do have a namespace attribute defined that is an absolute - * URI. - * - * @throws Fault - */ - public void testSOAPElementNamespace() throws Fault { - Document document = client.getDocument(); - NamespaceAttributeVerifier verifier = new NamespaceAttributeVerifier( - document, 2717); - verifier.verify(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2717/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2717/build.xml deleted file mode 100644 index 81d68f6da9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2717/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2717/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2717/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2717/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2718/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2718/Client.java deleted file mode 100644 index 68b122f84f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2718/Client.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2718; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements DescriptionConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * The document. - */ - private Document document; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testBindingOperations - * - * @assertion_ids: WSI:SPEC:R2718 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the wsdl:binding elements, ensuring that the list - * of operations match exactly the list of operations in the - * references portType element(s). - * - * @throws Fault - */ - public void testBindingOperations() throws Fault { - document = client.getDocument(); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - } - - protected void verifyBinding(Element binding) throws Fault { - Element portType = getPortType(binding); - ArrayList bindingNames = getOperationNames(binding); - ArrayList portTypeNames = getOperationNames(portType); - Iterator iterator = bindingNames.iterator(); - while (iterator.hasNext()) { - String name = (String) iterator.next(); - if (!portTypeNames.contains(name)) { - throw new Fault("Operation '" + name - + "' in wsdl:binding not present in referenced wsdl:portType (BP-R2718)"); - } - portTypeNames.remove(name); - } - int names = portTypeNames.size(); - if (names > 0) { - throw new Fault(names - + " operations listed in referenced wsdl:portType are not present in referencing wsdl:binding (BP-R2718)"); - } - } - - protected Element getPortType(Element binding) throws Fault { - String type = binding.getAttribute(WSDL_TYPE_ATTR); - int index = type.indexOf(':'); - if (index > 0) { - type = type.substring(index + 1); - } - Element[] portTypes = DescriptionUtils.getPortTypes(document); - for (int i = 0; i < portTypes.length; i++) { - String name = portTypes[i].getAttribute(WSDL_NAME_ATTR); - if (type.equals(name)) { - return portTypes[i]; - } - } - throw new Fault("Port type '" + type - + "' referenced in wsdl:binding not found (BP-R2718)"); - } - - protected ArrayList getOperationNames(Element element) { - ArrayList names = new ArrayList(); - Element[] operations = DescriptionUtils.getChildElements(element, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - String name = operations[i].getAttribute(WSDL_NAME_ATTR); - names.add(name); - } - return names; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2718/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2718/build.xml deleted file mode 100644 index 861576002f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2718/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2718/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2718/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2718/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2720/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2720/Client.java deleted file mode 100644 index dddb79a65e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2720/Client.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2720; - -import java.util.Properties; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testPartAttributes - * - * @assertion_ids: WSI:SPEC:R2720 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the wsdl:binding elements, ensuring that the input - * and output elements' header and headerfault elements have - * the part attributes and that they're NMTOKENs. - * - * @throws Fault - */ - public void testPartAttributes() throws Fault { - Document document = client.getDocument(); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - } - - protected void verifyBinding(Element binding) throws Fault { - Element[] operations = DescriptionUtils.getChildElements(binding, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - verifyOperation(operations[i]); - } - } - - protected void verifyOperation(Element operation) throws Fault { - Element[] children = DescriptionUtils.getChildElements(operation, - WSDL_NAMESPACE_URI, null); - for (int i = 0; i < children.length; i++) { - String localName = children[i].getLocalName(); - if ((localName.equals(WSDL_INPUT_LOCAL_NAME)) - || (localName.equals(WSDL_OUTPUT_LOCAL_NAME))) { - verifyInputOutput(children[i]); - } - } - } - - protected void verifyInputOutput(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - SOAP_NAMESPACE_URI, null); - for (int i = 0; i < children.length; i++) { - String localName = children[i].getLocalName(); - if ((localName.equals(SOAP_HEADER_LOCAL_NAME)) - || (localName.equals(SOAP_HEADERFAULT_LOCAL_NAME))) { - verifyPartAttribute(children[i]); - } - } - } - - protected void verifyPartAttribute(Element element) throws Fault { - String localName = element.getLocalName(); - Attr attr = element.getAttributeNode(SOAP_PART_ATTR); - if (attr == null) { - throw new Fault("Required attribute 'part' not found on element '" - + localName + "' (BP-R2720)"); - } - String value = attr.getValue().trim(); - if (value.length() == 0) { - throw new Fault("Required attribute 'part' on element '" + localName - + "' is empty (BP-R2720)"); - } - if ((value.indexOf(':') != -1) || (value.indexOf(':') != -1)) { - throw new Fault("Attribute 'part' with value '" + value + "' on element '" - + localName + "' is no a valid NMTOKEN (BP-R2720)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2720/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2720/build.xml deleted file mode 100644 index 502b746665..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2720/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2720/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2720/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2720/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2721/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2721/Client.java deleted file mode 100644 index efcbf863b2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2721/Client.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2721; - -import java.util.Properties; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.faultclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static FaultTest service = null; - - private boolean foundOne = false; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(FaultTestClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testNameAttributes - * - * @assertion_ids: WSI:SPEC:R2721 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the wsdl:binding elements, ensuring that the - * contained soap:fault elements have the name attribute - * specified. - * - * @throws Fault - */ - public void testNameAttributes() throws Fault { - Document document = client.getDocument(); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - if (!foundOne) { - throw new Fault("No soap:fault elements found during test"); - } - - } - - protected void verifyBinding(Element binding) throws Fault { - Element[] operations = DescriptionUtils.getChildElements(binding, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - verifyOperation(operations[i]); - } - } - - protected void verifyOperation(Element operation) throws Fault { - NodeList list = operation.getElementsByTagNameNS(SOAP_NAMESPACE_URI, - SOAP_FAULT_LOCAL_NAME); - for (int i = 0; i < list.getLength(); i++) { - verifySOAPFault((Element) list.item(i)); - } - } - - protected void verifySOAPFault(Element fault) throws Fault { - Attr attr = fault.getAttributeNode(SOAP_NAME_ATTR); - if (attr == null) { - throw new Fault( - "Required 'name' attribute not present on soap:fault element (BP-R2721)"); - } else { - foundOne = true; - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2721/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2721/build.xml deleted file mode 100644 index 9a5e5a3a9c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2721/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2721/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2721/jakartaEE.tokens deleted file mode 100644 index c7e1d5e4b0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2721/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wfaulttest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.faultclient.FaultTest -URLALIAS=/jaxws/FaultTest -WEBSERVICEDESCRIPTION=FaultTest -SERVICEREFNAMEWSSERVLET=service/wsj2wfaulttest -SERVICEREFNAMEWSEJB=service/wsj2wfaulttest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wfaulttest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2723/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2723/Client.java deleted file mode 100644 index 8edc83a124..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2723/Client.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2723; - -import java.util.Properties; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testUseAttributes - * - * @assertion_ids: WSI:SPEC:R2723 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the wsdl:binding elements, ensuring that the - * contained soap:fault elements that have the use attribute - * specified, have the value "literal". - * - * @throws Fault - */ - public void testUseAttributes() throws Fault { - Document document = client.getDocument(); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - } - - protected void verifyBinding(Element binding) throws Fault { - Element[] operations = DescriptionUtils.getChildElements(binding, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - verifyOperation(operations[i]); - } - } - - protected void verifyOperation(Element operation) throws Fault { - NodeList list = operation.getElementsByTagNameNS(SOAP_NAMESPACE_URI, - SOAP_FAULT_LOCAL_NAME); - for (int i = 0; i < list.getLength(); i++) { - verifySOAPFault((Element) list.item(i)); - } - } - - protected void verifySOAPFault(Element fault) throws Fault { - Attr attr = fault.getAttributeNode(SOAP_USE_ATTR); - if (attr != null) { - String use = attr.getValue(); - if (!use.equals(SOAP_LITERAL)) { - throw new Fault( - "soap:fault element encountered with specified 'use' attribute value that is not 'literal' (BP-R2723)"); - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2723/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2723/build.xml deleted file mode 100644 index 8d3558c206..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2723/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2723/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2723/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2723/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2724/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2724/Client.java deleted file mode 100644 index 64a7249514..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2724/Client.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2724; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.simpleclient.*; -import com.sun.ts.tests.jaxws.wsi.utils.SOAPUtils; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import java.util.Properties; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements SOAPRequests { - - private SimpleTestClient client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (SimpleTestClient) ClientFactory.getClient(SimpleTestClient.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testVersionMismatchFaultcode - * - * @assertion_ids: WSI:SPEC:R2724 - * - * @test_Strategy: Make a request and inspect response to ensure faultcode - * "VersionMismatch" was sent. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testVersionMismatchFaultcode() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(BAD_SOAP_ENVELOPE); - client.logMessageInHarness(response); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateVersionMismatchFaultcode(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - } - - /** - * @testName: testMustUnderstandFaultcode - * - * @assertion_ids: WSI:SPEC:R2724 - * - * @test_Strategy: Make a request and inspect response to ensure faultcode - * "MustUnderstand" was sent. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testMustUnderstandFaultcode() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(MUST_UNDERSTAND_HEADER); - client.logMessageInHarness(response); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateMustUnderstandFaultcode(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - } - - /** - * @testName: testClientFaultcode - * - * @assertion_ids: WSI:SPEC:R2724 - * - * @test_Strategy: Make a request and inspect response to ensure faultcode - * "Client" was sent. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testClientFaultcode() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(NON_EXISTANT_OPERATION); - client.logMessageInHarness(response); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateClientFaultcode(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - } - - private void validateVersionMismatchFaultcode(SOAPMessage response) - throws EETest.Fault, SOAPException { - if (!SOAPUtils.isVersionMismatchFaultcode(response)) { - throw new EETest.Fault( - "Invalid soap:Fault: faultcode must be \"VersionMismatch\" (BP-R2724)"); - } - } - - private void validateClientFaultcode(SOAPMessage response) - throws EETest.Fault, SOAPException { - if (!SOAPUtils.isClientFaultcode(response)) { - throw new EETest.Fault( - "Invalid soap:Fault: faultcode must be \"Client\" (BP-R2724)"); - } - } - - private void validateMustUnderstandFaultcode(SOAPMessage response) - throws EETest.Fault, SOAPException { - if (!SOAPUtils.isMustUnderstandFaultcode(response)) { - throw new EETest.Fault( - "Invalid soap:Fault: faultcode must be \"MustUnderstand\" (BP-R2724)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2724/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2724/build.xml deleted file mode 100644 index b8dbf3f076..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2724/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2724/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2724/jakartaEE.tokens deleted file mode 100644 index 2b1ed6fe22..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2724/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wsimpletest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.simpleclient.SimpleTest -URLALIAS=/jaxws/SimpleTest -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/wsj2wsimpletest -SERVICEREFNAMEWSEJB=service/wsj2wsimpletest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wsimpletest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2725/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2725/Client.java deleted file mode 100644 index b263b998cd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2725/Client.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2725; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.simpleclient.*; -import com.sun.ts.tests.jaxws.wsi.utils.SOAPUtils; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import java.util.Properties; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements SOAPRequests { - - private SimpleTestClient client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (SimpleTestClient) ClientFactory.getClient(SimpleTestClient.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testVersionMismatchFaultcode - * - * @assertion_ids: WSI:SPEC:R2725 - * - * @test_Strategy: Make a request and inspect response to ensure faultcode - * "VersionMismatch" was sent. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testVersionMismatchFaultcode() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(BAD_SOAP_ENVELOPE); - client.logMessageInHarness(response); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateVersionMismatchFaultcode(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - } - - /** - * @testName: testVersionMismatchFaultcodeWithMustUnderstand - * - * @assertion_ids: WSI:SPEC:R2725 - * - * @test_Strategy: Make a request and inspect response to ensure faultcode - * "VersionMismatch" was sent. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testVersionMismatchFaultcodeWithMustUnderstand() - throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(BAD_SOAP_ENVELOPE_WITH_HEADER); - client.logMessageInHarness(response); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateVersionMismatchFaultcode(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - } - - /** - * @testName: testVersionMismatchFaultcodeWithNonExistantOperation - * - * @assertion_ids: WSI:SPEC:R2725 - * - * @test_Strategy: Make a request and inspect response to ensure faultcode - * "VersionMismatch" was sent. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testVersionMismatchFaultcodeWithNonExistantOperation() - throws EETest.Fault { - SOAPMessage response = null; - try { - response = client - .makeSaajRequest(BAD_SOAP_ENVELOPE_NON_EXISTANT_OPERATION); - client.logMessageInHarness(response); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateVersionMismatchFaultcode(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - } - - /** - * @testName: testMustUnderstandFaultcode - * - * @assertion_ids: WSI:SPEC:R2725 - * - * @test_Strategy: Make a request and inspect response to ensure faultcode - * "MustUnderstand" was sent. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testMustUnderstandFaultcode() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(MUST_UNDERSTAND_HEADER); - client.logMessageInHarness(response); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateMustUnderstandFaultcode(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - } - - /** - * @testName: testMustUnderstandFaultcodeWithNonExistantOperation - * - * @assertion_ids: WSI:SPEC:R2725 - * - * @test_Strategy: Make a request and inspect response to ensure faultcode - * "MustUnderstand" was sent. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testMustUnderstandFaultcodeWithNonExistantOperation() - throws EETest.Fault { - SOAPMessage response = null; - try { - response = client - .makeSaajRequest(MUST_UNDERSTAND_HEADER_NON_EXISTANT_OPERATION); - client.logMessageInHarness(response); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateMustUnderstandFaultcode(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - } - - /** - * @testName: testClientFaultcode - * - * @assertion_ids: WSI:SPEC:R2725 - * - * @test_Strategy: Make a request and inspect response to ensure faultcode - * "Client" was sent. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testClientFaultcode() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(NON_EXISTANT_OPERATION); - client.logMessageInHarness(response); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateClientFaultcode(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - } - - private void validateVersionMismatchFaultcode(SOAPMessage response) - throws EETest.Fault, SOAPException { - if (!SOAPUtils.isVersionMismatchFaultcode(response)) { - throw new EETest.Fault( - "Invalid soap:Fault: faultcode must be \"VersionMismatch\" (BP-R2725)"); - } - } - - private void validateClientFaultcode(SOAPMessage response) - throws EETest.Fault, SOAPException { - if (!SOAPUtils.isClientFaultcode(response)) { - throw new EETest.Fault( - "Invalid soap:Fault: faultcode must be \"Client\" (BP-R2725)"); - } - } - - private void validateMustUnderstandFaultcode(SOAPMessage response) - throws EETest.Fault, SOAPException { - if (!SOAPUtils.isMustUnderstandFaultcode(response)) { - throw new EETest.Fault( - "Invalid soap:Fault: faultcode must be \"MustUnderstand\" (BP-R2725)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2725/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2725/build.xml deleted file mode 100644 index f953f7b26d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2725/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2725/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2725/jakartaEE.tokens deleted file mode 100644 index 2b1ed6fe22..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2725/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wsimpletest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.simpleclient.SimpleTest -URLALIAS=/jaxws/SimpleTest -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/wsj2wsimpletest -SERVICEREFNAMEWSEJB=service/wsj2wsimpletest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wsimpletest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2726/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2726/Client.java deleted file mode 100644 index 32d0e33f91..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2726/Client.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2726; - -import java.util.Properties; - -import org.w3c.dom.Document; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.j2w.*; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSOAPElementNamespace - * - * @assertion_ids: WSI:SPEC:R2726 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the rpc-literal wsdl:binding elements to ensure - * that their input- and output elements' soap:header, - * soap:headerfault and soap:fault elements do not have a - * namespace attribute defined. - * - * @throws Fault - */ - public void testSOAPElementNamespace() throws Fault { - Document document = client.getDocument(); - NamespaceAttributeVerifier verifier = new NamespaceAttributeVerifier( - document, 2726); - verifier.verify(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2726/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2726/build.xml deleted file mode 100644 index 2183c41d9d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2726/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2726/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2726/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2726/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2749/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2749/Client.java deleted file mode 100644 index e652f9f8e9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2749/Client.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2749; - -import java.util.Properties; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testPartsAttributes - * - * @assertion_ids: WSI:SPEC:R2749 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the wsdl:binding elements, ensuring that the input - * and output elements' header and headerfault elements have - * the part attributes and that they're NMTOKENs. - * - * @throws Fault - */ - public void testPartsAttributes() throws Fault { - Document document = client.getDocument(); - Element[] bindings = DescriptionUtils.getBindings(document); - for (int i = 0; i < bindings.length; i++) { - verifyBinding(bindings[i]); - } - } - - protected void verifyBinding(Element binding) throws Fault { - Element[] operations = DescriptionUtils.getChildElements(binding, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - verifyOperation(operations[i]); - } - } - - protected void verifyOperation(Element operation) throws Fault { - Element[] children = DescriptionUtils.getChildElements(operation, - WSDL_NAMESPACE_URI, null); - for (int i = 0; i < children.length; i++) { - String localName = children[i].getLocalName(); - if ((localName.equals(WSDL_INPUT_LOCAL_NAME)) - || (localName.equals(WSDL_OUTPUT_LOCAL_NAME))) { - verifyInputOutputFault(children[i]); - } - } - } - - protected void verifyInputOutputFault(Element element) throws Fault { - Element[] children = DescriptionUtils.getChildElements(element, - SOAP_NAMESPACE_URI, null); - for (int i = 0; i < children.length; i++) { - String localName = children[i].getLocalName(); - if ((localName.equals(SOAP_HEADER_LOCAL_NAME)) - || (localName.equals(SOAP_HEADERFAULT_LOCAL_NAME))) { - verifyPartAttribute(children[i]); - } - } - } - - protected void verifyPartAttribute(Element element) throws Fault { - String localName = element.getLocalName(); - Attr attr = element.getAttributeNode(SOAP_PARTS_ATTR); - if (attr != null) { - throw new Fault("Disallowed attribute 'parts' found on element '" - + localName + "' (BP-R2749)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2749/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2749/build.xml deleted file mode 100644 index 9b4e6c05d0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2749/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2749/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2749/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2749/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2754/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2754/Client.java deleted file mode 100644 index 48ecc860c8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2754/Client.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2754; - -import java.util.Properties; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.faultclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SOAPConstants { - /** - * The client. - */ - private SOAPClient client; - - static FaultTest service = null; - - private boolean foundOne = false; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(FaultTestClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testNameAttributes - * - * @assertion_ids: WSI:SPEC:R2754 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine the wsdl:binding elements, ensuring that the - * contained soap:fault elements have the same name attribute - * specified on its parent. - * - * @throws Fault - */ - public void testNameAttributes() throws Fault { - Document document = client.getDocument(); - Element[] bindings = DescriptionUtils.getBindings(document); - logTrace("in testNameAttributes, bindings.length=" + bindings.length); - for (int i = 0; i < bindings.length; i++) { - logTrace("bindings[" + i + "].getAttribute(name) = " - + bindings[i].getAttribute("name")); - getOperations(bindings[i]); - } - if (!foundOne) { - throw new Fault("No soap:fault elements found during test"); - } - - } - - protected void getOperations(Element binding) throws Fault { - Element[] operations = DescriptionUtils.getChildElements(binding, - WSDL_NAMESPACE_URI, WSDL_OPERATION_LOCAL_NAME); - logTrace("in getBinding, operations.length=" + operations.length); - for (int i = 0; i < operations.length; i++) { - logTrace("operations[" + i + "].getAttribute(name)=" - + operations[i].getAttribute("name")); - getWSDLFaults(operations[i]); - } - } - - protected void getWSDLFaults(Element operation) throws Fault { - Element[] list = DescriptionUtils.getChildElements(operation, - WSDL_NAMESPACE_URI, WSDL_FAULT_LOCAL_NAME); - for (int i = 0; i < list.length; i++) { - logTrace("in getWSDLFaults - list[" + i + "].getAttribute(name) = " - + list[i].getAttribute("name")); - String WSDLFaultName = getWSDLFaultName(list[i]); - getSOAPFaults(WSDLFaultName, list[i]); - } - } - - protected void getSOAPFaults(String WSDLFaultName, Element WSDLFaults) - throws Fault { - Element[] list = DescriptionUtils.getChildElements(WSDLFaults, - SOAP_NAMESPACE_URI, SOAP_FAULT_LOCAL_NAME); - for (int i = 0; i < list.length; i++) { - logTrace("in getSOAPFaults - list[" + i + "].getAttribute(name) = " - + list[i].getAttribute("name")); - String SOAPFaultName = getSOAPFaultName(list[i]); - if (!(SOAPFaultName.equals(WSDLFaultName))) { - throw new Fault( - "Required 'name' attribute does not match the value of the name attribute on its parent element (BP-R2754) - wsdl:fault=" - + WSDLFaultName + ", soap:fault=" + SOAPFaultName); - } - } - } - - protected String getWSDLFaultName(Element fault) throws Fault { - Attr attr = fault.getAttributeNode(WSDL_NAME_ATTR); - if (attr == null) { - throw new Fault( - "Required 'name' attribute not present on wsdl:fault element (BP-R2754)"); - } - String name = attr.getValue(); - logTrace("name=" + name); - return (name); - } - - protected String getSOAPFaultName(Element fault) throws Fault { - Attr attr = fault.getAttributeNode(SOAP_NAME_ATTR); - if (attr == null) { - throw new Fault( - "Required 'name' attribute not present on soap:fault element (BP-R2754)"); - } else { - foundOne = true; - } - String name = attr.getValue(); - logTrace("name=" + name); - return (name); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2754/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2754/build.xml deleted file mode 100644 index f7343f8a7e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2754/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2754/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2754/jakartaEE.tokens deleted file mode 100644 index c7e1d5e4b0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2754/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wfaulttest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.faultclient.FaultTest -URLALIAS=/jaxws/FaultTest -WEBSERVICEDESCRIPTION=FaultTest -SERVICEREFNAMEWSSERVLET=service/wsj2wfaulttest -SERVICEREFNAMEWSEJB=service/wsj2wfaulttest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wfaulttest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2801/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2801/Client.java deleted file mode 100644 index dbf7526b6a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2801/Client.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R2801; - -import java.util.Properties; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SchemaConstants { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSchemaNamespaces - * - * @assertion_ids: WSI:SPEC:R2801 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine types element, enumerating all schema elements - * ensuring that their namespace is - * "http://www.w3.org/2001/XMLSchema". - * - * @throws Fault - */ - public void testSchemaNamespaces() throws Fault { - Document document = client.getDocument(); - Element types = DescriptionUtils.getTypes(document); - if (types == null) { - return; - } - Element[] schemas = DescriptionUtils.getChildElements(types, null, - WSDL_SCHEMA_LOCAL_NAME); - for (int i = 0; i < schemas.length; i++) { - verifySchemaNamespace(schemas[i]); - } - } - - protected void verifySchemaNamespace(Element schema) throws Fault { - String namespaceURI = schema.getNamespaceURI(); - if (!namespaceURI.equals(XSD_NAMESPACE_URI)) { - throw new Fault("Encounterd 'schema' element with invalid namespace URI '" - + namespaceURI + "' (BP-R2801)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2801/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2801/build.xml deleted file mode 100644 index aadc3c2ab1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2801/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2801/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2801/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R2801/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R4003/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R4003/Client.java deleted file mode 100644 index dd8d38abc4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R4003/Client.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)Client.java 1.3 03/05/09 - */ - -package com.sun.ts.tests.jaxws.wsi.j2w.rpc.literal.R4003; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The client. - */ - private SOAPClient client; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testDescriptionEncoding - * - * @assertion_ids: WSI:SPEC:R4003 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine its encoding. - * - * @throws Fault - */ - public void testDescriptionEncoding() throws Fault { - String descriptionURL = client.getDescriptionURL(); - try { - URL url = new URL(descriptionURL); - verifyEncoding(url); - } catch (MalformedURLException e) { - throw new Fault( - "The description URL '" + descriptionURL + "' is invalid (BP-R4003)", - e); - } - } - - protected void verifyEncoding(URL url) throws Fault { - byte[] bytes = getDescriptionBytes(url); - int utf; - String description; - try { - description = new String(bytes, "UTF-8"); - utf = 8; - } catch (Throwable t) { - try { - description = new String(bytes, "UTF-16"); - utf = 16; - } catch (Throwable t2) { - throw new Fault("Description at '" + url - + "' cannot be created using neither 'UTF-8' nor 'UTF-16' encoding (BP-R4003)", - t2); - } - } - if (description.startsWith(""); - if (index == -1) { - throw new Fault("Description at '" + url - + "' has open ' 0) { - os.write(buffer, 0, length); - } - } while (length > 0); - is.close(); - os.flush(); - return os.toByteArray(); - } catch (IOException e) { - throw new Fault( - "Unable to read description from '" + url + "' (BP-R4003)", e); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R4003/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R4003/build.xml deleted file mode 100644 index 57497667a4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R4003/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R4003/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R4003/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/R4003/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/build.xml deleted file mode 100644 index f25f18d2fa..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/j2w/rpc/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/requests/SOAPRequests.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/requests/SOAPRequests.java deleted file mode 100644 index 7b6a960177..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/requests/SOAPRequests.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.requests; - -public interface SOAPRequests { - public static final String HELLOWORLD = ""; - - public static final String HELLOWORLD_WITH_HANDLER = "response"; - - public static final String HELLOWORLD_WITH_CONFORMANCE_WITH_MU1 = ""; - - public static final String HELLOWORLD_WITH_CONFORMANCE_WITH_MU0 = ""; - - public static final String HELLOWORLD_WITH_CONFORMANCE = ""; - - public static final String HELLOWORLD_WITH_MULTIPLE_CONFORMANCE = ""; - - public static final String ALWAYS_THROWS_EXCEPTION = ""; - - public static final String ALWAYS_THROWS_SERVER_EXCEPTION = ""; - - public static final String BAD_SOAP_ENVELOPE = ""; - - public static final String MUST_UNDERSTAND_HEADER = "BAZ"; - - public static final String NON_EXISTANT_OPERATION = ""; - - public static final String BAD_SOAP_ENVELOPE_WITH_HEADER = "BAZ"; - - public static final String BAD_SOAP_ENVELOPE_NON_EXISTANT_OPERATION = ""; - - public static final String MUST_UNDERSTAND_HEADER_NON_EXISTANT_OPERATION = "BAZ"; - - public static final String SOAP_ACTION_HELLO_WORLD = ""; - - public static final String SOAP_ACTION_ECHO_STRING = "responseecho"; - - public static final String ARRAY_OPERATION = ""; - - public static final String ONE_WAY_OPERATION = ""; - - public static final String ECHO_STRING = "responseecho"; - - public static final String R0007_REQUEST = "R0007-1"; - - public static final String R0007_RESPONSE = "{0}"; - - public static final String R1011_REQUEST = "R1011-1"; - - public static final String R1011_RESPONSE = "{0}"; - - public static final String R1012_REQUEST = "R1012-1"; - - public static final String R1012_RESPONSE = "{0}"; - - public static final String R97XX_REQUEST = "R97XX-1"; - - public static final String R97XX_RESPONSE = "{0}"; - - public static final String R2301_REQUEST = ""; - - public static final String R2729_REQUEST = "R2729"; - - public static final String R2744_RESPONSE = "{0}"; - - public static final String R2745_RESPONSE = "{0}"; - - public static final String R4001_REQUEST = "R4001-1"; - - public static final String R4001_RESPONSE = "R4001-2"; - - public static final String R2751_REQUEST = "ConfigHeader3ConfigHeaderConfigHeader2foo"; - - public static final String R273X_REQUEST = "I am a foo requestI am a bar request"; - - public static final String R273X_RESPONSE = "{0}I am a bar request"; - - public static final String R2712_REQUEST = "{0}"; - - public static final String R2712_RESPONSE = "{0}"; - - public static final String R11XX_RESPONSE = "{0}"; - - public final String R2915_UTF8_REQUEST_NO_ATTACHMENTS = "Hello"; - - public final String R2915_UTF16_REQUEST_NO_ATTACHMENTS = "Hello"; - - public final String R2915_UTF8_REQUEST_NO_ATTACHMENTS_DOCLIT = "Hello"; - - public final String R2915_UTF16_REQUEST_NO_ATTACHMENTS_DOCLIT = "Hello"; - - public final String R2917_REQUEST = "Hello"; - - public final String R2925_REQUEST = "text/plaintext/htmlhttp://localhost:8080/WSIRLSwaTest/attach.txthttp://localhost:8080/WSIRLSwaTest/attach.html"; - - public final String R2917_REQUEST_DOCLIT = "Hello"; - - public final String R2925_REQUEST_DOCLIT = "text/plaintext/htmlhttp://localhost:8080/WSIDLSwaTest/attach.txthttp://localhost:8080/WSIDLSwaTest/attach.html"; - - public final String R2917_RESPONSE1 = "{0}"; - - public final String R2917_RESPONSE2 = "{0}"; - - public final String R2917_RESPONSE_DOCLIT = "{0}"; - - public final String MTOM_RESPONSE_DOCLIT = "{0}"; -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/requests/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/requests/build.xml deleted file mode 100644 index ad0f641b85..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/requests/build.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/DescriptionUtils.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/DescriptionUtils.java deleted file mode 100644 index 63b2c4ac09..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/DescriptionUtils.java +++ /dev/null @@ -1,1512 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.utils; - -import com.sun.ts.lib.util.*; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.FactoryConfigurationError; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.tests.jaxws.wsi.constants.WSIConstants; - -public class DescriptionUtils implements DescriptionConstants, SOAPConstants, - SchemaConstants, WSIConstants { - /** - * - * @param document - * @return boolean - */ - public static boolean isDescription(Document document) { - return isElement(document.getDocumentElement(), WSDL_NAMESPACE_URI, - WSDL_DEFINITIONS_LOCAL_NAME); - } - - /** - * - * @param document - * @return boolean - */ - public static boolean isSchema(Document document) { - return isElement(document.getDocumentElement(), XSD_NAMESPACE_URI, - XSD_SCHEMA_LOCAL_NAME); - } - - /** - * - * @param document - * @return Element - */ - public static Element getTypes(Document document) { - Element[] children = getChildElements(document.getDocumentElement(), - WSDL_NAMESPACE_URI, WSDL_TYPES_LOCAL_NAME); - if (children.length != 0) - return children[0]; - else - return getTypesFromImports(document); - } - - public static Element getTypesFromImports(Document document) { - Element[] imports = getImports(document); - for (int i = 0; i < imports.length; i++) { - String location = imports[i].getAttribute(WSDL_LOCATION_ATTR); - String namespace = imports[i].getAttribute(WSDL_NAMESPACE_ATTR); - try { - Document newDoc = DescriptionUtils.getDocumentFromLocation(location); - Element element = getTypes(newDoc); - if (element != null) - return element; - } catch (Exception e) { - e.printStackTrace(System.err); - break; - } - } - return null; - } - - /** - * - * @param element - * @return Element[] - */ - public static Element[] getImports(Element element) { - return getChildElements(element, WSDL_NAMESPACE_URI, - WSDL_IMPORT_LOCAL_NAME); - } - - /** - * - * @param document - * @return Element[] - */ - public static Element[] getImports(Document document) { - return getChildElements(document.getDocumentElement(), WSDL_NAMESPACE_URI, - WSDL_IMPORT_LOCAL_NAME); - } - - public static Element[] getMessagesFromImports(Document document) { - ArrayList children = new ArrayList(); - Element[] imports = getImports(document); - for (int i = 0; i < imports.length; i++) { - String location = imports[i].getAttribute(WSDL_LOCATION_ATTR); - String namespace = imports[i].getAttribute(WSDL_NAMESPACE_ATTR); - try { - Document newDoc = DescriptionUtils.getDocumentFromLocation(location); - Element[] elements = getMessages(newDoc); - if (elements.length != 0) - return elements; - } catch (Exception e) { - e.printStackTrace(System.err); - break; - } - } - return (Element[]) children.toArray(new Element[children.size()]); - } - - /** - * - * @param document - * @return Element[] - */ - public static Element[] getMessages(Document document) { - Element[] elements = getChildElements(document.getDocumentElement(), - WSDL_NAMESPACE_URI, WSDL_MESSAGE_LOCAL_NAME); - if (elements.length != 0) - return elements; - else - return getMessagesFromImports(document); - } - - /** - * - * @param document - * @param name - * @return Element - */ - public static Element getMessage(Document document, String name) { - Element[] messages = getMessages(document); - for (int i = 0; i < messages.length; i++) { - if (name.equals(messages[i].getAttribute(WSDL_NAME_ATTR))) { - return messages[i]; - } - } - return null; - } - - /** - * - * @param messageName - * @return Element - */ - public static Element getPartElement(Document document, String messageName) { - Element message = getMessage(document, messageName); - return getChildElement(message, WSDL_NAMESPACE_URI, WSDL_PART_LOCAL_NAME); - } - - /** - * - * @param messageName - * @return Element[] - */ - public static Element[] getPartElements(Document document, - String messageName) { - Element message = getMessage(document, messageName); - return getChildElements(message, WSDL_NAMESPACE_URI, WSDL_PART_LOCAL_NAME); - } - - /** - * - * @param messageName - * @return String - */ - public static String getPartName(Document document, String messageName) { - Element message = getMessage(document, messageName); - Element part = getChildElement(message, WSDL_NAMESPACE_URI, - WSDL_PART_LOCAL_NAME); - return part.getAttribute(WSDL_NAME_ATTR); - } - - /** - * - * @param messageName - * @return String[] - */ - public static String[] getPartNames(Document document, String messageName) { - Element message = getMessage(document, messageName); - Element[] parts = getChildElements(message, WSDL_NAMESPACE_URI, - WSDL_PART_LOCAL_NAME); - String theParts[] = new String[parts.length]; - for (int i = 0; i < parts.length; i++) - theParts[i] = parts[i].getAttribute(WSDL_NAME_ATTR); - return theParts; - } - - public static Element[] getPortTypesFromImports(Document document) { - ArrayList children = new ArrayList(); - Element[] imports = getImports(document); - for (int i = 0; i < imports.length; i++) { - String location = imports[i].getAttribute(WSDL_LOCATION_ATTR); - String namespace = imports[i].getAttribute(WSDL_NAMESPACE_ATTR); - try { - Document newDoc = DescriptionUtils.getDocumentFromLocation(location); - Element[] elements = getPortTypes(newDoc); - if (elements.length != 0) - return elements; - } catch (Exception e) { - e.printStackTrace(System.err); - break; - } - } - return (Element[]) children.toArray(new Element[children.size()]); - } - - /** - * - * @param document - * @return Element[] - */ - public static Element[] getPortTypes(Document document) { - Element[] elements = getChildElements(document.getDocumentElement(), - WSDL_NAMESPACE_URI, WSDL_PORTTYPE_LOCAL_NAME); - if (elements.length != 0) - return elements; - else - return getPortTypesFromImports(document); - } - - /** - * - * @param document - * @param name - * @return Element - */ - public static Element getPortType(Document document, String name) { - Element[] portTypes = getPortTypes(document); - for (int i = 0; i < portTypes.length; i++) { - if (name.equals(portTypes[i].getAttribute(WSDL_NAME_ATTR))) { - return portTypes[i]; - } - } - return null; - } - - /** - * - * @param document - * @param name - * @return Element - */ - public static Element getPort(Document document, String name) { - Element[] services = getServices(document); - for (int i = 0; i < services.length; i++) { - Element port = getNamedChildElement(services[i], WSDL_NAMESPACE_URI, - WSDL_PORT_LOCAL_NAME, name); - if (port != null) - return port; - } - return null; - } - - /** - * - * @param document - * @param name - * @return Element - */ - public static Element getServiceName(Document document, String name) { - Element[] services = getServices(document); - for (int i = 0; i < services.length; i++) { - if (name.equals(services[i].getAttribute(WSDL_NAME_ATTR))) { - return services[i]; - } - } - return null; - } - - /** - * - * @param document - * @return Element[] - */ - public static Element[] getBindings(Document document) { - return getChildElements(document.getDocumentElement(), WSDL_NAMESPACE_URI, - WSDL_BINDING_LOCAL_NAME); - } - - /** - * - * @param document - * @param name - * @return Element - */ - public static Element getBinding(Document document, String name) { - Element[] bindings = getBindings(document); - for (int i = 0; i < bindings.length; i++) { - if (name.equals(bindings[i].getAttribute(WSDL_NAME_ATTR))) { - return bindings[i]; - } - } - return null; - } - - /** - * - * @param document - * @return Element[] - */ - public static Element[] getServices(Document document) { - return getChildElements(document.getDocumentElement(), WSDL_NAMESPACE_URI, - WSDL_SERVICE_LOCAL_NAME); - } - - /** - * - * @param document - * @param namespaceURI - * @param localName - * @return Element[] - */ - public static Element[] getChildElements(Document document, - String namespaceURI, String localName) { - Element element = document.getDocumentElement(); - ArrayList children = new ArrayList(); - NodeList list = element.getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - Node node = list.item(i); - if (node.getNodeType() == Node.ELEMENT_NODE) { - Element child = (Element) node; - if ((namespaceURI != null) - && (!namespaceURI.equals(child.getNamespaceURI()))) { - continue; - } - if ((localName != null) && (!localName.equals(child.getLocalName()))) { - continue; - } - children.add(child); - } - } - if (children.size() == 0) - return getChildElementsFromImports(element, namespaceURI, localName); - else - return (Element[]) children.toArray(new Element[children.size()]); - } - - /** - * - * @param element - * @param namespaceURI - * @param localName - * @return Element[] - */ - public static Element[] getChildElements(Element element, String namespaceURI, - String localName) { - ArrayList children = new ArrayList(); - NodeList list = element.getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - Node node = list.item(i); - if (node.getNodeType() == Node.ELEMENT_NODE) { - Element child = (Element) node; - if ((namespaceURI != null) - && (!namespaceURI.equals(child.getNamespaceURI()))) { - continue; - } - if ((localName != null) && (!localName.equals(child.getLocalName()))) { - continue; - } - children.add(child); - } - } - return (Element[]) children.toArray(new Element[children.size()]); - } - - public static Element[] getChildElementsFromImports(Element element, - String namespaceURI, String localName) { - ArrayList children = new ArrayList(); - Element[] imports = getImports(element); - for (int i = 0; i < imports.length; i++) { - String location = imports[i].getAttribute(WSDL_LOCATION_ATTR); - String namespace = imports[i].getAttribute(WSDL_NAMESPACE_ATTR); - try { - Document newDoc = DescriptionUtils.getDocumentFromLocation(location); - Element[] elements = getChildElements(newDoc.getDocumentElement(), - namespaceURI, localName); - return elements; - } catch (Exception e) { - e.printStackTrace(System.err); - } - } - return (Element[]) children.toArray(new Element[children.size()]); - } - - /** - * - * @param document - * @return String - */ - public static String getTargetNamespaceAttr(Document document) { - return document.getDocumentElement() - .getAttribute(WSDL_TARGETNAMESPACE_ATTR); - } - - /** - * - * @param document - * @return String - */ - public static String getDefintionsNameAttr(Document document) { - return document.getDocumentElement().getAttribute(WSDL_NAME_ATTR); - } - - /** - * - * @param document - * @return String - */ - public static boolean isPortTypeNameAttr(Document document, - String portTypeName) { - Element portType = getPortType(document, portTypeName); - if (portType != null) - return true; - else - return false; - } - - /** - * - * @param document - * @return String - */ - public static boolean isPortNameAttr(Document document, String portName) { - Element port = getPort(document, portName); - if (port != null) - return true; - else - return false; - } - - /** - * - * @param document - * @return String - */ - public static boolean isServiceNameAttr(Document document, - String serviceName) { - Element service = getServiceName(document, serviceName); - if (service != null) - return true; - else - return false; - } - - /** - * - * @param document - * @return String - */ - public static String getInputMessageName(Element e) { - Element input = getChildElement(e, WSDL_NAMESPACE_URI, - WSDL_INPUT_LOCAL_NAME); - String messageName = input.getAttribute(WSDL_MESSAGE_ATTR); - int i = messageName.indexOf(":"); - if (i != -1) - return messageName.substring(i + 1); - else - return messageName; - } - - /** - * - * @param document - * @return String - */ - public static String getOutputMessageName(Element e) { - Element output = getChildElement(e, WSDL_NAMESPACE_URI, - WSDL_OUTPUT_LOCAL_NAME); - String messageName = output.getAttribute(WSDL_MESSAGE_ATTR); - int i = messageName.indexOf(":"); - if (i != -1) - return messageName.substring(i + 1); - else - return messageName; - } - - /** - * - * @param document - * @param portTypeName - * @param operationName - * @return Element - */ - public static Element getPortTypeOperationNameElement(Document document, - String portTypeName, String operationName) { - Element portType = getPortType(document, portTypeName); - if (portType != null) { - Element[] operations = getChildElements(portType, WSDL_NAMESPACE_URI, - WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - String theOperationName = operations[i].getAttribute(WSDL_NAME_ATTR); - if (theOperationName.equals(operationName)) - return operations[i]; - } - } - return null; - } - - /** - * - * @param document - * @param portTypeName - * @return String[] - */ - public static String[] getPortTypeOperationNames(Document document, - String portTypeName) { - Element portType = getPortType(document, portTypeName); - if (portType != null) { - Element[] operations = getChildElements(portType, WSDL_NAMESPACE_URI, - WSDL_OPERATION_LOCAL_NAME); - String opNames[] = new String[operations.length]; - for (int i = 0; i < operations.length; i++) { - opNames[i] = operations[i].getAttribute(WSDL_NAME_ATTR); - } - return opNames; - } - return null; - } - - /** - * - * @param document - * @param portTypeName - * @return Element[] - */ - public static Element[] getPortTypeOperationNameElements(Document document, - String portTypeName) { - Element portType = getPortType(document, portTypeName); - if (portType != null) { - Element[] operations = getChildElements(portType, WSDL_NAMESPACE_URI, - WSDL_OPERATION_LOCAL_NAME); - return operations; - } - return null; - } - - /** - * - * @param document - * @return Element[] - */ - public static Element[] getBindingOperationNameElements(Document document) { - Element[] bindings = getBindings(document); - return getChildElements(bindings[0], WSDL_NAMESPACE_URI, - WSDL_OPERATION_LOCAL_NAME); - } - - /** - * - * @param document - * @param portTypeName - * @return String[] - */ - public static String[] getInputMessageNames(Document document, - String portTypeName) { - ArrayList alist = new ArrayList(); - Element portType = getPortType(document, portTypeName); - if (portType != null) { - Element[] operations = getChildElements(portType, WSDL_NAMESPACE_URI, - WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - Element input = DescriptionUtils.getChildElement(operations[i], - WSDL_NAMESPACE_URI, WSDL_INPUT_LOCAL_NAME); - String imsg = input.getAttribute(WSDL_MESSAGE_ATTR); - alist.add(imsg.substring(imsg.indexOf(":") + 1)); - - } - return (String[]) alist.toArray(new String[alist.size()]); - } - return null; - } - - /** - * - * @param document - * @param portTypeName - * @return String[] - */ - public static String[] getOutputMessageNames(Document document, - String portTypeName) { - ArrayList alist = new ArrayList(); - Element portType = getPortType(document, portTypeName); - if (portType != null) { - Element[] operations = getChildElements(portType, WSDL_NAMESPACE_URI, - WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - Element output = DescriptionUtils.getChildElement(operations[i], - WSDL_NAMESPACE_URI, WSDL_OUTPUT_LOCAL_NAME); - // Operation always has an input, may not have an output so let's check - if (output != null) { - String omsg = output.getAttribute(WSDL_MESSAGE_ATTR); - alist.add(omsg.substring(omsg.indexOf(":") + 1)); - } - - } - return (String[]) alist.toArray(new String[alist.size()]); - } - return null; - } - - /** - * - * @param document - * @param portTypeName - * @return String[] - */ - public static String[] getFaultMessageNames(Document document, - String portTypeName) { - ArrayList alist = new ArrayList(); - Element portType = getPortType(document, portTypeName); - if (portType != null) { - Element[] operations = getChildElements(portType, WSDL_NAMESPACE_URI, - WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - Element[] faults = DescriptionUtils.getChildElements(operations[i], - WSDL_NAMESPACE_URI, WSDL_FAULT_LOCAL_NAME); - // Operation always has an input, may not have a fault so let's check - if (faults.length > 0) { - for (int j = 0; j < faults.length; j++) { - String fmsg = faults[j].getAttribute(WSDL_MESSAGE_ATTR); - alist.add(fmsg.substring(fmsg.indexOf(":") + 1)); - } - } - - } - return (String[]) alist.toArray(new String[alist.size()]); - } - return null; - } - - /** - * - * @param operation - * @return boolean - */ - public static boolean isOneWay(Element operation) { - return getChildElement(operation, WSDL_NAMESPACE_URI, - WSDL_INPUT_LOCAL_NAME) != null - && getChildElement(operation, WSDL_NAMESPACE_URI, - WSDL_OUTPUT_LOCAL_NAME) == null; - } - - /** - * - * @param operation - * @return boolean - */ - public static boolean isTwoWay(Element operation) { - return getChildElement(operation, WSDL_NAMESPACE_URI, - WSDL_INPUT_LOCAL_NAME) != null - && getChildElement(operation, WSDL_NAMESPACE_URI, - WSDL_OUTPUT_LOCAL_NAME) != null; - } - - /** - * - * @param operation - * @return boolean - */ - public static boolean hasFault(Element operation) { - Element[] faults = getChildElements(operation, WSDL_NAMESPACE_URI, - WSDL_FAULT_LOCAL_NAME); - if (faults.length > 0) - return true; - else - return false; - } - - /** - * - * @param operation - * @param faultName - * @return boolean - */ - public static boolean hasFault(Element operation, String faultName) { - Element[] faults = getChildElements(operation, WSDL_NAMESPACE_URI, - WSDL_FAULT_LOCAL_NAME); - for (int i = 0; i < faults.length; i++) { - if (faults[i].getAttribute(WSDL_NAME_ATTR).equals(faultName)) - return true; - } - return false; - } - - /** - * - * @param document - * @param operationName - * @return Element - */ - public static Element getBindingOperationNameElement(Document document, - String operationName) { - Element[] bindings = getBindings(document); - if (bindings.length != 1) - return null; - Element[] operations = getChildElements(bindings[0], WSDL_NAMESPACE_URI, - WSDL_OPERATION_LOCAL_NAME); - for (int i = 0; i < operations.length; i++) { - String theOperationName = operations[i].getAttribute(WSDL_NAME_ATTR); - if (theOperationName.equals(operationName)) - return operations[i]; - } - return null; - } - - /** - * - * @param document - * @return Element[] - */ - public static Element[] getSchemaImportElements(Document document) { - Element types = getTypes(document); - ArrayList alist = new ArrayList(); - Element[] schemas = null; - if (types != null) { - schemas = getChildElements(types, XSD_NAMESPACE_URI, - XSD_SCHEMA_LOCAL_NAME); - for (int i = 0; i < schemas.length; i++) { - Element[] imports = getChildElements(schemas[i], XSD_NAMESPACE_URI, - XSD_IMPORT_LOCAL_NAME); - for (int j = 0; j < imports.length; j++) - alist.add(imports[j]); - } - } else { - Element[] imports = getChildElements(document.getDocumentElement(), - XSD_NAMESPACE_URI, XSD_IMPORT_LOCAL_NAME); - for (int i = 0; i < imports.length; i++) - alist.add(imports[i]); - } - return (Element[]) alist.toArray(new Element[alist.size()]); - } - - /** - * - * @param document - * @return Element - */ - public static Element getSchemaElementName(Document document, - String elementName) { - Element types = getTypes(document); - Element schema = getChildElement(types, XSD_NAMESPACE_URI, - XSD_SCHEMA_LOCAL_NAME); - Element[] elements; - if (schema != null) { - elements = getChildElements(schema, XSD_NAMESPACE_URI, - XSD_ELEMENT_LOCAL_NAME); - TestUtil.logMsg("elements=" + elements.length); - for (int i = 0; i < elements.length; i++) { - TestUtil.logMsg("name=" + elements[i].getAttribute(XSD_NAME_ATTR)); - if (elements[i].getAttribute(XSD_NAME_ATTR).equals(elementName)) - return elements[i]; - } - } - return null; - } - - /** - * - * @param document - * @return String[] - */ - public static String[] getSchemaNamespaces(Document document) { - Element[] imports = getSchemaImportElements(document); - ArrayList alist = new ArrayList(); - for (int i = 0; i < imports.length; i++) { - alist.add(imports[i].getAttribute(XSD_NAMESPACE_ATTR)); - - } - if (alist.size() == 0) - return null; - else - return (String[]) alist.toArray(new String[alist.size()]); - } - - /** - * - * @param document - * @param name - * @return boolean - * @throws EETest.Fault - */ - public static boolean findGlobalElementByName(Document document, String name) - throws EETest.Fault { - Element[] elements = getChildElements(document.getDocumentElement(), - XSD_NAMESPACE_URI, XSD_ELEMENT_LOCAL_NAME); - for (int i = 0; i < elements.length; i++) { - String nameAttr = elements[i].getAttribute(XSD_NAME_ATTR); - if (nameAttr.equals(name)) - return true; - } - return false; - } - - /** - * - * @param element - * @return boolean - * @throws EETest.Fault - */ - public static boolean findGlobalElementByName(Element element, String name) - throws EETest.Fault { - Element[] elements = getChildElements(element, XSD_NAMESPACE_URI, - XSD_ELEMENT_LOCAL_NAME); - for (int i = 0; i < elements.length; i++) { - String nameAttr = elements[i].getAttribute(XSD_NAME_ATTR); - if (nameAttr.equals(name)) - return true; - } - return false; - } - - /** - * - * @param document - * @param base - * @return Document[] - * @throws EETest.Fault - */ - public static Document[] getSchemaDocuments(Document document, String base) - throws EETest.Fault { - Element[] imports = getSchemaImportElements(document); - ArrayList alist = new ArrayList(); - for (int i = 0; i < imports.length; i++) { - String schemaLocation = imports[i].getAttribute(XSD_SCHEMALOCATION_ATTR); - Document thedocument = getDocumentFromLocation( - "file:" + base + schemaLocation); - thedocument.getDocumentElement().setAttribute("SchemaFile", - schemaLocation); - alist.add(thedocument); - } - if (alist.size() == 0) - return null; - else - return (Document[]) alist.toArray(new Document[alist.size()]); - } - - /** - * - * @param document - * @param base - * @param prefix - * @return Document[] - * @throws EETest.Fault - */ - public static Document getSchemaDocument(Document document, String prefix, - String base) throws EETest.Fault { - String ns = getNamespaceOfPrefix(document, prefix); - Element[] imports = getSchemaImportElements(document); - for (int i = 0; i < imports.length; i++) { - String namespace = imports[i].getAttribute(XSD_NAMESPACE_ATTR); - if (namespace.equals(ns)) { - String schemaLocation = imports[i] - .getAttribute(XSD_SCHEMALOCATION_ATTR); - return getDocumentFromLocation("file:" + base + schemaLocation); - } - } - return null; - } - - /** - * - * @param document - * @param base - * @return Document[] - * @throws EETest.Fault - */ - public static Document[] getWsdlDocuments(Document document, String base) - throws EETest.Fault { - Element[] imports = getImports(document); - ArrayList alist = new ArrayList(); - for (int i = 0; i < imports.length; i++) { - String location = imports[i].getAttribute(WSDL_LOCATION_ATTR); - Document thedocument = getDocumentFromLocation("file:" + base + location); - thedocument.getDocumentElement().setAttribute("WsdlFile", location); - alist.add(thedocument); - } - if (alist.size() == 0) - return null; - else - return (Document[]) alist.toArray(new Document[alist.size()]); - } - - /** - * - * @param document - * @param url - * @return Document[] - * @throws EETest.Fault - */ - public static Document[] getSchemaDocuments(Document document, URL url) - throws EETest.Fault { - Element[] imports = getSchemaImportElements(document); - ArrayList alist = new ArrayList(); - for (int i = 0; i < imports.length; i++) { - String schemaLocation = imports[i].getAttribute(XSD_SCHEMALOCATION_ATTR); - Document thedocument = getDocumentFromLocation(schemaLocation, url); - thedocument.getDocumentElement().setAttribute("SchemaFile", - schemaLocation); - alist.add(thedocument); - } - if (alist.size() == 0) - return null; - else - return (Document[]) alist.toArray(new Document[alist.size()]); - } - - /** - * - * @param document - * @param prefix - * @param url - * @return Document[] - * @throws EETest.Fault - */ - public static Document getSchemaDocument(Document document, String prefix, - URL url) throws EETest.Fault { - String ns = getNamespaceOfPrefix(document, prefix); - Element[] imports = getSchemaImportElements(document); - for (int i = 0; i < imports.length; i++) { - String namespace = imports[i].getAttribute(XSD_NAMESPACE_ATTR); - if (namespace.equals(ns)) { - String schemaLocation = imports[i] - .getAttribute(XSD_SCHEMALOCATION_ATTR); - return getDocumentFromLocation(schemaLocation, url); - } - } - return null; - } - - /** - * - * @param document - * @return Document[] - * @param url - * @throws EETest.Fault - */ - public static Document[] getWsdlDocuments(Document document, URL url) - throws EETest.Fault { - Element[] imports = getImports(document); - ArrayList alist = new ArrayList(); - for (int i = 0; i < imports.length; i++) { - String location = imports[i].getAttribute(WSDL_LOCATION_ATTR); - Document thedocument = getDocumentFromLocation(location, url); - thedocument.getDocumentElement().setAttribute("WsdlFile", location); - alist.add(thedocument); - } - if (alist.size() == 0) - return null; - else - return (Document[]) alist.toArray(new Document[alist.size()]); - } - - /** - * - * @param document - * @return String[] - */ - public static String[] getSchemaPrefixes(Document document) { - Element[] imports = getSchemaImportElements(document); - ArrayList alist = new ArrayList(); - for (int i = 0; i < imports.length; i++) { - String NS = imports[i].getAttribute(XSD_NAMESPACE_ATTR); - alist.add(findPrefixForNamespace(document, NS)); - } - if (alist.size() == 0) - return null; - else - return (String[]) alist.toArray(new String[alist.size()]); - } - - /** - * - * @param document - * @return Element[] - */ - public static String[] getAllPrefixAndNamespace(Document document) { - Element description = document.getDocumentElement(); - Attr[] attributes = DescriptionUtils.getElementAttributes(description); - ArrayList alist = new ArrayList(); - for (int i = 0; i < attributes.length; i++) { - String name = attributes[i].getName(); - String value = attributes[i].getValue(); - if (name.startsWith("xmlns:")) - alist.add(name.substring(name.indexOf(":") + 1) + ":" + value); - } - return (String[]) alist.toArray(new String[alist.size()]); - } - - /** - * - * @param document - * @return String - */ - public static String getNamespaceOfPrefix(Document document, String prefix) { - Element description = document.getDocumentElement(); - Attr[] attributes = DescriptionUtils.getElementAttributes(description); - for (int i = 0; i < attributes.length; i++) { - String name = attributes[i].getName(); - String value = attributes[i].getValue(); - if (name.startsWith("xmlns:")) { - String nsprefix = name.substring(name.indexOf(":") + 1); - if (nsprefix.equals(prefix)) - return value; - } - } - return null; - } - - /** - * - * @param document - * @return String - */ - public static String getPrefixOfNamepace(Document document, - String namespace) { - Element description = document.getDocumentElement(); - Attr[] attributes = DescriptionUtils.getElementAttributes(description); - for (int i = 0; i < attributes.length; i++) { - String name = attributes[i].getName(); - String value = attributes[i].getValue(); - if (value.equals(namespace)) { - if (name.startsWith("xmlns:")) - return name.substring(name.indexOf(":") + 1); - } - } - return null; - } - - /** - * - * @param document - * @return String - */ - public static String findPrefixForNamespace(Document document, - String namespace) { - Element description = document.getDocumentElement(); - Attr[] attributes = DescriptionUtils.getElementAttributes(description); - for (int i = 0; i < attributes.length; i++) { - String name = attributes[i].getName(); - String value = attributes[i].getValue(); - if (!value.equals(namespace)) - continue; - if (name.startsWith("xmlns:")) - return name.substring(name.indexOf(":") + 1); - } - return null; - } - - /** - * - * @param document - * @param operationName - * @return Element - */ - public static Element getSoapBindingElement(Document document, - String operationName) { - Element[] bindings = getBindings(document); - if (bindings.length != 1) - return null; - return getChildElement(bindings[0], SOAP_NAMESPACE_URI, - SOAP_BINDING_LOCAL_NAME); - } - - /** - * - * @param document - * @return Element[] - */ - public static Element[] getSoapHeaderElements(Document document) { - Element[] bindings = getBindings(document); - ArrayList alist = new ArrayList(); - for (int i = 0; i < bindings.length; i++) { - Element[] operations = getChildElements(bindings[0], WSDL_NAMESPACE_URI, - WSDL_OPERATION_LOCAL_NAME); - for (int j = 0; j < operations.length; j++) { - Element input = getChildElement(operations[j], WSDL_NAMESPACE_URI, - WSDL_INPUT_LOCAL_NAME); - Element header = getChildElement(input, SOAP_NAMESPACE_URI, - SOAP_HEADER_LOCAL_NAME); - if (header != null) - alist.add(header); - } - } - return (Element[]) alist.toArray(new Element[alist.size()]); - } - - /** - * - * @param document - * @return String[] - */ - public static String[] getSoapHeaderElementsPartAttr(Document document) { - Element[] headers = getSoapHeaderElements(document); - ArrayList alist = new ArrayList(); - for (int i = 0; i < headers.length; i++) - alist.add(headers[i].getAttribute(SOAP_PART_ATTR)); - return (String[]) alist.toArray(new String[alist.size()]); - } - - /** - * - * @param element - * @return Element[] - */ - public static Element[] getChildElements(Element element) { - return getChildElements(element, null, null); - } - - /** - * - * @param element - * @param namespaceURI - * @param localName - * @return Element - */ - public static Element getChildElement(Element element, String namespaceURI, - String localName) { - Element[] children = getChildElements(element, namespaceURI, localName); - if (children.length != 0) { - return children[0]; - } - return null; - } - - /** - * - * @param element - * @param namespaceURI - * @param localName - * @param name - * @return Element - */ - public static Element getNamedChildElement(Element element, - String namespaceURI, String localName, String name) { - Element[] children = getChildElements(element, namespaceURI, localName); - for (int i = 0; i < children.length; i++) { - if (name.equals(children[i].getAttribute(WSDL_NAME_ATTR))) { - return children[i]; - } - } - return null; - } - - /** - * - * @param element - * @param namespaceURI - * @param localName - * @return boolean - */ - public static boolean isElement(Element element, String namespaceURI, - String localName) { - if (element == null) { - return false; - } - if (!namespaceURI.equals(element.getNamespaceURI())) { - return false; - } - if (!localName.equals(element.getLocalName())) { - return false; - } - return true; - } - - /** - * - * @param element - * @return Attr[] - */ - public static Attr[] getElementAttributes(Element element) { - NamedNodeMap map = element.getAttributes(); - Attr[] attributes = new Attr[map.getLength()]; - for (int i = 0; i < attributes.length; i++) { - attributes[i] = (Attr) map.item(i); - } - return attributes; - } - - /** - * - * @param element - * @param prefix - * @return boolean - */ - public static boolean isNamespacePrefixDeclared(Element element, - String prefix) { - while (element != null) { - Attr attribute = element.getAttributeNode("xmlns:" + prefix); - if (attribute != null) { - return true; - } - Node node = element.getParentNode(); - if (node.getNodeType() == Node.ELEMENT_NODE) { - element = (Element) node; - } else { - element = null; - } - } - return false; - } - - /** - * - * @param element - * @param prefix - * @return String - */ - public static String getNamespaceURI(Element element, String prefix) { - while (element != null) { - Attr attribute = element.getAttributeNode("xmlns:" + prefix); - if (attribute != null) { - return attribute.getValue(); - } - Node node = element.getParentNode(); - if (node.getNodeType() == Node.ELEMENT_NODE) { - element = (Element) node; - } else { - element = null; - } - } - return null; - } - - /** - * - * @param elements - * @param namespaceURI - * @param localName - * @return int - */ - public static int getIndexOf(Element[] elements, String namespaceURI, - String localName) { - for (int i = 0; i < elements.length; i++) { - if (isElement(elements[i], namespaceURI, localName)) { - return i; - } - } - return -1; - } - - /** - * - * @param elements - * @param namespaceURI - * @param localName - * @return int - */ - public static int getLastIndexOf(Element[] elements, String namespaceURI, - String localName) { - for (int i = elements.length - 1; i >= 0; i--) { - if (isElement(elements[i], namespaceURI, localName)) { - return i; - } - } - return -1; - } - - /** - * - * @param location - * @return Document - * @throws EETest.Fault - */ - public static Document getDocumentFromLocation(String location) - throws EETest.Fault { - try { - URL url = new URL(location); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - DocumentBuilder builder = factory.newDocumentBuilder(); - return builder.parse(url.openStream()); - } catch (MalformedURLException e) { - throw new EETest.Fault("The location '" + location + "' is invalid", e); - } catch (FactoryConfigurationError e) { - throw new EETest.Fault("Unable to obtain XML parser", e); - } catch (ParserConfigurationException e) { - throw new EETest.Fault("Unable to obtain XML parser", e); - } catch (SAXException e) { - throw new EETest.Fault( - "The document at '" + location + "' is not valid XML", e); - } catch (IOException e) { - throw new EETest.Fault( - "The document at '" + location + "' could not be read", e); - } - } - - /** - * - * @param location - * @param context - * @return Document - * @throws EETest.Fault - */ - public static Document getDocumentFromLocation(String location, URL context) - throws EETest.Fault { - try { - URL url; - if (location.startsWith("http")) - url = new URL(location); - else - url = new URL(context, location); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - DocumentBuilder builder = factory.newDocumentBuilder(); - return builder.parse(url.openStream()); - } catch (MalformedURLException e) { - throw new EETest.Fault("The location '" + location + "' is invalid", e); - } catch (FactoryConfigurationError e) { - throw new EETest.Fault("Unable to obtain XML parser", e); - } catch (ParserConfigurationException e) { - throw new EETest.Fault("Unable to obtain XML parser", e); - } catch (SAXException e) { - throw new EETest.Fault( - "The document at '" + location + "' is not valid XML", e); - } catch (IOException e) { - throw new EETest.Fault( - "The document at '" + location + "' could not be read", e); - } - } - - /** - * Private to prevent instantiation. - */ - private DescriptionUtils() { - super(); - } - - private static int spaces = 0; - - private static String spacesString = ""; - - private static void setSpaces() { - spacesString = ""; - for (int i = 0; i < spaces; i++) - spacesString = spacesString + " "; - } - - private static String getText(Node node) { - String result = ""; - result = node.getNodeValue(); - if (result == null) - result = ""; - result = result.trim(); - return result; - } - - private static void processAttributes(Node root) { - NamedNodeMap attribs = root.getAttributes(); - if (attribs != null) { - for (int i = 0; i < attribs.getLength(); i++) { - Node attnode = attribs.item(i); - String attName = attnode.getNodeName(); - String attValue = attnode.getNodeValue(); - setSpaces(); - TestUtil.logMsg(spacesString + "" + attName + "=" + attValue - + ""); - } - } - } - - private static boolean hasAttributes(Node root) { - NamedNodeMap attribs = root.getAttributes(); - if (attribs == null || attribs.getLength() == 0) - return false; - else - return true; - } - - public static void dumpDOMNodes(Element element) { - spaces = 0; - TestUtil.logMsg("Begin Dumping DOM Nodes"); - String rootNodeName = element.getNodeName(); - TestUtil.logMsg("" + rootNodeName + ""); - setSpaces(); - spaces += 2; - processAttributes((Node) element); - dumpDOMNodes_(element); - TestUtil.logMsg("Done Dumping DOM Nodes"); - } - - public static void dumpDOMNodes(Node node) { - TestUtil.logMsg("Begin Dumping DOM Nodes"); - String rootNodeName = node.getNodeName(); - TestUtil.logMsg("" + rootNodeName + ""); - setSpaces(); - spaces += 2; - processAttributes(node); - dumpDOMNodes_((Element) node); - TestUtil.logMsg("Done Dumping DOM Nodes"); - } - - public static void dumpDOMNodes_(Element element) { - NodeList nodes = element.getChildNodes(); - for (int i = 0; i < nodes.getLength(); i++) { - Node node = nodes.item(i); - String nodeName = node.getNodeName(); - String nodeValue = node.getNodeValue(); - short nodeType = node.getNodeType(); - switch (nodeType) { - case Node.ATTRIBUTE_NODE: - setSpaces(); - TestUtil.logMsg(spacesString + "" + nodeName + "=" - + nodeValue + ""); - break; - case Node.CDATA_SECTION_NODE: - TestUtil.logMsg("" + nodeValue + ""); - break; - case Node.COMMENT_NODE: - TestUtil.logMsg("" + nodeValue + ""); - break; - case Node.DOCUMENT_FRAGMENT_NODE: - TestUtil.logMsg(""); - break; - case Node.DOCUMENT_NODE: - TestUtil.logMsg(""); - break; - case Node.DOCUMENT_TYPE_NODE: - TestUtil.logMsg("" + nodeName + ""); - break; - case Node.ELEMENT_NODE: - setSpaces(); - TestUtil.logMsg(spacesString + "" + nodeName + ""); - spaces += 2; - processAttributes(node); - break; - case Node.ENTITY_NODE: - TestUtil.logMsg("" + nodeValue + ""); - break; - case Node.ENTITY_REFERENCE_NODE: - TestUtil.logMsg("" + nodeValue + ""); - break; - case Node.NOTATION_NODE: - TestUtil.logMsg("" + nodeValue + ""); - break; - case Node.PROCESSING_INSTRUCTION_NODE: - TestUtil.logMsg( - "" + nodeName + ""); - break; - case Node.TEXT_NODE: - String text = getText(node); - if (!text.equals("")) { - setSpaces(); - TestUtil.logMsg(spacesString + "" + text + ""); - } - break; - default: - TestUtil.logMsg("<" + nodeName + ">"); - break; - } - if (node instanceof Element) { - dumpDOMNodes_((Element) node); - spaces -= 2; - } - } - } - - /** - * - * @param document - * @return Element - */ - public static Element getSchemaComplexTypeName(Document document, - String typeName) { - Element types = getTypes(document); - Element schema = getChildElement(types, XSD_NAMESPACE_URI, - XSD_SCHEMA_LOCAL_NAME); - Element[] elements; - if (schema != null) { - elements = getChildElements(schema, XSD_NAMESPACE_URI, - XSD_COMPLEXTYPE_LOCAL_NAME); - TestUtil.logMsg("elements=" + elements.length); - for (int i = 0; i < elements.length; i++) { - TestUtil.logMsg("name=" + elements[i].getAttribute(XSD_NAME_ATTR)); - if (elements[i].getAttribute(XSD_NAME_ATTR).equals(typeName)) - return elements[i]; - } - } - return null; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/PropertyUtils.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/PropertyUtils.java deleted file mode 100644 index 61f393f679..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/PropertyUtils.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)PropertyUtils.java 1.1 03/04/15 - */ - -package com.sun.ts.tests.jaxws.wsi.utils; - -import java.util.Properties; - -import com.sun.ts.lib.harness.EETest; - -/** - */ -public class PropertyUtils { - /** - * Returns the property with the specified name. If the property does not - * exist, an EETest.Fault exception is thrown. - * - * @param properties - * the properties. - * @param key - * the key. - * - * @return the value. - * - * @throws EETest.Fault - */ - public static String getProperty(Properties properties, String key) - throws EETest.Fault { - String value = properties.getProperty(key); - if (value != null) { - return value; - } - throw new EETest.Fault("Required property '" + key + "' not present."); - } - - /** - * Returns the property, with the specified name, as an integer. If the - * property does not exist or cannot be converted to an integer, an - * EETest.Fault exception is thrown. - * - * @param properties - * the properties. - * @param key - * the key. - * - * @return the value. - * - * @throws EETest.Fault - */ - public static int getIntegerProperty(Properties properties, String key) - throws EETest.Fault { - String value = getProperty(properties, key); - try { - int i = Integer.parseInt(value); - return i; - } catch (NumberFormatException e) { - throw new EETest.Fault("Property '" + key + "' value '" + value - + "' is not a valid integer.", e); - } - } - - /** - * Returns the property, with the specified name, as a boolean. If the - * property does not exist or cannot be converted to a boolean, an - * EETest.Fault exception is thrown. - * - * @param properties - * the properties. - * @param key - * the key. - * - * @return the value. - * - * @throws EETest.Fault - */ - public static boolean getBooleanProperty(Properties properties, String key) - throws EETest.Fault { - String value = getProperty(properties, key); - if (value.equalsIgnoreCase("true")) { - return true; - } - if (value.equalsIgnoreCase("false")) { - return false; - } - throw new EETest.Fault( - "Property '" + key + "' value '" + value + "' is not a valid boolean."); - } - - /** - * Private to prevent instantiation. - */ - private PropertyUtils() { - super(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/SOAPUtils.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/SOAPUtils.java deleted file mode 100644 index 3a2bc4e63b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/SOAPUtils.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.utils; - -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.ws.soap.SOAPFaultException; - -public class SOAPUtils implements jakarta.xml.soap.SOAPConstants { - public static final String FAULT_DETAIL = "detail"; - - public static final String FAULT_ACTOR = "faultactor"; - - public static final String FAULT_STRING = "faultstring"; - - public static final String FAULT_CODE = "faultcode"; - - public static final String VERSION_MISMATCH = "VersionMismatch"; - - public static final String CLIENT = "Client"; - - public static final String MUST_UNDERSTAND = "MustUnderstand"; - - public static final String[] FAULT_CHILDREN = { FAULT_ACTOR, FAULT_CODE, - FAULT_DETAIL, FAULT_STRING }; - - public static boolean isValidSoapFaultChildName(SOAPElement element) { - for (int i = 0; i < FAULT_CHILDREN.length; i++) { - if (FAULT_CHILDREN[i].equals(element.getElementName().getLocalName())) { - return true; - } - } - return false; - } - - public static boolean isVersionMismatchFaultcode(SOAPMessage message) - throws SOAPException { - return isFaultcode(message, VERSION_MISMATCH); - } - - public static boolean isMustUnderstandFaultcode(SOAPMessage message) - throws SOAPException { - return isFaultcode(message, MUST_UNDERSTAND); - } - - public static boolean isClientFaultcode(SOAPMessage message) - throws SOAPException { - return isFaultcode(message, CLIENT); - } - - public static boolean isMustUnderstandFaultcode(SOAPFaultException se) { - return isFaultcode(se, MUST_UNDERSTAND); - } - - private static boolean isFaultcode(SOAPFaultException se, String faultcode) { - return se.getFault().getFaultCode().endsWith(faultcode); - } - - private static boolean isFaultcode(SOAPMessage message, String faultcode) - throws SOAPException { - SOAPBody body = message.getSOAPPart().getEnvelope().getBody(); - if (body.hasFault()) { - return body.getFault().getFaultCode().endsWith(faultcode); - } else { - return false; - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/ToolRunner.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/ToolRunner.java deleted file mode 100644 index 05c323f151..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/ToolRunner.java +++ /dev/null @@ -1,172 +0,0 @@ - /* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)ToolRunner.java 1.1 03/04/15 - */ - -package com.sun.ts.tests.jaxws.wsi.utils; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; - -import com.sun.ts.lib.harness.EETest; - -/** - * The class ... - * - * @author Peter H. Petersen - */ -public class ToolRunner { - /** - * The command-line. - */ - private String commandLine; - - /** - * The STDOUT output. - */ - private String stdout; - - /** - * The STDERR output. - */ - private String stderr; - - /** - * The process. - */ - private Process process; - - /** - * - * @param commandLine - */ - public ToolRunner(String commandLine) { - super(); - this.commandLine = commandLine; - } - - /** - * Executes the process. - * - * @return the exit value from the process. - * - * @throws IOException - * @throws InterruptedException - */ - public int execute() throws EETest.Fault { - if (process != null) { - throw new IllegalStateException("Tool has already been executed."); - } - try { - process = Runtime.getRuntime().exec(commandLine); - } catch (IOException e) { - throw new EETest.Fault("Unable to execute '" + commandLine + "'.", e); - } - StreamReader ir = new StreamReader(process.getInputStream()); - ir.start(); - StreamReader er = new StreamReader(process.getErrorStream()); - er.start(); - try { - process.waitFor(); - ir.join(); - er.join(); - } catch (InterruptedException e) { - throw new EETest.Fault("Execution interrupted.", e); - } - stdout = ir.getOutput(); - stderr = er.getOutput(); - return process.exitValue(); - } - - /** - * Returns the STDOUT output. - * - * @return the output. - */ - public String getStdOut() { - return stdout; - } - - /** - * Returns the STDERR output. - * - * @return the output. - */ - public String getStdErr() { - return stderr; - } - - /** - * The class StreamReader is a Thread extension for reading process streams. - */ - private static class StreamReader extends Thread { - /** - * The input stream. - */ - private InputStream is; - - /** - * The output. - */ - private String output; - - /** - * Constructs a new StreamReader instance for the specified input stream. - * - * @param is - * the input stream. - */ - public StreamReader(InputStream is) { - super(); - this.is = is; - } - - /** - * Runs this reader. - */ - public void run() { - StringBuffer buffer = new StringBuffer(); - try { - BufferedReader reader = new BufferedReader(new InputStreamReader(is)); - String line; - do { - line = reader.readLine(); - if (line != null) { - buffer.append(line); - buffer.append('\n'); - } - } while (line != null); - reader.close(); - } catch (IOException e) { - buffer.append(e.getMessage()); - } - output = buffer.toString(); - } - - /** - * Returns the output. - * - * @return the output. - */ - public String getOutput() { - return output; - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/build.xml deleted file mode 100644 index 5ff21db1fc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/utils/build.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/build.xml deleted file mode 100644 index 48f081b2ac..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/build.xml deleted file mode 100644 index 11f6a1ddf5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/Client.java deleted file mode 100644 index 36512a64cb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/Client.java +++ /dev/null @@ -1,378 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R1141; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R1141."; - - // The webserver username and password property names (harness properties) - private static final String USERNAME = "user"; - - private static final String PASSWORD = "password"; - - // RPC service and port information - private static final String NAMESPACE_URI = "http://w2jdlr1141testservice.org/wsdl"; - - private static final String SERVICE_NAME = "W2JDLR1141TestService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME; - - private QName PORT_QNAME; - - private static final Class PORT_CLASS = Hello.class; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private String username = null; - - private String password = null; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsi.w2jdlr1141.endpoint.1"; - - private static final String WSDLLOC_URL = "wsi.w2jdlr1141.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - // expect 2xx http status code - String GoodSoapMessage = "World"; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getTestURLfromStub() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Service Endpoint URL: " + url); - } - - Hello port = null; - - static W2JDLR1141TestService service = null; - - private void getPortStandalone() throws Exception { - port = (Hello) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - W2JDLR1141TestService.class, PORT_QNAME, Hello.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - getTargetEndpointAddress(port); - // JAXWS_Util.setTargetEndpointAddress(port, url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; user; password; - * platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - // Initialize QNames used by the test - SERVICE_QNAME = new QName(NAMESPACE_URI, SERVICE_NAME); - PORT_QNAME = new QName(NAMESPACE_URI, PORT_NAME); - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - username = p.getProperty(USERNAME); - password = p.getProperty(PASSWORD); - TestUtil.logMsg("Creating stub instance ..."); - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (W2JDLR1141TestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: TestHTTP10Message - * - * @assertion_ids: WSI:SPEC:R1141 - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection use - * a http version of 1.0. Verify that we get a correct HTTP status code of - * 2xx. - */ - public void TestHTTP10Message() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestHTTP10Message"); - TestUtil.logMsg("Send good SOAP RPC request (expect 2xx status code)"); - HttpURLConnection conn = openHttp10Connection(url); - TestUtil - .logMsg("HTTP VERSION = " + conn.getRequestProperty("HTTP-Version")); - int httpStatusCode = sendRequest(conn, GoodSoapMessage, "utf-8"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestGoodSoapMessage failed", e); - } - - if (!pass) - throw new Fault("TestGoodSoapMessage failed"); - } - - /* - * @testName: TestHTTP11Message - * - * @assertion_ids: WSI:SPEC:R1141 - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection use - * a http version of 1.1. Verify that we get a correct HTTP status code of - * 2xx. - */ - public void TestHTTP11Message() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestHTTP10Message"); - TestUtil.logMsg("Send good SOAP RPC request (expect 2xx status code)"); - HttpURLConnection conn = openHttpConnection(url); - TestUtil - .logMsg("HTTP VERSION = " + conn.getRequestProperty("HTTP-Version")); - int httpStatusCode = sendRequest(conn, GoodSoapMessage, "utf-8"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestGoodSoapMessage failed", e); - } - - if (!pass) - throw new Fault("TestGoodSoapMessage failed"); - } - - private HttpURLConnection openHttpConnection(String s) throws IOException { - HttpURLConnection conn = (HttpURLConnection) new URL(s).openConnection(); - conn.setDoOutput(true); - conn.setDoInput(true); - conn.setRequestMethod("POST"); - conn.setRequestProperty("HTTP-Version", "HTTP/1.1"); - conn.setRequestProperty("Content-Type", "text/xml"); - conn.setRequestProperty("SOAPAction", "\"\""); - return conn; - } - - private HttpURLConnection openHttp10Connection(String s) throws IOException { - HttpURLConnection conn = (HttpURLConnection) new URL(s).openConnection(); - conn.setDoOutput(true); - conn.setDoInput(true); - conn.setRequestMethod("POST"); - conn.setRequestProperty("HTTP-Version", "HTTP/1.0"); - conn.setRequestProperty("Content-Type", "text/xml"); - conn.setRequestProperty("SOAPAction", "\"\""); - return conn; - } - - private void closeHttpConnection(HttpURLConnection conn) throws IOException { - conn.disconnect(); - } - - private int sendRequest(HttpURLConnection conn, String request) - throws IOException { - - TestUtil.logMsg("Request=" + request); - return _sendRequest(conn, request.getBytes()); - } - - private int sendRequest(HttpURLConnection conn, String request, - String charsetName) throws IOException { - - TestUtil.logMsg("Request=" + request); - return _sendRequest(conn, request.getBytes(charsetName)); - } - - private int sendRequest(HttpURLConnection conn, byte[] request, - String encoding) throws IOException { - - TestUtil.logMsg("Request=" + new String(request, encoding)); - return _sendRequest(conn, request); - } - - private int _sendRequest(HttpURLConnection conn, byte[] data) - throws IOException { - - int length = data.length; - conn.setRequestProperty("Content-Length", - new Integer(data.length).toString()); - OutputStream outputStream = null; - try { - outputStream = conn.getOutputStream(); - outputStream.write(data); - } finally { - try { - outputStream.close(); - } catch (Throwable t) { - } - } - - boolean isFailure = true; - int responseCode = conn.getResponseCode(); - - String responseMessage = conn.getResponseMessage(); - - TestUtil.logMsg("ResponseCode=" + responseCode); - TestUtil.logMsg("ResponseMessage=" + responseMessage); - if (responseCode == HttpURLConnection.HTTP_OK) { - isFailure = false; - } - InputStream istream = null; - BufferedReader reader = null; - try { - istream = !isFailure ? conn.getInputStream() : conn.getErrorStream(); - if (istream != null) { - String response = null; - String buf = null; - reader = new BufferedReader(new InputStreamReader(istream)); - while ((buf = reader.readLine()) != null) { - if (response != null) - response += buf; - else - response = buf; - } - } - } finally { - try { - reader.close(); - istream.close(); - } catch (Throwable t) { - } - } - - return responseCode; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/HelloImpl.java deleted file mode 100644 index ef688d3ba9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/HelloImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R1141; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "W2JDLR1141TestService", targetNamespace = "http://w2jdlr1141testservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JDLR1141TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R1141.Hello") - -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/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/W2JDLR1141TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/W2JDLR1141TestService.wsdl deleted file mode 100644 index dcd2ef267f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/W2JDLR1141TestService.wsdl +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/build.xml deleted file mode 100644 index d1a75daab2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/customfile.xml deleted file mode 100644 index b2e3f89953..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/jakartaEE.tokens deleted file mode 100644 index 71518b81f6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JDLR1141TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R1141.W2JDLR1141TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R1141.HelloImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R1141.Hello -NAMESPACEURI=http://w2jdlr1141testservice.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R1141.HelloImpl -WEBSERVICEDESCRIPTION=W2JDLR1141TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JDLR1141TestService -SERVICEREFNAMEWSEJB=service/WSW2JDLR1141TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JDLR1141TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/standalone-sun-jaxws.xml deleted file mode 100644 index d07dfe09e2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/standalone.web.xml deleted file mode 100644 index 816f71f1d5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R1141/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLR1141TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -/jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/Client.java deleted file mode 100644 index 15e0ed0781..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/Client.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2030; - -import java.util.Properties; - -import jakarta.xml.ws.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String STRING = "R2030"; - - /** - * The client. - */ - private W2JDLR2030Client client; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - static W2JDLR2030TestService service = null; - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JDLR2030Client) ClientFactory.getClient(W2JDLR2030Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testDocumentLiteralDocumentationElement - * - * @assertion_ids: WSI:SPEC:R2030 - * - * @test_Strategy: The supplied WSDL, containing a wsdl:documentation element - * as a child of the wsdl:import element, containing a - * wsdl:documentation element as a child of the wsdl:part - * element, and containing a wsdl:documentation element as a - * child of the wsdl:definitions element, has been used by the - * WSDL-to-Java tool to generate an end point. If the tool - * works correctly, the end-point has been built and deployed - * so it should simply be reachable. - * - * @throws Fault - */ - public void testDocumentLiteralDocumentationElement() throws Fault { - String result; - try { - result = client.echoString(STRING); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2030)", e); - } - if (!STRING.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R2030)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030Client.java deleted file mode 100644 index 1c0dc691cd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030Client.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2030; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JDLR2030Client extends SOAPClient { - - public W2JDLR2030Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JDLR2030Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jdlr2030testservice.org/W2JDLR2030TestService.wsdl"); - stubContext.setService("W2JDLR2030TestService"); - stubContext.setPort("W2JDLR2030TestPort"); - stubContext.setEndpointInterface(W2JDLR2030Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jdlr2030.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jdlr2030.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - return ((W2JDLR2030Test) stubContext.getStub()).echoString(str); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030Import.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030Import.wsdl deleted file mode 100644 index ee15139257..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030Import.wsdl +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - Documentation. - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030TestImpl.java deleted file mode 100644 index 1422e6bd4d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030TestImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2030; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JDLR2030TestPort", serviceName = "W2JDLR2030TestService", targetNamespace = "http://w2jdlr2030testservice.org/W2JDLR2030TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JDLR2030TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2030.W2JDLR2030Test") -public class W2JDLR2030TestImpl implements W2JDLR2030Test { - public String echoString(String str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030TestService.wsdl deleted file mode 100644 index 1566840157..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/W2JDLR2030TestService.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - Documentation. - - - - - - - - - - - - - - - - - Documentation. - - - - - - - Documentation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/build.xml deleted file mode 100644 index 95ff075635..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/customfile.xml deleted file mode 100644 index 73a8c7c373..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/jakartaEE.tokens deleted file mode 100644 index 7e412ad381..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JDLR2030TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2030.W2JDLR2030TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2030.W2JDLR2030TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2030.W2JDLR2030Test -NAMESPACEURI=http://w2jdlr2030testservice.org/W2JDLR2030TestService.wsdl -PORT=W2JDLR2030TestPort -URLALIAS=/jaxws/W2JDLR2030Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2030.W2JDLR2030TestImpl -WEBSERVICEDESCRIPTION=W2JDLR2030TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JDLR2030TestService -SERVICEREFNAMEWSEJB=service/WSW2JDLR2030TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JDLR2030TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/standalone-sun-jaxws.xml deleted file mode 100644 index 67f2c81d23..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/standalone.web.xml deleted file mode 100644 index 655d1842a6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2030/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLR2030TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JDLR2030Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JDLR2030Test -/jaxws/W2JDLR2030Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/Client.java deleted file mode 100644 index 543b600aba..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/Client.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2707; - -import java.util.Properties; - -import jakarta.xml.ws.*; -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String STRING = "R2707"; - - /** - * The client. - */ - private W2JDLR2707Client client; - - static W2JDLR2707TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JDLR2707Client) ClientFactory.getClient(W2JDLR2707Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testUseAttributeDefaulting - * - * @assertion_ids: WSI:SPEC:R2707 - * - * @test_Strategy: The supplied WSDL, containg a soap:body, soapbind fault, - * soapbind:header or soapbind:headerfault element without the - * use="literal" attribute has been used by the WSDL-to-Java - * tool to generate an end point. If the tool works correctly, - * the end-point has been built and deployed so it should - * simply be reachable. - * - * @throws Fault - */ - public void testUseAttributeDefaulting() throws Fault { - String result; - try { - result = client.echoString(STRING); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2707)", e); - } - if (!STRING.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R2707)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/W2JDLR2707Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/W2JDLR2707Client.java deleted file mode 100644 index bb36e85f39..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/W2JDLR2707Client.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2707; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JDLR2707Client extends SOAPClient { - - public W2JDLR2707Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JDLR2707Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jdlr2707testservice.org/W2JDLR2707TestService.wsdl"); - stubContext.setService("W2JDLR2707TestService"); - stubContext.setPort("W2JDLR2707TestPort"); - stubContext.setEndpointInterface(W2JDLR2707Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jdlr2707.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jdlr2707.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - Header hdr = new Header(); - hdr.setTestName("echoString"); - hdr.setMessage("Testing echoString method call"); - return ((W2JDLR2707Test) stubContext.getStub()).echoString(str, hdr); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/W2JDLR2707TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/W2JDLR2707TestImpl.java deleted file mode 100644 index ef72fcaa30..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/W2JDLR2707TestImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2707; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JDLR2707TestPort", serviceName = "W2JDLR2707TestService", targetNamespace = "http://w2jdlr2707testservice.org/W2JDLR2707TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JDLR2707TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2707.W2JDLR2707Test") -public class W2JDLR2707TestImpl implements W2JDLR2707Test { - public String echoString(String str, Header hdr) throws ServiceFault { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/W2JDLR2707TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/W2JDLR2707TestService.wsdl deleted file mode 100644 index 2b4a82c127..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/W2JDLR2707TestService.wsdl +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - Documentation. - - - - - - - - - - - - - - - - - This is the configuration header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/build.xml deleted file mode 100644 index bade13ecde..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/build.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/customfile.xml deleted file mode 100644 index 327f433ba9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/jakartaEE.tokens deleted file mode 100644 index 757591d2f2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JDLR2707TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2707.W2JDLR2707TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2707.W2JDLR2707TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2707.W2JDLR2707Test -NAMESPACEURI=http://w2jdlr2707testservice.org/W2JDLR2707TestService.wsdl -PORT=W2JDLR2707TestPort -URLALIAS=/jaxws/W2JDLR2707Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2707.W2JDLR2707TestImpl -WEBSERVICEDESCRIPTION=W2JDLR2707TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JDLR2707TestService -SERVICEREFNAMEWSEJB=service/WSW2JDLR2707TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JDLR2707TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/standalone-sun-jaxws.xml deleted file mode 100644 index 0dec09b6f5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/standalone.web.xml deleted file mode 100644 index 22cc755e39..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2707/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLR2707TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JDLR2707Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JDLR2707Test -/jaxws/W2JDLR2707Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/Client.java deleted file mode 100644 index 7b23f9945c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/Client.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2709; - -import java.util.Properties; - -import jakarta.xml.ws.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String STRING = "R2709"; - - /** - * The client. - */ - private W2JDLR2709Client client; - - static W2JDLR2709TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JDLR2709Client) ClientFactory.getClient(W2JDLR2709Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testPortTypeReferences - * - * @assertion_ids: WSI:SPEC:R2709 - * - * @test_Strategy: The supplied WSDL, containg a set of port types, referred - * to by zero, one and two bindings respectively, has been - * used by the WSDL-to-Java tool to generate an end point. If - * the tool works correctly, the end-point has been built and - * deployed so it should simply be reachable. - * - * @throws Fault - */ - public void testPortTypeReferences() throws Fault { - String result; - try { - result = client.echoString(STRING); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2709)", e); - } - if (!STRING.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R2709)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/W2JDLR2709Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/W2JDLR2709Client.java deleted file mode 100644 index 699f5eeac7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/W2JDLR2709Client.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2709; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JDLR2709Client extends SOAPClient { - - public W2JDLR2709Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JDLR2709Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jdlr2709testservice.org/W2JDLR2709TestService.wsdl"); - stubContext.setService("W2JDLR2709TestService"); - stubContext.setPort("W2JDLR2709TestPort"); - stubContext.setEndpointInterface(W2JDLR2709Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jdlr2709.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jdlr2709.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - return ((W2JDLR2709Test) stubContext.getStub()).echoString(str); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/W2JDLR2709TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/W2JDLR2709TestImpl.java deleted file mode 100644 index 08f4e72232..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/W2JDLR2709TestImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2709; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JDLR2709TestPort", serviceName = "W2JDLR2709TestService", targetNamespace = "http://w2jdlr2709testservice.org/W2JDLR2709TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JDLR2709TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2709.W2JDLR2709Test") - -public class W2JDLR2709TestImpl implements W2JDLR2709Test { - public String echoString(String str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/W2JDLR2709TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/W2JDLR2709TestService.wsdl deleted file mode 100644 index 9655c31b53..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/W2JDLR2709TestService.wsdl +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - Documentation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/build.xml deleted file mode 100644 index ae5a8a7115..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/build.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/customfile.xml deleted file mode 100644 index 8a7d6eeaf1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/jakartaEE.tokens deleted file mode 100644 index d97f8fb2c8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/jakartaEE.tokens +++ /dev/null @@ -1,15 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JDLR2709TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2709.W2JDLR2709TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2709.W2JDLR2709TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2709.W2JDLR2709Test -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2709.W2JDLR2709TestZero -SEI3=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2709.W2JDLR2709TestOne -SEI4=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2709.W2JDLR2709TestTwo -NAMESPACEURI=http://w2jdlr2709testservice.org/W2JDLR2709TestService.wsdl -PORT=W2JDLR2709TestPort -URLALIAS=/jaxws/W2JDLR2709Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2709.W2JDLR2709TestImpl -WEBSERVICEDESCRIPTION=W2JDLR2709TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JDLR2709TestService -SERVICEREFNAMEWSEJB=service/WSW2JDLR2709TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JDLR2709TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/standalone-sun-jaxws.xml deleted file mode 100644 index bb30fd99e6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/standalone.web.xml deleted file mode 100644 index e3d733310c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2709/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLR2709TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JDLR2709Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JDLR2709Test -/jaxws/W2JDLR2709Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/Client.java deleted file mode 100644 index 6ce4b60e91..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/Client.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; -import java.text.MessageFormat; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPElement; -import java.util.Properties; -import java.util.Iterator; - -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.lib.util.*; - -public class Client extends ServiceEETest implements SOAPRequests { - - private W2JDLR2712ClientOne client1; - - private W2JDLR2712ClientTwo client2; - - private static String GLOBAL_ELEMENT = "HelloResponseElement"; - - static W2JDLR2712TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client1 = (W2JDLR2712ClientOne) ClientFactory - .getClient(W2JDLR2712ClientOne.class, properties, this, service); - client2 = (W2JDLR2712ClientTwo) ClientFactory - .getClient(W2JDLR2712ClientTwo.class, properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: ChildElementInstanceOfGlobalElementInRequest - * - * @assertion_ids: WSI:SPEC:R2712 - * - * @test_Strategy: Send a request and verify the child elements using a - * servlet filter. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void ChildElementInstanceOfGlobalElementInRequest() - throws EETest.Fault { - HelloResponse result; - HelloRequest hr = new HelloRequest(); - hr.setString("ChildElementInstanceOfGlobalElementInRequest"); - try { - result = client2.hello(hr); - } catch (Exception e) { - throw new Fault("Failure with (BP-R2712)", e); - } - } - - /** - * @testName: ChildElementInstanceOfGlobalElementInResponse - * - * @assertion_ids: WSI:SPEC:R2712 - * - * @test_Strategy: Send a request to the endpoint which inturn sends a - * response back. Verify the child elements in that response. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void ChildElementInstanceOfGlobalElementInResponse() - throws EETest.Fault { - SOAPMessage response; - try { - String request = MessageFormat.format(R2712_REQUEST, - "ChildElementInstanceOfGlobalElementInResponse"); - String expected = "PASSED"; - response = client1.makeSaajRequest(request); - String result = verifyChildElement(response); - if (!result.equals(expected)) { - TestUtil.logErr("ERROR: incorrect result"); - TestUtil.logErr("expected=" + expected); - TestUtil.logErr("actual=" + result); - throw new Fault("Failure with (BP-R2712)"); - } - } catch (Exception e) { - throw new Fault("Failure with (BP-R2712)", e); - } - - } - - /** - * Verifies that the correct child element of the soap:body is returned - * - * @param request - * the SOAPMessage response. - * - * @return "PASSED" if valid; an error message otherwise. - * - * @throws Exception - */ - protected String verifyChildElement(SOAPMessage sm) throws Exception { - String result = "FAILED"; - System.out.println("Getting children of body element ..."); - Iterator children = sm.getSOAPBody().getChildElements(); - SOAPElement child; - String localName; - int count = 0; - while (children.hasNext()) { - count++; - System.out.println("Getting operation name ..."); - child = (SOAPElement) children.next(); - localName = child.getElementName().getLocalName(); - System.out.println("child localname: " + localName); - if (localName.equals(GLOBAL_ELEMENT)) { - if (count == 1) { - result = "PASSED"; - } else { - result = "Error: The element '" + GLOBAL_ELEMENT + "' was found " - + count + " time(s) in the soap:body"; - } - } else { - result = "Error: Expected element '" + GLOBAL_ELEMENT - + "' in soap:body, instead got '" + localName + "'"; - } - - } - if (count == 0) { - result = "Error: no child elements were found in soap:body"; - } - System.out.println("result=" + result); - JAXWS_Util.printSOAPMessage(sm, System.out); - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/ServerSOAPHandler.java deleted file mode 100644 index f970713b56..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/ServerSOAPHandler.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPElement; - -import java.util.Iterator; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - private String PASSED = "PASSED"; - - private String FAILED = "FAILED"; - - private String GLOBAL_ELEMENT = "HelloRequestElement"; - - protected void processInboundMessage(SOAPMessageContext context) { - System.out.println("in ServerSOAPHandler:processInboundMessage"); - String result = null; - try { - result = verifyChildElement(context); - } catch (Exception e) { - throw new RuntimeException( - "Exception occurred in ServerSOAPHandler:verifyChildElement: " + e); - } - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: " + result); - } - } - - protected String verifyChildElement(SOAPMessageContext context) - throws Exception { - System.out.println("in ServerSOAPHandler:verifyChildElement"); - String result = FAILED; - SOAPMessage sm = context.getMessage(); - System.out.println("Getting children of body element ..."); - Iterator children = sm.getSOAPBody().getChildElements(); - SOAPElement child; - String localName; - int count = 0; - while (children.hasNext()) { - count++; - System.out.println("Getting operation name ..."); - child = (SOAPElement) children.next(); - localName = child.getElementName().getLocalName(); - System.out.println("child localname: " + localName); - if (localName.equals(GLOBAL_ELEMENT)) { - if (count == 1) { - result = PASSED; - } else { - result = FAILED + ": The element '" + GLOBAL_ELEMENT + "' was found " - + count + " time(s) in the soap:body"; - } - } else { - result = FAILED + ": Expected element '" + GLOBAL_ELEMENT - + "' in soap:body, instead got '" + localName + "'"; - } - } - if (count == 0) { - result = "Error: no child elements were found in soap:body"; - } - System.out.println("result=" + result); - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712ClientOne.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712ClientOne.java deleted file mode 100644 index 29d3bdeb59..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712ClientOne.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712; - -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.lib.harness.EETest; - -public class W2JDLR2712ClientOne extends SOAPClient { - - public W2JDLR2712ClientOne(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JDLR2712ClientOne(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://w2jdlr2712testservice.org/wsdl"); - stubContext.setService("W2JDLR2712TestService"); - stubContext.setPort("W2JDLR2712TestOnePort"); - stubContext.setEndpointInterface(W2JDLR2712TestOne.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jdlr2712.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jdlr2712.wsdlloc.1"; - } - - public HelloResponse hello(HelloRequest item) throws Exception { - return ((W2JDLR2712TestOne) stubContext.getStub()).hello(item); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712ClientTwo.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712ClientTwo.java deleted file mode 100644 index 367a70d3c3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712ClientTwo.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712; - -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.lib.harness.EETest; - -public class W2JDLR2712ClientTwo extends SOAPClient { - - public W2JDLR2712ClientTwo(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JDLR2712ClientTwo(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - - super(webServerHost, port, mode); - stubContext.setNamespace("http://w2jdlr2712testservice.org/wsdl"); - stubContext.setService("W2JDLR2712TestService"); - stubContext.setPort("W2JDLR2712TestTwoPort"); - stubContext.setEndpointInterface(W2JDLR2712TestTwo.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jdlr2712.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jdlr2712.wsdlloc.1"; - } - - public HelloResponse hello(HelloRequest item) throws Exception { - return ((W2JDLR2712TestTwo) stubContext.getStub()).hello(item); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712TestOneImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712TestOneImpl.java deleted file mode 100644 index 690cf00a36..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712TestOneImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JDLR2712TestOnePort", serviceName = "W2JDLR2712TestService", targetNamespace = "http://w2jdlr2712testservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JDLR2712TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712.W2JDLR2712TestOne") - -public class W2JDLR2712TestOneImpl implements W2JDLR2712TestOne { - - public HelloResponse hello(HelloRequest req) { - System.out.println(req.getString()); - HelloResponse resp = new HelloResponse(); - resp.setString(req.getString()); - return resp; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712TestService.wsdl deleted file mode 100644 index 3e4dc5281f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712TestService.wsdl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712TestTwoImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712TestTwoImpl.java deleted file mode 100644 index 0df61b6ed1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/W2JDLR2712TestTwoImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JDLR2712TestTwoPort", serviceName = "W2JDLR2712TestService", targetNamespace = "http://w2jdlr2712testservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JDLR2712TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712.W2JDLR2712TestTwo") - -public class W2JDLR2712TestTwoImpl implements W2JDLR2712TestTwo { - - public HelloResponse hello(HelloRequest req) { - System.out.println(req.getString()); - HelloResponse resp = new HelloResponse(); - resp.setString(req.getString()); - return resp; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/build.xml deleted file mode 100644 index a102eec615..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/build.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/custom-client.xml deleted file mode 100644 index 79f0763f2e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/custom-server.xml deleted file mode 100644 index 89d51a5d4e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/custom-server.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - ns1:W2JDLR2712TestTwoPort - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712.ServerSOAPHandler - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/jakartaEE.tokens deleted file mode 100644 index 31837b36c3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JDLR2712TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712.W2JDLR2712TestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712.W2JDLR2712TestOneImpl -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712.W2JDLR2712TestOneImpl -URLALIAS=/jaxws/W2JDLR2712TestOne -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712.W2JDLR2712TestTwoImpl -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712.W2JDLR2712TestTwoImpl -URLALIAS2=/jaxws/W2JDLR2712TestTwo -SEI=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712.W2JDLR2712TestOne -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2712.W2JDLR2712TestTwo -NAMESPACEURI=http://w2jdlr2712testservice.org/wsdl -PORT=W2JDLR2712TestOnePort -PORT2=W2JDLR2712TestTwoPort -WEBSERVICEDESCRIPTION=W2JDLR2712TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JDLR2712TestService -SERVICEREFNAMEWSEJB=service/WSW2JDLR2712TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JDLR2712TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/standalone-sun-jaxws.xml deleted file mode 100644 index 32e1d04990..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/standalone.web.xml deleted file mode 100644 index 8963d48572..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2712/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSW2JDLR2712TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JDLR2712TestTwo -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JDLR2712TestOne -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JDLR2712TestTwo -/jaxws/W2JDLR2712TestTwo - - -W2JDLR2712TestOne -/jaxws/W2JDLR2712TestOne - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/Client.java deleted file mode 100644 index a7c5f4f484..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/Client.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747; - -import java.util.Properties; - -import jakarta.xml.ws.*; -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -public class Client extends ServiceEETest { - /** - * The one string to be echoed. - */ - private static final String STRING_1 = "R2747-1"; - - /** - * The other string to be echoed. - */ - private static final String STRING_2 = "R2747-2"; - - /** - * The one client. - */ - private W2JDLR2747ClientOne client1; - - /** - * The other client. - */ - private W2JDLR2747ClientTwo client2; - - static W2JDLR2747TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client1 = (W2JDLR2747ClientOne) ClientFactory - .getClient(W2JDLR2747ClientOne.class, properties, this, service); - client2 = (W2JDLR2747ClientTwo) ClientFactory - .getClient(W2JDLR2747ClientTwo.class, properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testExtensionElementUnderstanding - * - * @assertion_ids: WSI:SPEC:R2747 - * - * @test_Strategy: The supplied WSDL, containing two port types, which are - * identical except for the use of the wsdl:required attribute - * on the soap binding extension elements, has been used by - * the WSDL-to-Java tool to generate an end point. If the tool - * works correctly, the end-point has been built and deployed - * so it should simply be reachable. - * - * @throws Fault - */ - public void testExtensionElementUnderstanding() throws Fault { - String result; - try { - result = client1.echoString(STRING_1); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2747)", e); - } - if (!STRING_1.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING_1 + "' (BP-R2747)"); - } - try { - result = client2.echoString(STRING_2); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2747)", e); - } - if (!STRING_2.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING_2 + "' (BP-R2747)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747ClientOne.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747ClientOne.java deleted file mode 100644 index 6f52075173..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747ClientOne.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JDLR2747ClientOne extends SOAPClient { - - public W2JDLR2747ClientOne(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JDLR2747ClientOne(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jdlr2747testservice.org/W2JDLR2747TestService.wsdl"); - stubContext.setService("W2JDLR2747TestService"); - stubContext.setPort("W2JDLR2747TestOnePort"); - stubContext.setEndpointInterface(W2JDLR2747TestOne.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jdlr2747.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jdlr2747.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - return ((W2JDLR2747TestOne) stubContext.getStub()).echoString(str); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747ClientTwo.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747ClientTwo.java deleted file mode 100644 index 8c90f63b39..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747ClientTwo.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JDLR2747ClientTwo extends SOAPClient { - - public W2JDLR2747ClientTwo(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JDLR2747ClientTwo(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jdlr2747testservice.org/W2JDLR2747TestService.wsdl"); - stubContext.setService("W2JDLR2747TestService"); - stubContext.setPort("W2JDLR2747TestTwoPort"); - stubContext.setEndpointInterface(W2JDLR2747TestTwo.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jdlr2747.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jdlr2747.wsdlloc.2"; - } - - public String echoString(String str) throws Exception { - return ((W2JDLR2747TestTwo) stubContext.getStub()).echoString(str); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747TestOneImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747TestOneImpl.java deleted file mode 100644 index f4c1883605..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747TestOneImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JDLR2747TestOnePort", serviceName = "W2JDLR2747TestService", targetNamespace = "http://w2jdlr2747testservice.org/W2JDLR2747TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JDLR2747TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747.W2JDLR2747TestOne") - -public class W2JDLR2747TestOneImpl implements W2JDLR2747TestOne { - public String echoString(String str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747TestService.wsdl deleted file mode 100644 index a58e7ae227..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747TestService.wsdl +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747TestTwoImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747TestTwoImpl.java deleted file mode 100644 index 041df7d132..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/W2JDLR2747TestTwoImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JDLR2747TestTwoPort", serviceName = "W2JDLR2747TestService", targetNamespace = "http://w2jdlr2747testservice.org/W2JDLR2747TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JDLR2747TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747.W2JDLR2747TestTwo") -public class W2JDLR2747TestTwoImpl implements W2JDLR2747TestTwo { - public String echoString(String str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/build.xml deleted file mode 100644 index c5a3f958b2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/customfile.xml deleted file mode 100644 index 13b8250370..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/jakartaEE.tokens deleted file mode 100644 index 0addc22b8b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JDLR2747TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747.W2JDLR2747TestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747.W2JDLR2747TestOneImpl -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747.W2JDLR2747TestOneImpl -URLALIAS=/jaxws/W2JDLR2747TestOne -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747.W2JDLR2747TestTwoImpl -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747.W2JDLR2747TestTwoImpl -URLALIAS2=/jaxws/W2JDLR2747TestTwo -SEI=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747.W2JDLR2747TestOne -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2747.W2JDLR2747TestTwo -NAMESPACEURI=http://w2jdlr2747testservice.org/W2JDLR2747TestService.wsdl -PORT=W2JDLR2747TestOnePort -PORT2=W2JDLR2747TestTwoPort -WEBSERVICEDESCRIPTION=W2JDLR2747TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JDLR2747TestService -SERVICEREFNAMEWSEJB=service/WSW2JDLR2747TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JDLR2747TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/standalone-sun-jaxws.xml deleted file mode 100644 index b63f2f30ff..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/standalone.web.xml deleted file mode 100644 index 1e28df140b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2747/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSW2JDLR2747TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JDLR2747TestOne -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JDLR2747TestTwo -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JDLR2747TestOne -/jaxws/W2JDLR2747TestOne - - -W2JDLR2747TestTwo -/jaxws/W2JDLR2747TestTwo - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/Client.java deleted file mode 100644 index 4bae973563..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/Client.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748; - -import java.util.Properties; - -import jakarta.xml.ws.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The one string to be echoed. - */ - private static final String STRING_1 = "R2748-1"; - - /** - * The other string to be echoed. - */ - private static final String STRING_2 = "R2748-2"; - - /** - * The one client. - */ - private W2JDLR2748ClientOne client1; - - /** - * The other client. - */ - private W2JDLR2748ClientTwo client2; - - static W2JDLR2748TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client1 = (W2JDLR2748ClientOne) ClientFactory - .getClient(W2JDLR2748ClientOne.class, properties, this, service); - client2 = (W2JDLR2748ClientTwo) ClientFactory - .getClient(W2JDLR2748ClientTwo.class, properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testFalseWSDLRequireds - * - * @assertion_ids: WSI:SPEC:R2748 - * - * @test_Strategy: The supplied WSDL, containing two port types, which are - * identical except for the use of the wsdl:required attribute - * on the soap binding extension elements, has been used by - * the WSDL-to-Java tool to generate an end point. If the tool - * works correctly, the end-point has been built and deployed - * so it should simply be reachable. - * - * @throws Fault - */ - public void testFalseWSDLRequireds() throws Fault { - String result; - try { - result = client1.echoString(STRING_1); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2748)", e); - } - if (!STRING_1.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING_1 + "' (BP-R2748)"); - } - try { - result = client2.echoString(STRING_2); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2748)", e); - } - if (!STRING_2.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING_2 + "' (BP-R2748)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748ClientOne.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748ClientOne.java deleted file mode 100644 index 0c6e1ec538..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748ClientOne.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JDLR2748ClientOne extends SOAPClient { - - public W2JDLR2748ClientOne(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JDLR2748ClientOne(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jdlr2748testservice.org/W2JDLR2748TestService.wsdl"); - stubContext.setService("W2JDLR2748TestService"); - stubContext.setPort("W2JDLR2748TestOnePort"); - stubContext.setEndpointInterface(W2JDLR2748TestOne.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jdlr2748.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jdlr2748.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - return ((W2JDLR2748TestOne) stubContext.getStub()).echoString(str); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748ClientTwo.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748ClientTwo.java deleted file mode 100644 index 45aca0710d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748ClientTwo.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JDLR2748ClientTwo extends SOAPClient { - - public W2JDLR2748ClientTwo(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JDLR2748ClientTwo(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jdlr2748testservice.org/W2JDLR2748TestService.wsdl"); - stubContext.setService("W2JDLR2748TestService"); - stubContext.setPort("W2JDLR2748TestTwoPort"); - stubContext.setEndpointInterface(W2JDLR2748TestTwo.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jdlr2748.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jdlr2748.wsdlloc.2"; - } - - public String echoString(String str) throws Exception { - return ((W2JDLR2748TestTwo) stubContext.getStub()).echoString(str); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748TestOneImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748TestOneImpl.java deleted file mode 100644 index 46a0802c42..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748TestOneImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JDLR2748TestOnePort", serviceName = "W2JDLR2748TestService", targetNamespace = "http://w2jdlr2748testservice.org/W2JDLR2748TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JDLR2748TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748.W2JDLR2748TestOne") - -public class W2JDLR2748TestOneImpl implements W2JDLR2748TestOne { - public String echoString(String str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748TestService.wsdl deleted file mode 100644 index 938250d8b2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748TestService.wsdl +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748TestTwoImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748TestTwoImpl.java deleted file mode 100644 index 983cff4fd7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/W2JDLR2748TestTwoImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JDLR2748TestTwoPort", serviceName = "W2JDLR2748TestService", targetNamespace = "http://w2jdlr2748testservice.org/W2JDLR2748TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JDLR2748TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748.W2JDLR2748TestTwo") - -public class W2JDLR2748TestTwoImpl implements W2JDLR2748TestTwo { - public String echoString(String str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/build.xml deleted file mode 100644 index 044062a2af..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/customfile.xml deleted file mode 100644 index 783c537ceb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/jakartaEE.tokens deleted file mode 100644 index 3a32aed32f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JDLR2748TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748.W2JDLR2748TestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748.W2JDLR2748TestOneImpl -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748.W2JDLR2748TestOneImpl -URLALIAS=/jaxws/W2JDLR2748TestOne -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748.W2JDLR2748TestTwoImpl -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748.W2JDLR2748TestTwoImpl -URLALIAS2=/jaxws/W2JDLR2748TestTwo -SEI=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748.W2JDLR2748TestOne -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R2748.W2JDLR2748TestTwo -NAMESPACEURI=http://w2jdlr2748testservice.org/W2JDLR2748TestService.wsdl -PORT=W2JDLR2748TestOnePort -PORT2=W2JDLR2748TestTwoPort -WEBSERVICEDESCRIPTION=W2JDLR2748TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JDLR2748TestService -SERVICEREFNAMEWSEJB=service/WSW2JDLR2748TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JDLR2748TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/standalone-sun-jaxws.xml deleted file mode 100644 index 0173891e50..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/standalone.web.xml deleted file mode 100644 index 5612cbae57..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R2748/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSW2JDLR2748TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JDLR2748TestTwo -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JDLR2748TestOne -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JDLR2748TestTwo -/jaxws/W2JDLR2748TestTwo - - -W2JDLR2748TestOne -/jaxws/W2JDLR2748TestOne - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/Client.java deleted file mode 100644 index 8d6747c544..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/Client.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4002; - -import java.util.Properties; - -import jakarta.xml.ws.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String STRING = "R4002"; - - /** - * The client. - */ - private W2JDLR4002Client client; - - static W2JDLR4002TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JDLR4002Client) ClientFactory.getClient(W2JDLR4002Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testDescriptionWithBOM - * - * @assertion_ids: WSI:SPEC:R4002 - * - * @test_Strategy: The supplied WSDL, encoded as UTF-16 and containing a BOM, - * has been used by the WSDL-to-Java tool to generate an end - * point. If the tool works correctly, the end-point has been - * built and deployed so it should simply be reachable. - * - * @throws Fault - */ - public void testDescriptionWithBOM() throws Fault { - String result; - try { - result = client.echoString(STRING); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R4002)", e); - } - if (!STRING.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R4002)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002Client.java deleted file mode 100644 index db56a87853..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002Client.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4002; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JDLR4002Client extends SOAPClient { - - public W2JDLR4002Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JDLR4002Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jdlr4002testservice.org/W2JDLR4002TestService.wsdl"); - stubContext.setService("W2JDLR4002TestService"); - stubContext.setPort("W2JDLR4002TestPort"); - stubContext.setEndpointInterface(W2JDLR4002Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jdlr4002.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jdlr4002.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - return ((W2JDLR4002Test) stubContext.getStub()).echoString(str); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002TestImpl.java deleted file mode 100644 index adaa83eed3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002TestImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4002; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JDLR4002TestPort", serviceName = "W2JDLR4002TestService", targetNamespace = "http://w2jdlr4002testservice.org/W2JDLR4002TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JDLR4002TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4002.W2JDLR4002Test") - -public class W2JDLR4002TestImpl implements W2JDLR4002Test { - public String echoString(String str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002TestService.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002TestService.txt deleted file mode 100644 index 0a02288e89..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002TestService.txt +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002TestService.wsdl deleted file mode 100644 index a8350c6669..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/W2JDLR4002TestService.wsdl and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/build.xml deleted file mode 100644 index 8d8777e1b8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/customfile.xml deleted file mode 100644 index a2b677b56e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/customfile.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/jakartaEE.tokens deleted file mode 100644 index 280a01b583..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JDLR4002TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4002.W2JDLR4002TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4002.W2JDLR4002TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4002.W2JDLR4002Test -NAMESPACEURI=http://w2jdlr4002testservice.org/W2JDLR4002TestService.wsdl -PORT=W2JDLR4002TestPort -URLALIAS=/jaxws/W2JDLR4002Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4002.W2JDLR4002TestImpl -WEBSERVICEDESCRIPTION=W2JDLR4002TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JDLR4002TestService -SERVICEREFNAMEWSEJB=service/WSW2JDLR4002TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JDLR4002TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/standalone-sun-jaxws.xml deleted file mode 100644 index 27384be82c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/standalone.web.xml deleted file mode 100644 index 9b41ba28b3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4002/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLR4002TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JDLR4002Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JDLR4002Test -/jaxws/W2JDLR4002Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/Client.java deleted file mode 100644 index 385f1095d5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/Client.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4003; - -import java.util.Properties; - -import jakarta.xml.ws.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The client. - */ - private W2JDLR4003Client client; - - static W2JDLR4003TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JDLR4003Client) ClientFactory.getClient(W2JDLR4003Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testDescriptionEncoding - * - * @assertion_ids: WSI:SPEC:R4003 - * - * @test_Strategy: The supplied WSDL, importing UTF-8 and UTF-16 descriptions, - * has been used by the WSDL-to-Java tool to generate an end - * point. If the tool works correctly, the end-point has been - * built and deployed so it should simply be reachable. - * - * @throws Fault - */ - public void testDescriptionEncoding() throws Fault { - try { - String result = client.echoString("R4003"); - if (!"R4003".equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of 'R4003' (BP-R4003)"); - } - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R4003)", e); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003Client.java deleted file mode 100644 index 294b1932f9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003Client.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4003; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JDLR4003Client extends SOAPClient { - - public W2JDLR4003Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JDLR4003Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jdlr4003testservice.org/W2JDLR4003TestService.wsdl"); - stubContext.setService("W2JDLR4003TestService"); - stubContext.setPort("W2JDLR4003TestPort"); - stubContext.setEndpointInterface(W2JDLR4003Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jdlr4003.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jdlr4003.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - return ((W2JDLR4003Test) stubContext.getStub()).echoString(str); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003ImportUTF16.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003ImportUTF16.txt deleted file mode 100644 index c207389df3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003ImportUTF16.txt +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003ImportUTF16.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003ImportUTF16.wsdl deleted file mode 100644 index 956baf6c59..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003ImportUTF16.wsdl and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003ImportUTF8.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003ImportUTF8.txt deleted file mode 100644 index 40e37c6ebf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003ImportUTF8.txt +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003ImportUTF8.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003ImportUTF8.wsdl deleted file mode 100644 index 40e37c6ebf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003ImportUTF8.wsdl +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003TestImpl.java deleted file mode 100644 index bdbae5d968..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003TestImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4003; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JDLR4003TestPort", serviceName = "W2JDLR4003TestService", targetNamespace = "http://w2jdlr4003testservice.org/W2JDLR4003TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JDLR4003TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4003.W2JDLR4003Test") - -public class W2JDLR4003TestImpl implements W2JDLR4003Test { - public String echoString(String str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003TestService.wsdl deleted file mode 100644 index 5787aaba41..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/W2JDLR4003TestService.wsdl +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/build.xml deleted file mode 100644 index 8f8b20f3aa..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/customfile.xml deleted file mode 100644 index 1ce2b3c567..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/jakartaEE.tokens deleted file mode 100644 index 6a7fc51d5d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JDLR4003TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4003.W2JDLR4003TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4003.W2JDLR4003TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4003.W2JDLR4003Test -NAMESPACEURI=http://w2jdlr4003testservice.org/W2JDLR4003ImportUTF16.wsdl -PORT=W2JDLR4003TestPort -URLALIAS=/jaxws/W2JDLR4003Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.R4003.W2JDLR4003TestImpl -WEBSERVICEDESCRIPTION=W2JDLR4003TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JDLR4003TestService -SERVICEREFNAMEWSEJB=service/WSW2JDLR4003TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JDLR4003TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/standalone-sun-jaxws.xml deleted file mode 100644 index 93d08eaebd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/standalone.web.xml deleted file mode 100644 index fa4b6c58ad..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/R4003/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JDLR4003TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JDLR4003Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JDLR4003Test -/jaxws/W2JDLR4003Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/build.xml deleted file mode 100644 index 7f4a25c7f7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/Client.java deleted file mode 100644 index 3d1ffb25c6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/Client.java +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 59593 2009-09-28 15:35:32Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swareftest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.awt.*; - -import jakarta.activation.*; -import javax.xml.transform.stream.*; - -import java.util.Properties; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsidlswareftest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsidlswareftest.wsdlloc.1"; - - private static final String CTXROOT = "wsidlswareftest.ctxroot.1"; - - private String surl = null; - - private String file = null; - - private String ctxroot = null; - - private URL wsdlurl = null; - - private static final String NAMESPACEURI = "http://SwaRefTestService.org/wsdl"; - - private static final String SERVICE_NAME = "WSIDLSwaRefTestService"; - - private static final String PORT_NAME = "SwaRefTestPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private DataHandler dh1 = null; - - private DataHandler dh2 = null; - - private DataHandler dh3 = null; - - private DataHandler dh4 = null; - - private URL url1 = null; - - private URL url2 = null; - - private URL url3 = null; - - private URL url4 = null; - - static WSIDLSwaRefTestService service = null; - - /*********************************************************************** - * All the test cases in this file test all of the assertions specified in the - * WSI Attachment Profile 1.0 specification. - **********************************************************************/ - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - surl = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - ctxroot = JAXWS_Util.getURLFromProp(CTXROOT); - TestUtil.logMsg("Service Endpoint URL: " + surl); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - TestUtil.logMsg("Context Root: " + ctxroot); - } - - SwaRefTest port = null; - - private void getPortStandalone() throws Exception { - port = (SwaRefTest) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - WSIDLSwaRefTestService.class, PORT_QNAME, SwaRefTest.class); - JAXWS_Util.setTargetEndpointAddress(port, surl); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (SwaRefTest) service.getPort(SwaRefTest.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - getTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (WSIDLSwaRefTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - TestUtil.logMsg("Create URL's to attachments"); - url1 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.txt"); - url2 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.html"); - url3 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.xml"); - url4 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.jpeg"); - TestUtil.logMsg("url1=" + url1); - TestUtil.logMsg("url2=" + url2); - TestUtil.logMsg("url3=" + url3); - TestUtil.logMsg("url4=" + url4); - TestUtil.logMsg("Create DataHandler's to attachments"); - dh1 = new DataHandler(url1); - dh2 = new DataHandler(url2); - dh3 = new DataHandler(url3); - dh4 = new DataHandler(javax.imageio.ImageIO.read(url4), "image/jpeg"); - TestUtil.logMsg("dh1.getContentType()=" + dh1.getContentType()); - TestUtil.logMsg("dh2.getContentType()=" + dh2.getContentType()); - TestUtil.logMsg("dh3.getContentType()=" + dh3.getContentType()); - TestUtil.logMsg("dh4.getContentType()=" + dh4.getContentType()); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: EchoSingleSwaRefAttachmentTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R2927; JAXWS:SPEC:2051; JAXWS:SPEC:2052; JAXWS:SPEC:2053; - * WSI:SPEC:R2940; WSI:SPEC:R2928; - * - * @test_Strategy: Send and Receive a single attachment via swaRef type. - * - */ - public void EchoSingleSwaRefAttachmentTest() throws Fault { - TestUtil.logMsg("EchoSingleSwaRefAttachmentTest"); - boolean pass = true; - - try { - TestUtil - .logMsg("Send and receive (text/xml) attachment via the swaRef type"); - SwaRefTypeRequest request = new SwaRefTypeRequest(); - DataHandler swaRefInput = dh3; - request.setAttachment(swaRefInput); - SwaRefTypeResponse response = port.echoSingleSwaRefAttachment(request); - if (!ValidateSingleSwaRefAttachmentTestCase(request, response, - "text/xml")) - pass = false; - TestUtil.logMsg( - "Send and receive (text/plain) attachment via the swaRef type"); - swaRefInput = dh1; - request.setAttachment(swaRefInput); - response = port.echoSingleSwaRefAttachment(request); - if (!ValidateSingleSwaRefAttachmentTestCase(request, response, - "text/plain")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoSingleSwaRefAttachmentTest failed", e); - } - if (!pass) - throw new Fault("EchoSingleSwaRefAttachmentTest failed"); - } - - /* - * @testName: EchoMultipleSwaRefAttachmentsTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R2927; JAXWS:SPEC:2051; JAXWS:SPEC:2052; JAXWS:SPEC:2053; - * WSI:SPEC:R2940; WSI:SPEC:R2928; - * - * @test_Strategy: Send and Receive multiple attachments via swaRef type. - * - */ - public void EchoMultipleSwaRefAttachmentsTest() throws Fault { - TestUtil.logMsg("SwaRefAttachmentsTest2"); - boolean pass = true; - - try { - TestUtil.logMsg( - "Send and receive (text/xml, text/plain, text/html) attachments via the swaRef type"); - SwaRefTypeRequest2 request = new SwaRefTypeRequest2(); - request.setAttachment1(dh3); - request.setAttachment2(dh1); - request.setAttachment3(dh4); - SwaRefTypeResponse2 response = port - .echoMultipleSwaRefAttachments(request); - if (!ValidateMultipleSwaRefAttachmentsTestCase(request, response)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoMultipleSwaRefAttachmentsTest failed", e); - } - if (!pass) - throw new Fault("EchoMultipleSwaRefAttachmentsTest failed"); - } - - /******************************************************************************* - * Validate request, response and attachments (swaRefAttachments) - ******************************************************************************/ - private boolean ValidateSingleSwaRefAttachmentTestCase( - SwaRefTypeRequest request, SwaRefTypeResponse response, String type) { - boolean result = true; - TestUtil.logMsg("--------------------------------------------------------"); - TestUtil.logMsg("Validating the request, the response, and the attachment"); - TestUtil.logMsg("--------------------------------------------------------"); - if (type.equals("text/xml")) { - try { - StreamSource sr1 = new StreamSource( - request.getAttachment().getInputStream()); - StreamSource sr2 = new StreamSource( - response.getAttachment().getInputStream()); - String tmpStr = AttachmentHelper.validateAttachmentData(sr1, sr2, - "XmlAttachment"); - if (tmpStr != null) { - TestUtil.logErr(tmpStr); - result = false; - } - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - } else if (type.equals("image/jpeg")) { - try { - Image image1 = javax.imageio.ImageIO - .read(request.getAttachment().getInputStream()); - Image image2 = javax.imageio.ImageIO - .read(response.getAttachment().getInputStream()); - if (!AttachmentHelper.compareImages(image1, image2, - new Rectangle(0, 0, 100, 120), "JpegAttachment")) - result = false; - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - } else if (type.equals("text/plain")) { - try { - byte data1[] = new byte[4096]; - byte data2[] = new byte[4096]; - InputStream is = request.getAttachment().getInputStream(); - int count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = response.getAttachment().getInputStream(); - int count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, - data2, "PlainTextAttachment")) - result = false; - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - } - return result; - } - - private boolean ValidateMultipleSwaRefAttachmentsTestCase( - SwaRefTypeRequest2 request, SwaRefTypeResponse2 response) { - boolean result = true; - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil - .logMsg("Validating the request, the response, and the attachments"); - TestUtil - .logMsg("---------------------------------------------------------"); - try { - StreamSource sr1 = new StreamSource( - request.getAttachment1().getInputStream()); - StreamSource sr2 = new StreamSource( - response.getAttachment1().getInputStream()); - String tmpStr = AttachmentHelper.validateAttachmentData(sr1, sr2, - "XmlAttachment"); - if (tmpStr != null) { - TestUtil.logErr(tmpStr); - result = false; - } - byte data1[] = new byte[4096]; - byte data2[] = new byte[4096]; - InputStream is = request.getAttachment2().getInputStream(); - int count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = response.getAttachment2().getInputStream(); - int count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "PlainTextAttachment")) - result = false; - Image image1 = javax.imageio.ImageIO - .read(request.getAttachment3().getInputStream()); - Image image2 = javax.imageio.ImageIO - .read(response.getAttachment3().getInputStream()); - if (!AttachmentHelper.compareImages(image1, image2, - new Rectangle(0, 0, 100, 120), "JpegAttachment")) - result = false; - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/SwaRefTestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/SwaRefTestImpl.java deleted file mode 100644 index c54477e0c7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/SwaRefTestImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: SwaRefTestImpl.java 52876 2007-03-12 14:51:28Z af70133 $ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swareftest; - -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.soap.*; -import jakarta.activation.*; -import javax.xml.transform.stream.*; -import javax.xml.transform.*; -import java.net.*; -import java.awt.*; - -import jakarta.jws.WebService; - -@WebService(portName = "SwaRefTestPort", serviceName = "WSIDLSwaRefTestService", targetNamespace = "http://SwaRefTestService.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JDLSwaRefTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swareftest.SwaRefTest") - -public class SwaRefTestImpl implements SwaRefTest { - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swareftest.SwaRefTypeResponse echoSingleSwaRefAttachment( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swareftest.SwaRefTypeRequest request) { - System.out.println("Enter echoSingleSwaRefAttachment() ......"); - SwaRefTypeResponse response = new SwaRefTypeResponse(); - response.setAttachment(request.getAttachment()); - System.out.println("Leave echoSingleSwaRefAttachment() ......"); - return response; - } - - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swareftest.SwaRefTypeResponse2 echoMultipleSwaRefAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swareftest.SwaRefTypeRequest2 request) { - System.out.println("Enter echoMultipleSwaRefAttachments() ......"); - SwaRefTypeResponse2 response = new SwaRefTypeResponse2(); - response.setAttachment1(request.getAttachment1()); - response.setAttachment2(request.getAttachment2()); - response.setAttachment3(request.getAttachment3()); - System.out.println("Leave echoMultipleSwaRefAttachments() ......"); - return response; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/WSW2JDLSwaRefTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/WSW2JDLSwaRefTestService.wsdl deleted file mode 100644 index 74cb68359d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/WSW2JDLSwaRefTestService.wsdl +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/build.xml deleted file mode 100644 index 9e321f2852..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/build.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/contentRoot/attach.html b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/contentRoot/attach.html deleted file mode 100644 index 74211eca02..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/contentRoot/attach.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - -This is a title - - -

This is a starting point


-

This is a header

-

This is a paragraph

-
    -
  • This is a bullet

  • -
- - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/contentRoot/attach.jpeg b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/contentRoot/attach.jpeg deleted file mode 100644 index a1ed71ba6a..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/contentRoot/attach.jpeg and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/contentRoot/attach.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/contentRoot/attach.txt deleted file mode 100644 index cdc8a13be3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/contentRoot/attach.txt +++ /dev/null @@ -1 +0,0 @@ -This is a plain text attachment. diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/contentRoot/attach.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/contentRoot/attach.xml deleted file mode 100644 index 9c0113605b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/contentRoot/attach.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - http - - - - - http://www.wombats.com/remote/sender - - - http://127.0.0.1:8081/jaxm-provider/receiver/ebxml - - - - - - - 5 - - - 2000 - - - - - - - ebxml/ - - - 10 - - - - - - - https - - - - - jaxm.dummy.uri - - - https://127.0.0.1:8443/jaxm/dummy/ - - - - - - ebxml-https/ - - - 10 - - - - - - - - - - http - - - - - http://www.wombats.com/soaprp/sender - - - http://127.0.0.1:8081/jaxm-provider/receiver/soaprp - - - - - - - 3 - - - 2000 - - - - - - - soaprp/ - - - 20 - - - - - - - https - - - - - jaxm.dummy.uri - - - https://127.0.0.1:8443/jaxm/dummy - - - - - - - - - 3 - - - 2000 - - - - - - - tempdir/ - - - 11 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/custom-client.xml deleted file mode 100644 index 68b9de34ad..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/custom-client.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - true - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/custom-server.xml deleted file mode 100644 index 1a07406e4f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/custom-server.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - true - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/jakartaEE.tokens deleted file mode 100644 index dcf0add398..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/jakartaEE.tokens +++ /dev/null @@ -1,13 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSWSIDLSwaRefTestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swareftest.WSIDLSwaRefTestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swareftest.SwaRefTestImpl -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swareftest.SwaRefTestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swareftest.SwaRefTest -URLALIAS=/jaxws/SwaRefTest -NAMESPACEURI=http://SwaRefTestService.org/wsdl -PORT=SwaRefTestPort -WEBSERVICEDESCRIPTION=WSIDLSwaRefTestService -SERVICEREFNAMEWSSERVLET=service/WSWSIDLSwaRefTestService -SERVICEREFNAMEWSEJB=service/WSWSIDLSwaRefTestService -SERVICEREFNAMEWSAPPCLIENT=service/WSWSIDLSwaRefTestService - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/standalone-sun-jaxws.xml deleted file mode 100644 index ba9e487d8e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/standalone.web.xml deleted file mode 100644 index 029fce9a38..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swareftest/standalone.web.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - WSWSIDLSwaRefTestApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - WSIDLSwaRefTest - com.sun.xml.ws.transport.http.servlet.WSServlet - - - WSIDLSwaRefTest - /jaxws/SwaRefTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/Client.java deleted file mode 100644 index adf6071268..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/Client.java +++ /dev/null @@ -1,1247 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.awt.*; -import java.nio.charset.Charset; - -import jakarta.xml.ws.*; -import jakarta.xml.soap.*; -import jakarta.activation.*; -import javax.xml.transform.stream.*; - -import java.util.Properties; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; - -public class Client extends ServiceEETest implements SOAPRequests { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsidlswatest.endpoint.1"; - - private static final String ENDPOINT_URL2 = "wsidlswatest.endpoint.2"; - - private static final String WSDLLOC_URL = "wsidlswatest.wsdlloc.1"; - - private static final String CTXROOT = "wsidlswatest.ctxroot.1"; - - private String surl = null; - - private String file = null; - - private String surl2 = null; - - private String file2 = null; - - private String ctxroot = null; - - private URL wsdlurl = null; - - private static final String NAMESPACEURI = "http://SwaTestService.org/wsdl"; - - private static final String SERVICE_NAME = "WSIDLSwaTestService"; - - private static final String PORT_NAME = "SwaTestOnePort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private DataHandler dh1 = null; - - private DataHandler dh2 = null; - - private DataHandler dh3 = null; - - private DataHandler dh4 = null; - - private DataHandler dh5 = null; - - private URL url1 = null; - - private URL url2 = null; - - private URL url3 = null; - - private URL url4 = null; - - private URL url5 = null; - - static WSIDLSwaTestService service = null; - - /*********************************************************************** - * All the test cases in this file test all of the assertions specified in the - * WSI Attachment Profile 1.0 specification. - **********************************************************************/ - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - surl = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file2 = JAXWS_Util.getURLFromProp(ENDPOINT_URL2); - surl2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file2); - ctxroot = JAXWS_Util.getURLFromProp(CTXROOT); - TestUtil.logMsg("Service Endpoint URL: " + surl); - TestUtil.logMsg("Service Endpoint URL2: " + surl2); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - TestUtil.logMsg("Context Root: " + ctxroot); - } - - SwaTest1 port = null; - - private SwaTestClient1 client1; - - private SwaTestClient2 client2; - - private void getPortStandalone() throws Exception { - port = (SwaTest1) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - WSIDLSwaTestService.class, PORT_QNAME, SwaTest1.class); - JAXWS_Util.setTargetEndpointAddress(port, surl); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (SwaTest1) service.getPort(SwaTest1.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - getTargetEndpointAddress(port); - // JAXWS_Util.setTargetEndpointAddress(port, surl); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - client1 = (SwaTestClient1) ClientFactory.getClient(SwaTestClient1.class, p, - this, service); - client2 = (SwaTestClient2) ClientFactory.getClient(SwaTestClient2.class, p, - this, service); - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (WSIDLSwaTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - TestUtil.logMsg("Create URL's to attachments"); - url1 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.txt"); - url2 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.html"); - url3 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.xml"); - url4 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.jpeg"); - url5 = ctsurl.getURL("http", hostname, portnum, - ctxroot + "/attach2.jpeg"); - TestUtil.logMsg("url1=" + url1); - TestUtil.logMsg("url2=" + url2); - TestUtil.logMsg("url3=" + url3); - TestUtil.logMsg("url4=" + url4); - TestUtil.logMsg("url5=" + url5); - TestUtil.logMsg("Create DataHandler's to attachments"); - dh1 = new DataHandler(url1); - dh2 = new DataHandler(url2); - dh3 = new DataHandler(url3); - dh4 = new DataHandler(javax.imageio.ImageIO.read(url4), "image/jpeg"); - dh5 = new DataHandler(javax.imageio.ImageIO.read(url5), "image/jpeg"); - TestUtil.logMsg("dh1.getContentType()=" + dh1.getContentType()); - TestUtil.logMsg("dh2.getContentType()=" + dh2.getContentType()); - TestUtil.logMsg("dh3.getContentType()=" + dh3.getContentType()); - TestUtil.logMsg("dh4.getContentType()=" + dh4.getContentType()); - TestUtil.logMsg("dh5.getContentType()=" + dh5.getContentType()); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: GetMultipleAttachmentsTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R2927; JAXWS:SPEC:2051; JAXWS:SPEC:2052; JAXWS:SPEC:2053; - * WSI:SPEC:R9801; - * - * @test_Strategy: Get multiple attachments. Multiple attachments should be - * returned in the soap response. - * - */ - public void GetMultipleAttachmentsTest() throws Fault { - TestUtil.logMsg("GetMultipleAttachmentsTest"); - boolean pass = true; - - try { - InputRequestGet request = new InputRequestGet(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - request.setUrl1(url1.toString()); - request.setUrl2(url2.toString()); - TestUtil.logMsg("Get 2 attachments (text/plain) and (text/html)"); - Holder attach1 = new Holder(); - Holder attach2 = new Holder(); - Holder response = new Holder(); - port.getMultipleAttachments(request, response, attach1, attach2); - if (!ValidateRequestResponseAttachmentsGetTestCase(request, - response.value, attach1, attach2)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetMultipleAttachmentsTest failed", e); - } - if (!pass) - throw new Fault("GetMultipleAttachmentsTest failed"); - } - - /* - * @testName: PutMultipleAttachmentsTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R2927; JAXWS:SPEC:2051; JAXWS:SPEC:2052; JAXWS:SPEC:2053; - * WSI:SPEC:R9801; - * - * @test_Strategy: Put multiple attachments. Multiple attachments should be - * sent in the soap request and a status result is returned in the soap - * response. - * - */ - public void PutMultipleAttachmentsTest() throws Fault { - TestUtil.logMsg("PutMultipleAttachmentsTest"); - boolean pass = true; - - try { - InputRequestPut request = new InputRequestPut(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - request.setHeader("notused"); - DataHandler attach1 = dh1; - DataHandler attach2 = dh2; - TestUtil.logMsg("Put 2 attachments (text/plain) and (text/html)"); - OutputResponseString response = port.putMultipleAttachments(request, - attach1, attach2); - if (!response.getMyString().equals("ok")) { - TestUtil.logErr( - "Return status is " + response.getMyString() + ", expected ok"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("PutMultipleAttachmentsTest failed", e); - } - - if (!pass) - throw new Fault("PutMultipleAttachmentsTest failed"); - } - - /* - * @testName: EchoMultipleAttachmentsTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R2927; JAXWS:SPEC:2051; JAXWS:SPEC:2052; JAXWS:SPEC:2053; - * WSI:SPEC:R9801; - * - * @test_Strategy: Echo multiple attachments. Multiple attachments should be - * sent in the soap request and returned in the soap response. - * - */ - public void EchoMultipleAttachmentsTest() throws Fault { - TestUtil.logMsg("EchoMultipleAttachmentsTest"); - boolean pass = true; - - try { - InputRequest request = new InputRequest(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - Holder attach1 = new Holder(); - Holder attach2 = new Holder(); - attach1.value = dh1; - attach2.value = dh2; - TestUtil.logMsg("Echo 2 attachments (text/plain) and (text/html)"); - OutputResponse response = port.echoMultipleAttachments(request, attach1, - attach2); - if (!ValidateRequestResponseAttachmentsEchoTestCase(request, response, - attach1, attach2)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoMultipleAttachmentsTest failed", e); - } - - if (!pass) - throw new Fault("EchoMultipleAttachmentsTest failed"); - } - - /* - * @testName: EchoNoAttachmentsTest - * - * @assertion_ids: WSI:SPEC:R2917; JAXWS:SPEC:10011; WSI:SPEC:R2902; - * WSI:SPEC:R9801; - * - * @test_Strategy: Echo no attachments. No attachments should be sent in the - * soap request or returned in the soap response. - * - */ - public void EchoNoAttachmentsTest() throws Fault { - TestUtil.logMsg("EchoNoAttachmentsTest"); - boolean pass = true; - - try { - InputRequestString request = new InputRequestString(); - request.setMyString("Hello"); - TestUtil.logMsg("Echo no attachments"); - OutputResponseString response = port.echoNoAttachments(request); - if (!response.getMyString().equals(request.getMyString())) { - TestUtil.logErr("OutputString is not equal to InputString"); - TestUtil.logErr("InputString=" + request.getMyString()); - TestUtil.logErr("OutputString=" + response.getMyString()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoNoAttachmentsTest failed", e); - } - - if (!pass) - throw new Fault("EchoNoAttachmentsTest failed"); - } - - /* - * @testName: EchoAllAttachmentTypesTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R2927; WSI:SPEC:R2912; WSI:SPEC:R2908; WSI:SPEC:R2903; - * WSI:SPEC:R2904; WSI:SPEC:R2941; WSI:SPEC:R2922; WSI:SPEC:R2902; - * WSI:SPEC:R2916; WSI:SPEC:R9801; - * - * @test_Strategy: Echo all attachment types. Attachments for each supported - * mime type is sent in the soap request and then returned in the soap - * response. This test sends and returns attachments for all the supported - * mime types. - * - */ - public void EchoAllAttachmentTypesTest() throws Fault { - TestUtil.logMsg("EchoAllAttachmentTypesTest"); - boolean pass = true; - - try { - // Make sure soap logging is off for this test case - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - getTestURLs(); - getPortJavaEE(); - } - TestUtil.logMsg( - "Echo all attachments (text/plain), (text/html), (text/xml), (image/jpeg)"); - Holder attach1 = new Holder(); - attach1.value = dh1; - Holder attach2 = new Holder(); - attach2.value = dh2; - Holder attach3 = new Holder(); - attach3.value = new StreamSource(dh3.getInputStream()); - Holder attach4 = new Holder(); - Holder attach5 = new Holder(); - attach4.value = javax.imageio.ImageIO.read(url4); - attach5.value = javax.imageio.ImageIO.read(url5); - VoidRequest request = new VoidRequest(); - OutputResponseAll response = port.echoAllAttachmentTypes(request, attach1, - attach2, attach3, attach4, attach5); - if (!ValidateRequestResponseAttachmentsEchoAllTestCase(request, response, - attach1, attach2, attach3, attach4, attach5)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoAllAttachmentTypesTest failed", e); - } - - if (!pass) - throw new Fault("EchoAllAttachmentTypesTest failed"); - } - - /* - * @testName: EchoAttachmentsAndThrowAFaultTest - * - * @assertion_ids: WSI:SPEC:R2913; WSI:SPEC:R2920; WSI:SPEC:R2930; - * WSI:SPEC:R2946; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Echo attachments and throw back a soap fault. Multiple - * attachments should be sent in the soap request and the endpoint should - * throw back a soap fault. - * - */ - public void EchoAttachmentsAndThrowAFaultTest() throws Fault { - TestUtil.logMsg("EchoAttachmentsAndThrowAFaultTest"); - boolean pass = true; - - try { - InputRequestThrowAFault request = new InputRequestThrowAFault(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - Holder attach1 = new Holder(); - Holder attach2 = new Holder(); - attach1.value = dh1; - attach2.value = dh2; - TestUtil.logMsg("Echo attachments and throw a fault"); - OutputResponse response = port.echoAttachmentsAndThrowAFault(request, - attach1, attach2); - pass = false; - } catch (MyFault e) { - TestUtil.logMsg("Caught expected MyFault exception: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoAttachmentsAndThrowAFaultTest failed", e); - } - - if (!pass) - throw new Fault("EchoAttachmentsAndThrowAFaultTest failed"); - } - - /* - * @testName: EchoAttachmentsWithHeaderTest - * - * @assertion_ids: WSI:SPEC:R2905; WSI:SPEC:2906; WSI:SPEC:R2946; - * JAXWS:SPEC:1011; WSI:SPEC:R2906; WSI:SPEC:R9801; - * - * @test_Strategy: Send a header with attachments using the soapbind:header - * element which must be a child of the root part mime:part element. - * - */ - public void EchoAttachmentsWithHeaderTest() throws Fault { - TestUtil.logMsg("EchoAttachmentsWithHeaderTest"); - boolean pass = true; - - try { - InputRequestWithHeader request = new InputRequestWithHeader(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - Holder attach1 = new Holder(); - Holder attach2 = new Holder(); - attach1.value = dh1; - attach2.value = dh2; - MyHeader header = new MyHeader(); - header.setMessage("do not throw my fault"); - TestUtil.logMsg("Echo attachments with a header"); - OutputResponse response = port.echoAttachmentsWithHeader(request, header, - attach1, attach2); - if (!ValidateRequestResponseAttachmentsEchoWithHeaderTestCase(request, - response, attach1, attach2)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoAttachmentsWithHeaderTest failed", e); - } - - if (!pass) - throw new Fault("EchoAttachmentsWithHeaderTest failed"); - } - - /* - * @testName: EchoAttachmentsWithHeaderAndThrowAFaultTest - * - * @assertion_ids: WSI:SPEC:R2905; WSI:SPEC:2906; WSI:SPEC:2913; - * WSI:SPEC:R2946; JAXWS:SPEC:10011; - * - * @test_Strategy: Send a header with attachments and throw a fault back using - * the soapbind:fault element. - */ - public void EchoAttachmentsWithHeaderAndThrowAFaultTest() throws Fault { - TestUtil.logMsg("EchoAttachmentsWithHeaderAndThrowAFaultTest"); - boolean pass = true; - - try { - InputRequestWithHeader request = new InputRequestWithHeader(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - Holder attach1 = new Holder(); - Holder attach2 = new Holder(); - attach1.value = dh1; - attach2.value = dh2; - MyHeader header = new MyHeader(); - header.setMessage("do throw a fault"); - TestUtil.logMsg("Echo attachments with a header and throw a fault"); - OutputResponse response = port.echoAttachmentsWithHeader(request, header, - attach1, attach2); - pass = false; - } catch (MyFault e) { - TestUtil.logMsg("Caught expected MyFault exception: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoAttachmentsWithHeaderAndThrowAFaultTest failed", e); - } - - if (!pass) - throw new Fault("EchoAttachmentsWithHeaderAndThrowAFaultTest failed"); - } - - /* - * @testName: VerifyPutOfSOAPEnvelopesInAttachmentsTest - * - * @assertion_ids: WSI:SPEC:R2919; JAXWS:SPEC:10011; WSI:SPEC:R2947 - * WSI:SPEC:R9801; - * - * @test_Strategy: Put multiple attachments. Multiple attachments should be - * sent in the soap request and a status results is returned in the soap - * response. The attachments contain SOAP Envelopes. - * - */ - public void VerifyPutOfSOAPEnvelopesInAttachmentsTest() throws Fault { - TestUtil.logMsg("VerifyPutOfSOAPEnvelopesInAttachmentsTest"); - boolean pass = true; - - try { - InputRequestPut request = new InputRequestPut(); - request.setMimeType1("text/xml"); - request.setMimeType2("text/xml"); - request.setHeader("notused"); - StreamSource xmlSrc1 = new StreamSource(new StringReader(R0007_REQUEST)); - StreamSource xmlSrc2 = new StreamSource(new StringReader(R1011_REQUEST)); - DataHandler attach1 = new DataHandler(xmlSrc1, "text/xml"); - DataHandler attach2 = new DataHandler(xmlSrc2, "text/xml"); - TestUtil.logMsg("Put 2 attachments that contain SOAP envelopes"); - OutputResponseString response = port.putMultipleAttachments(request, - attach1, attach2); - if (!response.getMyString().equals("ok")) { - TestUtil.logErr( - "Return status is " + response.getMyString() + ", expected ok"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("VerifyPutOfSOAPEnvelopesInAttachmentsTest failed", e); - } - - if (!pass) - throw new Fault("VerifyPutOfSOAPEnvelopesInAttachmentsTest failed"); - } - - /* - * @testName: VerifyUTF8EncodingOfRootPartWithoutAttachments - * - * @assertion_ids: WSI:SPEC:R2915; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Test UTF8 encoding of the root part of a multipart/related - * message without attachments. - * - */ - public void VerifyUTF8EncodingOfRootPartWithoutAttachments() throws Fault { - TestUtil.logMsg("VerifyUTF8EncodingOfRootPartWithoutAttachments"); - boolean pass = true; - SOAPMessage request; - String requestAsString; - SOAPMessage response; - StreamSource ssrc; - - try { - TestUtil.logMsg("Construct SOAP RPC request without attachments"); - ssrc = new StreamSource(new ByteArrayInputStream( - R2915_UTF8_REQUEST_NO_ATTACHMENTS_DOCLIT.getBytes())); - request = MessageFactory.newInstance().createMessage(); - request.getSOAPPart().setContent(ssrc); - } catch (Exception e) { - throw new Fault("Unable to construct SOAP message request (R2915)", e); - } - try { - TestUtil.logMsg( - "Send SOAP RPC request without attachments using UTF8 encoding"); - Charset cs = Charset.forName("UTF-8"); - response = client1.makeSaajRequest(request, cs); - } catch (Exception e) { - throw new Fault("Unable to invoke RPC operation (R2915)", e); - } - try { - SOAPBody body = response.getSOAPPart().getEnvelope().getBody(); - if (body.hasFault()) { - throw new Fault("Unexpected SOAP fault returned in response (R2915)"); - } - } catch (SOAPException e) { - throw new Fault("Invalid SOAP message returned (R2915)", e); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("VerifyUTF8EncodingOfRootPartWithoutAttachments failed", - e); - } - - if (!pass) - throw new Fault("VerifyUTF8EncodingOfRootPartWithoutAttachments failed"); - } - - /* - * @testName: VerifyUTF16EncodingOfRootPartWithoutAttachments - * - * @assertion_ids: WSI:SPEC:R2915; JAXWS:SPEC:10011; - * - * @test_Strategy: Test UTF16 encoding of the root part of a multipart/related - * message without attachments. - * - */ - public void VerifyUTF16EncodingOfRootPartWithoutAttachments() throws Fault { - TestUtil.logMsg("VerifyUTF16EncodingOfRootPartWithoutAttachments"); - boolean pass = true; - SOAPMessage response; - - try { - TestUtil.logMsg( - "Send SOAP RPC request without attachments using UTF16 encoding"); - Charset cs = Charset.forName("UTF-16"); - response = client1 - .makeSaajRequest(R2915_UTF16_REQUEST_NO_ATTACHMENTS_DOCLIT, cs); - } catch (Exception e) { - throw new Fault("Unable to invoke RPC operation (R2915)", e); - } - try { - SOAPBody body = response.getSOAPPart().getEnvelope().getBody(); - if (body.hasFault()) { - throw new Fault("Unexpected SOAP fault returned in response (R2915)"); - } - } catch (SOAPException e) { - throw new Fault("Invalid SOAP message returned (R2915)", e); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("VerifyUTF16EncodingOfRootPartWithoutAttachments failed", - e); - } - - if (!pass) - throw new Fault("VerifyUTF16EncodingOfRootPartWithoutAttachments failed"); - } - - /* - * @testName: VerifyRequestContentTypeHttpHeaderWithAttachments - * - * @assertion_ids: WSI:SPEC:R2925; WSI:SPEC:R2932; WSI:SPEC:R2945; - * JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Verify that the Content-Type HTTP header is correct in the - * SOAP request. - * - */ - public void VerifyRequestContentTypeHttpHeaderWithAttachments() throws Fault { - TestUtil.logMsg("VerifyRequestContentTypeHttpHeaderWithAttachments"); - boolean pass = true; - String expected = "ok"; - try { - InputRequestPut request = new InputRequestPut(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - request.setHeader("notused"); - DataHandler attach1 = dh1; - DataHandler attach2 = dh2; - TestUtil.logMsg("Send SOAP RPC request with 2 attachments"); - OutputResponseString response = client2.putMultipleAttachments(request, - attach1, attach2); - String actual = response.getMyString(); - if (!actual.equals(expected)) { - TestUtil.logErr("Did not get expected result"); - TestUtil.logErr("Expected=" + expected); - TestUtil.logErr("Actual=" + actual); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "VerifyRequestContentTypeHttpHeaderWithAttachments failed", e); - } - - if (!pass) - throw new Fault( - "VerifyRequestContentTypeHttpHeaderWithAttachments failed"); - } - - /* - * @testName: VerifyRequestContentTypeHttpHeaderWithoutAttachments - * - * @assertion_ids: WSI:SPEC:R2917; WSI:SPEC:R2932; WSI:SPEC:R2945; - * JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Verify that the Content-Type HTTP header is correct in the - * SOAP request. - * - */ - public void VerifyRequestContentTypeHttpHeaderWithoutAttachments() - throws Fault { - TestUtil.logMsg("VerifyRequestContentTypeHttpHeaderWithoutAttachments"); - boolean pass = true; - - String expected = "Hello"; - try { - InputRequestString request = new InputRequestString(); - request.setMyString(expected); - TestUtil.logMsg("Send SOAP RPC request without attachments"); - OutputResponseString response = client2.echoNoAttachments(request); - String actual = response.getMyString(); - if (!actual.equals(expected)) { - TestUtil.logErr("Did not get expected result"); - TestUtil.logErr("Expected=" + expected); - TestUtil.logErr("Actual=" + actual); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "VerifyRequestContentTypeHttpHeaderWithoutAttachments failed", e); - } - - if (!pass) - throw new Fault( - "VerifyRequestContentTypeHttpHeaderWithoutAttachments failed"); - } - - /* - * @testName: VerifyResponseContentTypeHttpHeaderWithAttachments - * - * @assertion_ids: WSI:SPEC:R2925; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Verify that the Content-Type HTTP header is correct in the - * SOAP response. - * - */ - public void VerifyResponseContentTypeHttpHeaderWithAttachments() - throws Fault { - TestUtil.logMsg("VerifyResponseContentTypeHttpHeaderWithAttachments"); - boolean pass = true; - SOAPMessage request = null; - SOAPMessage response = null; - - try { - TestUtil.logMsg("Construct SOAP RPC request to get 2 attachments"); - String requestString = doSubstitution(R2925_REQUEST_DOCLIT); - StreamSource ssrc = new StreamSource( - new ByteArrayInputStream(requestString.getBytes())); - request = MessageFactory.newInstance().createMessage(); - request.getSOAPPart().setContent(ssrc); - InputStream is = client1.makeHTTPRequest(requestString); - String contentTypeHeader = client1.getResponseHeader("Content-Type"); - int statusCode = client1.getStatusCode(); - TestUtil.logMsg("HTTP header Content-Type = " + contentTypeHeader); - String mediaType = null; - if (contentTypeHeader.indexOf("multipart/related") == -1) - mediaType = "text/xml"; - else - mediaType = "multipart/related"; - if (contentTypeHeader.indexOf("multipart/related") == -1) { - TestUtil.logErr("HTTP header Content-Type is incorrect "); - pass = false; - } else - TestUtil.logMsg("HTTP header Content-Type is correct: " + mediaType); - if (statusCode < 200 || statusCode > 299) { - TestUtil.logErr("Unexpected HTTP status code of: " + statusCode); - pass = false; - } - } catch (Exception e) { - throw new Fault("Unable to construct SOAP message request (R2925)", e); - } - - if (!pass) - throw new Fault( - "VerifyResponseContentTypeHttpHeaderWithAttachments failed"); - } - - /* - * @testName: VerifyResponseContentTypeHttpHeaderWithoutAttachments - * - * @assertion_ids: WSI:SPEC:R2917; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Verify that the Content-Type HTTP header is correct in the - * SOAP response. - * - */ - public void VerifyResponseContentTypeHttpHeaderWithoutAttachments() - throws Fault { - TestUtil.logMsg("VerifyResponseContentTypeHttpHeaderWithoutAttachments"); - boolean pass = true; - SOAPMessage request = null; - SOAPMessage response = null; - - try { - TestUtil.logMsg("Construct SOAP RPC request to get no attachments"); - StreamSource ssrc = new StreamSource( - new ByteArrayInputStream(R2917_REQUEST_DOCLIT.getBytes())); - request = MessageFactory.newInstance().createMessage(); - request.getSOAPPart().setContent(ssrc); - InputStream is = client1.makeHTTPRequest(R2917_REQUEST_DOCLIT); - String contentTypeHeader = client1.getResponseHeader("Content-Type"); - int statusCode = client1.getStatusCode(); - TestUtil.logMsg("HTTP header Content-Type = " + contentTypeHeader); - String mediaType = null; - if (contentTypeHeader.indexOf("multipart/related") == -1) - mediaType = "text/xml"; - else - mediaType = "multipart/related"; - if (contentTypeHeader.indexOf("multipart/related") == -1 - && contentTypeHeader.indexOf("text/xml") == -1) { - TestUtil.logErr("HTTP header Content-Type is incorrect "); - pass = false; - } else - TestUtil.logMsg("HTTP header Content-Type is correct: " + mediaType); - if (statusCode < 200 || statusCode > 299) { - TestUtil.logErr("Unexpected HTTP status code of: " + statusCode); - pass = false; - } - } catch (Exception e) { - throw new Fault("Unable to construct SOAP message request (R2917)", e); - } - - if (!pass) - throw new Fault( - "VerifyResponseContentTypeHttpHeaderWithoutAttachments failed"); - } - - /* - * @testName: VerifyRequestContentTransferEncodingMimeHeadersWithAttachments - * - * @assertion_ids: WSI:SPEC:R2934; WSI:SPEC:R2935; JAXWS:SPEC:10011; - * WSI:SPEC:R9801; - * - * @test_Strategy: Verify that the Content-Transfer-Encoding mime header(s) if - * set is correct in the SOAP request. - * - */ - public void VerifyRequestContentTransferEncodingMimeHeadersWithAttachments() - throws Fault { - TestUtil.logMsg( - "VerifyRequestContentTransferEncodingMimeHeadersWithAttachments"); - boolean pass = true; - - try { - InputRequestPut request = new InputRequestPut(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - request.setHeader("Check-Content-Transfer-Encoding"); - DataHandler attach1 = dh1; - DataHandler attach2 = dh2; - TestUtil.logMsg("Send SOAP RPC request with 2 attachments"); - OutputResponseString response = client2.putMultipleAttachments(request, - attach1, attach2); - String result = response.getMyString(); - if ((result.indexOf("7bit") < 0) && (result.indexOf("8bit") < 0) - && (result.indexOf("binary") < 0) - && (result.indexOf("quoted-printable") < 0) - && (result.indexOf("base64") < 0) - && (result.indexOf("FAILED") >= 0)) { - - TestUtil.logErr( - "HTTP header Content-Transfer-Encoding is incorrect "); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "VerifyRequestContentTransferEncodingMimeHeadersWithAttachments failed", - e); - } - - if (!pass) - throw new Fault( - "VerifyRequestContentTransferEncodingMimeHeadersWithAttachments failed"); - } - - /******************************************************************************* - * Validate request, response and attachments (getMultipleAttachments) - ******************************************************************************/ - private boolean ValidateRequestResponseAttachmentsGetTestCase( - InputRequestGet request, OutputResponse response, - Holder attach1, - Holder attach2) { - boolean result = true; - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil - .logMsg("Validating the request, the response, and the attachments"); - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil.logMsg("Check if the mime types are correct"); - if (!response.getMimeType1().equals(request.getMimeType1())) { - TestUtil.logErr("MimeType1 is not equal in request and response"); - TestUtil.logErr("Request MimeType1 = " + request.getMimeType1()); - TestUtil.logErr("Response MimeType1 = " + response.getMimeType1()); - result = false; - } - if (!response.getMimeType2().equals(request.getMimeType2())) { - TestUtil.logErr("MimeType2 is not equal in request and response"); - TestUtil.logErr("Request MimeType2 = " + request.getMimeType2()); - TestUtil.logErr("Response MimeType2 = " + response.getMimeType2()); - result = false; - } else { - TestUtil.logMsg("The mime types are correct"); - } - TestUtil.logMsg("Check if the response result is correct"); - if (!response.getResult().equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - TestUtil.logErr("Return Reason is: " + response.getReason()); - result = false; - } else { - TestUtil.logMsg("The response result is correct"); - } - try { - TestUtil.logMsg("Check if the attachment contents are correct"); - DataHandler dh1 = new DataHandler(new URL(request.getUrl1())); - DataHandler dh2 = new DataHandler(new URL(request.getUrl2())); - byte data1[] = new byte[4096]; - byte data2[] = new byte[4096]; - InputStream is = dh1.getInputStream(); - int count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach1.value.getInputStream(); - int count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment1")) - result = false; - is = dh2.getInputStream(); - count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach2.value.getInputStream(); - count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment2")) - result = false; - TestUtil.logMsg("The attachment contents are equal"); - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - return result; - } - - /******************************************************************************* - * Validate request, response and attachments (echoMultipleAttachments) - ******************************************************************************/ - private boolean ValidateRequestResponseAttachmentsEchoTestCase( - InputRequest request, OutputResponse response, - Holder attach1, - Holder attach2) { - boolean result = true; - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil - .logMsg("Validating the request, the response, and the attachments"); - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil.logMsg("Check if the mime types are correct"); - if (!response.getMimeType1().equals(request.getMimeType1())) { - TestUtil.logErr("MimeType1 is not equal in request and response"); - TestUtil.logErr("Request MimeType1 = " + request.getMimeType1()); - TestUtil.logErr("Response MimeType1 = " + response.getMimeType1()); - result = false; - } - if (!response.getMimeType2().equals(request.getMimeType2())) { - TestUtil.logErr("MimeType2 is not equal in request and response"); - TestUtil.logErr("Request MimeType2 = " + request.getMimeType2()); - TestUtil.logErr("Response MimeType2 = " + response.getMimeType2()); - result = false; - } else { - TestUtil.logMsg("The mime types are correct"); - } - TestUtil.logMsg("Check if the response result is correct"); - if (!response.getResult().equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - TestUtil.logErr("Return Reason is: " + response.getReason()); - result = false; - } else { - TestUtil.logMsg("The response result is correct"); - } - try { - TestUtil.logMsg("Check if the attachment contents are correct"); - DataHandler dh1 = new DataHandler(url1); - byte data1[] = new byte[4096]; - byte data2[] = new byte[4096]; - InputStream is = dh1.getInputStream(); - int count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach1.value.getInputStream(); - int count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment1")) - result = false; - - dh1 = new DataHandler(url2); - is = dh1.getInputStream(); - count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach2.value.getInputStream(); - count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment2")) - result = false; - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - return result; - } - - /******************************************************************************* - * Validate request, response and attachments (echoAttachmentsWithHeader) - ******************************************************************************/ - private boolean ValidateRequestResponseAttachmentsEchoWithHeaderTestCase( - InputRequestWithHeader request, OutputResponse response, - Holder attach1, - Holder attach2) { - boolean result = true; - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil - .logMsg("Validating the request, the response, and the attachments"); - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil.logMsg("Check if the mime types are correct"); - if (!response.getMimeType1().equals(request.getMimeType1())) { - TestUtil.logErr("MimeType1 is not equal in request and response"); - TestUtil.logErr("Request MimeType1 = " + request.getMimeType1()); - TestUtil.logErr("Response MimeType1 = " + response.getMimeType1()); - result = false; - } - if (!response.getMimeType2().equals(request.getMimeType2())) { - TestUtil.logErr("MimeType2 is not equal in request and response"); - TestUtil.logErr("Request MimeType2 = " + request.getMimeType2()); - TestUtil.logErr("Response MimeType2 = " + response.getMimeType2()); - result = false; - } else { - TestUtil.logMsg("The mime types are correct"); - } - TestUtil.logMsg("Check if the response result is correct"); - if (!response.getResult().equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - TestUtil.logErr("Return Reason is: " + response.getReason()); - result = false; - } else { - TestUtil.logMsg("The response result is correct"); - } - try { - TestUtil.logMsg("Check if the attachment contents are correct"); - DataHandler dh1 = new DataHandler(url1); - DataHandler dh2 = new DataHandler(url2); - byte data1[] = new byte[4096]; - byte data2[] = new byte[4096]; - InputStream is = dh1.getInputStream(); - int count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach1.value.getInputStream(); - int count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment1")) - result = false; - is = dh2.getInputStream(); - count1 = AttachmentHelper.readTheData(is, data1, 4096); - data2 = new byte[4096]; - is = attach2.value.getInputStream(); - count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment2")) - result = false; - TestUtil.logMsg("The attachment contents are equal"); - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - return result; - } - - /******************************************************************************* - * Validate request, response and attachments (echoAllAttachmentTypes) - ******************************************************************************/ - private boolean ValidateRequestResponseAttachmentsEchoAllTestCase( - VoidRequest request, OutputResponseAll response, - Holder attach1, - Holder attach2, - Holder attach3, - Holder attach4, Holder attach5) { - boolean result = true; - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil - .logMsg("Validating the request, the response, and the attachments"); - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil.logMsg("Check if the response result is correct"); - if (!response.getResult().equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - TestUtil.logErr("Return Reason is: " + response.getReason()); - result = false; - } else { - TestUtil.logMsg("The response result is correct"); - } - try { - TestUtil.logMsg("Check if the attachment contents are correct"); - DataHandler dh1 = new DataHandler(url1); - byte data1[] = new byte[4096]; - byte data2[] = new byte[4096]; - InputStream is = dh1.getInputStream(); - int count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach1.value.getInputStream(); - int count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment1")) - result = false; - - dh1 = new DataHandler(url2); - is = dh1.getInputStream(); - count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach2.value.getInputStream(); - count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment2")) - result = false; - - dh1 = new DataHandler(url3); - StreamSource sr1 = new StreamSource(dh1.getInputStream()); - StreamSource sr2 = (StreamSource) attach3.value; - String tmpStr = AttachmentHelper.validateAttachmentData(sr1, sr2, - "Attachment3"); - if (tmpStr != null) { - TestUtil.logErr(tmpStr); - result = false; - } else - TestUtil.logMsg("Attachment3 xml content is equal in attachment"); - - Image image1 = javax.imageio.ImageIO.read(url4); - Image image2 = attach4.value; - if (!AttachmentHelper.compareImages(image1, image2, - new Rectangle(0, 0, 100, 120), "Attachment4")) - result = false; - - image1 = javax.imageio.ImageIO.read(url5); - image2 = attach5.value; - if (!AttachmentHelper.compareImages(image1, image2, - new Rectangle(0, 0, 100, 120), "Attachment5")) - result = false; - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - return result; - } - - private String doSubstitution(String s) { - String tmp = s.replaceAll("localhost", hostname); - tmp = tmp.replaceAll("8080", new Integer(portnum).toString()); - String modified = tmp.replaceAll("/WSIDLSwaTest", ctxroot); - return modified; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/ServerSOAPHandler.java deleted file mode 100644 index 701efe5d44..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/ServerSOAPHandler.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; - -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.AttachmentPart; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - protected void processInboundMessage(SOAPMessageContext context) { - String result = "FAILED"; - JAXWS_Util.dumpHTTPHeaders(context, false); - try { - if (!Handler_Util.checkForMsg(context, "putMultipleAttachments") - && !Handler_Util.checkForMsg(context, "echoNoAttachments")) { - System.out.println( - "SoapMessage does not contain expected putMultipleAttachments"); - System.out.println("or echoNoAttachments value (exiting handler)"); - return; - } - if (Handler_Util.checkForMsg(context, - "Check-Content-Transfer-Encoding")) { - result = verifyContentTransferEncodingMimeHeader(context); - System.out.println("result=" + result); - throw new RuntimeException(result); - } else { - result = verifyContentTypeHttpHeader(context); - System.out.println("result=" + result); - throw new RuntimeException(result); - } - } catch (Exception e) { - e.printStackTrace(); - throw new RuntimeException( - "Exception occurred in ServerSOAPHandler: " + e); - } - } - - protected String verifyContentTypeHttpHeader(SOAPMessageContext context) - throws Exception { - System.out.println("in ServerSOAPHandler:verifyContentTypeHttpHeader"); - String result = "FAILED"; - - Map> map1 = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - Map> map2 = JAXWS_Util.convertKeysToLowerCase(map1); - List values = map2.get("content-type"); - System.out.println("HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - int index = sValues.toLowerCase().indexOf("text/xml"); - int index2 = sValues.toLowerCase().indexOf("multipart/related"); - if ((index >= 0) || (index2 >= 0)) { - result = "PASSED: HTTP Content-Type header contains expected: text/xml, multipart/related"; - } else { - result = "FAILED: HTTP Content-Type header does not contain expected text/xml, multipart/related"; - } - } else { - result = "FAILED: the HTTP Content-Type header was not found"; - } - return result; - } - - /** - * Verifies the contents of the Content-Transfer-Encoding mime header - */ - - protected String verifyContentTransferEncodingMimeHeader( - SOAPMessageContext context) throws Exception { - String result = null; - SOAPMessage sm = context.getMessage(); - try { - JAXWS_Util.dumpSOAPMessage(sm, false); - Iterator iterator = sm.getAttachments(); - int k = 0; - while (iterator.hasNext()) { - Object o = iterator.next(); - AttachmentPart ap = (AttachmentPart) o; - String[] mimeHeaderValues = ap - .getMimeHeader("Content-transfer-encoding"); - if (mimeHeaderValues != null && mimeHeaderValues.length > 0) { - for (int i = 0; i < mimeHeaderValues.length; i++) { - System.out.println( - "Content-transfer-encoding[" + i + "]=" + mimeHeaderValues[i]); - if ((mimeHeaderValues[i].indexOf("7bit") >= 0) - || (mimeHeaderValues[i].indexOf("8bit") >= 0) - || (mimeHeaderValues[i].indexOf("binary") >= 0) - || (mimeHeaderValues[i].indexOf("quoted-printable") >= 0) - || (mimeHeaderValues[i].indexOf("base64") >= 0)) { - if (result == null) - result = "PASSED: Attach[" + k + "]="; - else - result = result + "Attach[" + k + "]="; - result = result + mimeHeaderValues[i] + " "; - } else { - return "FAILED: INVALID Content-Transfer-Encoding mime header value of [" - + mimeHeaderValues[i] + "]"; - } - ++k; - } - } - } - if (result == null) - result = "PASSED: No Content-Transfer-Encoding mime headers were found"; - } catch (Exception e) { - result = "FAILED: exception occurred:" + e; - } - return result; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/SwaTestClient1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/SwaTestClient1.java deleted file mode 100644 index ee17d91c44..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/SwaTestClient1.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -import com.sun.ts.tests.jaxws.common.*; - -public class SwaTestClient1 extends SOAPClient { - - public SwaTestClient1(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public SwaTestClient1(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - - super(webServerHost, webServerPort, mode); - stubContext.setNamespace("http://SwaTestService.org/wsdl"); - stubContext.setService("WSIDLSwaTestService"); - stubContext.setPort("SwaTestOnePort"); - stubContext.setEndpointInterface(SwaTest1.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsidlswatest.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsidlswatest.wsdlloc.1"; - } - - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.OutputResponse echoMultipleAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.InputRequest request, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2) - throws Exception { - return ((SwaTest1) stubContext.getStub()).echoMultipleAttachments(request, - attach1, attach2); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/SwaTestClient2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/SwaTestClient2.java deleted file mode 100644 index e38cff671a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/SwaTestClient2.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -import com.sun.ts.tests.jaxws.common.*; - -public class SwaTestClient2 extends SOAPClient { - - public SwaTestClient2(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public SwaTestClient2(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - - super(webServerHost, webServerPort, mode); - stubContext.setNamespace("http://SwaTestService.org/wsdl"); - stubContext.setService("WSIDLSwaTestService"); - stubContext.setPort("SwaTestTwoPort"); - stubContext.setEndpointInterface(SwaTest2.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsidlswatest.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsidlswatest.wsdlloc.1"; - } - - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.OutputResponseString putMultipleAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.InputRequestPut request, - jakarta.activation.DataHandler attach1, - jakarta.activation.DataHandler attach2) throws Exception { - return ((SwaTest2) stubContext.getStub()).putMultipleAttachments(request, - attach1, attach2); - } - - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.OutputResponseString echoNoAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.InputRequestString request) - throws Exception { - return ((SwaTest2) stubContext.getStub()).echoNoAttachments(request); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/SwaTestImpl1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/SwaTestImpl1.java deleted file mode 100644 index b6b07a6842..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/SwaTestImpl1.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest; - -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.soap.*; -import jakarta.activation.*; -import javax.xml.transform.stream.*; -import javax.xml.transform.*; -import java.net.*; -import java.awt.*; - -import jakarta.jws.WebService; - -@WebService(portName = "SwaTestOnePort", serviceName = "WSIDLSwaTestService", targetNamespace = "http://SwaTestService.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JDLSwaTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.SwaTest1") - -public class SwaTestImpl1 implements SwaTest1 { - public void getMultipleAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.InputRequestGet request, - jakarta.xml.ws.Holder response, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2) { - try { - System.out.println("Enter getMultipleAttachments() ......"); - OutputResponse theResponse = new OutputResponse(); - theResponse.setMimeType1(request.getMimeType1()); - theResponse.setMimeType2(request.getMimeType2()); - theResponse.setResult("ok"); - theResponse.setReason("ok"); - DataHandler dh1 = new DataHandler(new URL(request.getUrl1())); - DataHandler dh2 = new DataHandler(new URL(request.getUrl2())); - attach1.value = dh1; - attach2.value = dh2; - response.value = theResponse; - System.out.println("Leave getMultipleAttachments() ......"); - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.OutputResponseString putMultipleAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.InputRequestPut request, - jakarta.activation.DataHandler attach1, - jakarta.activation.DataHandler attach2) { - try { - OutputResponseString theResponse = new OutputResponseString(); - theResponse.setMyString("ok"); - System.out.println("Enter putMultipleAttachments() ......"); - if (attach1 == null) { - System.err.println("attach1 is null (unexpected)"); - theResponse.setMyString("not ok"); - } - if (attach2 == null) { - System.err.println("attach2 is null (unexpected)"); - theResponse.setMyString("not ok"); - } - System.out.println("Leave putMultipleAttachments() ......"); - return theResponse; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.OutputResponse echoMultipleAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.InputRequest request, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2) { - try { - System.out.println("Enter echoMultipleAttachments() ......"); - OutputResponse theResponse = new OutputResponse(); - theResponse.setMimeType1(request.getMimeType1()); - theResponse.setMimeType2(request.getMimeType2()); - theResponse.setResult("ok"); - theResponse.setReason("ok"); - if (attach1 == null || attach1.value == null) { - System.err.println("attach1.value is null (unexpected)"); - theResponse.setReason("attach1.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - if (attach2 == null || attach2.value == null) { - System.err.println("attach2.value is null (unexpected)"); - if (theResponse.getReason().equals("ok")) - theResponse.setReason("attach2.value is null (unexpected)"); - else - theResponse.setReason( - theResponse.getReason() + "\nattach2.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - System.out.println("Leave echoMultipleAttachments() ......"); - return theResponse; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.OutputResponseString echoNoAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.InputRequestString request) { - try { - System.out.println("Enter echoNoAttachments() ......"); - OutputResponseString theResponse = new OutputResponseString(); - theResponse.setMyString(request.getMyString()); - System.out.println("Leave echoNoAttachments() ......"); - return theResponse; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.OutputResponseAll echoAllAttachmentTypes( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.VoidRequest request, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2, - jakarta.xml.ws.Holder attach3, - jakarta.xml.ws.Holder attach4, - jakarta.xml.ws.Holder attach5) { - try { - System.out.println("Enter echoAllAttachmentTypes() ......"); - OutputResponseAll theResponse = new OutputResponseAll(); - theResponse.setResult("ok"); - theResponse.setReason("ok"); - if (attach1 == null || attach1.value == null) { - System.err.println("attach1.value is null (unexpected)"); - theResponse.setReason("attach1.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - if (attach2 == null || attach2.value == null) { - System.err.println("attach2.value is null (unexpected)"); - if (theResponse.getReason().equals("ok")) - theResponse.setReason("attach2.value is null (unexpected)"); - else - theResponse.setReason( - theResponse.getReason() + "\nattach2.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - if (attach3 == null || attach3.value == null) { - System.err.println("attach3.value is null (unexpected)"); - if (theResponse.getReason().equals("ok")) - theResponse.setReason("attach3.value is null (unexpected)"); - else - theResponse.setReason( - theResponse.getReason() + "\nattach3.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - if (attach4 == null || attach4.value == null) { - System.err.println("attach4.value is null (unexpected)"); - if (theResponse.getReason().equals("ok")) - theResponse.setReason("attach4.value is null (unexpected)"); - else - theResponse.setReason( - theResponse.getReason() + "\nattach4.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - if (attach5 == null || attach5.value == null) { - System.err.println("attach5.value is null (unexpected)"); - if (theResponse.getReason().equals("ok")) - theResponse.setReason("attach5.value is null (unexpected)"); - else - theResponse.setReason( - theResponse.getReason() + "\nattach5.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - System.out.println("Leave echoAllAttachmentTypes() ......"); - return theResponse; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.OutputResponse echoAttachmentsAndThrowAFault( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.InputRequestThrowAFault request, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2) - throws com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.MyFault { - System.out.println("Enter echoAttachmentsAndThrowAFault() ......"); - System.out.println("Throwing back a fault [MyFault] ......"); - throw new MyFault("This is my fault", new MyFaultType()); - } - - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.OutputResponse echoAttachmentsWithHeader( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.InputRequestWithHeader request, - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.MyHeader header, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2) - throws com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.MyFault { - System.out.println("Enter echoAttachmentsWithHeader() ......"); - if (header.getMessage().equals("do throw a fault")) { - System.out.println("Throwing back a fault [MyFault] ......"); - throw new MyFault("This is my fault", new MyFaultType()); - } - try { - OutputResponse theResponse = new OutputResponse(); - theResponse.setMimeType1(request.getMimeType1()); - theResponse.setMimeType2(request.getMimeType2()); - theResponse.setResult("ok"); - theResponse.setReason("ok"); - System.out.println("Leave echoAttachmentsWithHeader() ......"); - return theResponse; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/SwaTestImpl2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/SwaTestImpl2.java deleted file mode 100644 index 4d93565257..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/SwaTestImpl2.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest; - -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.soap.*; -import jakarta.activation.*; -import javax.xml.transform.stream.*; -import javax.xml.transform.*; -import java.net.*; -import java.awt.*; -import jakarta.jws.WebService; - -@WebService(portName = "SwaTestTwoPort", serviceName = "WSIDLSwaTestService", targetNamespace = "http://SwaTestService.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JDLSwaTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.SwaTest2") - -public class SwaTestImpl2 implements SwaTest2 { - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.OutputResponseString putMultipleAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.InputRequestPut request, - jakarta.activation.DataHandler attach1, - jakarta.activation.DataHandler attach2) { - try { - OutputResponseString theResponse = new OutputResponseString(); - theResponse.setMyString("ok"); - System.out.println("Enter putMultipleAttachments() ......"); - if (attach1 == null) { - System.err.println("attach1 is null (unexpected)"); - theResponse.setMyString("not ok"); - } - if (attach2 == null) { - System.err.println("attach2 is null (unexpected)"); - theResponse.setMyString("not ok"); - } - System.out.println("Leave putMultipleAttachments() ......"); - return theResponse; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.OutputResponseString echoNoAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.InputRequestString request) { - try { - System.out.println("Enter echoNoAttachments() ......"); - OutputResponseString theResponse = new OutputResponseString(); - theResponse.setMyString(request.getMyString()); - System.out.println("Leave echoNoAttachments() ......"); - return theResponse; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/WSW2JDLSwaTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/WSW2JDLSwaTestService.wsdl deleted file mode 100644 index 175db1cb53..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/WSW2JDLSwaTestService.wsdl +++ /dev/null @@ -1,503 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This is my header - - - - - - - - - - - This is my fault - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/build.xml deleted file mode 100644 index eae1e9e646..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/build.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach.html b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach.html deleted file mode 100644 index 74211eca02..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - -This is a title - - -

This is a starting point


-

This is a header

-

This is a paragraph

-
    -
  • This is a bullet

  • -
- - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach.jpeg b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach.jpeg deleted file mode 100644 index a1ed71ba6a..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach.jpeg and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach.txt deleted file mode 100644 index cdc8a13be3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach.txt +++ /dev/null @@ -1 +0,0 @@ -This is a plain text attachment. diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach.xml deleted file mode 100644 index 9c0113605b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - http - - - - - http://www.wombats.com/remote/sender - - - http://127.0.0.1:8081/jaxm-provider/receiver/ebxml - - - - - - - 5 - - - 2000 - - - - - - - ebxml/ - - - 10 - - - - - - - https - - - - - jaxm.dummy.uri - - - https://127.0.0.1:8443/jaxm/dummy/ - - - - - - ebxml-https/ - - - 10 - - - - - - - - - - http - - - - - http://www.wombats.com/soaprp/sender - - - http://127.0.0.1:8081/jaxm-provider/receiver/soaprp - - - - - - - 3 - - - 2000 - - - - - - - soaprp/ - - - 20 - - - - - - - https - - - - - jaxm.dummy.uri - - - https://127.0.0.1:8443/jaxm/dummy - - - - - - - - - 3 - - - 2000 - - - - - - - tempdir/ - - - 11 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach2.jpeg b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach2.jpeg deleted file mode 100644 index a1ed71ba6a..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/contentRoot/attach2.jpeg and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/custom-client.xml deleted file mode 100644 index d14bab44bf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/custom-client.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - true - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/custom-server.xml deleted file mode 100644 index 14cf3f7c40..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/custom-server.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - true - - - - - - - - - - - - ns1:SwaTestTwoPort - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.ServerSOAPHandler - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/jakartaEE.tokens deleted file mode 100644 index 2e06873802..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSWSIDLSwaTestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.WSIDLSwaTestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.SwaTestImpl1 -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.SwaTestImpl1 -SEI=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.SwaTest1 -URLALIAS=/jaxws/SwaTestOne -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.SwaTestImpl2 -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.SwaTestImpl2 -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.document.literal.swatest.SwaTest2 -URLALIAS2=/jaxws/SwaTestTwo -NAMESPACEURI=http://SwaTestService.org/wsdl -PORT=SwaTestOnePort -PORT2=SwaTestTwoPort -WEBSERVICEDESCRIPTION=WSIDLSwaTestService -SERVICEREFNAMEWSSERVLET=service/WSWSIDLSwaTestService -SERVICEREFNAMEWSEJB=service/WSWSIDLSwaTestService -SERVICEREFNAMEWSAPPCLIENT=service/WSWSIDLSwaTestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/standalone-sun-jaxws.xml deleted file mode 100644 index ff15553294..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/standalone.web.xml deleted file mode 100644 index 639c4faff6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/document/literal/swatest/standalone.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - WSWSIDLSwaTestApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - WSIDLSwaTestOne - com.sun.xml.ws.transport.http.servlet.WSServlet - - - WSIDLSwaTestTwo - com.sun.xml.ws.transport.http.servlet.WSServlet - - - WSIDLSwaTestOne - /jaxws/SwaTestOne - - - WSIDLSwaTestTwo - /jaxws/SwaTestTwo - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/build.xml deleted file mode 100644 index 0ec51d148c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/Client.java deleted file mode 100644 index aae85e1181..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/Client.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1005; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.constants.WSIConstants; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.*; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends ServiceEETest - implements WSIConstants, SOAPRequests { - - private W2JRLR1005Client client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (W2JRLR1005Client) ClientFactory.getClient(W2JRLR1005Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testNoEncodingStyleOnResponseEnvelopeElements - * - * @assertion_ids: WSI:SPEC:R1005 - * - * @test_Strategy: Make a request and inspect response elements with a - * namespace of "http://schemas.xmlsoap.org/soap/envelope/" to - * ensure they don't have soap:encodingStyle attribute. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testNoEncodingStyleOnResponseEnvelopeElements() - throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(HELLOWORLD_WITH_HANDLER); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateNoEncodingStyleOnEnvelopeElements(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - client.logMessageInHarness(response); - } - - /** - * @testName: testNoEncodingStyleOnRequestEnvelopeElements - * - * @assertion_ids: WSI:SPEC:R1005 - * - * @test_Strategy: Make a request and inspect its elements on the server with - * a namespace of "http://schemas.xmlsoap.org/soap/envelope/" - * to ensure they don't have soap:encodingStyle attribute. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testNoEncodingStyleOnRequestEnvelopeElements() - throws EETest.Fault { - String response = null; - try { - response = client.helloWorld(); - TestUtil.logMsg("response=" + response); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EETest.Fault("Test didn't complete properly: ", e); - } - if (response.startsWith("failed")) { - throw new EETest.Fault(response); - } - } - - private void validateNoEncodingStyleOnEnvelopeElements(SOAPMessage response) - throws EETest.Fault, SOAPException { - validateNoEncodingStyleOnEnvelopeElements( - response.getSOAPPart().getEnvelope(), response); - } - - private void validateNoEncodingStyleOnEnvelopeElements(Iterator soapElements, - SOAPMessage response) throws EETest.Fault { - Node n; - while (soapElements.hasNext()) { - n = (Node) soapElements.next(); - if (n instanceof SOAPElement) { - validateNoEncodingStyleOnEnvelopeElements((SOAPElement) n, response); - } - } - } - - private void validateNoEncodingStyleOnEnvelopeElements(SOAPElement element, - SOAPMessage response) throws EETest.Fault { - boolean fails = hasEncodingStyleAttr(element); - if (fails) { - client.logMessageInHarness(response); - throw new EETest.Fault( - "Invalid element: elements with namespace http://schemas.xmlsoap.org/soap/envelope/" - + " cannot have soap:encodingStyle attribute (BP-R1005): " - + element.getElementName().getQualifiedName()); - } - validateNoEncodingStyleOnEnvelopeElements(element.getChildElements(), - response); - } - - private boolean hasEncodingStyleAttr(SOAPElement elem) { - Iterator attrs = elem.getAllAttributes(); - Name name; - String uri; - while (attrs.hasNext()) { - name = (Name) attrs.next(); - uri = name.getURI(); - if (uri == null) { - uri = ""; - } - if (name.getLocalName().equals(SOAP_ENC_STYLE) - && uri.equals(SOAP_ENV_NS)) { - return true; - } - } - return false; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/R1005ConformanceChecker.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/R1005ConformanceChecker.java deleted file mode 100644 index a70c4fbfe8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/R1005ConformanceChecker.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1005; - -import com.sun.ts.tests.jaxws.common.RequestConformanceChecker; - -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.*; -import java.util.Iterator; - -public class R1005ConformanceChecker extends RequestConformanceChecker { - - public void test(SOAPMessageContext context) throws SOAPException { - test(context.getMessage().getSOAPPart().getEnvelope()); - } - - private void test(SOAPElement elem) { - boolean fails = false; - String namespace = elem.getElementName().getURI(); - if (namespace != null && namespace.equals(SOAP_ENV_NS)) { - fails = hasEncodingStyleAttr(elem); - } - if (!fails) { - Iterator children = elem.getChildElements(); - while (children.hasNext()) { - Object o = children.next(); - if (o instanceof SOAPElement) { - test((SOAPElement) o); - } - } - } else { - response = "failed. Elements with namespace of http://schemas.xmlsoap.org/soap/envelope/" - + "cannot have soap:encodingStyle attribute."; - } - } - - private boolean hasEncodingStyleAttr(SOAPElement elem) { - Iterator attrs = elem.getAllAttributes(); - Name name; - String uri; - while (attrs.hasNext()) { - name = (Name) attrs.next(); - uri = name.getURI(); - if (uri == null) { - uri = ""; - } - if (name.getLocalName().equals(SOAP_ENC_STYLE) - && uri.equals(SOAP_ENV_NS)) { - return true; - } - } - return false; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/SimpleEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/SimpleEndpointImpl.java deleted file mode 100644 index 93587a1a54..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/SimpleEndpointImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1005; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "SimpleEndpointPort", serviceName = "SimpleTest", targetNamespace = "http://simpletestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR1005TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1005.SimpleEndpoint") - -public class SimpleEndpointImpl implements SimpleEndpoint { - public String helloWorld() { - return "hello world"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/W2JRLR1005Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/W2JRLR1005Client.java deleted file mode 100644 index 972e2c78ed..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/W2JRLR1005Client.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1005; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR1005Client extends SOAPClient { - - public W2JRLR1005Client(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR1005Client(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://simpletestservice.org/wsdl"); - stubContext.setService("SimpleTest"); - stubContext.setPort("SimpleEndpointPort"); - stubContext.setEndpointInterface(SimpleEndpoint.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr1005.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr1005.wsdlloc.1"; - } - - public String helloWorld() throws Exception { - return ((SimpleEndpoint) stubContext.getStub()).helloWorld(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/W2JRLR1005TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/W2JRLR1005TestService.wsdl deleted file mode 100644 index d24300de7c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/W2JRLR1005TestService.wsdl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/build.xml deleted file mode 100644 index 4de2aef511..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/build.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/customfile-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/customfile-client.xml deleted file mode 100644 index 3c11a0eae3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/customfile-client.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/customfile-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/customfile-server.xml deleted file mode 100644 index 8c54e965a8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/customfile-server.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - R1005ConformanceChecker - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1005.R1005ConformanceChecker - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/jakartaEE.tokens deleted file mode 100644 index e75ce253df..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR1005TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1005.SimpleTest -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1005.SimpleEndpointImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1005.SimpleEndpoint -NAMESPACEURI=http://simpletestservice.org/wsdl -PORT=SimpleEndpointPort -URLALIAS=/jaxws/SimpleTest -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1005.SimpleEndpointImpl -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR1005TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR1005TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR1005TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/standalone-sun-jaxws.xml deleted file mode 100644 index 924b2e340b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/standalone.web.xml deleted file mode 100644 index 364cac07d5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1005/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR1005TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -SimpleTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -SimpleTest -/jaxws/SimpleTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/Client.java deleted file mode 100644 index b07282b899..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/Client.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1006; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPElement; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends ServiceEETest implements SOAPRequests { - - private W2JRLR1006Client client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (W2JRLR1006Client) ClientFactory.getClient(W2JRLR1006Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testNoEncodingStyleOnResponseBodyChildren - * - * @assertion_ids: WSI:SPEC:R1006 - * - * @test_Strategy: Make a request and inspect response soap:Body children to - * ensure they don't have soap:encodingStyle attribute. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testNoEncodingStyleOnResponseBodyChildren() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(HELLOWORLD_WITH_HANDLER); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateNoEncodingStyleOnBodyChildren(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - client.logMessageInHarness(response); - } - - /** - * @testName: testNoEncodingStyleOnRequestBodyChildren - * - * @assertion_ids: WSI:SPEC:R1006 - * - * @test_Strategy: Make a request and inspect request soap:Body children to - * ensure they don't have soap:encodingStyle attribute. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testNoEncodingStyleOnRequestBodyChildren() throws EETest.Fault { - String response = ""; - try { - response = client.helloWorld(); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - if (response.startsWith("failed")) { - throw new EETest.Fault(response); - } - } - - private void validateNoEncodingStyleOnBodyChildren(SOAPMessage response) - throws EETest.Fault, SOAPException { - Iterator bodyChildren = response.getSOAPPart().getEnvelope().getBody() - .getChildElements(); - SOAPElement child; - String encodingStyle; - while (bodyChildren.hasNext()) { - child = (SOAPElement) bodyChildren.next(); - encodingStyle = child.getEncodingStyle(); - if (!(encodingStyle == null || encodingStyle.equals(""))) { - client.logMessageInHarness(response); - throw new EETest.Fault("Invalid element: child elements of soap:Body" - + " cannot have soap:encodingStyle attribute (BP-R1006): " - + child.getElementName().getQualifiedName()); - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/R1006ConformanceChecker.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/R1006ConformanceChecker.java deleted file mode 100644 index 56687bd1ed..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/R1006ConformanceChecker.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1006; - -import com.sun.ts.tests.jaxws.common.RequestConformanceChecker; - -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.*; -import java.util.Iterator; - -public class R1006ConformanceChecker extends RequestConformanceChecker { - - public void test(SOAPMessageContext context) throws SOAPException { - test(context.getMessage().getSOAPPart().getEnvelope().getBody()); - } - - private void test(SOAPElement elem) { - boolean fails = false; - Iterator children = elem.getChildElements(); - String namespace; - SOAPElement child; - while (children.hasNext() && !fails) { - child = (SOAPElement) children.next(); - namespace = child.getElementName().getURI(); - if (namespace != null && namespace.equals(SOAP_ENV_NS)) { - fails = hasEncodingStyleAttr(elem); - } - } - if (fails) { - response = "failed. Children of soap:Body cannot have soap:encodingStyle attribute."; - } - } - - private boolean hasEncodingStyleAttr(SOAPElement elem) { - Iterator attrs = elem.getAllAttributes(); - Name name; - String uri; - while (attrs.hasNext()) { - name = (Name) attrs.next(); - uri = name.getURI(); - if (uri == null) { - uri = ""; - } - if (name.getLocalName().equals(SOAP_ENC_STYLE) - && uri.equals(SOAP_ENV_NS)) { - return true; - } - } - return false; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/SimpleEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/SimpleEndpointImpl.java deleted file mode 100644 index b7371d9e02..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/SimpleEndpointImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1006; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "SimpleEndpointPort", serviceName = "SimpleTest", targetNamespace = "http://simpletestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR1006TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1006.SimpleEndpoint") - -public class SimpleEndpointImpl implements SimpleEndpoint { - public String helloWorld() { - return "hello world"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/W2JRLR1006Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/W2JRLR1006Client.java deleted file mode 100644 index bd19e760d5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/W2JRLR1006Client.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1006; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR1006Client extends SOAPClient { - - public W2JRLR1006Client(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR1006Client(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://simpletestservice.org/wsdl"); - stubContext.setService("SimpleTest"); - stubContext.setPort("SimpleEndpointPort"); - stubContext.setEndpointInterface(SimpleEndpoint.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr1006.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr1006.wsdlloc.1"; - } - - public String helloWorld() throws Exception { - return ((SimpleEndpoint) stubContext.getStub()).helloWorld(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/W2JRLR1006TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/W2JRLR1006TestService.wsdl deleted file mode 100644 index d24300de7c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/W2JRLR1006TestService.wsdl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/build.xml deleted file mode 100644 index 232ac8768c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/build.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/customfile-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/customfile-client.xml deleted file mode 100644 index 63526b9bb5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/customfile-client.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/customfile-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/customfile-server.xml deleted file mode 100644 index c153e18cdc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/customfile-server.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - R1006ConformanceChecker - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1006.R1006ConformanceChecker - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/jakartaEE.tokens deleted file mode 100644 index a92fbc2e7b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR1006TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1006.SimpleTest -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1006.SimpleEndpointImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1006.SimpleEndpoint -NAMESPACEURI=http://simpletestservice.org/wsdl -PORT=SimpleEndpointPort -URLALIAS=/jaxws/SimpleTest -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1006.SimpleEndpointImpl -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR1006TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR1006TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR1006TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/standalone-sun-jaxws.xml deleted file mode 100644 index be0895396f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/standalone.web.xml deleted file mode 100644 index a3730b86e6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1006/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR1006TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -SimpleTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -SimpleTest -/jaxws/SimpleTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/Client.java deleted file mode 100644 index f2acf509f5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/Client.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1007; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPElement; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends ServiceEETest implements SOAPRequests { - - private W2JRLR1007Client client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (W2JRLR1007Client) ClientFactory.getClient(W2JRLR1007Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testNoEncodingStyleOnResponseBodyGrandchildren - * - * @assertion_ids: WSI:SPEC:R1007 - * - * @test_Strategy: Make a request and inspect response soap:Body grandchildren - * to ensure they don't have soap:encodingStyle attribute. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testNoEncodingStyleOnResponseBodyGrandchildren() - throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(HELLOWORLD_WITH_HANDLER); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateNoEncodingStyleOnBodyGrandchildren(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - client.logMessageInHarness(response); - } - - /** - * @testName: testNoEncodingStyleOnRequestBodyGrandchildren - * - * @assertion_ids: WSI:SPEC:R1007 - * - * @test_Strategy: Make a request and inspect request soap:Body grandchildren - * to ensure they don't have soap:encodingStyle attribute. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testNoEncodingStyleOnRequestBodyGrandchildren() - throws EETest.Fault { - String response = ""; - try { - response = client.helloWorld(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EETest.Fault("Test didn't complete properly: ", e); - } - if (response.startsWith("failed")) { - throw new EETest.Fault(response); - } - } - - private void validateNoEncodingStyleOnBodyGrandchildren(SOAPMessage response) - throws EETest.Fault, SOAPException { - Iterator bodyChildren = response.getSOAPPart().getEnvelope().getBody() - .getChildElements(); - SOAPElement child; - while (bodyChildren.hasNext()) { - child = (SOAPElement) bodyChildren.next(); - validateNoEncodingStyleOnChildren(child, response); - } - } - - private void validateNoEncodingStyleOnChildren(SOAPElement element, - SOAPMessage response) throws EETest.Fault { - Iterator children = element.getChildElements(); - SOAPElement child; - String encodingStyle; - while (children.hasNext()) { - child = (SOAPElement) children.next(); - encodingStyle = child.getEncodingStyle(); - if (!(encodingStyle == null || encodingStyle.equals(""))) { - client.logMessageInHarness(response); - throw new EETest.Fault( - "Invalid element: grandchild elements of soap:Body" - + " cannot have soap:encodingStyle attribute (BP-R1007): " - + child.getElementName().getQualifiedName()); - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/R1007ConformanceChecker.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/R1007ConformanceChecker.java deleted file mode 100644 index be99cbfd99..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/R1007ConformanceChecker.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1007; - -import com.sun.ts.tests.jaxws.common.RequestConformanceChecker; - -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.*; -import java.util.Iterator; - -public class R1007ConformanceChecker extends RequestConformanceChecker { - - public void test(SOAPMessageContext context) throws SOAPException { - test(context.getMessage().getSOAPPart().getEnvelope().getBody()); - } - - private void test(SOAPElement elem) { - boolean fails = false; - Iterator children = elem.getChildElements(); - SOAPElement child; - while (children.hasNext() && !fails) { - fails = testChildren((SOAPElement) children.next()); - } - if (fails) { - response = "failed. Grandchildren of soap:Body cannot have soap:encodingStyle attribute."; - } - } - - private boolean testChildren(SOAPElement elem) { - boolean fails = false; - Iterator children = elem.getChildElements(); - SOAPElement child; - String namespace; - while (children.hasNext() && !fails) { - child = (SOAPElement) children.next(); - namespace = child.getElementName().getURI(); - if (namespace != null && namespace.equals(SOAP_ENV_NS)) { - fails = hasEncodingStyleAttr(elem); - } - } - return fails; - } - - private boolean hasEncodingStyleAttr(SOAPElement elem) { - Iterator attrs = elem.getAllAttributes(); - Name name; - String uri; - while (attrs.hasNext()) { - name = (Name) attrs.next(); - uri = name.getURI(); - if (uri == null) { - uri = ""; - } - if (name.getLocalName().equals(SOAP_ENC_STYLE) - && uri.equals(SOAP_ENV_NS)) { - return true; - } - } - return false; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/SimpleEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/SimpleEndpointImpl.java deleted file mode 100644 index 073ef8c278..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/SimpleEndpointImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1007; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "SimpleEndpointPort", serviceName = "SimpleTest", targetNamespace = "http://simpletestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR1007TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1007.SimpleEndpoint") - -public class SimpleEndpointImpl implements SimpleEndpoint { - public String helloWorld() { - return "hello world"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/W2JRLR1007Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/W2JRLR1007Client.java deleted file mode 100644 index 58c68220ca..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/W2JRLR1007Client.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1007; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR1007Client extends SOAPClient { - - public W2JRLR1007Client(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR1007Client(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://simpletestservice.org/wsdl"); - stubContext.setService("SimpleTest"); - stubContext.setPort("SimpleEndpointPort"); - stubContext.setEndpointInterface(SimpleEndpoint.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr1007.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr1007.wsdlloc.1"; - } - - public String helloWorld() throws Exception { - return ((SimpleEndpoint) stubContext.getStub()).helloWorld(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/W2JRLR1007TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/W2JRLR1007TestService.wsdl deleted file mode 100644 index d24300de7c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/W2JRLR1007TestService.wsdl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/build.xml deleted file mode 100644 index c2a072b6ed..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/build.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/customfile-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/customfile-client.xml deleted file mode 100644 index 35e4c915d2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/customfile-client.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/customfile-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/customfile-server.xml deleted file mode 100644 index 70f92b16c8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/customfile-server.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - R1007ConformanceChecker - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1007.R1007ConformanceChecker - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/jakartaEE.tokens deleted file mode 100644 index db1333d128..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR1007TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1007.SimpleTest -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1007.SimpleEndpointImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1007.SimpleEndpoint -NAMESPACEURI=http://simpletestservice.org/wsdl -PORT=SimpleEndpointPort -URLALIAS=/jaxws/SimpleTest -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1007.SimpleEndpointImpl -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR1007TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR1007TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR1007TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/standalone-sun-jaxws.xml deleted file mode 100644 index 47b0d7c879..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/standalone.web.xml deleted file mode 100644 index 25a2cd13de..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1007/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR1007TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -SimpleTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -SimpleTest -/jaxws/SimpleTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/Client.java deleted file mode 100644 index 7e2b050bd5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/Client.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011; - -import java.io.InputStream; -import java.util.Properties; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements SOAPRequests { - - /** - * The string to be echoed for request two. - */ - private static final String STRING_2 = "R1011-2"; - - /** - * The one client. - */ - private W2JRLR1011ClientOne client1; - - /** - * The other client. - */ - private W2JRLR1011ClientTwo client2; - - static W2JRLR1011TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client1 = (W2JRLR1011ClientOne) ClientFactory - .getClient(W2JRLR1011ClientOne.class, properties, this, service); - client2 = (W2JRLR1011ClientTwo) ClientFactory - .getClient(W2JRLR1011ClientTwo.class, properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testResponseChildren - * - * @assertion_ids: WSI:SPEC:R1011 - * - * @test_Strategy: A valid request is made to the endpoint and the returned - * response is investigated in order to determine the document - * composition. - * - * @throws Fault - */ - public void testResponseChildren() throws Fault { - Document document; - try { - InputStream is = client1.makeHTTPRequest(R1011_REQUEST); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - DocumentBuilder builder = factory.newDocumentBuilder(); - document = builder.parse(is); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R1011)", e); - } - Element envelope = document.getDocumentElement(); - if (!isElement(envelope, "http://schemas.xmlsoap.org/soap/envelope/", - "Envelope")) { - throw new Fault( - "Expected 'env:Envelope' element not received (BP-R1011)"); - } - NodeList list = envelope.getChildNodes(); - boolean hasBody = false; - for (int i = 0; i < list.getLength(); i++) { - Node node = list.item(i); - if (node.getNodeType() != Node.ELEMENT_NODE) { - continue; - } - if (hasBody) { - throw new Fault( - "Child of 'env:Envelope' following 'env:Body' (BP-R1011)"); - } else { - hasBody = isElement((Element) node, - "http://schemas.xmlsoap.org/soap/envelope/", "Body"); - } - } - } - - protected boolean isElement(Element element, String namespaceURI, - String localName) { - if (!namespaceURI.equals(element.getNamespaceURI())) { - return false; - } - return localName.equals(element.getLocalName()); - } - - /** - * @testName: testRequestChildren - * - * @assertion_ids: WSI:SPEC:R1011 - * - * @test_Strategy: A request is made from the generated client. A handler - * verifies the encoding. The returned string indicates the - * success or failure. - * - * @throws Fault - */ - public void testRequestChildren() throws Fault { - String result; - try { - System.out.println("request=" + STRING_2); - result = client2.echoString(STRING_2); - System.out.println("result=" + result); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R1011)", e); - } - if (!result.equals(STRING_2)) { - if (result.equals("EXCEPTION")) { - throw new Fault("Endpoint unable to process request (BP-R1011)"); - } else { - throw new Fault( - "Request contains invalid 'soap:Envelope' children (BP-R1011)"); - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/ServerSOAPHandler.java deleted file mode 100644 index a1188c2663..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/ServerSOAPHandler.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPPart; -import jakarta.xml.soap.SOAPEnvelope; - -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - final String PASSED = "PASSED"; - - final String FAILED = "FAILED"; - - protected void processInboundMessage(SOAPMessageContext context) { - String result; - System.out.println("in ServerSOAPHandler:processInboundMessage"); - JAXWS_Util.dumpHTTPHeaders(context); - try { - result = verifyChildren(context); - } catch (Exception e) { - result = "FAILED"; - } - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: " + result); - } - } - - /** - * Verifies the env:Envelope children. - * - * @param request - * the HTTP servlet request. - * - * @return "PASSED" if no invalid claims are present; "FAILED" otherwise. - * - * @throws Exception - */ - protected String verifyChildren(SOAPMessageContext context) throws Exception { - SOAPMessage sm = context.getMessage(); - SOAPPart sp = sm.getSOAPPart(); - SOAPEnvelope se = sp.getEnvelope(); - - Element envelope = se; - if (!isElement(envelope, "http://schemas.xmlsoap.org/soap/envelope/", - "Envelope")) { - return "FAILED"; - } - NodeList list = envelope.getChildNodes(); - boolean hasBody = false; - for (int i = 0; i < list.getLength(); i++) { - Node node = list.item(i); - if (node.getNodeType() != Node.ELEMENT_NODE) { - continue; - } - if (hasBody) { - return "FAILED"; - } else { - hasBody = isElement((Element) node, - "http://schemas.xmlsoap.org/soap/envelope/", "Body"); - } - } - return "PASSED"; - } - - protected boolean isElement(Element element, String namespaceURI, - String localName) { - if (!namespaceURI.equals(element.getNamespaceURI())) { - return false; - } - return localName.equals(element.getLocalName()); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011ClientOne.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011ClientOne.java deleted file mode 100644 index e6770a9c5b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011ClientOne.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR1011ClientOne extends SOAPClient { - public W2JRLR1011ClientOne(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR1011ClientOne(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr1011testservice.org/W2JRLR1011TestService.wsdl"); - stubContext.setService("W2JRLR1011TestService"); - stubContext.setPort("W2JRLR1011TestOnePort"); - stubContext.setEndpointInterface(W2JRLR1011TestOne.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr1011.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr1011.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR1011TestOne) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011ClientTwo.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011ClientTwo.java deleted file mode 100644 index e93483d3a1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011ClientTwo.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR1011ClientTwo extends SOAPClient { - public W2JRLR1011ClientTwo(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR1011ClientTwo(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr1011testservice.org/W2JRLR1011TestService.wsdl"); - stubContext.setService("W2JRLR1011TestService"); - stubContext.setPort("W2JRLR1011TestTwoPort"); - stubContext.setEndpointInterface(W2JRLR1011TestTwo.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr1011.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr1011.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR1011TestTwo) stubContext.getStub()).echoString(nns); - System.out.println("P1=" + nns.getP1()); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011TestOneImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011TestOneImpl.java deleted file mode 100644 index dbdbfcb043..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011TestOneImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR1011TestOnePort", serviceName = "W2JRLR1011TestService", targetNamespace = "http://w2jrlr1011testservice.org/W2JRLR1011TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR1011TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011.W2JRLR1011TestOne") - -public class W2JRLR1011TestOneImpl implements W2JRLR1011TestOne { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011TestService.wsdl deleted file mode 100644 index 0a02aad3f6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011TestService.wsdl +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011TestTwoImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011TestTwoImpl.java deleted file mode 100644 index 1d3de88fd4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/W2JRLR1011TestTwoImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR1011TestTwoPort", serviceName = "W2JRLR1011TestService", targetNamespace = "http://w2jrlr1011testservice.org/W2JRLR1011TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR1011TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011.W2JRLR1011TestTwo") - -public class W2JRLR1011TestTwoImpl implements W2JRLR1011TestTwo { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/build.xml deleted file mode 100644 index f18800b673..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/build.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/custom-client.xml deleted file mode 100644 index 4f319a19c7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/custom-client.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/custom-server.xml deleted file mode 100644 index 3c95a1c6cc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/custom-server.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - ns1:W2JRLR1011TestTwoPort - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011.ServerSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/jakartaEE.tokens deleted file mode 100644 index 0f29954a85..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR1011TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011.W2JRLR1011TestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011.W2JRLR1011TestOneImpl -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011.W2JRLR1011TestOneImpl -URLALIAS=/jaxws/W2JRLR1011TestOne -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011.W2JRLR1011TestTwoImpl -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011.W2JRLR1011TestTwoImpl -URLALIAS2=/jaxws/W2JRLR1011TestTwo -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011.W2JRLR1011TestOne -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1011.W2JRLR1011TestTwo -NAMESPACEURI=http://w2jrlr1011testservice.org/W2JRLR1011TestService.wsdl -PORT=W2JRLR1011TestOnePort -PORT2=W2JRLR1011TestTwoPort -WEBSERVICEDESCRIPTION=W2JRLR1011TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR1011TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR1011TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR1011TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/standalone-sun-jaxws.xml deleted file mode 100644 index 9abefc3a5c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/standalone.web.xml deleted file mode 100644 index 2c4b9c8415..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1011/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSW2JRLR1011TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR1011TestTwo -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR1011TestOne -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR1011TestTwo -/jaxws/W2JRLR1011TestTwo - - -W2JRLR1011TestOne -/jaxws/W2JRLR1011TestOne - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/Client.java deleted file mode 100644 index a6038f28f6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/Client.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.Charset; -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.constants.WSIConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements SOAPConstants, WSIConstants, SOAPRequests { - - /** - * The string to be echoed for request two. - */ - private static final String STRING_2 = "R1012-2"; - - /** - * The one client. - */ - private W2JRLR1012ClientOne client1; - - /** - * The other client. - */ - private W2JRLR1012ClientTwo client2; - - static W2JRLR1012TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client1 = (W2JRLR1012ClientOne) ClientFactory - .getClient(W2JRLR1012ClientOne.class, properties, this, service); - client2 = (W2JRLR1012ClientTwo) ClientFactory - .getClient(W2JRLR1012ClientTwo.class, properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testResponseEncoding - * - * @assertion_ids: WSI:SPEC:R1012 - * - * @test_Strategy: A valid request is made to the endpoint and the returned - * response is investigated in order to determine the - * encoding. - * - * @throws Fault - */ - public void testResponseEncoding() throws Fault { - InputStream is; - Charset cs = Charset.forName("UTF-8"); - try { - is = client1.makeHTTPRequest(R1012_REQUEST, cs); - String contentType = client1.getResponseHeader("Content-Type"); - if (contentType != null) { - int index = contentType.toLowerCase().indexOf("charset="); - if (index > 0) { - String name = contentType.substring(index + 8).trim(); - if (name.charAt(0) == '"') - name = name.substring(1, name.length() - 1); - if ((name.equalsIgnoreCase("UTF-8")) - || name.equalsIgnoreCase("UTF-16")) { - char c = name.charAt(0); - if ((c == '\"') || (c == '\'')) { - name = name.substring(1, name.length() - 1); - } - cs = Charset.forName(name); - } else { - throw new Fault("Response encoded in '" + name + "' (BP-R1012)"); - } - } - } - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R1012)", e); - } - InputStreamReader isr = new InputStreamReader(is, cs); - try { - char[] buffer = new char[1024]; - int length; - do { - length = isr.read(buffer); - } while (length > 0); - } catch (IOException e) { - throw new Fault("Unable to read response from endpoint (BP-R1012)", e); - } finally { - try { - isr.close(); - is.close(); - } catch (Exception e) { - } - } - } - - /** - * @testName: testRequestEncoding - * - * @assertion_ids: WSI:SPEC:R1012 - * - * @test_Strategy: A request is made from the generated client. A handler - * verifies the encoding. The returned string indicates the - * success or failure. - * - * @throws Fault - */ - public void testRequestEncoding() throws Fault { - String result; - try { - result = client2.echoString(STRING_2); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R1012)", e); - } - if (!result.equals(STRING_2)) { - if (result.equals("EXCEPTION")) { - throw new Fault("Endpoint unable to process request (BP-R1012)"); - } else { - throw new Fault( - "Request encoding neither 'UTF-8' nor 'UTF-16' (BP-R1012)"); - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/ServerSOAPHandler.java deleted file mode 100644 index b6f1d58988..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/ServerSOAPHandler.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; - -import java.util.Map; -import java.util.List; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - final String PASSED = "PASSED"; - - final String FAILED = "FAILED"; - - protected void processInboundMessage(SOAPMessageContext context) { - System.out.println("in ServerSOAPHandler:processInboundMessage"); - JAXWS_Util.dumpHTTPHeaders(context); - Map> map = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - String result = verifyContentTypeHttpHeader(map); - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: " + result); - } - } - - /** - * Verifies the contents of the Content-Type HTTP header - * - * @param request - * the HTTP servlet request. - */ - protected String verifyContentTypeHttpHeader(Map> m) { - System.out.println("in ServerSOAPHandler:verifyContentTypeHttpHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - int index = sValues.indexOf("charset="); - if (index > 0) { - if ((sValues.indexOf("utf-8") >= 0) - || (sValues.indexOf("utf-16") >= 0)) { - result = PASSED; - } else { - result = FAILED + ":charset did not equal utf-8 or utf-16, it was |" - + sValues + "|"; - } - } else { - result = FAILED + ": charset not found in HTTP Content-Type [" + sValues - + "]"; - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - System.out.println("result=" + result); - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012ClientOne.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012ClientOne.java deleted file mode 100644 index eeb2e76a7e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012ClientOne.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR1012ClientOne extends SOAPClient { - public W2JRLR1012ClientOne(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR1012ClientOne(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr1012testservice.org/W2JRLR1012TestService.wsdl"); - stubContext.setService("W2JRLR1012TestService"); - stubContext.setPort("W2JRLR1012TestOnePort"); - stubContext.setEndpointInterface(W2JRLR1012TestOne.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr1012.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr1012.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR1012TestOne) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012ClientTwo.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012ClientTwo.java deleted file mode 100644 index c485a21a32..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012ClientTwo.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR1012ClientTwo extends SOAPClient { - public W2JRLR1012ClientTwo(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR1012ClientTwo(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr1012testservice.org/W2JRLR1012TestService.wsdl"); - stubContext.setService("W2JRLR1012TestService"); - stubContext.setPort("W2JRLR1012TestTwoPort"); - stubContext.setEndpointInterface(W2JRLR1012TestTwo.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr1012.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr1012.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR1012TestTwo) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012TestOneImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012TestOneImpl.java deleted file mode 100644 index b2315adcc4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012TestOneImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR1012TestOnePort", serviceName = "W2JRLR1012TestService", targetNamespace = "http://w2jrlr1012testservice.org/W2JRLR1012TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR1012TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012.W2JRLR1012TestOne") -public class W2JRLR1012TestOneImpl implements W2JRLR1012TestOne { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012TestService.wsdl deleted file mode 100644 index eb1a15af4d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012TestService.wsdl +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012TestTwoImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012TestTwoImpl.java deleted file mode 100644 index e0d389cfcb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/W2JRLR1012TestTwoImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR1012TestTwoPort", serviceName = "W2JRLR1012TestService", targetNamespace = "http://w2jrlr1012testservice.org/W2JRLR1012TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR1012TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012.W2JRLR1012TestTwo") -public class W2JRLR1012TestTwoImpl implements W2JRLR1012TestTwo { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/build.xml deleted file mode 100644 index bc76d69d9d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/build.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/custom-client.xml deleted file mode 100644 index 43438c148f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/custom-client.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/custom-server.xml deleted file mode 100644 index e236a9ef2b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/custom-server.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - ns1:W2JRLR1012TestTwoPort - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012.ServerSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/jakartaEE.tokens deleted file mode 100644 index 5452150280..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR1012TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012.W2JRLR1012TestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012.W2JRLR1012TestOneImpl -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012.W2JRLR1012TestOneImpl -URLALIAS=/jaxws/W2JRLR1012TestOne -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012.W2JRLR1012TestTwoImpl -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012.W2JRLR1012TestTwoImpl -URLALIAS2=/jaxws/W2JRLR1012TestTwo -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012.W2JRLR1012TestOne -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1012.W2JRLR1012TestTwo -NAMESPACEURI=http://w2jrlr1012testservice.org/W2JRLR1012TestService.wsdl -PORT=W2JRLR1012TestOnePort -PORT2=W2JRLR1012TestTwoPort -WEBSERVICEDESCRIPTION=W2JRLR1012TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR1012TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR1012TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR1012TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/standalone-sun-jaxws.xml deleted file mode 100644 index 9b6fcb268e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/standalone.web.xml deleted file mode 100644 index 7ba5de8e48..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1012/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSW2JRLR1012TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR1012TestOne -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR1012TestTwo -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR1012TestOne -/jaxws/W2JRLR1012TestOne - - -W2JRLR1012TestTwo -/jaxws/W2JRLR1012TestTwo - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/Client.java deleted file mode 100644 index 527f5ef0fb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/Client.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1014; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPElement; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends ServiceEETest implements SOAPRequests { - - private W2JRLR1014Client client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (W2JRLR1014Client) ClientFactory.getClient(W2JRLR1014Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testBodyChildrenAreQualifiedOnResponse - * - * @assertion_ids: WSI:SPEC:R1014 - * - * @test_Strategy: Make a request and inspect response soap:Body children to - * ensure they are namespace qualified. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testBodyChildrenAreQualifiedOnResponse() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(HELLOWORLD_WITH_HANDLER); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateBodyChildrenAreQualified(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - client.logMessageInHarness(response); - } - - /** - * @testName: testBodyChildrenAreQualifiedOnRequest - * - * @assertion_ids: WSI:SPEC:R1014 - * - * @test_Strategy: Make a request and inspect response to see if request was - * conformant, as determined by server side handler. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testBodyChildrenAreQualifiedOnRequest() throws EETest.Fault { - String response = null; - try { - response = client.helloWorld(); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - if (response.startsWith("failed")) { - throw new EETest.Fault(response); - } - } - - private void validateBodyChildrenAreQualified(SOAPMessage response) - throws EETest.Fault, SOAPException { - Iterator bodyChildren = response.getSOAPPart().getEnvelope().getBody() - .getChildElements(); - SOAPElement child; - String uri; - while (bodyChildren.hasNext()) { - child = (SOAPElement) bodyChildren.next(); - uri = child.getElementName().getURI(); - if (uri == null || uri.equals("")) { - client.logMessageInHarness(response); - throw new EETest.Fault("Invalid element: child elements of soap:Body" - + " must be qualified (BP-R1014): " - + child.getElementName().getQualifiedName()); - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/R1014ConformanceChecker.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/R1014ConformanceChecker.java deleted file mode 100644 index be04c41dfb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/R1014ConformanceChecker.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)R1014ConformanceChecker.java 1.4 03/11/24 - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1014; - -import com.sun.ts.tests.jaxws.common.RequestConformanceChecker; - -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.*; -import java.util.Iterator; - -public class R1014ConformanceChecker extends RequestConformanceChecker { - - public void test(SOAPMessageContext context) throws SOAPException { - SOAPBody body = getBody(context); - Iterator children = body.getChildElements(); - SOAPElement element; - String uri; - while (children.hasNext() && response == null) { - element = (SOAPElement) children.next(); - uri = element.getElementName().getURI(); - if (uri == null || uri.equals("")) { - response = "failed. Children of soap:Body must be qualified"; - } - } - } - - private SOAPBody getBody(SOAPMessageContext context) throws SOAPException { - return context.getMessage().getSOAPPart().getEnvelope().getBody(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/SimpleEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/SimpleEndpointImpl.java deleted file mode 100644 index 02b8d80ef8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/SimpleEndpointImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1014; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "SimpleEndpointPort", serviceName = "SimpleTest", targetNamespace = "http://simpletestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR1014TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1014.SimpleEndpoint") - -public class SimpleEndpointImpl implements SimpleEndpoint { - public String helloWorld() { - return "hello world"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/W2JRLR1014Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/W2JRLR1014Client.java deleted file mode 100644 index 2bf2569817..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/W2JRLR1014Client.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1014; - -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.lib.harness.EETest; - -public class W2JRLR1014Client extends SOAPClient { - public W2JRLR1014Client(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR1014Client(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://simpletestservice.org/wsdl"); - stubContext.setService("SimpleTest"); - stubContext.setPort("SimpleEndpointPort"); - stubContext.setEndpointInterface(SimpleEndpoint.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr1014.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr1014.wsdlloc.1"; - } - - public String helloWorld() throws Exception { - return ((SimpleEndpoint) stubContext.getStub()).helloWorld(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/W2JRLR1014TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/W2JRLR1014TestService.wsdl deleted file mode 100644 index d24300de7c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/W2JRLR1014TestService.wsdl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/build.xml deleted file mode 100644 index 5be020c79b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/build.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/customfile-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/customfile-client.xml deleted file mode 100644 index 5227fc868e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/customfile-client.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/customfile-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/customfile-server.xml deleted file mode 100644 index f30cd5800d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/customfile-server.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - R1014ConformanceChecker - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1014.R1014ConformanceChecker - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/jakartaEE.tokens deleted file mode 100644 index b83526c493..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR1014TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1014.SimpleTest -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1014.SimpleEndpointImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1014.SimpleEndpoint -NAMESPACEURI=http://simpletestservice.org/wsdl -PORT=SimpleEndpointPort -URLALIAS=/jaxws/SimpleTest -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1014.SimpleEndpointImpl -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR1014TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR1014TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR1014TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/standalone-sun-jaxws.xml deleted file mode 100644 index b35d531e5d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/standalone.web.xml deleted file mode 100644 index 04a76181af..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1014/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR1014TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -SimpleTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -SimpleTest -/jaxws/SimpleTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1015/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1015/Client.java deleted file mode 100644 index 72c2cf475f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1015/Client.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1015; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.simpleclient.*; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import java.util.Properties; - -public class Client extends ServiceEETest implements SOAPRequests { - - private SimpleTestClient client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (SimpleTestClient) ClientFactory.getClient(SimpleTestClient.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testEnvelopeWrongNamespace - * - * @assertion_ids: WSI:SPEC:R1015 - * - * @test_Strategy: Make a request with envelope with wrong namespace, inpsect - * response to make sure it is a soap:Fault. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testEnvelopeWrongNamespace() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(BAD_SOAP_ENVELOPE); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateIsFault(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - client.logMessageInHarness(response); - } - - private void validateIsFault(SOAPMessage response) - throws EETest.Fault, SOAPException { - if (!response.getSOAPPart().getEnvelope().getBody().hasFault()) { - client.logMessageInHarness(response); - throw new EETest.Fault( - "Invalid response: instances must generate a soap:Fault when a request " - + "soap:Envelope uses a namespace other than http://schemas.xmlsoap.org/soap/envelope/" - + "(BP-R1015)."); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1015/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1015/build.xml deleted file mode 100644 index 3529f0258e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1015/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1015/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1015/jakartaEE.tokens deleted file mode 100644 index 3ea29e0904..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1015/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wsimpletest") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.simpleclient.SimpleTest -WEBSERVICEDESCRIPTION=SimpleTest -URLALIAS=/jaxws/SimpleTest -SERVICEREFNAMEWSSERVLET=service/wsj2wsimpletest -SERVICEREFNAMEWSEJB=service/wsj2wsimpletest -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wsimpletest diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/Client.java deleted file mode 100644 index 37f08a5de1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/Client.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1016; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.ws.WebServiceException; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends ServiceEETest implements SOAPRequests { - - private W2JRLR1016Client client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (W2JRLR1016Client) ClientFactory.getClient(W2JRLR1016Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testCanAcceptXMLLangAttribute - * - * @assertion_ids: WSI:SPEC:R1016 - * - * @test_Strategy: Make a request that generates a fault with an xml:lang - * attribute on the faultstring element, ensure the client can - * accept the fault - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testCanAcceptXMLLangAttribute() throws EETest.Fault { - try { - client.alwaysThrowsWebServiceException(); - } catch (WebServiceException e) { - // expected result - TestUtil.logMsg("Received WebServiceException"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EETest.Fault("Test didn't complete properly: ", e); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/SimpleEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/SimpleEndpointImpl.java deleted file mode 100644 index 6515956be6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/SimpleEndpointImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1016; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "SimpleEndpointPort", serviceName = "SimpleTest", targetNamespace = "http://simpletestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR1016TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1016.SimpleEndpoint") - -public class SimpleEndpointImpl implements SimpleEndpoint { - public void alwaysThrowsWebServiceException() { - throw new WebServiceException("alwaysThrowsWebServiceException"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/W2JRLR1016Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/W2JRLR1016Client.java deleted file mode 100644 index 655c8fd1a9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/W2JRLR1016Client.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1016; - -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -public class W2JRLR1016Client extends SOAPClient { - public W2JRLR1016Client(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR1016Client(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://simpletestservice.org/wsdl"); - stubContext.setService("SimpleTest"); - stubContext.setPort("SimpleEndpointPort"); - stubContext.setEndpointInterface(SimpleEndpoint.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr1016.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr1016.wsdlloc.1"; - } - - public void alwaysThrowsWebServiceException() throws Exception { - SimpleEndpoint port = (SimpleEndpoint) stubContext.getStub(); - Handler_Util - .clearHandlers(((jakarta.xml.ws.BindingProvider) port).getBinding()); - port.alwaysThrowsWebServiceException(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/W2JRLR1016TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/W2JRLR1016TestService.wsdl deleted file mode 100644 index a56ff5bb2e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/W2JRLR1016TestService.wsdl +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/XMLLangHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/XMLLangHandler.java deleted file mode 100644 index eb9606988b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/XMLLangHandler.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1016; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.Constants; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.soap.SOAPHandler; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.soap.*; -import javax.xml.namespace.QName; -import java.util.Iterator; -import java.util.Set; -import java.util.HashSet; - -public class XMLLangHandler implements SOAPHandler { - - public Set getHeaders() { - return new HashSet(); - } - - public void init(java.util.Map config) { - }; - - public boolean handleFault(SOAPMessageContext context) { - System.out.println("HANDLER: XMLLangHandler.handleFault() BEGIN"); - JAXWS_Util.dumpSOAPMessage(context.getMessage(), false); - try { - if (Handler_Util.getDirection(context).equals(Constants.OUTBOUND)) { - System.out.println( - "HANDLER: XMLLangHandler.handleFault() direction=outbound"); - addXMLLangAttribute((SOAPMessageContext) context); - } else { - System.out - .println("HANDLER: XMLLangHandler.handleFault() direction=inbound"); - } - } catch (SOAPException se) { - com.sun.ts.lib.util.TestUtil.printStackTrace(se); - } - System.out.println("HANDLER: XMLLangHandler.handleFault() END"); - return true; - }; - - public void destroy() { - }; - - public void close(MessageContext context) { - }; - - public boolean handleMessage(SOAPMessageContext context) { - if (Handler_Util.getDirection(context).equals(Constants.OUTBOUND)) { - System.out.println( - "HANDLER: XMLLangHandler.handleMessage() direction=outbound"); - } else { - System.out - .println("HANDLER: XMLLangHandler.handleMessage() direction=inbound"); - } - return true; - } - - private void addXMLLangAttribute(SOAPMessageContext context) - throws SOAPException { - - Iterator children; - SOAPElement fault = context.getMessage().getSOAPPart().getEnvelope() - .getBody().getFault(); - if (fault == null) - return; - children = fault.getChildElements(); - SOAPElement child; - while (children.hasNext()) { - child = (SOAPElement) children.next(); - if (child.getElementName().getLocalName().equals("faultstring")) { - child.addAttribute(getXMLLangName(SOAPFactory.newInstance()), "en"); - } - } - context.getMessage().saveChanges(); - } - - private Name getXMLLangName(SOAPFactory factory) throws SOAPException { - return factory.createName("lang", "xml", ""); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/build.xml deleted file mode 100644 index dc7fd32bdf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/build.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/customfile-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/customfile-client.xml deleted file mode 100644 index 7c6d79b022..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/customfile-client.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/customfile-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/customfile-server.xml deleted file mode 100644 index 80712a2fce..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/customfile-server.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - XMLLangHandler - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1016.XMLLangHandler - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/jakartaEE.tokens deleted file mode 100644 index 916b1b9bc8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR1016TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1016.SimpleTest -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1016.SimpleEndpointImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1016.SimpleEndpoint -NAMESPACEURI=http://simpletestservice.org/wsdl -PORT=SimpleEndpointPort -URLALIAS=/jaxws/SimpleTest -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1016.SimpleEndpointImpl -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR1016TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR1016TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR1016TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/standalone-sun-jaxws.xml deleted file mode 100644 index 299cdc8854..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/standalone.web.xml deleted file mode 100644 index b0c3637002..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1016/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR1016TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -SimpleTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -SimpleTest -/jaxws/SimpleTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/Client.java deleted file mode 100644 index ceee256c10..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/Client.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1027; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.utils.SOAPUtils; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.ws.soap.SOAPFaultException; -import java.util.Properties; -import java.rmi.ServerException; - -public class Client extends ServiceEETest implements SOAPRequests { - - private W2JRLR1027Client client; - - static SimpleTest service; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (W2JRLR1027Client) ClientFactory.getClient(W2JRLR1027Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testNotUnderstoodHeaderInRequest - * - * @assertion_ids: WSI:SPEC:R1027 - * - * @test_Strategy: Make a request with envelope with soap header with - * mustUnderstnad = 1, that the server doesn't understand. - * Inspect repsonse to ensure it is a soap:Fault with - * faultcode of "MustUnderstand" - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testNotUnderstoodHeaderInRequest() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(MUST_UNDERSTAND_HEADER); - } catch (Exception e) { - client.logMessageInHarness(response); - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - client.logMessageInHarness(response); - validateIsMustUnderstandFault(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - - } - - private void validateIsMustUnderstandFault(SOAPMessage response) - throws EETest.Fault, SOAPException { - if (!SOAPUtils.isMustUnderstandFaultcode(response)) { - throw new EETest.Fault( - "Invalid response: instances must generate a \"MustUnderstand\" " - + "soap:Fault when a request contains a soap header with \"mustUnderstand=1\" " - + "that is not understood (BP-R1027)"); - } - - } - - private void validateIsMustUnderstandFault(SOAPFaultException se) - throws EETest.Fault { - if (!SOAPUtils.isMustUnderstandFaultcode(se)) { - throw new EETest.Fault( - "Invalid response: instances must generate a \"MustUnderstand\" " - + "soap:Fault when a request contains a soap header with \"mustUnderstand=1\" " - + "that is not understood (BP-R1027)"); - } - - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/SimpleEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/SimpleEndpointImpl.java deleted file mode 100644 index a7c8adee5c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/SimpleEndpointImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1027; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "SimpleEndpointPort", serviceName = "SimpleTest", targetNamespace = "http://simpletestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR1027TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1027.SimpleEndpoint") - -public class SimpleEndpointImpl implements SimpleEndpoint { - public String helloWorld() { - return "hello world"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/W2JRLR1027Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/W2JRLR1027Client.java deleted file mode 100644 index d84347bb50..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/W2JRLR1027Client.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1027; - -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.lib.harness.EETest; - -public class W2JRLR1027Client extends SOAPClient { - public W2JRLR1027Client(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR1027Client(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://simpletestservice.org/wsdl"); - stubContext.setService("SimpleTest"); - stubContext.setPort("SimpleEndpointPort"); - stubContext.setEndpointInterface(SimpleEndpoint.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr1027.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr1027.wsdlloc.1"; - } - - public String helloWorld() throws Exception { - return ((SimpleEndpoint) stubContext.getStub()).helloWorld(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/W2JRLR1027TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/W2JRLR1027TestService.wsdl deleted file mode 100644 index d24300de7c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/W2JRLR1027TestService.wsdl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/build.xml deleted file mode 100644 index 14369e2549..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/build.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/customfile.xml deleted file mode 100644 index a851223c1f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/customfile.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/jakartaEE.tokens deleted file mode 100644 index c96315b24a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR1027TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1027.SimpleTest -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1027.SimpleEndpointImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1027.SimpleEndpoint -NAMESPACEURI=http://simpletestservice.org/wsdl -PORT=SimpleEndpointPort -URLALIAS=/jaxws/SimpleTest -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1027.SimpleEndpointImpl -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR1027TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR1027TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR1027TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/standalone-sun-jaxws.xml deleted file mode 100644 index c4661cbcba..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/standalone.web.xml deleted file mode 100644 index 3b1fc56bb4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1027/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR1027TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -SimpleTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -SimpleTest -/jaxws/SimpleTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/Client.java deleted file mode 100644 index 3bc2bfd440..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/Client.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)Client.java 1.15 03/05/21 - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1141; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.util.*; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1141."; - - // The webserver username and password property names (harness properties) - private static final String USERNAME = "user"; - - private static final String PASSWORD = "password"; - - // RPC service and port information - private static final String NAMESPACE_URI = "http://w2jrlr1141testservice.org/wsdl"; - - private static final String SERVICE_NAME = "W2JRLR1141TestService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME; - - private QName PORT_QNAME; - - private static final Class PORT_CLASS = Hello.class; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private String username = null; - - private String password = null; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsi.w2jrlr1141.endpoint.1"; - - private static final String WSDLLOC_URL = "wsi.w2jrlr1141.wsdlloc.1"; - - private String url = null; - - private URL wsdlurl = null; - - static W2JRLR1141TestService service; - - // expect 2xx http status code - String GoodSoapMessage = "Rocky"; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String url = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + url); - } - - Hello port = null; - - private void getPortStandalone() throws Exception { - port = (Hello) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - W2JRLR1141TestService.class, PORT_QNAME, Hello.class); - JAXWS_Util.setTargetEndpointAddress(port, url); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("Obtained service"); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("Obtained port"); - getTargetEndpointAddress(port); - // JAXWS_Util.setTargetEndpointAddress(port, url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; user; password; - * platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - // Initialize QNames used by the test - SERVICE_QNAME = new QName(NAMESPACE_URI, SERVICE_NAME); - PORT_QNAME = new QName(NAMESPACE_URI, PORT_NAME); - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - username = p.getProperty(USERNAME); - password = p.getProperty(PASSWORD); - TestUtil.logMsg("Creating stub instance ..."); - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (W2JRLR1141TestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - } - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: TestHTTP10Message - * - * @assertion_ids: WSI:SPEC:R1141 - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection use - * a http version of 1.0. Verify that we get a correct HTTP status code of - * 2xx. - */ - public void TestHTTP10Message() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestHTTP10Message"); - TestUtil.logMsg("Send good SOAP RPC request (expect 2xx status code)"); - HttpURLConnection conn = openHttp10Connection(url); - TestUtil - .logMsg("HTTP VERSION = " + conn.getRequestProperty("HTTP-Version")); - int httpStatusCode = sendRequest(conn, GoodSoapMessage, "utf-8"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestGoodSoapMessage failed", e); - } - - if (!pass) - throw new Fault("TestGoodSoapMessage failed"); - } - - /* - * @testName: TestHTTP11Message - * - * @assertion_ids: WSI:SPEC:R1141 - * - * @test_Strategy: Send a good SOAP RPC request over an HttpURLConnection use - * a http version of 1.1. Verify that we get a correct HTTP status code of - * 2xx. - */ - public void TestHTTP11Message() throws Fault { - boolean pass = true; - Iterator iterator = null; - try { - TestUtil.logMsg("TestHTTP10Message"); - TestUtil.logMsg("Send good SOAP RPC request (expect 2xx status code)"); - HttpURLConnection conn = openHttpConnection(url); - TestUtil - .logMsg("HTTP VERSION = " + conn.getRequestProperty("HTTP-Version")); - int httpStatusCode = sendRequest(conn, GoodSoapMessage, "utf-8"); - closeHttpConnection(conn); - if (httpStatusCode < 200 || httpStatusCode > 299) { - TestUtil - .logErr("Expected 2xx status code, instead got " + httpStatusCode); - pass = false; - } else - TestUtil - .logMsg("Received expected 2xx status code of " + httpStatusCode); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("TestGoodSoapMessage failed", e); - } - - if (!pass) - throw new Fault("TestGoodSoapMessage failed"); - } - - private HttpURLConnection openHttpConnection(String s) throws IOException { - HttpURLConnection conn = (HttpURLConnection) new URL(s).openConnection(); - conn.setDoOutput(true); - conn.setDoInput(true); - conn.setRequestMethod("POST"); - conn.setRequestProperty("HTTP-Version", "HTTP/1.1"); - conn.setRequestProperty("Content-Type", "text/xml"); - conn.setRequestProperty("SOAPAction", "\"\""); - return conn; - } - - private HttpURLConnection openHttp10Connection(String s) throws IOException { - HttpURLConnection conn = (HttpURLConnection) new URL(s).openConnection(); - conn.setDoOutput(true); - conn.setDoInput(true); - conn.setRequestMethod("POST"); - conn.setRequestProperty("HTTP-Version", "HTTP/1.0"); - conn.setRequestProperty("Content-Type", "text/xml"); - conn.setRequestProperty("SOAPAction", "\"\""); - return conn; - } - - private void closeHttpConnection(HttpURLConnection conn) throws IOException { - conn.disconnect(); - } - - private int sendRequest(HttpURLConnection conn, String request) - throws IOException { - - TestUtil.logMsg("Request=" + request); - return _sendRequest(conn, request.getBytes()); - } - - private int sendRequest(HttpURLConnection conn, String request, - String charsetName) throws IOException { - - TestUtil.logMsg("Request=" + request); - return _sendRequest(conn, request.getBytes(charsetName)); - } - - private int sendRequest(HttpURLConnection conn, byte[] request, - String encoding) throws IOException { - - TestUtil.logMsg("Request=" + new String(request, encoding)); - return _sendRequest(conn, request); - } - - private int _sendRequest(HttpURLConnection conn, byte[] data) - throws IOException { - - int length = data.length; - conn.setRequestProperty("Content-Length", - new Integer(data.length).toString()); - OutputStream outputStream = null; - try { - outputStream = conn.getOutputStream(); - outputStream.write(data); - } finally { - try { - outputStream.close(); - } catch (Throwable t) { - } - } - - boolean isFailure = true; - int responseCode = conn.getResponseCode(); - - String responseMessage = conn.getResponseMessage(); - - TestUtil.logMsg("ResponseCode=" + responseCode); - TestUtil.logMsg("ResponseMessage=" + responseMessage); - if (responseCode == HttpURLConnection.HTTP_OK) { - isFailure = false; - } - InputStream istream = null; - BufferedReader reader = null; - try { - istream = !isFailure ? conn.getInputStream() : conn.getErrorStream(); - if (istream != null) { - String response = null; - String buf = null; - reader = new BufferedReader(new InputStreamReader(istream)); - while ((buf = reader.readLine()) != null) { - if (response != null) - response += buf; - else - response = buf; - } - } - } finally { - try { - reader.close(); - istream.close(); - } catch (Throwable t) { - } - } - - return responseCode; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/HelloImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/HelloImpl.java deleted file mode 100644 index f0fc53ce4c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/HelloImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1141; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.ws.WebServiceException; - -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "W2JRLR1141TestService", targetNamespace = "http://w2jrlr1141testservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR1141TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1141.Hello") - -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/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/W2JRLR1141TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/W2JRLR1141TestService.wsdl deleted file mode 100644 index 8dfd3e0142..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/W2JRLR1141TestService.wsdl +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/build.xml deleted file mode 100644 index 7cf8f4ecb3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/build.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/customfile.xml deleted file mode 100644 index 60bccdc2c4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/jakartaEE.tokens deleted file mode 100644 index bb18046f1f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR1141TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1141.W2JRLR1141TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1141.HelloImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1141.Hello -NAMESPACEURI=http://w2jrlr1141testservice.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R1141.HelloImpl -WEBSERVICEDESCRIPTION=W2JRLR1141TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR1141TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR1141TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR1141TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/standalone-sun-jaxws.xml deleted file mode 100644 index c124435b6c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/standalone.web.xml deleted file mode 100644 index cabfaa2ff5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R1141/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR1141TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -Hello -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Hello -/jaxws/Hello - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/Client.java deleted file mode 100644 index 2baf5301b5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/Client.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import java.util.Properties; - -public class Client extends ServiceEETest implements SOAPRequests { - - private W2JRLR11XXClientOne client1; - - private W2JRLR11XXClientTwo client2; - - static W2JRLR11XXTestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client1 = (W2JRLR11XXClientOne) ClientFactory - .getClient(W2JRLR11XXClientOne.class, properties, this, service); - client2 = (W2JRLR11XXClientTwo) ClientFactory - .getClient(W2JRLR11XXClientTwo.class, properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSoapActionHeaderIsQuotedInRequest - * - * @assertion_ids: WSI:SPEC:R1109; WSI:SPEC:R1127 - * - * @test_Strategy: Make a request and inspect request soapAction HTTP header - * to ensure value is quoted - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testSoapActionHeaderIsQuotedInRequest() throws EETest.Fault { - String response = ""; - try { - response = client2.echoString("hello string"); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/ServerSOAPHandler.java deleted file mode 100644 index a944ba9682..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/ServerSOAPHandler.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; - -import java.util.Map; -import java.util.List; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - private String PASSED = "PASSED"; - - private String FAILED = "FAILED"; - - protected void processInboundMessage(SOAPMessageContext context) { - System.out.println("in ServerSOAPHandler:processInboundMessage"); - String result = null; - try { - result = verifySoapActionHeader(context); - } catch (Exception e) { - throw new RuntimeException( - "Exception occurred in ServerSOAPHandler:verifySoapActionHeader: " - + e); - } - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: " + result); - } - } - - protected String verifySoapActionHeader(SOAPMessageContext context) - throws Exception { - System.out.println("in ServerSOAPHandler:verifySoapActionHeader"); - String result = FAILED; - - JAXWS_Util.dumpHTTPHeaders(context); - Map> map1 = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - Map> map2 = JAXWS_Util.convertKeysToLowerCase(map1); - List values = map2.get("soapaction"); - if (values != null) { - System.out.println("SoapAction=" + values); - if (values.contains("\"helloWorld\"") - || values.contains("\'helloWorld\'")) { - result = "PASSED"; - } else { - result = "FAILED: the header SOAPAction was not a quoted value:" - + values; - } - } else { - result = "FAILED: the header SOAPAction was not found"; - } - return result; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXClientOne.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXClientOne.java deleted file mode 100644 index 1bb69b4a86..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXClientOne.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR11XXClientOne extends SOAPClient { - public W2JRLR11XXClientOne(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR11XXClientOne(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://soapactionservice.org/wsdl/"); - stubContext.setService("W2JRLR11XXTestService"); - stubContext.setPort("W2JRLR11XXTestOnePort"); - stubContext.setEndpointInterface(W2JRLR11XXTest.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr11XX.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr11XX.wsdlloc.1"; - } - - public String echoString(String s) throws Exception { - return ((W2JRLR11XXTest) stubContext.getStub()).echoString(s); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXClientTwo.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXClientTwo.java deleted file mode 100644 index f7024d0fdc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXClientTwo.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR11XXClientTwo extends SOAPClient { - public W2JRLR11XXClientTwo(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR11XXClientTwo(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://soapactionservice.org/wsdl/"); - stubContext.setService("W2JRLR11XXTestService"); - stubContext.setPort("W2JRLR11XXTestTwoPort"); - stubContext.setEndpointInterface(W2JRLR11XXTest.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr11XX.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr11XX.wsdlloc.1"; - } - - public String echoString(String s) throws Exception { - return ((W2JRLR11XXTest) stubContext.getStub()).echoString(s); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXTestOneImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXTestOneImpl.java deleted file mode 100644 index 809b13c8ea..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXTestOneImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR11XXTestOnePort", serviceName = "W2JRLR11XXTestService", targetNamespace = "http://soapactionservice.org/wsdl/", wsdlLocation = "WEB-INF/wsdl/W2JRLR11XXTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX.W2JRLR11XXTest") - -public class W2JRLR11XXTestOneImpl implements W2JRLR11XXTest { - public String echoString(String s) { - return s; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXTestService.wsdl deleted file mode 100644 index 01546ad6ac..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXTestService.wsdl +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXTestTwoImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXTestTwoImpl.java deleted file mode 100644 index c6b3935a69..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/W2JRLR11XXTestTwoImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR11XXTestTwoPort", serviceName = "W2JRLR11XXTestService", targetNamespace = "http://soapactionservice.org/wsdl/", wsdlLocation = "WEB-INF/wsdl/W2JRLR11XXTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX.W2JRLR11XXTest") - -public class W2JRLR11XXTestTwoImpl implements W2JRLR11XXTest { - public String echoString(String s) { - return s; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/build.xml deleted file mode 100644 index ef79b519b4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/build.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/custom-client.xml deleted file mode 100644 index bbe348bbce..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/custom-client.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/custom-server.xml deleted file mode 100644 index 4a5864bf30..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/custom-server.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ns1:W2JRLR11XXTestTwoPort - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX.ServerSOAPHandler - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/jakartaEE.tokens deleted file mode 100644 index 5a0a52bb18..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR11XXTestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX.W2JRLR11XXTestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX.W2JRLR11XXTestOneImpl -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX.W2JRLR11XXTestOneImpl -URLALIAS=/jaxws/W2JRLR11XXTestOne -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX.W2JRLR11XXTestTwoImpl -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX.W2JRLR11XXTestTwoImpl -URLALIAS2=/jaxws/W2JRLR11XXTestTwo -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX.W2JRLR11XXTest -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R11XX.W2JRLR11XXTest -NAMESPACEURI=http://soapactionservice.org/wsdl/ -PORT=W2JRLR11XXTestOnePort -PORT2=W2JRLR11XXTestTwoPort -WEBSERVICEDESCRIPTION=W2JRLR11XXTestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR11XXTestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR11XXTestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR11XXTestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/standalone-sun-jaxws.xml deleted file mode 100644 index fb6e0546e2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/standalone.web.xml deleted file mode 100644 index 78623ce805..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R11XX/standalone.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - WSW2JRLR11XXTestServiceApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - W2JRLR11XXTestOne - com.sun.xml.ws.transport.http.servlet.WSServlet - - - W2JRLR11XXTestTwo - com.sun.xml.ws.transport.http.servlet.WSServlet - - - W2JRLR11XXTestOne - /jaxws/W2JRLR11XXTestOne - - - W2JRLR11XXTestTwo - /jaxws/W2JRLR11XXTestTwo - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/Client.java deleted file mode 100644 index 5f0f1c2fac..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/Client.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2009; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import java.math.BigInteger; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String NUMBER = "2009"; - - /** - * The integer to be echoed. - */ - private static final BigInteger BIGINTEGER = new BigInteger(NUMBER); - - /** - * The client. - */ - private W2JRLR2009Client client; - - static W2JRLR2009TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR2009Client) ClientFactory.getClient(W2JRLR2009Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testBOMUTF16Schema - * - * @assertion_ids: WSI:SPEC:R2009 - * - * @test_Strategy: The supplied WSDL, imports an XML Schema that uses UTF-16 - * encoding (which contains a BOM) which has been used by the - * WSDL-to-Java tool to generate an end point. If the tool - * works correctly, the end-point has been built and deployed, - * so it should simply be reachable. - * - * @throws Fault - */ - public void testBOMUTF16Schema() throws Fault { - BigInteger result; - try { - result = client.echoIncludedUTF16IntegerTest(BIGINTEGER); - } catch (Exception e) { - throw new Fault( - "Unable to invoke echoIncludedUTF16IntegerTest operation (BP-R2009)", - e); - } - if (!BIGINTEGER.equals(result)) { - throw new Fault("echoIncludedUTF16IntegerTest operation returns '" - + result + "' in stead of '" + BIGINTEGER + "' (BP-R2009)"); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009Client.java deleted file mode 100644 index 170ef5fb1b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009Client.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2009; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -import java.math.BigInteger; - -public class W2JRLR2009Client extends SOAPClient { - public W2JRLR2009Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2009Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2009testservice.org/W2JRLR2009TestService.wsdl"); - stubContext.setService("W2JRLR2009TestService"); - stubContext.setPort("W2JRLR2009TestPort"); - stubContext.setEndpointInterface(W2JRLR2009Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2009.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2009.wsdlloc.1"; - } - - public BigInteger echoIncludedUTF16IntegerTest(BigInteger bi) - throws Exception { - IncludedUTF16IntegerRequest irq = new IncludedUTF16IntegerRequest(); - irq.setBigInteger(bi); - IncludedUTF16IntegerResponse irp = ((W2JRLR2009Test) stubContext.getStub()) - .echoIncludedUTF16IntegerTest(irq); - return irp.getBigInteger(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009ImportUTF16.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009ImportUTF16.txt deleted file mode 100644 index 1973306f29..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009ImportUTF16.txt +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009ImportUTF16.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009ImportUTF16.xsd deleted file mode 100644 index 245345ab28..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009ImportUTF16.xsd and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009TestImpl.java deleted file mode 100644 index 25b7a726a5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009TestImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2009; - -import com.sun.ts.lib.util.*; -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2009TestPort", serviceName = "W2JRLR2009TestService", targetNamespace = "http://w2jrlr2009testservice.org/W2JRLR2009TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2009TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2009.W2JRLR2009Test") - -public class W2JRLR2009TestImpl implements W2JRLR2009Test { - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2009.IncludedUTF16IntegerResponse echoIncludedUTF16IntegerTest( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2009.IncludedUTF16IntegerRequest params) { - TestUtil.logTrace("UTF-16 test"); - TestUtil.logMsg("value=" + params.getBigInteger()); - IncludedUTF16IntegerResponse r = new IncludedUTF16IntegerResponse(); - r.setBigInteger(params.getBigInteger()); - return r; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009TestService.wsdl deleted file mode 100644 index 70e37dc947..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/W2JRLR2009TestService.wsdl +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/build.xml deleted file mode 100644 index 7f6417ceb2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/build.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/customfile.xml deleted file mode 100644 index 2d415a1b1b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/customfile.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/customfile2.xml deleted file mode 100644 index 452bdc13ad..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/jakartaEE.tokens deleted file mode 100644 index 421b636602..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2009TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2009.W2JRLR2009TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2009.W2JRLR2009TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2009.W2JRLR2009Test -NAMESPACEURI=http://w2jrlr2009testservice.org/W2JRLR2009TestService.wsdl -PORT=W2JRLR2009TestPort -URLALIAS=/jaxws/W2JRLR2009Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2009.W2JRLR2009TestImpl -WEBSERVICEDESCRIPTION=W2JRLR2009TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2009TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2009TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2009TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/standalone-sun-jaxws.xml deleted file mode 100644 index e71bf80a5e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/standalone.web.xml deleted file mode 100644 index 2b62158294..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2009/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2009TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2009Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2009Test -/jaxws/W2JRLR2009Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/Client.java deleted file mode 100644 index 1586b230e1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/Client.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import java.math.BigInteger; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String R = "R"; - - private static final String NUMBER = "2010"; - - private static final String STRING = R + NUMBER; - - /** - * The integer to be echoed. - */ - private static final BigInteger BIGINTEGER = new BigInteger(NUMBER); - - /** - * The client. - */ - private W2JRLR2010Client client; - - static W2JRLR2010TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR2010Client) ClientFactory.getClient(W2JRLR2010Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testImportDirectlyUTF8Schema - * - * @assertion_ids: WSI:SPEC:R2010 - * - * @test_Strategy: The supplied WSDL, directly imports an XML Schema that uses - * UTF-8 encoding which has been used by the WSDL-to-Java tool - * to generate an end point. If the tool works correctly, the - * end-point has been built and deployed, so it should simply - * be reachable. - * - * @throws Fault - */ - public void testImportDirectlyUTF8Schema() throws Fault { - String result; - try { - result = client.echoImportDirectlyUTF8Test(STRING); - } catch (Exception e) { - throw new Fault( - "Unable to invoke echoImportDirectlyUTF8Test operation (BP-R2010)", - e); - } - if (!STRING.equals(result)) { - throw new Fault("echoImportDirectlyUTF8Test operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R2010)"); - } - } - - /** - * @testName: testImportDirectlyUTF16Schema - * - * @assertion_ids: WSI:SPEC:R2010 - * - * @test_Strategy: The supplied WSDL, directly imports an XML Schema that uses - * UTF-16 encoding which has been used by the WSDL-to-Java - * tool to generate an end point. If the tool works correctly, - * the end-point has been built and deployed, so it should - * simply be reachable. - * - * @throws Fault - */ - public void testImportDirectlyUTF16Schema() throws Fault { - BigInteger result; - try { - result = client.echoImportDirectlyUTF16Test(BIGINTEGER); - } catch (Exception e) { - throw new Fault( - "Unable to invoke echoImportDirectlyUTF16Test operation (BP-R2010)", - e); - } - if (!BIGINTEGER.equals(result)) { - throw new Fault("echoImportDirectlyUTF16Test operation returns '" + result - + "' in stead of '" + BIGINTEGER + "' (BP-R2010)"); - } - } - - /** - * @testName: testImportIndirectlyUTF8Schema - * - * @assertion_ids: WSI:SPEC:R2010 - * - * @test_Strategy: The supplied WSDL, directly imports an XML Schema that uses - * UTF-8 encoding which has been used by the WSDL-to-Java tool - * to generate an end point. If the tool works correctly, the - * end-point has been built and deployed, so it should simply - * be reachable. - * - * @throws Fault - */ - public void testImportIndirectlyUTF8Schema() throws Fault { - String result; - try { - result = client.echoImportIndirectlyUTF8Test(STRING); - } catch (Exception e) { - throw new Fault( - "Unable to invoke echoImportIndirectlyUTF8Test operation (BP-R2010)", - e); - } - if (!STRING.equals(result)) { - throw new Fault("echoImportIndirectlyUTF8Test operation returns '" - + result + "' in stead of '" + STRING + "' (BP-R2010)"); - } - } - - /** - * @testName: testImportIndirectlyUTF16Schema - * - * @assertion_ids: WSI:SPEC:R2010 - * - * @test_Strategy: The supplied WSDL, directly imports an XML Schema that uses - * UTF-16 encoding which has been used by the WSDL-to-Java - * tool to generate an end point. If the tool works correctly, - * the end-point has been built and deployed, so it should - * simply be reachable. - * - * @throws Fault - */ - public void testImportIndirectlyUTF16Schema() throws Fault { - BigInteger result; - try { - result = client.echoImportIndirectlyUTF16Test(BIGINTEGER); - } catch (Exception e) { - throw new Fault( - "Unable to invoke echoImportIndirectlyUTF16Test operation (BP-R2010)", - e); - } - if (!BIGINTEGER.equals(result)) { - throw new Fault("echoImportIndirectlyUTF16Test operation returns '" - + result + "' in stead of '" + BIGINTEGER + "' (BP-R2010)"); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010Client.java deleted file mode 100644 index adbecc81a3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010Client.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -import java.math.BigInteger; - -public class W2JRLR2010Client extends SOAPClient { - public W2JRLR2010Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2010Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2010testservice.org/W2JRLR2010TestService.wsdl"); - stubContext.setService("W2JRLR2010TestService"); - stubContext.setPort("W2JRLR2010TestPort"); - stubContext.setEndpointInterface(W2JRLR2010Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2010.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2010.wsdlloc.1"; - } - - public String echoImportDirectlyUTF8Test(String str) throws Exception { - ImportDirectlyUTF8Request srq = new ImportDirectlyUTF8Request(); - srq.setStringValue(str); - ImportDirectlyUTF8Response srp = ((W2JRLR2010Test) stubContext.getStub()) - .echoImportDirectlyUTF8Test(srq); - return srp.getStringValue(); - } - - public BigInteger echoImportDirectlyUTF16Test(BigInteger bi) - throws Exception { - ImportDirectlyUTF16Request irq = new ImportDirectlyUTF16Request(); - irq.setBigInteger(bi); - ImportDirectlyUTF16Response irp = ((W2JRLR2010Test) stubContext.getStub()) - .echoImportDirectlyUTF16Test(irq); - return irp.getBigInteger(); - } - - public String echoImportIndirectlyUTF8Test(String str) throws Exception { - ImportIndirectlyUTF8Request srq = new ImportIndirectlyUTF8Request(); - srq.setStringValue(str); - ImportIndirectlyUTF8Response srp = ((W2JRLR2010Test) stubContext.getStub()) - .echoImportIndirectlyUTF8Test(srq); - return srp.getStringValue(); - } - - public BigInteger echoImportIndirectlyUTF16Test(BigInteger bi) - throws Exception { - ImportIndirectlyUTF16Request irq = new ImportIndirectlyUTF16Request(); - irq.setBigInteger(bi); - ImportIndirectlyUTF16Response irp = ((W2JRLR2010Test) stubContext.getStub()) - .echoImportIndirectlyUTF16Test(irq); - return irp.getBigInteger(); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportDirectlyUTF16.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportDirectlyUTF16.txt deleted file mode 100644 index 2997df9e53..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportDirectlyUTF16.txt +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportDirectlyUTF16.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportDirectlyUTF16.xsd deleted file mode 100644 index c9a7c12a98..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportDirectlyUTF16.xsd and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportDirectlyUTF8.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportDirectlyUTF8.txt deleted file mode 100644 index 427a9a0603..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportDirectlyUTF8.txt +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportDirectlyUTF8.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportDirectlyUTF8.xsd deleted file mode 100644 index 427a9a0603..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportDirectlyUTF8.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectly.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectly.wsdl deleted file mode 100644 index fce5808dd0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectly.wsdl +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectlyUTF16.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectlyUTF16.txt deleted file mode 100644 index 876605e405..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectlyUTF16.txt +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectlyUTF16.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectlyUTF16.xsd deleted file mode 100644 index 2f90789997..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectlyUTF16.xsd and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectlyUTF8.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectlyUTF8.txt deleted file mode 100644 index fffa6beabc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectlyUTF8.txt +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectlyUTF8.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectlyUTF8.xsd deleted file mode 100644 index fffa6beabc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010ImportIndirectlyUTF8.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010TestImpl.java deleted file mode 100644 index 8bfd164ce9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010TestImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010; - -import com.sun.ts.lib.util.*; -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2010TestPort", serviceName = "W2JRLR2010TestService", targetNamespace = "http://w2jrlr2010testservice.org/W2JRLR2010TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2010TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.W2JRLR2010Test") - -public class W2JRLR2010TestImpl implements W2JRLR2010Test { - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.ImportDirectlyUTF8Response echoImportDirectlyUTF8Test( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.ImportDirectlyUTF8Request params) { - TestUtil.logTrace("UTF-8 test"); - TestUtil.logMsg("value=" + params.getStringValue()); - ImportDirectlyUTF8Response r = new ImportDirectlyUTF8Response(); - r.setStringValue(params.getStringValue()); - return r; - } - - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.ImportDirectlyUTF16Response echoImportDirectlyUTF16Test( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.ImportDirectlyUTF16Request params) { - TestUtil.logTrace("UTF-16 test"); - TestUtil.logMsg("value=" + params.getBigInteger()); - ImportDirectlyUTF16Response r = new ImportDirectlyUTF16Response(); - r.setBigInteger(params.getBigInteger()); - return r; - } - - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.ImportIndirectlyUTF8Response echoImportIndirectlyUTF8Test( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.ImportIndirectlyUTF8Request params) { - TestUtil.logTrace("UTF-8 test"); - TestUtil.logMsg("value=" + params.getStringValue()); - ImportIndirectlyUTF8Response r = new ImportIndirectlyUTF8Response(); - r.setStringValue(params.getStringValue()); - return r; - } - - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.ImportIndirectlyUTF16Response echoImportIndirectlyUTF16Test( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.ImportIndirectlyUTF16Request params) { - TestUtil.logTrace("UTF-16 test"); - TestUtil.logMsg("value=" + params.getBigInteger()); - ImportIndirectlyUTF16Response r = new ImportIndirectlyUTF16Response(); - r.setBigInteger(params.getBigInteger()); - return r; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010TestService.wsdl deleted file mode 100644 index fc50644fbf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/W2JRLR2010TestService.wsdl +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - Documentation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/build.xml deleted file mode 100644 index f438eb68c0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/build.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/customfile.xml deleted file mode 100644 index 57ab930f78..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/customfile.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/customfile2.xml deleted file mode 100644 index ba30cbf709..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/customfile2.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/jakartaEE.tokens deleted file mode 100644 index 0d85d4d676..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2010TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.W2JRLR2010TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.W2JRLR2010TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.W2JRLR2010Test -NAMESPACEURI=http://w2jrlr2010testservice.org/W2JRLR2010TestService.wsdl -PORT=W2JRLR2010TestPort -URLALIAS=/jaxws/W2JRLR2010Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2010.W2JRLR2010TestImpl -WEBSERVICEDESCRIPTION=W2JRLR2010TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2010TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2010TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2010TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/standalone-sun-jaxws.xml deleted file mode 100644 index 1a540cf22e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/standalone.web.xml deleted file mode 100644 index 882c8001e7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2010/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2010TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2010Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2010Test -/jaxws/W2JRLR2010Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/Client.java deleted file mode 100644 index 6fdd036ad9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/Client.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2011; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String R = "R"; - - private static final String NUMBER = "2011"; - - private static final String STRING = R + NUMBER; - - /** - * The client. - */ - private W2JRLR2011Client client; - - static W2JRLR2011TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR2011Client) ClientFactory.getClient(W2JRLR2011Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testVersionImportDirectlySchema - * - * @assertion_ids: WSI:SPEC:R2011 - * - * @test_Strategy: The supplied WSDL, directly imports an XML Schema that uses - * a version of 1.0 which has been used by the WSDL-to-Java - * tool to generate an end point. If the tool works correctly, - * the end-point has been built and deployed, so it should - * simply be reachable. - * - * @throws Fault - */ - public void testVersionImportDirectlySchema() throws Fault { - String result; - try { - result = client.echoImportDirectlyStringTest(STRING); - } catch (Exception e) { - throw new Fault( - "Unable to invoke echoImportDirectlyStringTest operation (BP-R2011)", - e); - } - if (!STRING.equals(result)) { - throw new Fault("echoImportDirectlyStringTest operation returns '" - + result + "' in stead of '" + STRING + "' (BP-R2011)"); - } - } - - /** - * @testName: testVersionImportIndirectlySchema - * - * @assertion_ids: WSI:SPEC:R2011 - * - * @test_Strategy: The supplied WSDL, indirectly imports an XML Schema that - * uses a version of 1.0 which has been used by the - * WSDL-to-Java tool to generate an end point. If the tool - * works correctly, the end-point has been built and deployed, - * so it should simply be reachable. - * - * @throws Fault - */ - public void testVersionImportIndirectlySchema() throws Fault { - String result; - try { - result = client.echoImportIndirectlyStringTest(STRING); - } catch (Exception e) { - throw new Fault( - "Unable to invoke echoImportIndirectlyStringTest operation (BP-R2011)", - e); - } - if (!STRING.equals(result)) { - throw new Fault("echoImportIndirectlyStringTest operation returns '" - + result + "' in stead of '" + STRING + "' (BP-R2011)"); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011Client.java deleted file mode 100644 index e787624ebd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011Client.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2011; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2011Client extends SOAPClient { - public W2JRLR2011Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2011Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2011testservice.org/W2JRLR2011TestService.wsdl"); - stubContext.setService("W2JRLR2011TestService"); - stubContext.setPort("W2JRLR2011TestPort"); - stubContext.setEndpointInterface(W2JRLR2011Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2011.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2011.wsdlloc.1"; - } - - public String echoImportDirectlyStringTest(String str) throws Exception { - ImportDirectlyStringRequest srq = new ImportDirectlyStringRequest(); - srq.setStringValue(str); - ImportDirectlyStringResponse srp = ((W2JRLR2011Test) stubContext.getStub()) - .echoImportDirectlyStringTest(srq); - return srp.getStringValue(); - } - - public String echoImportIndirectlyStringTest(String str) throws Exception { - ImportIndirectlyStringRequest srq = new ImportIndirectlyStringRequest(); - srq.setStringValue(str); - ImportIndirectlyStringResponse srp = ((W2JRLR2011Test) stubContext - .getStub()).echoImportIndirectlyStringTest(srq); - return srp.getStringValue(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011ImportDirectly.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011ImportDirectly.xsd deleted file mode 100644 index 79f3760437..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011ImportDirectly.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011ImportIndirectly.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011ImportIndirectly.wsdl deleted file mode 100644 index 0ec307e374..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011ImportIndirectly.wsdl +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011ImportIndirectly.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011ImportIndirectly.xsd deleted file mode 100644 index c7c8ee2d1c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011ImportIndirectly.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011TestImpl.java deleted file mode 100644 index 748aa814c9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011TestImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2011; - -import com.sun.ts.lib.util.*; -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2011TestPort", serviceName = "W2JRLR2011TestService", targetNamespace = "http://w2jrlr2011testservice.org/W2JRLR2011TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2011TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2011.W2JRLR2011Test") - -public class W2JRLR2011TestImpl implements W2JRLR2011Test { - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2011.ImportDirectlyStringResponse echoImportDirectlyStringTest( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2011.ImportDirectlyStringRequest params) { - TestUtil.logMsg("value=" + params.getStringValue()); - ImportDirectlyStringResponse r = new ImportDirectlyStringResponse(); - r.setStringValue(params.getStringValue()); - return r; - } - - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2011.ImportIndirectlyStringResponse echoImportIndirectlyStringTest( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2011.ImportIndirectlyStringRequest params) { - TestUtil.logMsg("value=" + params.getStringValue()); - ImportIndirectlyStringResponse r = new ImportIndirectlyStringResponse(); - r.setStringValue(params.getStringValue()); - return r; - - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011TestService.wsdl deleted file mode 100644 index 90cd4b3b87..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/W2JRLR2011TestService.wsdl +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - Documentation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/build.xml deleted file mode 100644 index 398743bb3f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/customfile.xml deleted file mode 100644 index c57ec611fb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/customfile.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/customfile2.xml deleted file mode 100644 index 297eb05423..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/customfile2.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/jakartaEE.tokens deleted file mode 100644 index 6ce0916d6b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2011TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2011.W2JRLR2011TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2011.W2JRLR2011TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2011.W2JRLR2011Test -NAMESPACEURI=http://w2jrlr2011testservice.org/W2JRLR2011TestService.wsdl -PORT=W2JRLR2011TestPort -URLALIAS=/jaxws/W2JRLR2011Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2011.W2JRLR2011TestImpl -WEBSERVICEDESCRIPTION=W2JRLR2011TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2011TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2011TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2011TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/standalone-sun-jaxws.xml deleted file mode 100644 index f577c02e3a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/standalone.web.xml deleted file mode 100644 index f8f12753a3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2011/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2011TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2011Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2011Test -/jaxws/W2JRLR2011Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/Client.java deleted file mode 100644 index fa37ec8b1e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/Client.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2030; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String STRING = "R2030"; - - /** - * The client. - */ - private W2JRLR2030Client client; - - static W2JRLR2030TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR2030Client) ClientFactory.getClient(W2JRLR2030Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testRpcLiteralDocumentationElement - * - * @assertion_ids: WSI:SPEC:R2030 - * - * @test_Strategy: The supplied WSDL, containing a wsdl:documentation element - * as a child of the wsdl:import element, containing a - * wsdl:documentation element as a child of the wsdl:part - * element, and containing a wsdl:documentation element as a - * child of the wsdl:definitions element, has been used by the - * WSDL-to-Java tool to generate an end point. If the tool - * works correctly, the end-point has been built and deployed - * so it should simply be reachable. - * - * @throws Fault - */ - public void testRpcLiteralDocumentationElement() throws Fault { - String result; - try { - result = client.echoString(STRING); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2030)", e); - } - if (!STRING.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R2030)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030Client.java deleted file mode 100644 index 85b1c297b9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030Client.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2030; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2030Client extends SOAPClient { - public W2JRLR2030Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2030Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2030testservice.org/W2JRLR2030TestService.wsdl"); - stubContext.setService("W2JRLR2030TestService"); - stubContext.setPort("W2JRLR2030TestPort"); - stubContext.setEndpointInterface(W2JRLR2030Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2030.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2030.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR2030Test) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030Import.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030Import.wsdl deleted file mode 100644 index f086d30cbc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030Import.wsdl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - Documentation. - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030TestImpl.java deleted file mode 100644 index 2295a977d5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030TestImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2030; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2030TestPort", serviceName = "W2JRLR2030TestService", targetNamespace = "http://w2jrlr2030testservice.org/W2JRLR2030TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2030TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2030.W2JRLR2030Test") - -public class W2JRLR2030TestImpl implements W2JRLR2030Test { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030TestService.wsdl deleted file mode 100644 index 13d87f3a59..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/W2JRLR2030TestService.wsdl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - Documentation. - - - - - - - - - - - - - - - - - - - Documentation. - - - - - - - Documentation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/build.xml deleted file mode 100644 index 85b34843e6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/build.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/customfile.xml deleted file mode 100644 index ddca94795a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/jakartaEE.tokens deleted file mode 100644 index 01e9cfb34a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2030TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2030.W2JRLR2030TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2030.W2JRLR2030TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2030.W2JRLR2030Test -NAMESPACEURI=http://w2jrlr2030testservice.org/W2JRLR2030TestService.wsdl -PORT=W2JRLR2030TestPort -URLALIAS=/jaxws/W2JRLR2030Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2030.W2JRLR2030TestImpl -WEBSERVICEDESCRIPTION=W2JRLR2030TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2030TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2030TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2030TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/standalone-sun-jaxws.xml deleted file mode 100644 index bf8f56c83b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/standalone.web.xml deleted file mode 100644 index 53a95f50ec..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2030/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2030TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2030Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2030Test -/jaxws/W2JRLR2030Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2105/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2105/Client.java deleted file mode 100644 index fbaded8b6a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2105/Client.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2105; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Properties; - -import org.w3c.dom.*; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.tests.jaxws.sharedclients.rpclitclient.*; -import com.sun.ts.tests.jaxws.wsi.constants.DescriptionConstants; -import com.sun.ts.tests.jaxws.wsi.constants.SchemaConstants; -import com.sun.ts.tests.jaxws.wsi.utils.DescriptionUtils; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements DescriptionConstants, SchemaConstants { - /** - * The client. - */ - private SOAPClient client; - - private String dstr, dstr2; - - static J2WRLShared service = null; - - /** - * Test entry point. - * - * @param args - * the command-lind arguments. - */ - public static void main(String[] args) { - Client test = new Client(); - Status status = test.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = ClientFactory.getClient(J2WRLSharedClient.class, properties, this, - service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSchemaTargetNamespace - * - * @assertion_ids: WSI:SPEC:R2105 - * - * @test_Strategy: Retrieve the WSDL, generated by the Java-to-WSDL tool, and - * examine all wsdl:types xsd:schema elements and ensure that - * they have a valid, non-null targetNamespace attribute, - * unless the xsd:schema element has xsd:import and/or - * xsd:annotation as its only child element(s). - * - * - * @throws Fault - */ - public void testSchemaTargetNamespace() throws Fault { - Document document = client.getDocument(); - Element types = DescriptionUtils.getTypes(document); - Element[] schemas = DescriptionUtils.getChildElements(types, - XSD_NAMESPACE_URI, XSD_SCHEMA_LOCAL_NAME); - logMsg("Number of schema elements=" + schemas.length); - for (int i = 0; i < schemas.length; i++) { - dstr = null; - dstr2 = "schema[" + i + "] elements are: "; - verifySchemaTargetNamespace(schemas[i]); - } - } - - protected void verifySchemaTargetNamespace(Element element) throws Fault { - Attr attribute = element.getAttributeNode(XSD_TARGETNAMESPACE_ATTR); - if (!containsOnlyImportOrAnnotation(element)) { - if (attribute == null) { - throw new Fault( - "xsd:schema element encountered with no 'targetNamespace' attribute (BP-R2105)"); - } - String targetNamespace = attribute.getValue(); - try { - URL url = new URL(targetNamespace); - } catch (MalformedURLException e) { - throw new Fault("The targetNamespace '" + targetNamespace - + "' is not valid (CP-R2105)", e); - } - } - } - - protected boolean containsOnlyImportOrAnnotation(Element element) { - boolean result = true; - NodeList list = element.getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - Node node = list.item(i); - if (node.getNodeType() == Node.ELEMENT_NODE) { - Element child = (Element) node; - String tagName = child.getTagName(); - int ind = tagName.indexOf(':'); - if (ind != -1) - tagName = tagName.substring(ind + 1); - if (dstr == null) - dstr = tagName; - else - dstr = dstr + ", " + tagName; - if (!tagName.equals(XSD_IMPORT_LOCAL_NAME) - && !tagName.equals(XSD_ANNOTATION_LOCAL_NAME)) { - result = false; - } - } - } - logMsg(dstr2 + dstr); - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2105/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2105/build.xml deleted file mode 100644 index 40f075c2f9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2105/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2105/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2105/jakartaEE.tokens deleted file mode 100644 index 2bcd0ba35a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2105/jakartaEE.tokens +++ /dev/null @@ -1,7 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsj2wrlshared") -SERVICE=com.sun.ts.tests.jaxws.sharedclients.rpclitclient.J2WRLShared -URLALIAS=/jaxws/J2WRLShared -WEBSERVICEDESCRIPTION=J2WRLShared -SERVICEREFNAMEWSSERVLET=service/wsj2wrlshared -SERVICEREFNAMEWSEJB=service/wsj2wrlshared -SERVICEREFNAMEWSAPPCLIENT=service/wsj2wrlshared diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/Client.java deleted file mode 100644 index aeb17f7ce5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/Client.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2113; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.utils.SOAPUtils; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.Name; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends ServiceEETest implements SOAPRequests { - - private W2JRLR2113Client client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (W2JRLR2113Client) ClientFactory.getClient(W2JRLR2113Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testNoArrayTypeInResponse - * - * @assertion_ids: WSI:SPEC:R2113 - * - * @test_Strategy: Make a request and inspect response to ensure - * soap-enc:arrayType attribute is not included. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testNoArrayTypeInResponse() throws EETest.Fault { - SOAPMessage response = null; - try { - response = client.makeSaajRequest(ARRAY_OPERATION); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateNoArrayType(response); - } catch (SOAPException se) { - throw new EETest.Fault("Error creating response object", se); - } - client.logMessageInHarness(response); - } - - /** - * @testName: testNoArrayTypeInRequest - * - * @assertion_ids: WSI:SPEC:R2113 - * - * @test_Strategy: Make a request and inspect response to ensure - * soap-enc:arrayType attribute is not included. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testNoArrayTypeInRequest() throws EETest.Fault { - String response = ""; - try { - response = client - .arrayOperationFromClient(new String[] { "one", "two", "three" }); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - if (response.startsWith("failed")) { - throw new EETest.Fault(response); - } - } - - private void validateNoArrayType(SOAPMessage response) - throws EETest.Fault, SOAPException { - String prefix = getSOAPEncodingNamespacePrefix( - response.getSOAPPart().getEnvelope().getBody()); - if (prefix == null) { - prefix = getSOAPEncodingNamespacePrefix( - response.getSOAPPart().getEnvelope()); - } - if (prefix != null) { - Name soapEncArrayType = response.getSOAPPart().getEnvelope() - .createName("arrayType", prefix, SOAPUtils.URI_NS_SOAP_ENCODING); - String soapEncArrayTypeValue = response.getSOAPPart().getEnvelope() - .getBody().getAttributeValue(soapEncArrayType); - if (soapEncArrayTypeValue == null || soapEncArrayTypeValue.equals("")) { - soapEncArrayTypeValue = response.getSOAPPart().getEnvelope() - .getAttributeValue(soapEncArrayType); - } - if (!(soapEncArrayTypeValue == null - || soapEncArrayTypeValue.equals(""))) { - client.logMessageInHarness(response); - throw new EETest.Fault( - "Invalid element: messages may not use a soapEnc:arrayType attribute (BP-R2113)"); - } - } - } - - private String getSOAPEncodingNamespacePrefix(SOAPElement element) { - Iterator attributes = element.getNamespacePrefixes(); - String prefix = null; - boolean done = false; - while (attributes.hasNext() && !done) { - prefix = (String) attributes.next(); - if (element.getNamespaceURI(prefix) - .equals(SOAPUtils.URI_NS_SOAP_ENCODING)) { - done = true; - } - } - return prefix; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/R2113ConformanceChecker.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/R2113ConformanceChecker.java deleted file mode 100644 index e6093e0df7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/R2113ConformanceChecker.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2113; - -import com.sun.ts.tests.jaxws.common.RequestConformanceChecker; - -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.*; -import java.util.Iterator; - -public class R2113ConformanceChecker extends RequestConformanceChecker { - - public void test(SOAPMessageContext context) throws SOAPException { - test(context.getMessage().getSOAPPart().getEnvelope()); - } - - private void test(SOAPElement elem) { - boolean fails = false; - fails = hasSoapEncArrayTypeAttr(elem); - if (!fails) { - Iterator children = elem.getChildElements(); - while (children.hasNext()) { - Node n = (Node) children.next(); - if (n instanceof SOAPElement) { - test((SOAPElement) n); - } - } - } else { - response = "failed. Cannot use soapenc:arrayType attribute."; - } - } - - private boolean hasSoapEncArrayTypeAttr(SOAPElement elem) { - Iterator attrs = elem.getAllAttributes(); - Name name; - String uri; - while (attrs.hasNext()) { - name = (Name) attrs.next(); - uri = name.getURI(); - if (uri == null) { - uri = ""; - } - if (name.getLocalName().equals(SOAP_ENC_ARRAY_TYPE) - && uri.equals(SOAP_ENV_NS)) { - return true; - } - } - return false; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/SimpleEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/SimpleEndpointImpl.java deleted file mode 100644 index bac65bc8ed..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/SimpleEndpointImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)SimpleEndpointImpl.java 1.2 04/11/17 - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2113; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "SimpleEndpointPort", serviceName = "SimpleTest", targetNamespace = "http://simpletestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2113TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2113.SimpleEndpoint") - -public class SimpleEndpointImpl implements SimpleEndpoint { - public String helloWorld() { - return "hello world"; - } - - public StringArray arrayOperation() { - StringArray sa = new StringArray(); - sa.getString().add("one"); - sa.getString().add("two"); - sa.getString().add("three"); - return sa; - } - - public String arrayOperationFromClient(StringArray array) { - return "success"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/W2JRLR2113Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/W2JRLR2113Client.java deleted file mode 100644 index 186ebfaa63..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/W2JRLR2113Client.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2113; - -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.lib.harness.EETest; - -public class W2JRLR2113Client extends SOAPClient { - public W2JRLR2113Client(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR2113Client(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://simpletestservice.org/wsdl"); - stubContext.setService("SimpleTest"); - stubContext.setPort("SimpleEndpointPort"); - stubContext.setEndpointInterface(SimpleEndpoint.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2113.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2113.wsdlloc.1"; - } - - public String helloWorld() throws Exception { - return ((SimpleEndpoint) stubContext.getStub()).helloWorld(); - } - - public String arrayOperationFromClient(String[] array) throws Exception { - StringArray sa = new StringArray(); - for (int i = 0; i < array.length; i++) { - sa.getString().add(array[i]); - } - return ((SimpleEndpoint) stubContext.getStub()) - .arrayOperationFromClient(sa); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/W2JRLR2113TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/W2JRLR2113TestService.wsdl deleted file mode 100644 index d6dff9204c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/W2JRLR2113TestService.wsdl +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/build.xml deleted file mode 100644 index 69ee66e127..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/build.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/customfile-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/customfile-client.xml deleted file mode 100644 index c366f7d6bf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/customfile-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/customfile-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/customfile-server.xml deleted file mode 100644 index 41465358b7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/customfile-server.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - R2113ConformanceChecker - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2113.R2113ConformanceChecker - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/jakartaEE.tokens deleted file mode 100644 index 8746d7663f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2113TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2113.SimpleTest -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2113.SimpleEndpointImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2113.SimpleEndpoint -NAMESPACEURI=http://w2jrlr2113testservice.org/W2JRLR2113TestService.wsdl -PORT=SimpleEndpointPort -URLALIAS=/jaxws/SimpleTest -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2113.SimpleEndpointImpl -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2113TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2113TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2113TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/standalone-sun-jaxws.xml deleted file mode 100644 index e6d93bd5a9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/standalone.web.xml deleted file mode 100644 index ddb7549883..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2113/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2113TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -SimpleTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -SimpleTest -/jaxws/SimpleTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/Client.java deleted file mode 100644 index e471a62356..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/Client.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2114; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String STRING = "R2114"; - - /** - * The client. - */ - private W2JRLR2114Client client; - - static W2JRLR2114TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR2114Client) ClientFactory.getClient(W2JRLR2114Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSameWSDLSchemaNameSpace - * - * @assertion_ids: WSI:SPEC:R2114 - * - * @test_Strategy: The supplied WSDL, imports an XML Schema that uses the same - * target namespace as the wsdl which has been used by the - * WSDL-to-Java tool to generate an end point. If the tool - * works correctly, the end-point has been built and deployed, - * so it should simply be reachable. - * - * @throws Fault - */ - public void testSameWSDLSchemaNameSpace() throws Fault { - String result; - try { - result = client.echoIncludedStringTest(STRING); - } catch (Exception e) { - throw new Fault( - "Unable to invoke echoIncludedStringTest operation (BP-R2114)", e); - } - if (!STRING.equals(result)) { - throw new Fault("echoIncludedStringTest operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R2114)"); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/W2JRLR2114Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/W2JRLR2114Client.java deleted file mode 100644 index 2efbe1ce3f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/W2JRLR2114Client.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2114; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2114Client extends SOAPClient { - public W2JRLR2114Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2114Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2114testservice.org/W2JRLR2114TestService.wsdl"); - stubContext.setService("W2JRLR2114TestService"); - stubContext.setPort("W2JRLR2114TestPort"); - stubContext.setEndpointInterface(W2JRLR2114Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2114.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2114.wsdlloc.1"; - } - - public String echoIncludedStringTest(String str) throws Exception { - IncludedStringRequest srq = new IncludedStringRequest(); - srq.setStringValue(str); - IncludedStringResponse srp = ((W2JRLR2114Test) stubContext.getStub()) - .echoIncludedStringTest(srq); - return srp.getStringValue(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/W2JRLR2114TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/W2JRLR2114TestImpl.java deleted file mode 100644 index 9a360af759..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/W2JRLR2114TestImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2114; - -import com.sun.ts.lib.util.*; -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2114TestPort", serviceName = "W2JRLR2114TestService", targetNamespace = "http://w2jrlr2114testservice.org/W2JRLR2114TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2114TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2114.W2JRLR2114Test") - -public class W2JRLR2114TestImpl implements W2JRLR2114Test { - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2114.IncludedStringResponse echoIncludedStringTest( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2114.IncludedStringRequest params) { - TestUtil.logTrace("SameTargetNamespace test"); - TestUtil.logMsg("value=" + params.getStringValue()); - IncludedStringResponse r = new IncludedStringResponse(); - r.setStringValue(params.getStringValue()); - return r; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/W2JRLR2114TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/W2JRLR2114TestService.wsdl deleted file mode 100644 index 6d46ddade0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/W2JRLR2114TestService.wsdl +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/build.xml deleted file mode 100644 index f2190917f3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/build.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/customfile.xml deleted file mode 100644 index f40bc307dc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/customfile.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/jakartaEE.tokens deleted file mode 100644 index 6ae429f130..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2114TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2114.W2JRLR2114TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2114.W2JRLR2114TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2114.W2JRLR2114Test -NAMESPACEURI=http://w2jrlr2114testservice.org/W2JRLR2114TestService.wsdl -PORT=W2JRLR2114TestPort -URLALIAS=/jaxws/W2JRLR2114Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2114.W2JRLR2114TestImpl -WEBSERVICEDESCRIPTION=W2JRLR2114TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2114TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2114TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2114TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/standalone-sun-jaxws.xml deleted file mode 100644 index dd6539437c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/standalone.web.xml deleted file mode 100644 index 5aecc4af8f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2114/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2114TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2114Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2114Test -/jaxws/W2JRLR2114Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/Client.java deleted file mode 100644 index 42bd980b4a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/Client.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2706; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String STRING = "R2706"; - - /** - * The header to be echoed. - */ - private static final String HEADER = "MyHeaderTestMessage"; - - /** - * The client. - */ - private W2JRLR2706Client client; - - static W2JRLR2706TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR2706Client) ClientFactory.getClient(W2JRLR2706Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testUseAttribute - * - * @assertion_ids: WSI:SPEC:R2706; WSI:SPEC:R2740; WSI:SPEC:R2741; - * - * @test_Strategy: The supplied WSDL, containg a soap:body, soapbind:fault, - * soapbind:header or soapbind:headerfault element with the - * use="literal" attribute has been used by the WSDL-to-Java - * tool to generate an end point. If the tool works correctly, - * the end-point has been built and deployed so it should - * simply be reachable. - * - * @throws Fault - */ - public void testUseAttribute() throws Fault { - String result; - MyHeader mh = new MyHeader(); - mh.setMessage(HEADER); - try { - result = client.echoString(STRING, mh); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2706)", e); - } - if (!result.equals(HEADER)) { - throw new Fault("echoString operation returned '" + result - + "' instead of '" + HEADER + "' (BP-R2706)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/W2JRLR2706Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/W2JRLR2706Client.java deleted file mode 100644 index b076563d3e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/W2JRLR2706Client.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2706; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2706Client extends SOAPClient { - public W2JRLR2706Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2706Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace("http://w2jrlr2706testservice.org/wsdl"); - stubContext.setService("W2JRLR2706TestService"); - stubContext.setPort("W2JRLR2706TestPort"); - stubContext.setEndpointInterface(W2JRLR2706Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2706.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2706.wsdlloc.1"; - } - - public String echoString(String str, - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2706.MyHeader mh) - throws Exception { - return ((W2JRLR2706Test) stubContext.getStub()).echoString(str, mh); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/W2JRLR2706TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/W2JRLR2706TestImpl.java deleted file mode 100644 index 2baa067c09..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/W2JRLR2706TestImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2706; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2706TestPort", serviceName = "W2JRLR2706TestService", targetNamespace = "http://w2jrlr2706testservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2706TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2706.W2JRLR2706Test") -public class W2JRLR2706TestImpl implements W2JRLR2706Test { - public String echoString(String str, - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2706.MyHeader mh) { - return mh.getMessage(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/W2JRLR2706TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/W2JRLR2706TestService.wsdl deleted file mode 100644 index 8f4f50827d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/W2JRLR2706TestService.wsdl +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - Documentation. - - - - - - - - - - - - - This is the header - - - - - - - - - - - - - This is the fault - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/build.xml deleted file mode 100644 index f4b53387dd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/customfile.xml deleted file mode 100644 index cd93d8cea8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/jakartaEE.tokens deleted file mode 100644 index 1358fced2b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2706TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2706.W2JRLR2706TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2706.W2JRLR2706TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2706.W2JRLR2706Test -NAMESPACEURI=http://w2jrlr2706testservice.org/W2JRLR2706TestService.wsdl -PORT=W2JRLR2706TestPort -URLALIAS=/jaxws/W2JRLR2706Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2706.W2JRLR2706TestImpl -WEBSERVICEDESCRIPTION=W2JRLR2706TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2706TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2706TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2706TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/standalone-sun-jaxws.xml deleted file mode 100644 index d9f9424e80..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/standalone.web.xml deleted file mode 100644 index 8fca327b87..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2706/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2706TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2706Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2706Test -/jaxws/W2JRLR2706Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/Client.java deleted file mode 100644 index 6b40987515..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/Client.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2707; - -import java.util.Properties; - -import com.sun.ts.lib.harness.*; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String STRING = "R2707"; - - /** - * The client. - */ - private W2JRLR2707Client client; - - static W2JRLR2707TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR2707Client) ClientFactory.getClient(W2JRLR2707Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testUseAttributeDefaulting - * - * @assertion_ids: WSI:SPEC:R2707 - * - * @test_Strategy: The supplied WSDL, containg a soap:body, soapbind fault, - * soapbind:header or soapbind:headerfault element without the - * use="literal" attribute has been used by the WSDL-to-Java - * tool to generate an end point. If the tool works correctly, - * the end-point has been built and deployed so it should - * simply be reachable. - * - * @throws Fault - */ - public void testUseAttributeDefaulting() throws Fault { - String result; - try { - result = client.echoString(STRING); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2707)", e); - } - if (!STRING.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R2707)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/W2JRLR2707Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/W2JRLR2707Client.java deleted file mode 100644 index 3f8c78ebc3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/W2JRLR2707Client.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2707; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2707Client extends SOAPClient { - public W2JRLR2707Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2707Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2707testservice.org/W2JRLR2707TestService.wsdl"); - stubContext.setService("W2JRLR2707TestService"); - stubContext.setPort("W2JRLR2707TestPort"); - stubContext.setEndpointInterface(W2JRLR2707Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2707.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2707.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - Header hdr = new Header(); - hdr.setTestName("echoString"); - hdr.setMessage("Testing echoString method call"); - nns = ((W2JRLR2707Test) stubContext.getStub()).echoString(nns, hdr); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/W2JRLR2707TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/W2JRLR2707TestImpl.java deleted file mode 100644 index a121c7f423..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/W2JRLR2707TestImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2707; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2707TestPort", serviceName = "W2JRLR2707TestService", targetNamespace = "http://w2jrlr2707testservice.org/W2JRLR2707TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2707TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2707.W2JRLR2707Test") - -public class W2JRLR2707TestImpl implements W2JRLR2707Test { - public NonNullString echoString(NonNullString str, Header hdr) - throws ServiceFault { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/W2JRLR2707TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/W2JRLR2707TestService.wsdl deleted file mode 100644 index a5a87b8bb5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/W2JRLR2707TestService.wsdl +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - Documentation. - - - - - - - - - - - - - - - - - - - This is the configuration header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/build.xml deleted file mode 100644 index ab5224019e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/customfile.xml deleted file mode 100644 index 1fc0b87d02..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/jakartaEE.tokens deleted file mode 100644 index 3adff85193..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2707TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2707.W2JRLR2707TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2707.W2JRLR2707TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2707.W2JRLR2707Test -NAMESPACEURI=http://w2jrlr2707testservice.org/W2JRLR2707TestService.wsdl -PORT=W2JRLR2707TestPort -URLALIAS=/jaxws/W2JRLR2707Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2707.W2JRLR2707TestImpl -WEBSERVICEDESCRIPTION=W2JRLR2707TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2707TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2707TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2707TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/standalone-sun-jaxws.xml deleted file mode 100644 index 5937b1804d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/standalone.web.xml deleted file mode 100644 index 1f1ade76b6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2707/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2707TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2707Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2707Test -/jaxws/W2JRLR2707Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/Client.java deleted file mode 100644 index aaeb46d640..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/Client.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2709; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String STRING = "R2709"; - - /** - * The client. - */ - private W2JRLR2709Client client; - - static W2JRLR2709TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR2709Client) ClientFactory.getClient(W2JRLR2709Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testPortTypeReferences - * - * @assertion_ids: WSI:SPEC:R2709 - * - * @test_Strategy: The supplied WSDL, containg a set of port types, referred - * to by zero, one and two bindings respectively, has been - * used by the WSDL-to-Java tool to generate an end point. If - * the tool works correctly, the end-point has been built and - * deployed so it should simply be reachable. - * - * @throws Fault - */ - public void testPortTypeReferences() throws Fault { - String result; - try { - result = client.echoString(STRING); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2709)", e); - } - if (!STRING.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R2709)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/W2JRLR2709Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/W2JRLR2709Client.java deleted file mode 100644 index ef983d907e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/W2JRLR2709Client.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2709; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2709Client extends SOAPClient { - public W2JRLR2709Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2709Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2709testservice.org/W2JRLR2709TestService.wsdl"); - stubContext.setService("W2JRLR2709TestService"); - stubContext.setPort("W2JRLR2709TestPort"); - stubContext.setEndpointInterface(W2JRLR2709Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2709.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2709.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR2709Test) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/W2JRLR2709TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/W2JRLR2709TestImpl.java deleted file mode 100644 index cd7efa24cb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/W2JRLR2709TestImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2709; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2709TestPort", serviceName = "W2JRLR2709TestService", targetNamespace = "http://w2jrlr2709testservice.org/W2JRLR2709TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2709TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2709.W2JRLR2709Test") - -public class W2JRLR2709TestImpl implements W2JRLR2709Test { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/W2JRLR2709TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/W2JRLR2709TestService.wsdl deleted file mode 100644 index 7434ad2a57..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/W2JRLR2709TestService.wsdl +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - Documentation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/build.xml deleted file mode 100644 index 95f265c0d6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/customfile.xml deleted file mode 100644 index 8ee6976f71..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/jakartaEE.tokens deleted file mode 100644 index c331db1e62..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2709TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2709.W2JRLR2709TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2709.W2JRLR2709TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2709.W2JRLR2709Test -NAMESPACEURI=http://w2jrlr2709testservice.org/W2JRLR2709TestService.wsdl -PORT=W2JRLR2709TestPort -URLALIAS=/jaxws/W2JRLR2709Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2709.W2JRLR2709TestImpl -WEBSERVICEDESCRIPTION=W2JRLR2709TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2709TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2709TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2709TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/standalone-sun-jaxws.xml deleted file mode 100644 index 86145d087a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/standalone.web.xml deleted file mode 100644 index 6b43592ae4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2709/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2709TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2709Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2709Test -/jaxws/W2JRLR2709Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/Client.java deleted file mode 100644 index 44fa50e361..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/Client.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2714; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.constants.WSIConstants; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; - -public class Client extends ServiceEETest - implements WSIConstants, SOAPRequests { - - private W2JRLR2714Client client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (W2JRLR2714Client) ClientFactory.getClient(W2JRLR2714Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testNoResponseBodyForOneWay - * - * @assertion_ids: WSI:SPEC:R2714 - * - * @test_Strategy: Make a request and inspect response to ensure there is no - * HTTP response body - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testNoResponseBodyForOneWay() throws EETest.Fault { - InputStream response = null; - try { - response = client.makeHTTPRequest(ONE_WAY_OPERATION); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - try { - validateNoResponseBody(response); - } catch (IOException ioe) { - throw new EETest.Fault("Error creating response object", ioe); - } - client.logMessageInHarness(response); - } - - private void validateNoResponseBody(InputStream is) - throws IOException, EETest.Fault { - if (is.available() > 0) { - throw new EETest.Fault( - "Invalid HTTP response: response body must be empty for " - + "one way operations (BP-R2714)."); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/SimpleEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/SimpleEndpointImpl.java deleted file mode 100644 index ed8aafca2f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/SimpleEndpointImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2714; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "SimpleEndpointPort", serviceName = "SimpleTest", targetNamespace = "http://simpletestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2714TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2714.SimpleEndpoint") - -public class SimpleEndpointImpl implements SimpleEndpoint { - public void oneWayOperation() { - - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/W2JRLR2714Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/W2JRLR2714Client.java deleted file mode 100644 index eac903abf9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/W2JRLR2714Client.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2714; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2714Client extends SOAPClient { - public W2JRLR2714Client(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR2714Client(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://simpletestservice.org/wsdl"); - stubContext.setService("SimpleTest"); - stubContext.setPort("SimpleEndpointPort"); - stubContext.setEndpointInterface(SimpleEndpoint.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2714.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2714.wsdlloc.1"; - } - - public void oneWayOperation() throws Exception { - ((SimpleEndpoint) stubContext.getStub()).oneWayOperation(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/W2JRLR2714TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/W2JRLR2714TestService.wsdl deleted file mode 100644 index 1fc2bd5347..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/W2JRLR2714TestService.wsdl +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/build.xml deleted file mode 100644 index 4ebcf55312..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/customfile.xml deleted file mode 100644 index 3c2fb1a796..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/customfile.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/jakartaEE.tokens deleted file mode 100644 index fec43fc23b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2714TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2714.SimpleTest -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2714.SimpleEndpointImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2714.SimpleEndpoint -NAMESPACEURI=http://simpletestservice.org/wsdl -PORT=SimpleEndpointPort -URLALIAS=/jaxws/SimpleTest -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2714.SimpleEndpointImpl -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2714TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2714TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2714TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/standalone-sun-jaxws.xml deleted file mode 100644 index 4281584d6d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/standalone.web.xml deleted file mode 100644 index 54187f1287..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2714/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2714TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -SimpleTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -SimpleTest -/jaxws/SimpleTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/Client.java deleted file mode 100644 index dcf0b66c4e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/Client.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2728; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String STRING = "R2728"; - - /** - * The client. - */ - private W2JRLR2728Client client; - - static W2JRLR2728TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR2728Client) ClientFactory.getClient(W2JRLR2728Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testUseAttributeDefaulting - * - * @assertion_ids: WSI:SPEC:R2728 - * - * @test_Strategy: The supplied WSDL, containg a soap:fault element without - * the use="literal" attribute has been used by the - * WSDL-to-Java tool to generate an end point. If the tool - * works correctly, the end-point has been built and deployed - * so it should simply be reachable. - * - * @throws Fault - */ - public void testUseAttributeDefaulting() throws Fault { - String result; - try { - result = client.echoString(STRING); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2728)", e); - } - if (!STRING.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R2728)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/W2JRLR2728Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/W2JRLR2728Client.java deleted file mode 100644 index 084c7cb629..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/W2JRLR2728Client.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2728; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2728Client extends SOAPClient { - public W2JRLR2728Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2728Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2728testservice.org/W2JRLR2728TestService.wsdl"); - stubContext.setService("W2JRLR2728TestService"); - stubContext.setPort("W2JRLR2728TestPort"); - stubContext.setEndpointInterface(W2JRLR2728Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2728.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2728.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR2728Test) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/W2JRLR2728TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/W2JRLR2728TestImpl.java deleted file mode 100644 index 91e928db9e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/W2JRLR2728TestImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2728; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2728TestPort", serviceName = "W2JRLR2728TestService", targetNamespace = "http://w2jrlr2728testservice.org/W2JRLR2728TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2728TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2728.W2JRLR2728Test") - -public class W2JRLR2728TestImpl implements W2JRLR2728Test { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/W2JRLR2728TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/W2JRLR2728TestService.wsdl deleted file mode 100644 index a54f7dfc1e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/W2JRLR2728TestService.wsdl +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - Documentation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/build.xml deleted file mode 100644 index d6cb24fc70..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/build.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/customfile.xml deleted file mode 100644 index 4f9246f818..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/jakartaEE.tokens deleted file mode 100644 index d2a740778a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2728TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2728.W2JRLR2728TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2728.W2JRLR2728TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2728.W2JRLR2728Test -NAMESPACEURI=http://w2jrlr2728testservice.org/W2JRLR2728TestService.wsdl -PORT=W2JRLR2728TestPort -URLALIAS=/jaxws/W2JRLR2728Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2728.W2JRLR2728TestImpl -WEBSERVICEDESCRIPTION=W2JRLR2728TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2728TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2728TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2728TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/standalone-sun-jaxws.xml deleted file mode 100644 index 0fad086da2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/standalone.web.xml deleted file mode 100644 index 97ebe3fab8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2728/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2728TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2728Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2728Test -/jaxws/W2JRLR2728Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/Client.java deleted file mode 100644 index 5fc25c6bdd..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/Client.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2729; - -import java.io.InputStream; -import java.util.Properties; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements SOAPRequests { - /** - * The string to be echoed. - */ - private static final String STRING = "R2729"; - - /** - * The client. - */ - private W2JRLR2729Client client; - - static W2JRLR2729TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR2729Client) ClientFactory.getClient(W2JRLR2729Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testResponseWrapperElement - * - * @assertion_ids: WSI:SPEC:R2729 - * - * @test_Strategy: A request to the echoString operation is made and the - * returned wrapper element must be "echoStringResponse". - * - * @throws Fault - */ - public void testResponseWrapperElement() throws Fault { - Document document; - try { - InputStream is = client.makeHTTPRequest(R2729_REQUEST); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - DocumentBuilder builder = factory.newDocumentBuilder(); - document = builder.parse(is); - } catch (Exception e) { - throw new Fault("Unable to invoke 'echoString' operation (BP-R2729)", e); - } - Element envelope = document.getDocumentElement(); - System.out.println( - "got " + envelope.getNamespaceURI() + ":" + envelope.getLocalName()); - NodeList list = envelope.getElementsByTagNameNS( - "http://w2jrlr2729testservice.org/W2JRLR2729TestService.wsdl", - "echoStringResponse"); - if (list.getLength() == 0) { - throw new Fault( - "Required 'echoStringResponse' element not present in message (BP-R2729)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/W2JRLR2729Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/W2JRLR2729Client.java deleted file mode 100644 index df91bc6164..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/W2JRLR2729Client.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2729; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2729Client extends SOAPClient { - public W2JRLR2729Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2729Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2729testservice.org/W2JRLR2729TestService.wsdl"); - stubContext.setService("W2JRLR2729TestService"); - stubContext.setPort("W2JRLR2729TestPort"); - stubContext.setEndpointInterface(W2JRLR2729Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2729.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2729.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR2729Test) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/W2JRLR2729TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/W2JRLR2729TestImpl.java deleted file mode 100644 index 26d3db04d2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/W2JRLR2729TestImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2729; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2729TestPort", serviceName = "W2JRLR2729TestService", targetNamespace = "http://w2jrlr2729testservice.org/W2JRLR2729TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2729TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2729.W2JRLR2729Test") - -public class W2JRLR2729TestImpl implements W2JRLR2729Test { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/W2JRLR2729TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/W2JRLR2729TestService.wsdl deleted file mode 100644 index 78e3db023c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/W2JRLR2729TestService.wsdl +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - Documentation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/build.xml deleted file mode 100644 index 3973209feb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/build.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/customfile.xml deleted file mode 100644 index c85a7de284..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/jakartaEE.tokens deleted file mode 100644 index 6f2f17e104..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2729TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2729.W2JRLR2729TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2729.W2JRLR2729TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2729.W2JRLR2729Test -NAMESPACEURI=http://w2jrlr2729testservice.org/W2JRLR2729TestService.wsdl -PORT=W2JRLR2729TestPort -URLALIAS=/jaxws/W2JRLR2729Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2729.W2JRLR2729TestImpl -WEBSERVICEDESCRIPTION=WSW2JRLR2729TestServiceApp -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2729TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2729TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2729TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/standalone-sun-jaxws.xml deleted file mode 100644 index 278bf80016..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/standalone.web.xml deleted file mode 100644 index bd4c504ffa..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2729/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2729TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2729Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2729Test -/jaxws/W2JRLR2729Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/Client.java deleted file mode 100644 index 0c67619f71..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/Client.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2738; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.ws.Holder; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPElement; -import java.util.Properties; -import java.util.Iterator; -import java.io.InputStream; - -public class Client extends ServiceEETest implements SOAPRequests { - - private W2JRLR2738Client client; - - static W2JRLR2738TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (W2JRLR2738Client) ClientFactory.getClient(W2JRLR2738Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: IncludeAllSoapHeadersTest - * - * @assertion_ids: WSI:SPEC:R2738 - * - * @test_Strategy: Send a SOAP request/response that has the headers in the - * wsdl:input and wsdl:output sections The endpoint and the - * client checks for their correctness. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void IncludeAllSoapHeadersTest() throws EETest.Fault { - String result = null; - ConfigHeader ch1 = new ConfigHeader(); - ch1.setMessage("ConfigHeader1"); - ConfigHeader ch2 = new ConfigHeader(); - ch2.setMessage("ConfigHeader2"); - Holder ghh2 = new Holder(); - ghh2.value = ch2; - ConfigHeader ch3 = new ConfigHeader(); - ch3.setMessage("ConfigHeader3"); - Holder ghh3 = new Holder(); - ghh3.value = ch3; - - try { - result = client.echoIt("IncludeAllSoapHeadersTest", ch1, ghh2, ghh3); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2738)", e); - } - String expected = "PASSED"; - if (result.equals(expected)) { - expected = "ConfigHeader1"; - if (ch1.getMessage().equals(expected)) { - expected = "ConfigHeader22"; - ch2 = (ConfigHeader) ghh2.value; - if (ch2.getMessage().equals(expected)) { - expected = "ConfigHeader33"; - ch3 = (ConfigHeader) ghh3.value; - if (!ch3.getMessage().equals(expected)) { - throw new Fault( - "echoIt operation did not return correct value for ConfigHeader: expected=" - + expected + ", got=" + ch3.getMessage()); - } - } else { - throw new Fault( - "echoIt operation did not return correct value for ConfigHeader: expected=" - + expected + ", got=" + ch2.getMessage()); - } - } else { - throw new Fault( - "echoIt operation did not return correct value for ConfigHeader: expected=" - + expected + ", got=" + ch1.getMessage()); - } - } else { - throw new Fault( - "echoIt operation did not return correct result: expected=" + expected - + ", got=" + result); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738Client.java deleted file mode 100644 index b0def4a473..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738Client.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2738; - -import jakarta.xml.ws.Holder; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.lib.harness.EETest; - -public class W2JRLR2738Client extends SOAPClient { - - public W2JRLR2738Client(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR2738Client(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace( - "http://w2jrlr2738testservice.org/W2JRLR2738TestService.wsdl"); - stubContext.setService("W2JRLR2738TestService"); - stubContext.setPort("W2JRLR2738TestPort"); - stubContext.setEndpointInterface(W2JRLR2738Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2738.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2738.wsdlloc.1"; - } - - public String echoIt(String text, ConfigHeader ch1, Holder ghh2, - Holder ghh3) - - throws Exception { - String result = ""; - Holder gh = new Holder(); - gh.value = result; - ((W2JRLR2738Test) stubContext.getStub()).echoIt(text, ch1, ghh2, gh, ghh3); - return (String) gh.value; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestDefs.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestDefs.wsdl deleted file mode 100644 index b63cb0b59e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestDefs.wsdl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestDefs.xsd deleted file mode 100644 index 5c6f568a85..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestDefs.xsd +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - This is the configuration header - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestImpl.java deleted file mode 100644 index 4e3b284cc5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2738; - -import jakarta.xml.ws.Holder; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2738TestPort", serviceName = "W2JRLR2738TestService", targetNamespace = "http://w2jrlr2738testservice.org/W2JRLR2738TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2738TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2738.W2JRLR2738Test") - -public class W2JRLR2738TestImpl implements W2JRLR2738Test { - public void echoIt(String text, ConfigHeader ch1, Holder ghch2, - Holder ghresult, Holder ghch3) { - - String result = ""; - String expected = "IncludeAllSoapHeadersTest"; - if (text.equals(expected)) { - if ((ch1.getMessage().equals("ConfigHeader1")) - && (ghch2.value.getMessage().equals("ConfigHeader2"))) { - if ((ghch3.value == null) - || (!ghch3.value.getMessage().equals("ConfigHeader3"))) { - result = "PASSED"; - } else { - throw new WebServiceException( - "FAILED in endpoint - expected configHeader3 not to be ConfigHeader3"); - } - } else { - throw new WebServiceException("FAILED in endpoint - ch1=" - + ch1.getMessage() + ", ghch2=" + ghch2.value.getMessage()); - } - } else { - throw new WebServiceException( - "FAILED in endpoint - the body text was not correct: expected=" - + expected + ", got=" + text); - } - ch1.setMessage("ConfigHeader11"); - ConfigHeader ch2 = new ConfigHeader(); - ch2.setMessage("ConfigHeader22"); - ghch2.value = ch2; - ConfigHeader ch3 = new ConfigHeader(); - ch3.setMessage("ConfigHeader33"); - ghch3.value = ch3; - ghresult.value = result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestService.wsdl deleted file mode 100644 index 444022a99d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/W2JRLR2738TestService.wsdl +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/build.xml deleted file mode 100644 index 6f4786372b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/customfile.xml deleted file mode 100644 index d5624df333..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/customfile.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/customfile2.xml deleted file mode 100644 index 48bf54ad1a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/jakartaEE.tokens deleted file mode 100644 index 591bdeefc7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2738TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2738.W2JRLR2738TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2738.W2JRLR2738TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2738.W2JRLR2738Test -NAMESPACEURI=http://w2jrlr2738testservice.org/W2JRLR2738TestService.wsdl -PORT=W2JRLR2738TestPort -URLALIAS=/jaxws/W2JRLR2738Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2738.W2JRLR2738TestImpl -WEBSERVICEDESCRIPTION=W2JRLR2738TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2738TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2738TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2738TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/standalone-sun-jaxws.xml deleted file mode 100644 index 7de09271d2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/standalone.web.xml deleted file mode 100644 index 9192ebeb71..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2738/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2738TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2738Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2738Test -/jaxws/W2JRLR2738Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/Client.java deleted file mode 100644 index fd2e6fa89d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/Client.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2739; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.constants.WSIConstants; -import com.sun.javatest.Status; - -import java.util.Properties; - -public class Client extends ServiceEETest implements WSIConstants { - - private W2JRLR2739Client client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (W2JRLR2739Client) ClientFactory.getClient(W2JRLR2739Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testExtraHeader - * - * @assertion_ids: WSI:SPEC:R2739 - * - * @test_Strategy: Make a request and add a header not contained in the wsdl. - * Ensure the request and response are normal. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testExtraHeader() throws EETest.Fault { - String response = ""; - try { - response = client.helloWorld(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EETest.Fault("Test didn't complete properly: ", e); - } - if (!response.equals("hello world")) { - throw new EETest.Fault("Error creating response object:" + response); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/R2739Handler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/R2739Handler.java deleted file mode 100644 index 911d2f9353..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/R2739Handler.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -/* - * @(#)R2739Handler.java 1.3 03/05/20 - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2739; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.Constants; - -import jakarta.xml.ws.handler.soap.SOAPHandler; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; -import javax.xml.namespace.QName; -import jakarta.xml.soap.*; - -import java.util.Set; -import java.util.HashSet; - -public class R2739Handler implements SOAPHandler { - - public Set getHeaders() { - Set s = new HashSet(); - s.add(new QName("http://extra-header.org", "extra-header")); - return s; - } - - public void init(java.util.Map config) { - }; - - public boolean handleFault(SOAPMessageContext context) { - return true; - }; - - public void destroy() { - }; - - public void close(MessageContext context) { - }; - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("HANDLER: R2739Handler.handleMessage() BEGIN"); - if (Handler_Util.getDirection(context).equals(Constants.INBOUND)) { - logSOAPMessage("Original", "Request", context); - handle(context); - logSOAPMessage("Modified", "Request", context); - } else { - logSOAPMessage("Original", "Response", context); - handle(context); - logSOAPMessage("Modified", "Response", context); - } - System.out.println("HANDLER: R2739Handler.handleMessage() END"); - return true; - } - - private void handle(MessageContext context) { - try { - addExtraHeader((SOAPMessageContext) context); - } catch (SOAPException se) { - com.sun.ts.lib.util.TestUtil.printStackTrace(se); - } - } - - private void addExtraHeader(SOAPMessageContext context) throws SOAPException { - SOAPEnvelope env = context.getMessage().getSOAPPart().getEnvelope(); - if (env.getHeader() == null) { - SOAPHeader header = env.addHeader(); - SOAPHeaderElement she = header.addHeaderElement(getExtraHeaderName(env)); - context.getMessage().saveChanges(); - } - } - - private Name getExtraHeaderName(SOAPEnvelope env) throws SOAPException { - return env.createName("extra-header", "ns1", "http://extra-header.org"); - } - - private void logSOAPMessage(String s1, String s2, MessageContext msgctx) { - try { - SOAPMessage msg = ((SOAPMessageContext) msgctx).getMessage(); - System.out.println("-----------------------------"); - System.out.println(s1 + " SOAP Message " + s2); - System.out.println("-----------------------------"); - msg.writeTo(System.out); - System.out.println("\n"); - } catch (Exception e) { - com.sun.ts.lib.util.TestUtil.printStackTrace(e); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/SimpleEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/SimpleEndpointImpl.java deleted file mode 100644 index cd106ffb07..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/SimpleEndpointImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2739; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "SimpleEndpointPort", serviceName = "SimpleTest", targetNamespace = "http://simpletestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2739TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2739.SimpleEndpoint") - -public class SimpleEndpointImpl implements SimpleEndpoint { - public String helloWorld() { - return "hello world"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/W2JRLR2739Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/W2JRLR2739Client.java deleted file mode 100644 index 254a93d884..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/W2JRLR2739Client.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2739; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2739Client extends SOAPClient { - - public W2JRLR2739Client(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR2739Client(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://simpletestservice.org/wsdl"); - stubContext.setService("SimpleTest"); - stubContext.setPort("SimpleEndpointPort"); - stubContext.setEndpointInterface(SimpleEndpoint.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2739.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2739.wsdlloc.1"; - } - - public String helloWorld() throws Exception { - return ((SimpleEndpoint) stubContext.getStub()).helloWorld(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/W2JRLR2739TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/W2JRLR2739TestService.wsdl deleted file mode 100644 index d24300de7c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/W2JRLR2739TestService.wsdl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/build.xml deleted file mode 100644 index e767e3f088..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/build.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/customfile-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/customfile-client.xml deleted file mode 100644 index 807f4f2603..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/customfile-client.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/customfile-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/customfile-server.xml deleted file mode 100644 index a29d19b569..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/customfile-server.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - R2739Handler - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2739.R2739Handler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/jakartaEE.tokens deleted file mode 100644 index 2a29262d0b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2739TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2739.SimpleTest -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2739.SimpleEndpointImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2739.SimpleEndpoint -NAMESPACEURI=http://simpletestservice.org/wsdl -PORT=SimpleEndpointPort -URLALIAS=/jaxws/SimpleTest -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2739.SimpleEndpointImpl -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2739TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2739TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2739TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/standalone-sun-jaxws.xml deleted file mode 100644 index 1f7abbb41a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/standalone.web.xml deleted file mode 100644 index 82e58d67a1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2739/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2739TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -SimpleTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -SimpleTest -/jaxws/SimpleTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/Client.java deleted file mode 100644 index bcad36579a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/Client.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import jakarta.xml.soap.*; -import java.util.Iterator; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.lib.util.TestUtil; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements SOAPRequests { - - private static String OPERATION_NAME = "echoFooBarResponse"; - - private static String OPERATION_URI = "http://w2jrlr273Xtestservice.org/W2JRLR273XTestService.wsdl"; - - private static String PART_ACCESSOR_NAME = "fooBarResponse"; - - private static String PART1_NAME = "foo"; - - private static String PART1_URI = "http://w2jrlr273Xtestservice.org/xsd"; - - private static String PART2_NAME = "bar"; - - private static String PART2_URI = "http://w2jrlr273Xtestservice.org/xsd"; - - /** - * The clients. - */ - private W2JRLR273XClient1 client1; - - private W2JRLR273XClient2 client2; - - static W2JRLR273XTestService service = null; - - /** - * Test entry. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client1 = (W2JRLR273XClient1) ClientFactory - .getClient(W2JRLR273XClient1.class, properties, this, service); - client2 = (W2JRLR273XClient2) ClientFactory - .getClient(W2JRLR273XClient2.class, properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testNamespacesForChildrenOfPartAccessorsOnRequest - * - * @assertion_ids: WSI:SPEC:R2735; WSI:SPEC:R2737; - * - * @test_Strategy: A request is made from the generated client. The endpoint - * is replaced by a Servlet Filter, that verifies the request. - * The returned object is interrogated for success of failure. - * - * @throws Fault - */ - public void testNamespacesForChildrenOfPartAccessorsOnRequest() throws Fault { - FooBar fb = new FooBar(); - String expected = "I am a foo request"; - fb.setFoo(expected); - fb.setBar("I am a bar request"); - FooBar fb2; - try { - fb2 = client2.echoFooBar(fb); - if (!fb2.getFoo().equals(expected)) { - TestUtil.logErr("Expected value=" + expected); - TestUtil.logErr("Actual value=" + fb2.getFoo()); - throw new Fault( - "testNamespacesForChildrenOfPartAccessorsOnRequest failed (BP-R273X)"); - } - } catch (Exception e) { - throw new Fault("Unable to invoke echoFooBar operation (BP-R273X)", e); - } - } - - /** - * @testName: testNamespacesForChildrenOfPartAccessorsOnResponse - * - * @assertion_ids: WSI:SPEC:R2735; WSI:SPEC:R2737; - * - * @test_Strategy: A valid request is made to the endpoint and the returned - * response is investigated for the presence of namespaces for - * children of part accessor. - * - * @throws Fault - */ - public void testNamespacesForChildrenOfPartAccessorsOnResponse() - throws Fault { - SOAPMessage response; - try { - response = client1.makeSaajRequest(R273X_REQUEST); - String result = verifyNamespacesForChildrenOfPartAccessors(response); - if (!result.equals("OK")) { - TestUtil.logErr("Expected value=OK"); - TestUtil.logErr("Actual value=" + result); - throw new Fault( - "testNamespacesForChildrenOfPartAccessorsOnResponse failed (BP-R273X)"); - } - } catch (Exception e) { - throw new Fault("Unable to invoke echoFooBar operation (BP-R273X)", e); - } - } - - /** - * Verifies that the children of part accessor for rpc-literal SOAP messages - * parameter and return values are namespace qualified. - * - * @param request - * the SOAPMessage response. - * - * @return "OK" if valid; "NOT OK" otherwise. - * - * @throws Exception - */ - private String verifyNamespacesForChildrenOfPartAccessors(SOAPMessage sm) - throws Exception { - String result = "NOT OK"; - System.out.println("Getting children of body element ..."); - Iterator children = sm.getSOAPBody().getChildElements(); - SOAPElement child; - String localName, uri; - boolean flg1 = false, flg2 = false, flg3 = false; - if (children.hasNext()) { - System.out.println("Getting operation name ..."); - child = (SOAPElement) children.next(); - localName = child.getElementName().getLocalName(); - uri = child.getElementName().getURI(); - System.out.println("child localname: " + localName); - System.out.println("child uri: " + uri); - if (localName.equals(OPERATION_NAME) && uri.equals(OPERATION_URI)) { - children = child.getChildElements(); - if (children.hasNext()) { - System.out.println("Getting part accessor name ..."); - child = (SOAPElement) children.next(); - localName = child.getElementName().getLocalName(); - uri = child.getElementName().getURI(); - System.out.println(" child localname: " + localName); - System.out.println(" child uri: " + uri); - if (localName.equals(PART_ACCESSOR_NAME) - && (uri == null || uri.equals(""))) - flg1 = true; - // All children of part accessors MUST be namespace qualified - if (!children.hasNext()) { - System.out.println("Getting children of part accessor ..."); - children = child.getChildElements(); - int i = 0; - System.out.println( - "Verifying namespaces exist and are correct for children"); - while (children.hasNext()) { - i++; - child = (SOAPElement) children.next(); - localName = child.getElementName().getLocalName(); - uri = child.getElementName().getURI(); - System.out.println(" child localname: " + localName); - System.out.println(" child uri: " + uri); - switch (i) { - case 1: - if (localName.equals(PART1_NAME) && uri.equals(PART1_URI)) - flg2 = true; - break; - case 2: - if (localName.equals(PART2_NAME) && uri.equals(PART2_URI)) - flg3 = true; - break; - } - } - } - } - } - } - if (flg1 && flg2 && flg3) - result = "OK"; - System.out.println("result=" + result); - JAXWS_Util.printSOAPMessage(sm, System.out); - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/ServerSOAPHandler.java deleted file mode 100644 index 7b6d978147..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/ServerSOAPHandler.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPElement; - -import java.util.Iterator; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - private String PASSED = "PASSED"; - - private String FAILED = "FAILED"; - - private static String OPERATION_NAME = "echoFooBar"; - - private static String OPERATION_URI = "http://w2jrlr273Xtestservice.org/W2JRLR273XTestService.wsdl"; - - private static String PART_ACCESSOR_NAME = "fooBarRequest"; - - private static String PART1_NAME = "foo"; - - private static String PART1_URI = "http://w2jrlr273Xtestservice.org/xsd"; - - private static String PART2_NAME = "bar"; - - private static String PART2_URI = "http://w2jrlr273Xtestservice.org/xsd"; - - protected void processInboundMessage(SOAPMessageContext context) { - System.out.println("in ServerSOAPHandler:processInboundMessage"); - String result = null; - try { - result = verifyNamespacesForChildrenOfPartAccessors(context); - } catch (Exception e) { - throw new RuntimeException( - "Exception occurred in ServerSOAPHandler:verifyNamespacesForChildrenOfPartAccessors: " - + e); - } - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: " + result); - } - } - - /** - * Verifies that the part accessor for rpc-literal SOAP messages parameter and - * return values have no namespace. - */ - - protected String verifyNamespacesForChildrenOfPartAccessors( - SOAPMessageContext context) throws Exception { - System.out.println( - "in ServerSOAPHandler:verifyNamespacesForChildrenOfPartAccessors"); - String result = FAILED; - SOAPMessage sm = context.getMessage(); - System.out.println("Getting children of body element ..."); - Iterator children = sm.getSOAPBody().getChildElements(); - SOAPElement child; - String localName, uri; - boolean flg1 = false, flg2 = false, flg3 = false; - if (children.hasNext()) { - System.out.println("Getting operation name ..."); - child = (SOAPElement) children.next(); - localName = child.getElementName().getLocalName(); - uri = child.getElementName().getURI(); - System.out.println("child localname: " + localName); - System.out.println("child uri: " + uri); - if (localName.equals(OPERATION_NAME) && uri.equals(OPERATION_URI)) { - children = child.getChildElements(); - if (children.hasNext()) { - System.out.println("Getting part accessor name ..."); - child = (SOAPElement) children.next(); - localName = child.getElementName().getLocalName(); - uri = child.getElementName().getURI(); - System.out.println(" child localname: " + localName); - System.out.println(" child uri: " + uri); - if (localName.equals(PART_ACCESSOR_NAME) - && (uri == null || uri.equals(""))) - flg1 = true; - // All children of part accessors MUST be namespace qualified - if (!children.hasNext()) { - System.out.println("Getting children of part accessor ..."); - children = child.getChildElements(); - int i = 0; - System.out.println( - "Verifying namespaces exist and are correct for children"); - while (children.hasNext()) { - i++; - child = (SOAPElement) children.next(); - localName = child.getElementName().getLocalName(); - uri = child.getElementName().getURI(); - System.out.println(" child localname: " + localName); - System.out.println(" child uri: " + uri); - switch (i) { - case 1: - if (localName.equals(PART1_NAME) && uri.equals(PART1_URI)) - flg2 = true; - break; - case 2: - if (localName.equals(PART2_NAME) && uri.equals(PART2_URI)) - flg3 = true; - break; - } - } - } - } - } - } - if (flg1 && flg2 && flg3) - result = "PASSED"; - System.out.println("result=" + result); - JAXWS_Util.printSOAPMessage(sm, System.out); - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XClient1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XClient1.java deleted file mode 100644 index 91eae15a4b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XClient1.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR273XClient1 extends SOAPClient { - public W2JRLR273XClient1(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR273XClient1(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr273Xtestservice.org/W2JRLR273XTestService.wsdl"); - stubContext.setService("W2JRLR273XTestService"); - stubContext.setPort("W2JRLR273XTest1Port"); - stubContext.setEndpointInterface(W2JRLR273XTest1.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr273X.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr273X.wsdlloc.1"; - } - - public FooBar echoFooBar(FooBar fb) throws Exception { - FooBar fb1 = ((W2JRLR273XTest1) stubContext.getStub()).echoFooBar(fb); - return fb1; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XClient2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XClient2.java deleted file mode 100644 index 7af92d6af6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XClient2.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR273XClient2 extends SOAPClient { - public W2JRLR273XClient2(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR273XClient2(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr273Xtestservice.org/W2JRLR273XTestService.wsdl"); - stubContext.setService("W2JRLR273XTestService"); - stubContext.setPort("W2JRLR273XTest2Port"); - stubContext.setEndpointInterface(W2JRLR273XTest2.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr273X.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr273X.wsdlloc.1"; - } - - public FooBar echoFooBar(FooBar fb) throws Exception { - FooBar fb1 = ((W2JRLR273XTest2) stubContext.getStub()).echoFooBar(fb); - return fb1; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XTest1Impl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XTest1Impl.java deleted file mode 100644 index 5158250b5e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XTest1Impl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR273XTest1Port", serviceName = "W2JRLR273XTestService", targetNamespace = "http://w2jrlr273Xtestservice.org/W2JRLR273XTestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR273XTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X.W2JRLR273XTest1") - -public class W2JRLR273XTest1Impl implements W2JRLR273XTest1 { - public FooBar echoFooBar(FooBar fb) { - return fb; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XTest2Impl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XTest2Impl.java deleted file mode 100644 index dd7505a7e0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XTest2Impl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR273XTest2Port", serviceName = "W2JRLR273XTestService", targetNamespace = "http://w2jrlr273Xtestservice.org/W2JRLR273XTestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR273XTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X.W2JRLR273XTest2") - -public class W2JRLR273XTest2Impl implements W2JRLR273XTest2 { - public FooBar echoFooBar(FooBar fb) { - return fb; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XTestService.wsdl deleted file mode 100644 index dc6736a848..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/W2JRLR273XTestService.wsdl +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/build.xml deleted file mode 100644 index 8a9117bfd2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/build.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/custom-client.xml deleted file mode 100644 index 916a2c8279..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/custom-server.xml deleted file mode 100644 index 434d2c1306..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/custom-server.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - ns1:W2JRLR273XTest2Port - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X.ServerSOAPHandler - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/jakartaEE.tokens deleted file mode 100644 index f6ca735ff2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR273XTestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X.W2JRLR273XTestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X.W2JRLR273XTest1Impl -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X.W2JRLR273XTest2Impl -URLALIAS=/jaxws/W2JRLR273XTest1 -URLALIAS2=/jaxws/W2JRLR273XTest2 -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X.W2JRLR273XTest1 -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X.W2JRLR273XTest2 -NAMESPACEURI=http://w2jrlr273Xtestservice.org/W2JRLR273XTestService.wsdl -PORT=W2JRLR273XTest1Port -PORT2=W2JRLR273XTest2Port -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X.W2JRLR273XTest1Impl -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R273X.W2JRLR273XTest2Impl -WEBSERVICEDESCRIPTION=W2JRLR273XTestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR273XTestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR273XTestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR273XTestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/standalone-sun-jaxws.xml deleted file mode 100644 index aa21e2747b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/standalone.web.xml deleted file mode 100644 index f12bcfca14..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R273X/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSW2JRLR273XTestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR273XTest2 -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR273XTest1 -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR273XTest2 -/jaxws/W2JRLR273XTest2 - - -W2JRLR273XTest1 -/jaxws/W2JRLR273XTest1 - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/Client.java deleted file mode 100644 index 1b55180245..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/Client.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The one string to be echoed. - */ - private static final String STRING = "R2744"; - - /** - * The one client. - */ - private W2JRLR2744Client client; - - static W2JRLR2744TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR2744Client) ClientFactory.getClient(W2JRLR2744Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSOAPAction - * - * @assertion_ids: WSI:SPEC:R2744; WSASB:SPEC:4001; WSASB:SPEC:4001.1; - * WSASB:SPEC:4001.2; - * - * @test_Strategy: The supplied WSDL, containing a soap:operation with a - * soapAction attribute, has been used by the WSDL-to-Java - * tool to generate an endpoint and client. A handler verifies - * the presence of the SOAPAction header and its quoted value. - * - * @throws Fault - */ - public void testSOAPAction() throws Fault { - String result; - try { - result = client.echoString(STRING); - System.out.println("result=" + result); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2744)", e); - } - if (!result.equals(STRING)) { - throw new Fault("Missing or invalid SOAPAction header (BP-R2744)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/DummyImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/DummyImpl.java deleted file mode 100644 index 1f31f65445..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/DummyImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744; - -import jakarta.jws.WebService; - -@WebService(portName = "DummyPort", serviceName = "W2JRLR2744TestService", targetNamespace = "http://w2jrlr2744testservice.org/W2JRLR2744TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2744TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744.Dummy") - -public class DummyImpl implements Dummy { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/ServerSOAPHandler.java deleted file mode 100644 index 8a4a20adbf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/ServerSOAPHandler.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; - -import java.util.Map; -import java.util.List; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - final String PASSED = "PASSED"; - - final String FAILED = "FAILED"; - - protected void processInboundMessage(SOAPMessageContext context) { - System.out.println("in ServerSOAPHandler:processInboundMessage"); - JAXWS_Util.dumpHTTPHeaders(context); - Map> map = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - String result = verifySOAPActionHeader(map); - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: " + result); - } - } - - /** - * Verifies the contents of the Content-Type HTTP header - * - * @param request - * the HTTP servlet request. - */ - protected String verifySOAPActionHeader(Map> m) { - System.out.println("in ServerSOAPHandler:verifySOAPActionHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("soapaction"); - System.out.println("HTTP Header soapAction=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - int index = sValues.indexOf("foo"); - if (index > 0) { - result = PASSED; - } else { - result = FAILED + ": foo not found in HTTP SOAPAction [" + sValues - + "]"; - } - } else { - result = FAILED + ": the HTTP header SOAPAction was not found"; - } - System.out.println("result=" + result); - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/W2JRLR2744Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/W2JRLR2744Client.java deleted file mode 100644 index 319078bd7f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/W2JRLR2744Client.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2744Client extends SOAPClient { - public W2JRLR2744Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2744Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2744testservice.org/W2JRLR2744TestService.wsdl"); - stubContext.setService("W2JRLR2744TestService"); - stubContext.setPort("W2JRLR2744TestPort"); - stubContext.setEndpointInterface(W2JRLR2744Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2744.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2744.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR2744Test) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/W2JRLR2744TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/W2JRLR2744TestImpl.java deleted file mode 100644 index faa84a598e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/W2JRLR2744TestImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2744TestPort", serviceName = "W2JRLR2744TestService", targetNamespace = "http://w2jrlr2744testservice.org/W2JRLR2744TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2744TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744.W2JRLR2744Test") - -public class W2JRLR2744TestImpl implements W2JRLR2744Test { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/W2JRLR2744TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/W2JRLR2744TestService.wsdl deleted file mode 100644 index bf6bf6125e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/W2JRLR2744TestService.wsdl +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/build.xml deleted file mode 100644 index 4d0e5d06c6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/build.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/custom-client.xml deleted file mode 100644 index 2e2b1c62be..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/custom-server.xml deleted file mode 100644 index ef62bcef08..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/custom-server.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - ns1:W2JRLR2744TestPort - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744.ServerSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/jakartaEE.tokens deleted file mode 100644 index ff3b00c151..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2744TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744.W2JRLR2744TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744.DummyImpl -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744.W2JRLR2744TestImpl -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744.DummyImpl -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744.W2JRLR2744TestImpl -URLALIAS=/jaxws/Dummy -URLALIAS2=/jaxws/W2JRLR2744Test -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744.Dummy -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2744.W2JRLR2744Test -NAMESPACEURI=http://w2jrlr2744testservice.org/W2JRLR2744TestService.wsdl -PORT=DummyPort -PORT2=W2JRLR2744TestPort -WEBSERVICEDESCRIPTION=W2JRLR2744TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2744TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2744TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2744TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/standalone-sun-jaxws.xml deleted file mode 100644 index 7350a72cdf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/standalone.web.xml deleted file mode 100644 index 54cced3960..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2744/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSW2JRLR2744TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2744Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Dummy -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2744Test -/jaxws/W2JRLR2744Test - - -Dummy -/jaxws/Dummy - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/Client.java deleted file mode 100644 index 87f8773695..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/Client.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The one string to be echoed. - */ - private static final String STRING_1 = "R2745-1"; - - /** - * The other string to be echoed. - */ - private static final String STRING_2 = "R2745-2"; - - /** - * The one client. - */ - private W2JRLR2745ClientOne client1; - - /** - * The other client. - */ - private W2JRLR2745ClientTwo client2; - - static W2JRLR2745TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client1 = (W2JRLR2745ClientOne) ClientFactory - .getClient(W2JRLR2745ClientOne.class, properties, this, service); - client2 = (W2JRLR2745ClientTwo) ClientFactory - .getClient(W2JRLR2745ClientTwo.class, properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testSOAPAction - * - * @assertion_ids: WSI:SPEC:R2745; WSASB:SPEC:4001; WSASB:SPEC:4001.1; - * WSASB:SPEC:4001.2; - * - * @test_Strategy: The supplied WSDL, containing a soap:operations with a - * missing and empty soapAction attribute respectively, has - * been used by the WSDL-to-Java tool to generate an endpoint - * and client. A handler verifies the presence of the - * SOAPAction header and its quoted value. - * - * @throws Fault - */ - public void testSOAPAction() throws Fault { - String result; - try { - result = client1.echoString(STRING_1); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2745)", e); - } - if (!result.equals(STRING_1)) { - throw new Fault("Missing or invalid soapAction header (BP-R2745)"); - } - try { - result = client2.echoString(STRING_2); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2745)", e); - } - if (!result.equals(STRING_2)) { - throw new Fault("Missing or invalid soapAction header (BP-R2745)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/DummyImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/DummyImpl.java deleted file mode 100644 index bfc1e73869..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/DummyImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745; - -import jakarta.jws.WebService; - -@WebService(portName = "DummyPort", serviceName = "W2JRLR2745TestService", targetNamespace = "http://w2jrlr2745testservice.org/W2JRLR2745TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2745TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.Dummy") - -public class DummyImpl implements Dummy { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/ServerSOAPHandler.java deleted file mode 100644 index 612883f04c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/ServerSOAPHandler.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; - -import java.util.Map; -import java.util.List; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - final String PASSED = "PASSED"; - - final String FAILED = "FAILED"; - - protected void processInboundMessage(SOAPMessageContext context) { - System.out.println("in ServerSOAPHandler:processInboundMessage"); - JAXWS_Util.dumpHTTPHeaders(context); - Map> map = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - String result = verifySOAPActionHeader(map); - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: " + result); - } - } - - /** - * Verifies the contents of the Content-Type HTTP header - * - * @param request - * the HTTP servlet request. - */ - protected String verifySOAPActionHeader(Map> m) { - System.out.println("in ServerSOAPHandler:verifySOAPActionHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("soapaction"); - System.out.println("HTTP Header soapAction=" + values); - int len = values.size(); - if (len == 1) { - String r = values.get(0); - if ((r == null) || (r.equals("\"\""))) { - result = PASSED; - } else { - result = FAILED + ": unexpected value found in HTTP SOAPAction:[" - + values + "]"; - } - } else if (len < 1) { - result = FAILED + ": no values found in HTTP SOAPAction:[" + values + "]"; - } else if (len > 1) { - result = FAILED + ": unexpected values found in HTTP SOAPAction:[" - + values + "]"; - } - System.out.println("result=" + result); - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745ClientOne.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745ClientOne.java deleted file mode 100644 index 499e5e2032..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745ClientOne.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2745ClientOne extends SOAPClient { - public W2JRLR2745ClientOne(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2745ClientOne(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2745testservice.org/W2JRLR2745TestService.wsdl"); - stubContext.setService("W2JRLR2745TestService"); - stubContext.setPort("W2JRLR2745TestOnePort"); - stubContext.setEndpointInterface(W2JRLR2745TestOne.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2745.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2745.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR2745TestOne) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745ClientTwo.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745ClientTwo.java deleted file mode 100644 index c30b0ec186..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745ClientTwo.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2745ClientTwo extends SOAPClient { - public W2JRLR2745ClientTwo(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2745ClientTwo(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2745testservice.org/W2JRLR2745TestService.wsdl"); - stubContext.setService("W2JRLR2745TestService"); - stubContext.setPort("W2JRLR2745TestTwoPort"); - stubContext.setEndpointInterface(W2JRLR2745TestTwo.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2745.endpoint.3"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2745.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR2745TestTwo) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745TestOneImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745TestOneImpl.java deleted file mode 100644 index cb1fa881d2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745TestOneImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2745TestOnePort", serviceName = "W2JRLR2745TestService", targetNamespace = "http://w2jrlr2745testservice.org/W2JRLR2745TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2745TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.W2JRLR2745TestOne") - -public class W2JRLR2745TestOneImpl implements W2JRLR2745TestOne { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745TestService.wsdl deleted file mode 100644 index 27558417d4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745TestService.wsdl +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745TestTwoImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745TestTwoImpl.java deleted file mode 100644 index b4e3c5ebe0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/W2JRLR2745TestTwoImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2745TestTwoPort", serviceName = "W2JRLR2745TestService", targetNamespace = "http://w2jrlr2745testservice.org/W2JRLR2745TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2745TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.W2JRLR2745TestTwo") - -public class W2JRLR2745TestTwoImpl implements W2JRLR2745TestTwo { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/build.xml deleted file mode 100644 index 3d4971f5c1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/build.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/custom-client.xml deleted file mode 100644 index 0e57c8c631..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/custom-server.xml deleted file mode 100644 index 31e853dbbb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/custom-server.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - ns1:W2JRLR2745Test* - - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.ServerSOAPHandler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/jakartaEE.tokens deleted file mode 100644 index 12b83819d0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/jakartaEE.tokens +++ /dev/null @@ -1,22 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2745TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.W2JRLR2745TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.DummyImpl -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.W2JRLR2745TestOneImpl -IMPL3=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.W2JRLR2745TestTwoImpl -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.DummyImpl -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.W2JRLR2745TestOneImpl -SERVLETNAME3=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.W2JRLR2745TestTwoImpl -URLALIAS=/jaxws/Dummy -URLALIAS2=/jaxws/W2JRLR2745TestOne -URLALIAS3=/jaxws/W2JRLR2745TestTwo -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.Dummy -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.W2JRLR2745TestOne -SEI3=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2745.W2JRLR2745TestTwo -NAMESPACEURI=http://w2jrlr2745testservice.org/W2JRLR2745TestService.wsdl -PORT=DummyPort -PORT2=W2JRLR2745TestOnePort -PORT3=W2JRLR2745TestTwoPort -WEBSERVICEDESCRIPTION=W2JRLR2745TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2745TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2745TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2745TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/jakartaEE.web.xml deleted file mode 100644 index f301dadfb8..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/jakartaEE.web.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME3@ - @IMPL3@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - @SERVLETNAME3@ - @URLALIAS3@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/standalone-sun-jaxws.xml deleted file mode 100644 index 5499a8917e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/standalone-sun-jaxws.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/standalone.web.xml deleted file mode 100644 index dafa3bb570..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2745/standalone.web.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - WSW2JRLR2745TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2745TestOne -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2745TestTwo -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -Dummy -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2745TestOne -/jaxws/W2JRLR2745TestOne - - -W2JRLR2745TestTwo -/jaxws/W2JRLR2745TestTwo - - -Dummy -/jaxws/Dummy - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/Client.java deleted file mode 100644 index b3413ad9e4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/Client.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The one string to be echoed. - */ - private static final String STRING_1 = "R2747-1"; - - /** - * The other string to be echoed. - */ - private static final String STRING_2 = "R2747-2"; - - /** - * The one client. - */ - private W2JRLR2747ClientOne client1; - - /** - * The other client. - */ - private W2JRLR2747ClientTwo client2; - - static W2JRLR2747TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client1 = (W2JRLR2747ClientOne) ClientFactory - .getClient(W2JRLR2747ClientOne.class, properties, this, service); - client2 = (W2JRLR2747ClientTwo) ClientFactory - .getClient(W2JRLR2747ClientTwo.class, properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testExtensionElementUnderstanding - * - * @assertion_ids: WSI:SPEC:R2747 - * - * @test_Strategy: The supplied WSDL, containing two port types, which are - * identical except for the use of the wsdl:required attribute - * on the soap binding extension elements, has been used by - * the WSDL-to-Java tool to generate an end point. If the tool - * works correctly, the end-point has been built and deployed - * so it should simply be reachable. - * - * @throws Fault - */ - public void testExtensionElementUnderstanding() throws Fault { - String result; - try { - result = client1.echoString(STRING_1); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2747)", e); - } - if (!STRING_1.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING_1 + "' (BP-R2747)"); - } - try { - result = client2.echoString(STRING_2); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2747)", e); - } - if (!STRING_2.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING_2 + "' (BP-R2747)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747ClientOne.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747ClientOne.java deleted file mode 100644 index 1e462499a4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747ClientOne.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2747ClientOne extends SOAPClient { - public W2JRLR2747ClientOne(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2747ClientOne(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2747testservice.org/W2JRLR2747TestService.wsdl"); - stubContext.setService("W2JRLR2747TestService"); - stubContext.setPort("W2JRLR2747TestOnePort"); - stubContext.setEndpointInterface(W2JRLR2747TestOne.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2747.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2747.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR2747TestOne) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747ClientTwo.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747ClientTwo.java deleted file mode 100644 index 8fa77f23f7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747ClientTwo.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2747ClientTwo extends SOAPClient { - public W2JRLR2747ClientTwo(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2747ClientTwo(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2747testservice.org/W2JRLR2747TestService.wsdl"); - stubContext.setService("W2JRLR2747TestService"); - stubContext.setPort("W2JRLR2747TestTwoPort"); - stubContext.setEndpointInterface(W2JRLR2747TestTwo.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2747.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2747.wsdlloc.2"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR2747TestTwo) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747TestOneImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747TestOneImpl.java deleted file mode 100644 index d623ea3602..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747TestOneImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2747TestOnePort", serviceName = "W2JRLR2747TestService", targetNamespace = "http://w2jrlr2747testservice.org/W2JRLR2747TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2747TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747.W2JRLR2747TestOne") - -public class W2JRLR2747TestOneImpl implements W2JRLR2747TestOne { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747TestService.wsdl deleted file mode 100644 index 08f1982386..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747TestService.wsdl +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747TestTwoImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747TestTwoImpl.java deleted file mode 100644 index 71abc36fec..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/W2JRLR2747TestTwoImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2747TestTwoPort", serviceName = "W2JRLR2747TestService", targetNamespace = "http://w2jrlr2747testservice.org/W2JRLR2747TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2747TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747.W2JRLR2747TestTwo") - -public class W2JRLR2747TestTwoImpl implements W2JRLR2747TestTwo { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/build.xml deleted file mode 100644 index ebb0de40e1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/build.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/customfile.xml deleted file mode 100644 index f0e95c3ed4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/jakartaEE.tokens deleted file mode 100644 index 2e65118929..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2747TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747.W2JRLR2747TestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747.W2JRLR2747TestOneImpl -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747.W2JRLR2747TestOneImpl -URLALIAS=/jaxws/W2JRLR2747TestOne -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747.W2JRLR2747TestTwoImpl -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747.W2JRLR2747TestTwoImpl -URLALIAS2=/jaxws/W2JRLR2747TestTwo -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747.W2JRLR2747TestOne -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2747.W2JRLR2747TestTwo -NAMESPACEURI=http://w2jrlr2747testservice.org/W2JRLR2747TestService.wsdl -PORT=W2JRLR2747TestOnePort -PORT2=W2JRLR2747TestTwoPort -WEBSERVICEDESCRIPTION=W2JRLR2747TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2747TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2747TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2747TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/standalone-sun-jaxws.xml deleted file mode 100644 index 6a89d250a3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/standalone.web.xml deleted file mode 100644 index c17474145f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2747/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSW2JRLR2747TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2747TestTwo -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2747TestOne -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2747TestTwo -/jaxws/W2JRLR2747TestTwo - - -W2JRLR2747TestOne -/jaxws/W2JRLR2747TestOne - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/Client.java deleted file mode 100644 index ef364db192..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/Client.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The one string to be echoed. - */ - private static final String STRING_1 = "R2748-1"; - - /** - * The other string to be echoed. - */ - private static final String STRING_2 = "R2748-2"; - - /** - * The one client. - */ - private W2JRLR2748ClientOne client1; - - /** - * The other client. - */ - private W2JRLR2748ClientTwo client2; - - static W2JRLR2748TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client1 = (W2JRLR2748ClientOne) ClientFactory - .getClient(W2JRLR2748ClientOne.class, properties, this, service); - client2 = (W2JRLR2748ClientTwo) ClientFactory - .getClient(W2JRLR2748ClientTwo.class, properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testFalseWSDLRequireds - * - * @assertion_ids: WSI:SPEC:R2748 - * - * @test_Strategy: The supplied WSDL, containing two port types, which are - * identical except for the use of the wsdl:required attribute - * on the soap binding extension elements, has been used by - * the WSDL-to-Java tool to generate an end point. If the tool - * works correctly, the end-point has been built and deployed - * so it should simply be reachable. - * - * @throws Fault - */ - public void testFalseWSDLRequireds() throws Fault { - String result; - try { - result = client1.echoString(STRING_1); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2748)", e); - } - if (!STRING_1.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING_1 + "' (BP-R2748)"); - } - try { - result = client2.echoString(STRING_2); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R2748)", e); - } - if (!STRING_2.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING_2 + "' (BP-R2748)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748ClientOne.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748ClientOne.java deleted file mode 100644 index 4bb3e72db4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748ClientOne.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2748ClientOne extends SOAPClient { - public W2JRLR2748ClientOne(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2748ClientOne(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2748testservice.org/W2JRLR2748TestService.wsdl"); - stubContext.setService("W2JRLR2748TestService"); - stubContext.setPort("W2JRLR2748TestOnePort"); - stubContext.setEndpointInterface(W2JRLR2748TestOne.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2748.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2748.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR2748TestOne) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748ClientTwo.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748ClientTwo.java deleted file mode 100644 index 40c8f1bd34..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748ClientTwo.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2748ClientTwo extends SOAPClient { - public W2JRLR2748ClientTwo(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR2748ClientTwo(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr2748testservice.org/W2JRLR2748TestService.wsdl"); - stubContext.setService("W2JRLR2748TestService"); - stubContext.setPort("W2JRLR2748TestTwoPort"); - stubContext.setEndpointInterface(W2JRLR2748TestTwo.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2748.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2748.wsdlloc.2"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR2748TestTwo) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748TestOneImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748TestOneImpl.java deleted file mode 100644 index 862a24807a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748TestOneImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2748TestOnePort", serviceName = "W2JRLR2748TestService", targetNamespace = "http://w2jrlr2748testservice.org/W2JRLR2748TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2748TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748.W2JRLR2748TestOne") - -public class W2JRLR2748TestOneImpl implements W2JRLR2748TestOne { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748TestService.wsdl deleted file mode 100644 index 9bba39ea36..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748TestService.wsdl +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748TestTwoImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748TestTwoImpl.java deleted file mode 100644 index 62edcef1cf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/W2JRLR2748TestTwoImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2748TestTwoPort", serviceName = "W2JRLR2748TestService", targetNamespace = "http://w2jrlr2748testservice.org/W2JRLR2748TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2748TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748.W2JRLR2748TestTwo") - -public class W2JRLR2748TestTwoImpl implements W2JRLR2748TestTwo { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/build.xml deleted file mode 100644 index f48f4294f6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/customfile.xml deleted file mode 100644 index 5e3eb4415c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/jakartaEE.tokens deleted file mode 100644 index 43c47bd651..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2748TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748.W2JRLR2748TestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748.W2JRLR2748TestOneImpl -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748.W2JRLR2748TestOneImpl -URLALIAS=/jaxws/W2JRLR2748TestOne -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748.W2JRLR2748TestTwoImpl -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748.W2JRLR2748TestTwoImpl -URLALIAS2=/jaxws/W2JRLR2748TestTwo -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748.W2JRLR2748TestOne -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2748.W2JRLR2748TestTwo -NAMESPACEURI=http://w2jrlr2748testservice.org/W2JRLR2748TestService.wsdl -PORT=W2JRLR2748TestOnePort -PORT2=W2JRLR2748TestTwoPort -WEBSERVICEDESCRIPTION=W2JRLR2748TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2748TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2748TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2748TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/standalone-sun-jaxws.xml deleted file mode 100644 index e6be7adfa9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/standalone.web.xml deleted file mode 100644 index a7860f7527..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2748/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSW2JRLR2748TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2748TestTwo -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2748TestOne -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2748TestTwo -/jaxws/W2JRLR2748TestTwo - - -W2JRLR2748TestOne -/jaxws/W2JRLR2748TestOne - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/Client.java deleted file mode 100644 index 0bae8228e2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/Client.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2751; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; -import com.sun.javatest.Status; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPElement; -import java.util.Properties; -import java.util.Iterator; -import java.io.InputStream; - -public class Client extends ServiceEETest implements SOAPRequests { - - private W2JRLR2751Client client; - - static W2JRLR2751TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (W2JRLR2751Client) ClientFactory.getClient(W2JRLR2751Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: IndependentOrderOfHeadersTest - * - * @assertion_ids: WSI:SPEC:R2751 - * - * @test_Strategy: Send a SOAP request that has the headers in a different - * order than they are defined in the wsdl. The endpoint - * checks for their correctness. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void IndependentOrderOfHeadersTest() throws EETest.Fault { - SOAPMessage response; - try { - response = client.makeSaajRequest(R2751_REQUEST); - } catch (Exception e) { - throw new EETest.Fault("Test didn't complete properly: ", e); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751Client.java deleted file mode 100644 index d7200e43c4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751Client.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2751; - -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; -import com.sun.ts.lib.harness.EETest; - -public class W2JRLR2751Client extends SOAPClient { - - public W2JRLR2751Client(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR2751Client(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace( - "http://w2jrlr2751testservice.org/W2JRLR2751TestService.wsdl"); - stubContext.setService("W2JRLR2751TestService"); - stubContext.setPort("W2JRLR2751TestPort"); - stubContext.setEndpointInterface(W2JRLR2751Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2751.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2751.wsdlloc.1"; - } - - public String echoIt(String item, - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2751.ConfigHeader ch, - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2751.ConfigHeader2 ch2, - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2751.ConfigHeader3 ch3) - throws Exception { - return ((W2JRLR2751Test) stubContext.getStub()).echoIt(item, ch, ch2, ch3); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestDefs.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestDefs.wsdl deleted file mode 100644 index 0be3e24337..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestDefs.wsdl +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestDefs.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestDefs.xsd deleted file mode 100644 index a4c07eef8d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestDefs.xsd +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - This is the configuration header - - - - - - - - - - - - This is the configuration header - - - - - - - - - - - - This is the configuration header - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestImpl.java deleted file mode 100644 index f8af254644..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2751; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR2751TestPort", serviceName = "W2JRLR2751TestService", targetNamespace = "http://w2jrlr2751testservice.org/W2JRLR2751TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2751TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2751.W2JRLR2751Test") - -public class W2JRLR2751TestImpl implements W2JRLR2751Test { - public String echoIt(String item, ConfigHeader ch, ConfigHeader2 ch2, - ConfigHeader3 ch3) { - - System.out.println("*** in W2JRLR2751TestImpl ***"); - String result = null; - if ((ch.getMessage().equals("ConfigHeader")) - && (ch2.getMessage().equals("ConfigHeader2")) - && (ch3.getMessage().equals("ConfigHeader3"))) { - result = "PASSED"; - } else { - throw new WebServiceException( - "FAILED - configHeader=" + ch.getMessage() + ", configHeader2=" - + ch2.getMessage() + ", configHeader3=" + ch3.getMessage()); - } - return result; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestService.wsdl deleted file mode 100644 index 5355bc9a06..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/W2JRLR2751TestService.wsdl +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/build.xml deleted file mode 100644 index 55b4adf48a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/build.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/customfile.xml deleted file mode 100644 index 2c4362b22e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/customfile.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/customfile2.xml deleted file mode 100644 index 908508558e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/jakartaEE.tokens deleted file mode 100644 index 3a06e56296..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2751TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2751.W2JRLR2751TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2751.W2JRLR2751TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2751.W2JRLR2751Test -NAMESPACEURI=http://w2jrlr2751testservice.org/W2JRLR2751TestService.wsdl -PORT=W2JRLR2751TestPort -URLALIAS=/jaxws/W2JRLR2751Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2751.W2JRLR2751TestImpl -WEBSERVICEDESCRIPTION=W2JRLR2751TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2751TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2751TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2751TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/standalone-sun-jaxws.xml deleted file mode 100644 index 775b8c7985..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/standalone.web.xml deleted file mode 100644 index 3aafaca8b7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2751/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2751TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR2751Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR2751Test -/jaxws/W2JRLR2751Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/Client.java deleted file mode 100644 index d79c603bb3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/Client.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2753; - -import com.sun.ts.lib.harness.*; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.constants.WSIConstants; -import com.sun.javatest.Status; - -import java.util.Properties; - -public class Client extends ServiceEETest implements WSIConstants { - - private W2JRLR2753Client client; - - static SimpleTest service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client tests = new Client(); - Status status = tests.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void setup(String[] args, Properties properties) throws EETest.Fault { - client = (W2JRLR2753Client) ClientFactory.getClient(W2JRLR2753Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testExtraMustUnderstandHeader - * - * @assertion_ids: WSI:SPEC:R12753; JAXWS:SPEC:9001 - * - * @test_Strategy: Make a request and add a header not contained in the wsdl, - * and set it to 'mustUnderstand=1'. Ensure the request and - * response are normal. - * - * @throws com.sun.ts.lib.harness.EETest.Fault - */ - public void testExtraMustUnderstandHeader() throws EETest.Fault { - String response = ""; - try { - response = client.helloWorld(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EETest.Fault("Test didn't complete properly: ", e); - } - if (!response.equals("hello world")) { - throw new EETest.Fault("Error creating response object:" + response); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/R2753Handler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/R2753Handler.java deleted file mode 100644 index 300dad9ec7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/R2753Handler.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2753; - -import jakarta.xml.ws.handler.soap.SOAPHandler; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; -import javax.xml.namespace.QName; -import jakarta.xml.soap.*; - -import java.util.Set; -import java.util.HashSet; - -public class R2753Handler implements SOAPHandler { - - public Set getHeaders() { - Set s = new HashSet(); - s.add(new QName("http://extra-header.org", "extra-header")); - return s; - } - - public void init(java.util.Map config) { - }; - - public boolean handleFault(SOAPMessageContext context) { - return true; - }; - - public void destroy() { - }; - - public void close(MessageContext context) { - }; - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("HANDLER: R2739Handler.handleMessage() BEGIN"); - handle(context); - System.out.println("HANDLER: R2739Handler.handleMessage() END"); - return true; - } - - private void handle(MessageContext context) { - try { - addExtraHeader((SOAPMessageContext) context); - } catch (SOAPException se) { - com.sun.ts.lib.util.TestUtil.printStackTrace(se); - } - } - - private void addExtraHeader(SOAPMessageContext context) throws SOAPException { - SOAPEnvelope env = context.getMessage().getSOAPPart().getEnvelope(); - if (env.getHeader() == null) { - SOAPHeader header = env.addHeader(); - SOAPHeaderElement extraHeader = header - .addHeaderElement(getExtraHeaderName(env)); - extraHeader.setActor("extra-header-actor"); - extraHeader.setMustUnderstand(true); - context.getMessage().saveChanges(); - } - } - - private Name getExtraHeaderName(SOAPEnvelope env) throws SOAPException { - return env.createName("extra-header", "ns1", "http://extra-header.org"); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/SimpleEndpointImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/SimpleEndpointImpl.java deleted file mode 100644 index f5aa52f5e7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/SimpleEndpointImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2753; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "SimpleEndpointPort", serviceName = "SimpleTest", targetNamespace = "http://simpletestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR2753TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2753.SimpleEndpoint") - -public class SimpleEndpointImpl implements SimpleEndpoint { - public String helloWorld() { - return "hello world"; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/W2JRLR2753Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/W2JRLR2753Client.java deleted file mode 100644 index f13872d295..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/W2JRLR2753Client.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2753; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR2753Client extends SOAPClient { - - public W2JRLR2753Client(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public W2JRLR2753Client(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://simpletestservice.org/wsdl"); - stubContext.setService("SimpleTest"); - stubContext.setPort("SimpleEndpointPort"); - stubContext.setEndpointInterface(SimpleEndpoint.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr2753.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr2753.wsdlloc.1"; - } - - public String helloWorld() throws Exception { - return ((SimpleEndpoint) stubContext.getStub()).helloWorld(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/W2JRLR2753TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/W2JRLR2753TestService.wsdl deleted file mode 100644 index d24300de7c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/W2JRLR2753TestService.wsdl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/build.xml deleted file mode 100644 index 61d1912dbf..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/build.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/customfile-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/customfile-client.xml deleted file mode 100644 index c98e353641..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/customfile-client.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/customfile-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/customfile-server.xml deleted file mode 100644 index 1e21623dc3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/customfile-server.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - R2753Handler - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2753.R2753Handler - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/jakartaEE.tokens deleted file mode 100644 index 420817f9d1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR2753TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2753.SimpleTest -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2753.SimpleEndpointImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2753.SimpleEndpoint -NAMESPACEURI=http://simpletestservice.org/wsdl -PORT=SimpleEndpointPort -URLALIAS=/jaxws/SimpleTest -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R2753.SimpleEndpointImpl -WEBSERVICEDESCRIPTION=SimpleTest -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR2753TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR2753TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR2753TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/standalone-sun-jaxws.xml deleted file mode 100644 index 1449a76417..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/standalone.web.xml deleted file mode 100644 index 8e7ddc0088..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R2753/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR2753TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -SimpleTest -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -SimpleTest -/jaxws/SimpleTest - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/Client.java deleted file mode 100644 index 0a6e1871eb..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/Client.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)Client.java 1.3 03/05/09 - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4001; - -import java.nio.charset.Charset; -import java.util.Properties; - -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.SOAPMessage; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest implements SOAPRequests { - - /** - * The string to be echoed for request two. - */ - private static final String STRING_2 = "R4001-2"; - - /** - * The one client. - */ - private W2JRLR4001ClientOne client1; - - static W2JRLR4001TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client1 = (W2JRLR4001ClientOne) ClientFactory - .getClient(W2JRLR4001ClientOne.class, properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testRequestWithBOM - * - * @assertion_ids: WSI:SPEC:R4001 - * - * @test_Strategy: A valid request, encoded in UTF-16 with a BOM, is sent to - * the endpoint. A conformant server must correctly process it - * and return the expected response. - * - * @throws Fault - */ - public void testRequestWithBOM() throws Fault { - SOAPMessage response; - try { - Charset cs = Charset.forName("UTF-16"); - response = client1.makeSaajRequest(R4001_REQUEST, cs); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R4001)", e); - } - try { - SOAPBody body = response.getSOAPPart().getEnvelope().getBody(); - if (body.hasFault()) { - throw new Fault("Request not processed by endpoint (BP-R4001)"); - } - } catch (SOAPException e) { - throw new Fault("Invalid SOAP message returned (BP-R4001)", e); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/W2JRLR4001ClientOne.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/W2JRLR4001ClientOne.java deleted file mode 100644 index 597580dde0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/W2JRLR4001ClientOne.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4001; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR4001ClientOne extends SOAPClient { - public W2JRLR4001ClientOne(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR4001ClientOne(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr4001testservice.org/W2JRLR4001TestService.wsdl"); - stubContext.setService("W2JRLR4001TestService"); - stubContext.setPort("W2JRLR4001TestOnePort"); - stubContext.setEndpointInterface(W2JRLR4001TestOne.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr4001.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr4001.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR4001TestOne) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/W2JRLR4001TestOneImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/W2JRLR4001TestOneImpl.java deleted file mode 100644 index 9d28a46676..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/W2JRLR4001TestOneImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4001; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR4001TestOnePort", serviceName = "W2JRLR4001TestService", targetNamespace = "http://w2jrlr4001testservice.org/W2JRLR4001TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR4001TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4001.W2JRLR4001TestOne") - -public class W2JRLR4001TestOneImpl implements W2JRLR4001TestOne { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/W2JRLR4001TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/W2JRLR4001TestService.wsdl deleted file mode 100644 index 14f155a753..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/W2JRLR4001TestService.wsdl +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/build.xml deleted file mode 100644 index 1f0673f555..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/customfile.xml deleted file mode 100644 index e181e031dc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/jakartaEE.tokens deleted file mode 100644 index 2f7057e98a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR4001TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4001.W2JRLR4001TestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4001.W2JRLR4001TestOneImpl -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4001.W2JRLR4001TestOneImpl -URLALIAS=/jaxws/W2JRLR4001TestOne -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4001.W2JRLR4001TestOne -NAMESPACEURI=http://w2jrlr4001testservice.org/W2JRLR4001TestService.wsdl -PORT=W2JRLR4001TestOnePort -WEBSERVICEDESCRIPTION=W2JRLR4001TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR4001TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR4001TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR4001TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/standalone-sun-jaxws.xml deleted file mode 100644 index c45acfa2b9..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/standalone.web.xml deleted file mode 100644 index bdf39978ba..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4001/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR4001TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR4001TestOne -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR4001TestOne -/jaxws/W2JRLR4001TestOne - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/Client.java deleted file mode 100644 index 1a9cf21e09..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/Client.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4002; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String STRING = "R4002"; - - /** - * The client. - */ - private W2JRLR4002Client client; - - static W2JRLR4002TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR4002Client) ClientFactory.getClient(W2JRLR4002Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testDescriptionWithBOM - * - * @assertion_ids: WSI:SPEC:R4002 - * - * @test_Strategy: The supplied WSDL, encoded as UTF-16 and containing a BOM, - * has been used by the WSDL-to-Java tool to generate an end - * point. If the tool works correctly, the end-point has been - * built and deployed so it should simply be reachable. - * - * @throws Fault - */ - public void testDescriptionWithBOM() throws Fault { - String result; - try { - result = client.echoString(STRING); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (BP-R4002)", e); - } - if (!STRING.equals(result)) { - throw new Fault("echoString operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R4002)"); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002Client.java deleted file mode 100644 index 3fa7015a85..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002Client.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4002; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR4002Client extends SOAPClient { - public W2JRLR4002Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR4002Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr4002testservice.org/W2JRLR4002TestService.wsdl"); - stubContext.setService("W2JRLR4002TestService"); - stubContext.setPort("W2JRLR4002TestPort"); - stubContext.setEndpointInterface(W2JRLR4002Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr4002.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr4002.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR4002Test) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002TestImpl.java deleted file mode 100644 index d77dd4e33e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002TestImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4002; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR4002TestPort", serviceName = "W2JRLR4002TestService", targetNamespace = "http://w2jrlr4002testservice.org/W2JRLR4002TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR4002TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4002.W2JRLR4002Test") - -public class W2JRLR4002TestImpl implements W2JRLR4002Test { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002TestService.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002TestService.txt deleted file mode 100644 index 738d494508..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002TestService.txt +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002TestService.wsdl deleted file mode 100644 index 85bf84f692..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/W2JRLR4002TestService.wsdl and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/build.xml deleted file mode 100644 index a8ba0853a5..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/customfile.xml deleted file mode 100644 index 1cf12609f7..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/customfile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/jakartaEE.tokens deleted file mode 100644 index 9f58d30a01..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR4002TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4002.W2JRLR4002TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4002.W2JRLR4002TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4002.W2JRLR4002Test -NAMESPACEURI=http://w2jrlr4002testservice.org/W2JRLR4002TestService.wsdl -PORT=W2JRLR4002TestPort -URLALIAS=/jaxws/W2JRLR4002Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4002.W2JRLR4002TestImpl -WEBSERVICEDESCRIPTION=W2JRLR4002TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR4002TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR4002TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR4002TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/standalone-sun-jaxws.xml deleted file mode 100644 index d2a104ad6d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/standalone.web.xml deleted file mode 100644 index 098bfbacfa..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4002/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR4002TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR4002Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR4002Test -/jaxws/W2JRLR4002Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/Client.java deleted file mode 100644 index f8fa37bbac..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/Client.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4003; - -import java.util.Properties; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest { - /** - * The string to be echoed. - */ - private static final String STRING = "R4003"; - - /** - * The client. - */ - private W2JRLR4003Client client; - - static W2JRLR4003TestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client = (W2JRLR4003Client) ClientFactory.getClient(W2JRLR4003Client.class, - properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - /** - * @testName: testWSDLImportUTF8UTF16 - * - * @assertion_ids: WSI:SPEC:R4003 - * - * @test_Strategy: The supplied WSDL imports both a UTF8 and UTF16 wsdl. - * - * @throws Fault - */ - public void testWSDLImportUTF8UTF16() throws Fault { - testImportUTF8WSDL(); - testImportUTF16WSDL(); - } - - private void testImportUTF8WSDL() throws Fault { - String result; - try { - result = client.echoStringUTF8(STRING); - } catch (Exception e) { - throw new Fault("Unable to invoke echoStringUTF8 operation (BP-R4003)", - e); - } - if (!STRING.equals(result)) { - throw new Fault("echoStringUTF8 operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R4003)"); - } - } - - private void testImportUTF16WSDL() throws Fault { - String result; - try { - result = client.echoStringUTF16(STRING); - } catch (Exception e) { - throw new Fault("Unable to invoke echoStringUTF16 operation (BP-R4003)", - e); - } - if (!STRING.equals(result)) { - throw new Fault("echoStringUTF16 operation returns '" + result - + "' in stead of '" + STRING + "' (BP-R4003)"); - } - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003Client.java deleted file mode 100644 index 561d93c7ba..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003Client.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4003; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR4003Client extends SOAPClient { - public W2JRLR4003Client(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - stubContext.setEndpointInterface(W2JRLR4003Test.class); - } - - public W2JRLR4003Client(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr4003testservice.org/W2JRLR4003TestService.wsdl"); - stubContext.setService("W2JRLR4003TestService"); - stubContext.setPort("W2JRLR4003TestPort"); - stubContext.setEndpointInterface(W2JRLR4003Test.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr4003.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr4003.wsdlloc.1"; - } - - public String echoStringUTF8(String str) throws Exception { - NonNullStringUTF8 nns = new NonNullStringUTF8(); - nns.setP1(str); - nns = ((W2JRLR4003Test) stubContext.getStub()).echoStringUTF8(nns); - return nns.getP1(); - } - - public String echoStringUTF16(String str) throws Exception { - NonNullStringUTF16 nns = new NonNullStringUTF16(); - nns.setP1(str); - nns = ((W2JRLR4003Test) stubContext.getStub()).echoStringUTF16(nns); - return nns.getP1(); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF16.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF16.txt deleted file mode 100644 index b3f95e0c3d..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF16.txt +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF16.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF16.wsdl deleted file mode 100644 index e38faf4906..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF16.wsdl and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF16.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF16.xsd deleted file mode 100644 index 545785c771..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF16.xsd and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF8.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF8.txt deleted file mode 100644 index 0e8f48888e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF8.txt +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF8.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF8.wsdl deleted file mode 100644 index 0e8f48888e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF8.wsdl +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF8.xsd b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF8.xsd deleted file mode 100644 index 1255974bf0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003ImportUTF8.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003TestImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003TestImpl.java deleted file mode 100644 index 23bf3a10ce..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003TestImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4003; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR4003TestPort", serviceName = "W2JRLR4003TestService", targetNamespace = "http://w2jrlr4003testservice.org/W2JRLR4003TestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR4003TestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4003.W2JRLR4003Test") - -public class W2JRLR4003TestImpl implements W2JRLR4003Test { - public NonNullStringUTF8 echoStringUTF8(NonNullStringUTF8 str) { - return str; - } - - public NonNullStringUTF16 echoStringUTF16(NonNullStringUTF16 str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003TestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003TestService.wsdl deleted file mode 100644 index 964279bf2e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003TestService.wsdl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003UTF16.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003UTF16.txt deleted file mode 100644 index 59e2aa965b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003UTF16.txt +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003UTF8.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003UTF8.txt deleted file mode 100644 index 1255974bf0..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/W2JRLR4003UTF8.txt +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/build.xml deleted file mode 100644 index b1cf350158..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/build.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/customfile.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/customfile.xml deleted file mode 100644 index 3aafb8c23a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/customfile.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/customfile2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/customfile2.xml deleted file mode 100644 index ba6e9dd43f..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/customfile2.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/jakartaEE.tokens deleted file mode 100644 index 1f8d8702d3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR4003TestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4003.W2JRLR4003TestService -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4003.W2JRLR4003TestImpl -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4003.W2JRLR4003Test -NAMESPACEURI=http://w2jrlr4003testservice.org/W2JRLR4003TestService.wsdl -PORT=W2JRLR4003TestPort -URLALIAS=/jaxws/W2JRLR4003Test -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R4003.W2JRLR4003TestImpl -WEBSERVICEDESCRIPTION=W2JRLR4003TestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR4003TestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR4003TestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR4003TestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/jakartaEE.web.xml deleted file mode 100644 index ba557da7b2..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@App - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/standalone-sun-jaxws.xml deleted file mode 100644 index 4e61230018..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/standalone-sun-jaxws.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/standalone.web.xml deleted file mode 100644 index 423211156b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R4003/standalone.web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - WSW2JRLR4003TestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR4003Test -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR4003Test -/jaxws/W2JRLR4003Test - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/Client.java deleted file mode 100644 index a4a1dec119..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/Client.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX; - -import java.io.InputStream; -import java.nio.charset.Charset; -import java.util.Properties; -import com.sun.ts.lib.util.TestUtil; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import com.sun.ts.lib.harness.*; - -public class Client extends ServiceEETest - implements SOAPConstants, SOAPRequests { - - /** - * The string to be echoed for request two. - */ - private static final String STRING_2 = "R97XX-2"; - - /** - * The one client. - */ - private W2JRLR97XXClientOne client1; - - /** - * The other client. - */ - private W2JRLR97XXClientTwo client2; - - static W2JRLR97XXTestService service = null; - - /** - * Test entry point. - * - * @param args - * the command-line arguments. - */ - public static void main(String[] args) { - Client client = new Client(); - Status status = client.run(args, System.out, System.err); - status.exit(); - } - - /** - * @class.testArgs: -ap jaxws-url-props.dat - * @class.setup_props: webServerHost; webServerPort; platform.mode; - * - * @param args - * @param properties - * - * @throws Fault - */ - public void setup(String[] args, Properties properties) throws Fault { - client1 = (W2JRLR97XXClientOne) ClientFactory - .getClient(W2JRLR97XXClientOne.class, properties, this, service); - client2 = (W2JRLR97XXClientTwo) ClientFactory - .getClient(W2JRLR97XXClientTwo.class, properties, this, service); - logMsg("setup ok"); - } - - public void cleanup() { - logMsg("cleanup"); - } - - private boolean isElement(Element element, String namespaceURI, - String localName) { - if (!namespaceURI.equals(element.getNamespaceURI())) { - return false; - } - return localName.equals(element.getLocalName()); - } - - /** - * @testName: testResponseEncoding - * - * @assertion_ids: WSI:SPEC:R9700; WSI:SPEC:R9701; WSI:SPEC:R9702; - * WSI:SPEC:R9703; WSI:SPEC:R1018; WSI:SPEC:R1140; - * WSI:SPEC:R1132; - * - * @test_Strategy: A valid request is made to the endpoint and the returned - * response is investigated in order to determine the - * encoding. - * - * @throws Fault - */ - public void testResponseEncoding() throws Fault { - InputStream is; - Charset cs = Charset.forName("UTF-8"); - try { - is = client1.makeHTTPRequest(R97XX_REQUEST, cs); - - // Testing for correct Content-Type header info - String contentType = client1.getResponseHeader("Content-Type"); - TestUtil.logMsg("Content-Type:" + contentType); - if (contentType == null) - throw new Fault( - "R9700,R9701,R9702,R9703,R1018 assertions failed - missing Content-Type header"); - else if (contentType != null) { - if (contentType.indexOf("text/xml") == -1) - throw new Fault( - "R9703 assertion failed - Content-Type header not text/xml"); - int index = contentType.toLowerCase().indexOf("charset="); - if (index == -1) - throw new Fault( - "R1018 assertion failed - Content-Type header missing charset attribute"); - if (index > 0) { - String name = contentType.substring(index + 8).trim(); - char c = name.charAt(0); - if ((c == '\"') || (c == '\'')) { - name = name.substring(1, name.length() - 1); - } - if ((name.equalsIgnoreCase("UTF-8")) - || name.equalsIgnoreCase("UTF-16")) { - cs = Charset.forName(name); - } else { - throw new Fault( - "R9700,R9701,R1018 assertions failed - Content-Type header attribute charset not UTF-8 or UTF-16 but " - + name); - } - } - } - - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (R97XX)", e); - } - try { - // Testing for serialization of envelope as XML 1.0 - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - DocumentBuilder builder = factory.newDocumentBuilder(); - Document document = builder.parse(is); - Element envelope = document.getDocumentElement(); - if (!isElement(envelope, "http://schemas.xmlsoap.org/soap/envelope/", - "Envelope")) { - throw new Fault("Expected 'env:Envelope' element not received (R9701)"); - } - } catch (Exception e) { - com.sun.ts.lib.util.TestUtil.printStackTrace(e); - throw new Fault("Failed to parse XML document information"); - } - } - - /** - * @testName: testRequestEncoding - * - * @assertion_ids: WSI:SPEC:R97XX - * - * @test_Strategy: A request is made from the generated client. A handler - * verifies the encoding. An exception is thrown if ther eis a - * failure - * - * @throws Fault - */ - public void testRequestEncoding() throws Fault { - String result; - try { - result = client2.echoString(STRING_2); - } catch (Exception e) { - throw new Fault("Unable to invoke echoString operation (R97XX)", e); - } - TestUtil.logMsg("result=" + result); - if (!result.equals(STRING_2)) { - if (result.equals("EXCEPTION")) { - throw new Fault("Endpoint unable to process request (R97XX)"); - } else { - throw new Fault( - "Request encoding neither 'UTF-8' nor 'UTF-16' (R97XX)"); - } - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/ServerSOAPHandler.java deleted file mode 100644 index c37a8e7c9c..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/ServerSOAPHandler.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; - -import java.util.Map; -import java.util.List; - -import org.w3c.dom.Element; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPPart; -import jakarta.xml.soap.SOAPEnvelope; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - private String PASSED = "PASSED"; - - private String FAILED = "FAILED"; - - protected void processInboundMessage(SOAPMessageContext context) { - System.out.println("in ServerSOAPHandler:processInboundMessage"); - String result = null; - try { - result = verifyXMLEnvSerialization(context); - } catch (Exception e) { - throw new RuntimeException( - "Exception occurred in ServerSOAPHandler:verifyXMLEnvSerialization: " - + e); - } - System.out.println("result=" + result); - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: " + result); - } - } - - protected String verifyXMLEnvSerialization(SOAPMessageContext context) - throws Exception { - System.out.println("in ServerSOAPHandler:verifyXMLEnvSerialization"); - String result = FAILED; - - JAXWS_Util.dumpHTTPHeaders(context); - Map> map1 = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - Map> map2 = JAXWS_Util.convertKeysToLowerCase(map1); - List values = map2.get("content-type"); - System.out.println("HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - int index = sValues.indexOf("text/xml"); - if (index < 0) { - result = FAILED + ": Content-Type header not text/xml [" + sValues - + "]"; - return result; - } - index = sValues.indexOf("charset="); - if (index > 0) { - if ((sValues.indexOf("utf-8") >= 0) - || (sValues.indexOf("utf-16") >= 0)) { - result = PASSED; - } else { - result = FAILED + ":charset did not equal utf-8 or utf-16, it was |" - + sValues + "|"; - } - } else { - result = FAILED + ": charset not found in HTTP Content-Type [" + sValues - + "]"; - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - if (!result.equals(PASSED)) { - return result; - } - - try { - // Testing for serialization of envelope as XML 1.0 - - System.out.println("Testing SOAPEnvelope"); - SOAPMessage sm = context.getMessage(); - SOAPPart sp = sm.getSOAPPart(); - SOAPEnvelope se = sp.getEnvelope(); - if (!isElement(se, "http://schemas.xmlsoap.org/soap/envelope/", - "Envelope")) { - result = FAILED + ": 'env:Envelope' element not received"; - } else { - result = PASSED; - } - } catch (Exception e) { - result = "FAILED: exception occurred:" + e; - } - return result; - } - - private boolean isElement(Element element, String namespaceURI, - String localName) { - if (!namespaceURI.equals(element.getNamespaceURI())) { - return false; - } - return localName.equals(element.getLocalName()); - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXClientOne.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXClientOne.java deleted file mode 100644 index 3ed4349038..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXClientOne.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR97XXClientOne extends SOAPClient { - public W2JRLR97XXClientOne(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR97XXClientOne(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr97XXtestservice.org/W2JRLR97XXTestService.wsdl"); - stubContext.setService("W2JRLR97XXTestService"); - stubContext.setPort("W2JRLR97XXTestOnePort"); - stubContext.setEndpointInterface(W2JRLR97XXTestOne.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr97XX.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr97XX.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR97XXTestOne) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXClientTwo.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXClientTwo.java deleted file mode 100644 index 917f158fb1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXClientTwo.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -public class W2JRLR97XXClientTwo extends SOAPClient { - public W2JRLR97XXClientTwo(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public W2JRLR97XXClientTwo(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace( - "http://w2jrlr97XXtestservice.org/W2JRLR97XXTestService.wsdl"); - stubContext.setService("W2JRLR97XXTestService"); - stubContext.setPort("W2JRLR97XXTestTwoPort"); - stubContext.setEndpointInterface(W2JRLR97XXTestTwo.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsi.w2jrlr97XX.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsi.w2jrlr97XX.wsdlloc.1"; - } - - public String echoString(String str) throws Exception { - NonNullString nns = new NonNullString(); - nns.setP1(str); - nns = ((W2JRLR97XXTestTwo) stubContext.getStub()).echoString(nns); - return nns.getP1(); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXTestOneImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXTestOneImpl.java deleted file mode 100644 index 29fcf3e0da..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXTestOneImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR97XXTestOnePort", serviceName = "W2JRLR97XXTestService", targetNamespace = "http://w2jrlr97XXtestservice.org/W2JRLR97XXTestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR97XXTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX.W2JRLR97XXTestOne") -public class W2JRLR97XXTestOneImpl implements W2JRLR97XXTestOne { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXTestService.wsdl deleted file mode 100644 index 2a1fde799a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXTestService.wsdl +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXTestTwoImpl.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXTestTwoImpl.java deleted file mode 100644 index 965e34a018..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/W2JRLR97XXTestTwoImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX; - -import jakarta.jws.WebService; - -@WebService(portName = "W2JRLR97XXTestTwoPort", serviceName = "W2JRLR97XXTestService", targetNamespace = "http://w2jrlr97XXtestservice.org/W2JRLR97XXTestService.wsdl", wsdlLocation = "WEB-INF/wsdl/W2JRLR97XXTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX.W2JRLR97XXTestTwo") - -public class W2JRLR97XXTestTwoImpl implements W2JRLR97XXTestTwo { - public NonNullString echoString(NonNullString str) { - return str; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/build.xml deleted file mode 100644 index 30318c1ca1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/build.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/custom-client.xml deleted file mode 100644 index ff2615412a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/custom-server.xml deleted file mode 100644 index 820beca786..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/custom-server.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - ns1:W2JRLR97XXTestTwoPort - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX.ServerSOAPHandler - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/jakartaEE.tokens deleted file mode 100644 index cbbace9742..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSW2JRLR97XXTestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX.W2JRLR97XXTestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX.W2JRLR97XXTestOneImpl -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX.W2JRLR97XXTestOneImpl -URLALIAS=/jaxws/W2JRLR97XXTestOne -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX.W2JRLR97XXTestTwoImpl -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX.W2JRLR97XXTestTwoImpl -URLALIAS2=/jaxws/W2JRLR97XXTestTwo -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX.W2JRLR97XXTestOne -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.R97XX.W2JRLR97XXTestTwo -NAMESPACEURI=http://w2jrlr97XXtestservice.org/W2JRLR97XXTestService.wsdl -PORT=W2JRLR97XXTestOnePort -PORT2=W2JRLR97XXTestTwoPort -WEBSERVICEDESCRIPTION=W2JRLR97XXTestService -SERVICEREFNAMEWSSERVLET=service/WSW2JRLR97XXTestService -SERVICEREFNAMEWSEJB=service/WSW2JRLR97XXTestService -SERVICEREFNAMEWSAPPCLIENT=service/WSW2JRLR97XXTestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/standalone-sun-jaxws.xml deleted file mode 100644 index 82388d375a..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/standalone-sun-jaxws.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/standalone.web.xml deleted file mode 100644 index 9a530be343..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/R97XX/standalone.web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - WSW2JRLR97XXTestServiceApp - -com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - -W2JRLR97XXTestOne -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR97XXTestTwo -com.sun.xml.ws.transport.http.servlet.WSServlet -1 - - -W2JRLR97XXTestOne -/jaxws/W2JRLR97XXTestOne - - -W2JRLR97XXTestTwo -/jaxws/W2JRLR97XXTestTwo - - - 54 - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/build.xml deleted file mode 100644 index dca881c67e..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/Client.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/Client.java deleted file mode 100644 index d415f41e07..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/Client.java +++ /dev/null @@ -1,1546 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.awt.*; -import java.nio.charset.Charset; - -import jakarta.xml.soap.*; -import jakarta.activation.*; -import javax.xml.transform.stream.*; -import javax.xml.transform.*; -import jakarta.xml.ws.Holder; - -import java.util.Properties; - -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; - -public class Client extends ServiceEETest implements SOAPRequests { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsirlswatest.endpoint.1"; - - private static final String ENDPOINT_URL2 = "wsirlswatest.endpoint.2"; - - private static final String WSDLLOC_URL = "wsirlswatest.wsdlloc.1"; - - private static final String CTXROOT = "wsirlswatest.ctxroot.1"; - - private String surl = null; - - private String file = null; - - private String surl2 = null; - - private String file2 = null; - - private String ctxroot = null; - - private URL wsdlurl = null; - - private static final String NAMESPACEURI = "http://SwaTestService.org/wsdl"; - - private static final String SERVICE_NAME = "WSIRLSwaTestService"; - - private static final String PORT_NAME = "SwaTestOnePort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private DataHandler dh1 = null; - - private DataHandler dh2 = null; - - private DataHandler dh3 = null; - - private DataHandler dh4 = null; - - private DataHandler dh5 = null; - - private DataHandler dh6 = null; - - private DataHandler dh7 = null; - - private URL url1 = null; - - private URL url2 = null; - - private URL url3 = null; - - private URL url4 = null; - - private URL url5 = null; - - private URL url6 = null; - - private URL url7 = null; - - static WSIRLSwaTestService service = null; - - /*********************************************************************** - * All the test cases in this file test all of the assertions specified in the - * WSI Attachment Profile 1.0 specification. - **********************************************************************/ - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - surl = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - file2 = JAXWS_Util.getURLFromProp(ENDPOINT_URL2); - surl2 = ctsurl.getURLString(PROTOCOL, hostname, portnum, file2); - ctxroot = JAXWS_Util.getURLFromProp(CTXROOT); - TestUtil.logMsg("Service Endpoint URL: " + surl); - TestUtil.logMsg("Service Endpoint URL2: " + surl2); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - TestUtil.logMsg("Context Root: " + ctxroot); - } - - SwaTest1 port = null; - - private SwaTestClient1 client1; - - private SwaTestClient2 client2; - - private void getPortStandalone() throws Exception { - port = (SwaTest1) JAXWS_Util.getPort(wsdlurl, SERVICE_QNAME, - WSIRLSwaTestService.class, PORT_QNAME, SwaTest1.class); - JAXWS_Util.setTargetEndpointAddress(port, surl); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtain service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from Service"); - port = (SwaTest1) service.getPort( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.SwaTest1.class); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - - client1 = (SwaTestClient1) ClientFactory.getClient(SwaTestClient1.class, p, - this, service); - client2 = (SwaTestClient2) ClientFactory.getClient(SwaTestClient2.class, p, - this, service); - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - if (modeProperty.equals("standalone")) { - getTestURLs(); - getPortStandalone(); - } else { - getTestURLs(); - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (WSIRLSwaTestService) getSharedObject(); - getPortJavaEE(); - ctxroot = JAXWS_Util.getURLFromProp(CTXROOT); - } - TestUtil.logMsg("Create URL's to attachments"); - url1 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.txt"); - url2 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.html"); - url3 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.xml"); - url4 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.jpeg"); - url5 = ctsurl.getURL("http", hostname, portnum, - ctxroot + "/attach2.jpeg"); - url6 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach2.xml"); - url7 = ctsurl.getURL("http", hostname, portnum, ctxroot + "/attach.gif"); - TestUtil.logMsg("url1=" + url1); - TestUtil.logMsg("url2=" + url2); - TestUtil.logMsg("url3=" + url3); - TestUtil.logMsg("url4=" + url4); - TestUtil.logMsg("url5=" + url5); - TestUtil.logMsg("url6=" + url6); - TestUtil.logMsg("url7=" + url7); - TestUtil.logMsg("Create DataHandler's to attachments"); - dh1 = new DataHandler(url1); - dh2 = new DataHandler(url2); - dh3 = new DataHandler(url3); - dh4 = new DataHandler(javax.imageio.ImageIO.read(url4), "image/jpeg"); - dh5 = new DataHandler(javax.imageio.ImageIO.read(url5), "image/jpeg"); - dh6 = new DataHandler(url6); - dh7 = new DataHandler(javax.imageio.ImageIO.read(url7), "image/gif"); - TestUtil.logMsg("dh1.getContentType()=" + dh1.getContentType()); - TestUtil.logMsg("dh2.getContentType()=" + dh2.getContentType()); - TestUtil.logMsg("dh3.getContentType()=" + dh3.getContentType()); - TestUtil.logMsg("dh4.getContentType()=" + dh4.getContentType()); - TestUtil.logMsg("dh5.getContentType()=" + dh5.getContentType()); - TestUtil.logMsg("dh6.getContentType()=" + dh6.getContentType()); - TestUtil.logMsg("dh7.getContentType()=" + dh7.getContentType()); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: GetMultipleAttachmentsTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R9801; JAXWS:SPEC:2051; JAXWS:SPEC:2052; JAXWS:SPEC:2053; - * - * @test_Strategy: Get multiple attachments. Multiple attachments should be - * returned in the soap response. - * - */ - public void GetMultipleAttachmentsTest() throws Fault { - TestUtil.logMsg("GetMultipleAttachmentsTest"); - boolean pass = true; - - try { - InputRequestGet request = new InputRequestGet(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - request.setUrl1(url1.toString()); - request.setUrl2(url2.toString()); - TestUtil.logMsg("Get 2 attachments (text/plain) and (text/html)"); - Holder attach1 = new Holder(); - Holder attach2 = new Holder(); - Holder response = new Holder(); - port.getMultipleAttachments(request, response, attach1, attach2); - if (!ValidateRequestResponseAttachmentsGetTestCase(request, - response.value, attach1, attach2)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetMultipleAttachmentsTest failed", e); - } - if (!pass) - throw new Fault("GetMultipleAttachmentsTest failed"); - } - - /* - * @testName: PutMultipleAttachmentsTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R9801; JAXWS:SPEC:2051; JAXWS:SPEC:2052; JAXWS:SPEC:2053; - * - * @test_Strategy: Put multiple attachments. Multiple attachments should be - * sent in the soap request and a status result is returned in the soap - * response. - * - */ - public void PutMultipleAttachmentsTest() throws Fault { - TestUtil.logMsg("PutMultipleAttachmentsTest"); - boolean pass = true; - - try { - InputRequestPut request = new InputRequestPut(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - request.setHeader("notused"); - DataHandler attach1 = dh1; - DataHandler attach2 = dh2; - TestUtil.logMsg("Put 2 attachments (text/plain) and (text/html)"); - String response = port.putMultipleAttachments(request, attach1, attach2); - if (!response.equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("PutMultipleAttachmentsTest failed", e); - } - - if (!pass) - throw new Fault("PutMultipleAttachmentsTest failed"); - } - - /* - * @testName: EchoMultipleAttachmentsTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R9801; JAXWS:SPEC:2051; JAXWS:SPEC:2052; JAXWS:SPEC:2053; - * - * @test_Strategy: Echo multiple attachments. Multiple attachments should be - * sent in the soap request and returned in the soap response. - * - */ - public void EchoMultipleAttachmentsTest() throws Fault { - TestUtil.logMsg("EchoMultipleAttachmentsTest"); - boolean pass = true; - - try { - InputRequest request = new InputRequest(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - Holder attach1 = new Holder(); - Holder attach2 = new Holder(); - attach1.value = dh1; - attach2.value = dh2; - TestUtil.logMsg("Echo 2 attachments (text/plain) and (text/html)"); - OutputResponse response = port.echoMultipleAttachments(request, attach1, - attach2); - if (!ValidateRequestResponseAttachmentsEchoTestCase(request, response, - attach1, attach2)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoMultipleAttachmentsTest failed", e); - } - - if (!pass) - throw new Fault("EchoMultipleAttachmentsTest failed"); - } - - /* - * @testName: EchoGifImageTypeTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R9801; JAXWS:SPEC:2051; JAXWS:SPEC:2052; JAXWS:SPEC:2053; - * - * @test_Strategy: Echo an image/gif attachment. This is a special test case. - * Due to the limitations of the platform a JAXWS implementation is required - * only to support decoding of images of type image/gif, but not encoding of - * them. This test case should throw an exception if the JAXWS implementation - * does not support encoding of images of types image/gif and it should pass - * if it does support encoding of images of type image/gif. - * - */ - public void EchoGifImageTypeTest() throws Fault { - TestUtil.logMsg("EchoGifImageTypeTest"); - boolean pass = true; - - try { - VoidRequest request = new VoidRequest(); - TestUtil.logMsg("Echo attachment (image/gif)"); - TestUtil.logMsg("Due to the limitation of the platform, a JAXWS " - + "implementation is not\nrequired to encode images of type " - + "image/gif. Therefore this test case\nshould throw an exception " - + "if the JAXWS implementation does not support\nencoding of images " - + "of type image/gif and it should pass if it does\nsupport " - + "encoding of images of type image/gif."); - Holder attach1 = new Holder(); - attach1.value = javax.imageio.ImageIO.read(url7); - String response = port.echoGifImageType(request, attach1); - if (!response.equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - pass = false; - } else { - Image image1 = javax.imageio.ImageIO.read(url7); - Image image2 = attach1.value; - if (!AttachmentHelper.compareImages(image1, image2, - new Rectangle(0, 0, 100, 120), "Attachment1")) - pass = false; - } - } catch (Exception e) { - TestUtil.logMsg("Caught expected exception: " + e.getMessage()); - } - - if (!pass) - throw new Fault("EchoGifImageTypeTest failed"); - } - - /* - * @testName: EchoNoAttachmentsTest - * - * @assertion_ids: WSI:SPEC:R2917; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Echo no attachments. No attachments should be sent in the - * soap request or returned in the soap response. - * - */ - public void EchoNoAttachmentsTest() throws Fault { - TestUtil.logMsg("EchoNoAttachmentsTest"); - boolean pass = true; - - try { - InputRequestString request = new InputRequestString(); - request.setMyString("Hello"); - TestUtil.logMsg("Echo no attachments"); - String response = port.echoNoAttachments(request); - if (!response.equals(request.getMyString())) { - TestUtil.logErr("OutputString is not equal to InputString"); - TestUtil.logErr("InputString=" + request.getMyString()); - TestUtil.logErr("OutputString=" + response); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoNoAttachmentsTest failed", e); - } - - if (!pass) - throw new Fault("EchoNoAttachmentsTest failed"); - } - - /* - * @testName: EchoAllAttachmentTypesTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R9801; - * - * @test_Strategy: Echo all attachment types. Attachments for each supported - * mime type is sent in the soap request and then returned in the soap - * response. This test sends and returns attachments for all the supported - * mime types. - * - */ - public void EchoAllAttachmentTypesTest() throws Fault { - TestUtil.logMsg("EchoAllAttachmentTypesTest"); - boolean pass = true; - - try { - TestUtil.logMsg( - "Echo all attachments types: (text/plain), (text/html), (text/xml), (image/jpeg)"); - Holder attach1 = new Holder(); - attach1.value = dh1; - Holder attach2 = new Holder(); - attach2.value = dh2; - Holder attach3 = new Holder(); - attach3.value = new StreamSource(dh3.getInputStream()); - Holder attach4 = new Holder(); - Holder attach5 = new Holder(); - attach4.value = javax.imageio.ImageIO.read(url4); - attach5.value = javax.imageio.ImageIO.read(url5); - Holder attach6 = new Holder(); - attach6.value = new StreamSource(dh6.getInputStream()); - VoidRequest request = new VoidRequest(); - OutputResponseAll response = port.echoAllAttachmentTypes(request, attach1, - attach2, attach3, attach4, attach5, attach6); - if (!ValidateRequestResponseAttachmentsEchoAllTestCase(request, response, - attach1, attach2, attach3, attach4, attach5, attach6)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoAllAttachmentTypesTest failed", e); - } - - if (!pass) - throw new Fault("EchoAllAttachmentTypesTest failed"); - } - - /* - * @testName: PutAllAttachmentTypesTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R9801; - * - * @test_Strategy: Put all attachment types. Attachments for each supported - * mime type is sent in the soap request and a status result is returned in - * the soap response. - */ - public void PutAllAttachmentTypesTest() throws Fault { - TestUtil.logMsg("PutAllAttachmentTypesTest"); - boolean pass = true; - - try { - TestUtil.logMsg( - "Put all attachments types: (text/plain), (text/html), (text/xml), (image/jpeg)"); - DataHandler attach1 = dh1; - DataHandler attach2 = dh2; - Source attach3 = new StreamSource(dh3.getInputStream()); - Image attach4 = javax.imageio.ImageIO.read(url4); - Image attach5 = javax.imageio.ImageIO.read(url5); - InputRequestPutAll request = new InputRequestPutAll(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - request.setMimeType3("text/xml"); - request.setMimeType4("image/jpeg"); - request.setMimeType5("image/jpeg"); - request.setMimeType6("text/xml"); - Source attach6 = new StreamSource(dh6.getInputStream()); - String response = port.putAllAttachmentTypes(request, attach1, attach2, - attach3, attach4, attach5, attach6); - if (!response.equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("PutAllAttachmentTypesTest failed", e); - } - - if (!pass) - throw new Fault("PutAllAttachmentTypesTest failed"); - } - - /* - * @testName: GetAllAttachmentTypesTest - * - * @assertion_ids: WSI:SPEC:R2901; WSI:SPEC:R2907; WSI:SPEC:R2909; - * WSI:SPEC:R2910; WSI:SPEC:R2911; WSI:SPEC:R2931; WSI:SPEC:R2921; - * WSI:SPEC:R2926; WSI:SPEC:R2929; WSI:SPEC:R2946; JAXWS:SPEC:10011; - * WSI:SPEC:R9801; - * - * @test_Strategy: Get all attachment types. Attachments for each supported - * mime type should be returned in the soap response. - * - */ - public void GetAllAttachmentTypesTest() throws Fault { - TestUtil.logMsg("GetAllAttachmentTypesTest"); - boolean pass = true; - - try { - InputRequestGetAll request = new InputRequestGetAll(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - request.setMimeType3("text/xml"); - request.setMimeType4("image/jpeg"); - request.setMimeType5("image/jpeg"); - request.setMimeType6("text/xml"); - request.setUrl1(url1.toString()); - request.setUrl2(url2.toString()); - request.setUrl3(url3.toString()); - request.setUrl4(url4.toString()); - request.setUrl5(url5.toString()); - request.setUrl6(url6.toString()); - TestUtil.logMsg( - "Get all attachments types: (text/plain), (text/html), (text/xml), (image/jpeg)"); - Holder attach1 = new Holder(); - Holder attach2 = new Holder(); - Holder attach3 = new Holder(); - Holder attach4 = new Holder(); - Holder attach5 = new Holder(); - Holder attach6 = new Holder(); - Holder response = new Holder(); - port.getAllAttachmentTypes(request, response, attach1, attach2, attach3, - attach4, attach5, attach6); - if (!ValidateRequestResponseAttachmentsGetAllTestCase(request, - response.value, attach1, attach2, attach3, attach4, attach5, attach6)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("GetAllAttachmentTypesTest failed", e); - } - if (!pass) - throw new Fault("GetAllAttachmentTypesTest failed"); - } - - /* - * @testName: EchoAttachmentsAndThrowAFaultTest - * - * @assertion_ids: WSI:SPEC:R2913; WSI:SPEC:R2920; WSI:SPEC:R2930; - * WSI:SPEC:R2946; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Echo attachments and throw back a soap fault. Multiple - * attachments should be sent in the soap request and the endpoint should - * throw back a soap fault. - * - */ - public void EchoAttachmentsAndThrowAFaultTest() throws Fault { - TestUtil.logMsg("EchoAttachmentsAndThrowAFaultTest"); - boolean pass = true; - - try { - InputRequest request = new InputRequest(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - Holder attach1 = new Holder(); - Holder attach2 = new Holder(); - attach1.value = dh1; - attach2.value = dh2; - TestUtil.logMsg("Echo attachments and throw a fault"); - OutputResponse response = port.echoAttachmentsAndThrowAFault(request, - attach1, attach2); - pass = false; - } catch (MyFault e) { - TestUtil.logMsg("Caught expected MyFault exception: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoAttachmentsAndThrowAFaultTest failed", e); - } - - if (!pass) - throw new Fault("EchoAttachmentsAndThrowAFaultTest failed"); - } - - /* - * @testName: EchoAttachmentsWithHeaderTest - * - * @assertion_ids: WSI:SPEC:R2905; WSI:SPEC:2906; WSI:SPEC:R2946; - * WSI:SPEC:R2946; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Send a header with attachments using the soapbind:header - * element which must be a child of the root part mime:part element. - * - */ - public void EchoAttachmentsWithHeaderTest() throws Fault { - TestUtil.logMsg("EchoAttachmentsWithHeaderTest"); - boolean pass = true; - - try { - InputRequest request = new InputRequest(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - Holder attach1 = new Holder(); - Holder attach2 = new Holder(); - attach1.value = dh1; - attach2.value = dh2; - MyHeader header = new MyHeader(); - header.setMessage("do not throw my header fault"); - TestUtil.logMsg("Echo attachments with a header"); - OutputResponse response = port.echoAttachmentsWithHeader(request, header, - attach1, attach2); - if (!ValidateRequestResponseAttachmentsEchoWithHeaderTestCase(request, - response, attach1, attach2)) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoAttachmentsWithHeaderTest failed", e); - } - - if (!pass) - throw new Fault("EchoAttachmentsWithHeaderTest failed"); - } - - /* - * @testName: EchoAttachmentsWithHeaderAndThrowAFaultTest - * - * @assertion_ids: WSI:SPEC:R2905; WSI:SPEC:2906; WSI:SPEC:2913; - * WSI:SPEC:R2946; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Send a header with attachments and throw a fault back using - * the soapbind:fault element. - */ - public void EchoAttachmentsWithHeaderAndThrowAFaultTest() throws Fault { - TestUtil.logMsg("EchoAttachmentsWithHeaderAndThrowAFaultTest"); - boolean pass = true; - - try { - InputRequest request = new InputRequest(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - Holder attach1 = new Holder(); - Holder attach2 = new Holder(); - attach1.value = dh1; - attach2.value = dh2; - MyHeader header = new MyHeader(); - header.setMessage("do throw a fault"); - TestUtil.logMsg("Echo attachments with a header and throw a fault"); - OutputResponse response = port.echoAttachmentsWithHeader(request, header, - attach1, attach2); - pass = false; - } catch (MyFault e) { - TestUtil.logMsg("Caught expected MyFault exception: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("EchoAttachmentsWithHeaderAndThrowAFaultTest failed", e); - } - - if (!pass) - throw new Fault("EchoAttachmentsWithHeaderAndThrowAFaultTest failed"); - } - - /* - * @testName: VerifyPutOfSOAPEnvelopesInAttachmentsTest - * - * @assertion_ids: WSI:SPEC:R2919; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Put multiple attachments. Multiple attachments should be - * sent in the soap request and a status results is returned in the soap - * response. The attachments contain SOAP Envelopes. - * - */ - public void VerifyPutOfSOAPEnvelopesInAttachmentsTest() throws Fault { - TestUtil.logMsg("VerifyPutOfSOAPEnvelopesInAttachmentsTest"); - boolean pass = true; - - try { - InputRequestPut request = new InputRequestPut(); - request.setMimeType1("text/xml"); - request.setMimeType2("text/xml"); - request.setHeader("notused"); - StreamSource xmlSrc1 = new StreamSource(new StringReader(R0007_REQUEST)); - StreamSource xmlSrc2 = new StreamSource(new StringReader(R1011_REQUEST)); - DataHandler attach1 = new DataHandler(xmlSrc1, "text/xml"); - DataHandler attach2 = new DataHandler(xmlSrc2, "text/xml"); - TestUtil.logMsg("Put 2 attachments that contain SOAP envelopes"); - String response = port.putMultipleAttachments(request, attach1, attach2); - if (!response.equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - pass = false; - } else - TestUtil.logMsg("Got expected response=ok"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("VerifyPutOfSOAPEnvelopesInAttachmentsTest failed", e); - } - - if (!pass) - throw new Fault("VerifyPutOfSOAPEnvelopesInAttachmentsTest failed"); - } - - /* - * @testName: VerifyUTF8EncodingOfRootPartWithoutAttachments - * - * @assertion_ids: WSI:SPEC:R2915; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Test UTF8 encoding of the root part of a multipart/related - * message without attachments. - * - */ - public void VerifyUTF8EncodingOfRootPartWithoutAttachments() throws Fault { - TestUtil.logMsg("VerifyUTF8EncodingOfRootPartWithoutAttachments"); - boolean pass = true; - SOAPMessage request; - String requestAsString; - SOAPMessage response; - StreamSource ssrc; - - try { - TestUtil.logMsg("Construct SOAP RPC request without attachments"); - ssrc = new StreamSource(new ByteArrayInputStream( - R2915_UTF8_REQUEST_NO_ATTACHMENTS.getBytes())); - request = MessageFactory.newInstance().createMessage(); - request.getSOAPPart().setContent(ssrc); - } catch (Exception e) { - throw new Fault("Unable to construct SOAP message request (R2915)", e); - } - try { - TestUtil.logMsg( - "Send SOAP RPC request without attachments using UTF8 encoding"); - Charset cs = Charset.forName("UTF-8"); - response = client1.makeSaajRequest(request, cs); - } catch (Exception e) { - throw new Fault("Unable to invoke RPC operation (R2915)", e); - } - try { - SOAPBody body = response.getSOAPPart().getEnvelope().getBody(); - if (body.hasFault()) { - throw new Fault("Unexpected SOAP fault returned in response (R2915)"); - } - } catch (SOAPException e) { - throw new Fault("Invalid SOAP message returned (R2915)", e); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("VerifyUTF8EncodingOfRootPartWithoutAttachments failed", - e); - } - - if (!pass) - throw new Fault("VerifyUTF8EncodingOfRootPartWithoutAttachments failed"); - } - - /* - * @testName: VerifyUTF16EncodingOfRootPartWithoutAttachments - * - * @assertion_ids: WSI:SPEC:R2915; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Test UTF16 encoding of the root part of a multipart/related - * message without attachments. - * - */ - public void VerifyUTF16EncodingOfRootPartWithoutAttachments() throws Fault { - TestUtil.logMsg("VerifyUTF16EncodingOfRootPartWithoutAttachments"); - boolean pass = true; - SOAPMessage response; - - try { - TestUtil.logMsg( - "Send SOAP RPC request without attachments using UTF16 encoding"); - Charset cs = Charset.forName("UTF-16"); - response = client1.makeSaajRequest(R2915_UTF16_REQUEST_NO_ATTACHMENTS, - cs); - } catch (Exception e) { - throw new Fault("Unable to invoke RPC operation (R2915)", e); - } - try { - SOAPBody body = response.getSOAPPart().getEnvelope().getBody(); - if (body.hasFault()) { - throw new Fault("Unexpected SOAP fault returned in response (R2915)"); - } - } catch (SOAPException e) { - throw new Fault("Invalid SOAP message returned (R2915)", e); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("VerifyUTF16EncodingOfRootPartWithoutAttachments failed", - e); - } - - if (!pass) - throw new Fault("VerifyUTF16EncodingOfRootPartWithoutAttachments failed"); - } - - /* - * @testName: VerifyRequestContentTypeHttpHeaderWithAttachments - * - * @assertion_ids: WSI:SPEC:R2925; WSI:SPEC:R2932; WSI:SPEC:R2945; - * JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Verify that the Content-Type HTTP header is correct in the - * SOAP request. - * - */ - public void VerifyRequestContentTypeHttpHeaderWithAttachments() throws Fault { - TestUtil.logMsg("VerifyRequestContentTypeHttpHeaderWithAttachments"); - boolean pass = true; - String expected = "ok"; - String response = null; - try { - InputRequestPut request = new InputRequestPut(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - request.setHeader("notused"); - DataHandler attach1 = dh1; - DataHandler attach2 = dh2; - TestUtil.logMsg("Send SOAP RPC request with 2 attachments"); - response = client2.putMultipleAttachments(request, attach1, attach2); - } catch (RuntimeException r) { - response = r.getMessage(); - if (response.indexOf("FAILED") != -1) { - response = response.substring(response.indexOf("FAILED")); - TestUtil.logErr("HTTP header Content-Type is incorrect "); - pass = false; - } else { - response = response.substring(response.indexOf("PASSED")); - TestUtil.logMsg( - "HTTP header Content-Type is correct "); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "VerifyRequestContentTypeHttpHeaderWithAttachments failed", e); - } - - if (!pass) - throw new Fault( - "VerifyRequestContentTypeHttpHeaderWithAttachments failed"); - } - - /* - * @testName: VerifyRequestContentTypeHttpHeaderWithoutAttachments - * - * @assertion_ids: WSI:SPEC:R2917; WSI:SPEC:R2932; WSI:SPEC:R2945; - * JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Verify that the Content-Type HTTP header is correct in the - * SOAP request. - * - */ - public void VerifyRequestContentTypeHttpHeaderWithoutAttachments() - throws Fault { - TestUtil.logMsg("VerifyRequestContentTypeHttpHeaderWithoutAttachments"); - boolean pass = true; - String response = null; - - try { - InputRequestString request = new InputRequestString(); - request.setMyString("Hello"); - TestUtil.logMsg("Send SOAP RPC request without attachments"); - response = client2.echoNoAttachments(request); - } catch (RuntimeException r) { - response = r.getMessage(); - if (response.indexOf("FAILED") != -1) { - response = response.substring(response.indexOf("FAILED")); - TestUtil.logErr("HTTP header Content-Type is incorrect "); - pass = false; - } else { - response = response.substring(response.indexOf("PASSED")); - TestUtil.logMsg( - "HTTP header Content-Type is correct "); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "VerifyRequestContentTypeHttpHeaderWithoutAttachments failed", e); - } - - if (!pass) - throw new Fault( - "VerifyRequestContentTypeHttpHeaderWithoutAttachments failed"); - } - - /* - * @testName: VerifyResponseContentTypeHttpHeaderWithAttachments - * - * @assertion_ids: WSI:SPEC:R2925; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Verify that the Content-Type HTTP header is correct in the - * SOAP response. - * - */ - public void VerifyResponseContentTypeHttpHeaderWithAttachments() - throws Fault { - TestUtil.logMsg("VerifyResponseContentTypeHttpHeaderWithAttachments"); - boolean pass = true; - SOAPMessage request = null; - SOAPMessage response = null; - - try { - TestUtil.logMsg("Construct SOAP RPC request to get 2 attachments"); - String requestString = doSubstitution(R2925_REQUEST); - StreamSource ssrc = new StreamSource( - new ByteArrayInputStream(requestString.getBytes())); - request = MessageFactory.newInstance().createMessage(); - request.getSOAPPart().setContent(ssrc); - InputStream is = client1.makeHTTPRequest(requestString); - String contentTypeHeader = client1.getResponseHeader("Content-Type"); - int statusCode = client1.getStatusCode(); - TestUtil.logMsg("HTTP header Content-Type = " + contentTypeHeader); - String mediaType = null; - if (contentTypeHeader.indexOf("multipart/related") == -1) - mediaType = "text/xml"; - else - mediaType = "multipart/related"; - if (contentTypeHeader.indexOf("multipart/related") == -1) { - TestUtil.logErr("HTTP header Content-Type is incorrect "); - pass = false; - } else - TestUtil.logMsg("HTTP header Content-Type is correct: " + mediaType); - if (statusCode < 200 || statusCode > 299) { - TestUtil.logErr("Unexpected HTTP status code of: " + statusCode); - pass = false; - } - } catch (Exception e) { - throw new Fault("Unable to construct SOAP message request (R2925)", e); - } - - if (!pass) - throw new Fault( - "VerifyResponseContentTypeHttpHeaderWithAttachments failed"); - } - - /* - * @testName: VerifyResponseContentTypeHttpHeaderWithoutAttachments - * - * @assertion_ids: WSI:SPEC:R2917; JAXWS:SPEC:10011; WSI:SPEC:R9801; - * - * @test_Strategy: Verify that the Content-Type HTTP header is correct in the - * SOAP response. - * - */ - public void VerifyResponseContentTypeHttpHeaderWithoutAttachments() - throws Fault { - TestUtil.logMsg("VerifyResponseContentTypeHttpHeaderWithoutAttachments"); - boolean pass = true; - SOAPMessage request = null; - SOAPMessage response = null; - - try { - TestUtil.logMsg("Construct SOAP RPC request to get no attachments"); - StreamSource ssrc = new StreamSource( - new ByteArrayInputStream(R2917_REQUEST.getBytes())); - request = MessageFactory.newInstance().createMessage(); - request.getSOAPPart().setContent(ssrc); - InputStream is = client1.makeHTTPRequest(R2917_REQUEST); - String contentTypeHeader = client1.getResponseHeader("Content-Type"); - int statusCode = client1.getStatusCode(); - TestUtil.logMsg("HTTP header Content-Type = " + contentTypeHeader); - String mediaType = null; - if (contentTypeHeader.indexOf("multipart/related") == -1) - mediaType = "text/xml"; - else - mediaType = "multipart/related"; - if (contentTypeHeader.indexOf("multipart/related") == -1 - && contentTypeHeader.indexOf("text/xml") == -1) { - TestUtil.logErr("HTTP header Content-Type is incorrect "); - pass = false; - } else - TestUtil.logMsg("HTTP header Content-Type is correct: " + mediaType); - if (statusCode < 200 || statusCode > 299) { - TestUtil.logErr("Unexpected HTTP status code of: " + statusCode); - pass = false; - } - } catch (Exception e) { - throw new Fault("Unable to construct SOAP message request (R2917)", e); - } - - if (!pass) - throw new Fault( - "VerifyResponseContentTypeHttpHeaderWithoutAttachments failed"); - } - - /* - * @testName: VerifyRequestContentTransferEncodingMimeHeadersWithAttachments - * - * @assertion_ids: WSI:SPEC:R2934; WSI:SPEC:R2935; JAXWS:SPEC:10011; - * WSI:SPEC:R9801; - * - * @test_Strategy: Verify that the Content-Transfer-Encoding mime header(s) if - * set is correct in the SOAP request. - * - */ - public void VerifyRequestContentTransferEncodingMimeHeadersWithAttachments() - throws Fault { - TestUtil.logMsg( - "VerifyRequestContentTransferEncodingMimeHeadersWithAttachments"); - boolean pass = true; - String response = null; - - try { - InputRequestPut request = new InputRequestPut(); - request.setMimeType1("text/plain"); - request.setMimeType2("text/html"); - request.setHeader("Check-Content-Transfer-Encoding"); - DataHandler attach1 = dh1; - DataHandler attach2 = dh2; - TestUtil.logMsg("Send SOAP RPC request with 2 attachments"); - response = client2.putMultipleAttachments(request, attach1, attach2); - } catch (RuntimeException r) { - response = r.getMessage(); - if (response.indexOf("FAILED") != -1) { - response = response.substring(response.indexOf("FAILED")); - TestUtil - .logErr("HTTP header Content-Transfer-Encoding is incorrect "); - pass = false; - } else { - response = response.substring(response.indexOf("PASSED")); - TestUtil.logMsg( - "HTTP header Content-Type is correct "); - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault( - "VerifyRequestContentTransferEncodingMimeHeadersWithAttachments failed", - e); - } - - if (!pass) - throw new Fault( - "VerifyRequestContentTransferEncodingMimeHeadersWithAttachments failed"); - } - - /******************************************************************************* - * Validate request, response and attachments (getMultipleAttachments) - ******************************************************************************/ - private boolean ValidateRequestResponseAttachmentsGetTestCase( - InputRequestGet request, OutputResponse response, - Holder attach1, - Holder attach2) { - boolean result = true; - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil - .logMsg("Validating the request, the response, and the attachments"); - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil.logMsg("Check if the mime types are correct"); - if (!response.getMimeType1().equals(request.getMimeType1())) { - TestUtil.logErr("MimeType1 is not equal in request and response"); - TestUtil.logErr("Request MimeType1 = " + request.getMimeType1()); - TestUtil.logErr("Response MimeType1 = " + response.getMimeType1()); - result = false; - } - if (!response.getMimeType2().equals(request.getMimeType2())) { - TestUtil.logErr("MimeType2 is not equal in request and response"); - TestUtil.logErr("Request MimeType2 = " + request.getMimeType2()); - TestUtil.logErr("Response MimeType2 = " + response.getMimeType2()); - result = false; - } else { - TestUtil.logMsg("The mime types are correct"); - } - TestUtil.logMsg("Check if the response result is correct"); - if (!response.getResult().equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - TestUtil.logErr("Return Reason is: " + response.getReason()); - result = false; - } else { - TestUtil.logMsg("The response result is correct"); - } - try { - TestUtil.logMsg("Check if the attachment contents are correct"); - DataHandler dh1 = new DataHandler(new URL(request.getUrl1())); - DataHandler dh2 = new DataHandler(new URL(request.getUrl2())); - byte data1[] = new byte[4096]; - byte data2[] = new byte[4096]; - InputStream is = dh1.getInputStream(); - int count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach1.value.getInputStream(); - int count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment1")) - result = false; - is = dh2.getInputStream(); - count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach2.value.getInputStream(); - count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment2")) - result = false; - if (result) - TestUtil.logMsg("The attachment contents are equal"); - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - return result; - } - - /******************************************************************************* - * Validate request, response and attachments (echoMultipleAttachments) - ******************************************************************************/ - private boolean ValidateRequestResponseAttachmentsEchoTestCase( - InputRequest request, OutputResponse response, - Holder attach1, - Holder attach2) { - boolean result = true; - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil - .logMsg("Validating the request, the response, and the attachments"); - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil.logMsg("Check if the mime types are correct"); - if (!response.getMimeType1().equals(request.getMimeType1())) { - TestUtil.logErr("MimeType1 is not equal in request and response"); - TestUtil.logErr("Request MimeType1 = " + request.getMimeType1()); - TestUtil.logErr("Response MimeType1 = " + response.getMimeType1()); - result = false; - } - if (!response.getMimeType2().equals(request.getMimeType2())) { - TestUtil.logErr("MimeType2 is not equal in request and response"); - TestUtil.logErr("Request MimeType2 = " + request.getMimeType2()); - TestUtil.logErr("Response MimeType2 = " + response.getMimeType2()); - result = false; - } else { - TestUtil.logMsg("The mime types are correct"); - } - TestUtil.logMsg("Check if the response result is correct"); - if (!response.getResult().equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - TestUtil.logErr("Return Reason is: " + response.getReason()); - result = false; - } else { - TestUtil.logMsg("The response result is correct"); - } - try { - TestUtil.logMsg("Check if the attachment contents are correct"); - DataHandler dh1 = new DataHandler(url1); - byte data1[] = new byte[4096]; - byte data2[] = new byte[4096]; - InputStream is = dh1.getInputStream(); - int count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach1.value.getInputStream(); - int count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment1")) - result = false; - - dh1 = new DataHandler(url2); - is = dh1.getInputStream(); - count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach2.value.getInputStream(); - count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment2")) - result = false; - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - return result; - } - - /******************************************************************************* - * Validate request, response and attachments (echoAttachmentsWithHeader) - ******************************************************************************/ - private boolean ValidateRequestResponseAttachmentsEchoWithHeaderTestCase( - InputRequest request, OutputResponse response, - Holder attach1, - Holder attach2) { - boolean result = true; - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil - .logMsg("Validating the request, the response, and the attachments"); - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil.logMsg("Check if the mime types are correct"); - if (!response.getMimeType1().equals(request.getMimeType1())) { - TestUtil.logErr("MimeType1 is not equal in request and response"); - TestUtil.logErr("Request MimeType1 = " + request.getMimeType1()); - TestUtil.logErr("Response MimeType1 = " + response.getMimeType1()); - result = false; - } - if (!response.getMimeType2().equals(request.getMimeType2())) { - TestUtil.logErr("MimeType2 is not equal in request and response"); - TestUtil.logErr("Request MimeType2 = " + request.getMimeType2()); - TestUtil.logErr("Response MimeType2 = " + response.getMimeType2()); - result = false; - } else { - TestUtil.logMsg("The mime types are correct"); - } - TestUtil.logMsg("Check if the response result is correct"); - if (!response.getResult().equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - TestUtil.logErr("Return Reason is: " + response.getReason()); - result = false; - } else { - TestUtil.logMsg("The response result is correct"); - } - try { - TestUtil.logMsg("Check if the attachment contents are correct"); - DataHandler dh1 = new DataHandler(url1); - DataHandler dh2 = new DataHandler(url2); - byte data1[] = new byte[4096]; - byte data2[] = new byte[4096]; - InputStream is = dh1.getInputStream(); - int count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach1.value.getInputStream(); - int count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment1")) - result = false; - is = dh2.getInputStream(); - count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach2.value.getInputStream(); - count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment2")) - result = false; - if (result) - TestUtil.logMsg("The attachment contents are equal"); - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - return result; - } - - /******************************************************************************* - * Validate request, response and attachments (echoAllAttachmentTypes) - ******************************************************************************/ - private boolean ValidateRequestResponseAttachmentsEchoAllTestCase( - VoidRequest request, OutputResponseAll response, - Holder attach1, - Holder attach2, - Holder attach3, - Holder attach4, Holder attach5, - Holder attach6) { - boolean result = true; - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil - .logMsg("Validating the request, the response, and the attachments"); - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil.logMsg("Check if the response result is correct"); - if (!response.getResult().equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - TestUtil.logErr("Return Reason is: " + response.getReason()); - result = false; - } else { - TestUtil.logMsg("The response result is correct"); - } - try { - TestUtil.logMsg("Check if the attachment contents are correct"); - DataHandler dh1 = new DataHandler(url1); - byte data1[] = new byte[4096]; - byte data2[] = new byte[4096]; - InputStream is = dh1.getInputStream(); - int count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach1.value.getInputStream(); - int count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment1")) - result = false; - - dh1 = new DataHandler(url2); - is = dh1.getInputStream(); - count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach2.value.getInputStream(); - count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment2")) - result = false; - - dh1 = new DataHandler(url3); - StreamSource sr1 = new StreamSource(dh1.getInputStream()); - StreamSource sr2 = (StreamSource) attach3.value; - String tmpStr = AttachmentHelper.validateAttachmentData(sr1, sr2, - "Attachment3"); - if (tmpStr != null) { - TestUtil.logErr(tmpStr); - result = false; - } else - TestUtil.logMsg("Attachment3 xml content is equal in attachment"); - - Image image1 = javax.imageio.ImageIO.read(url4); - Image image2 = attach4.value; - if (!AttachmentHelper.compareImages(image1, image2, - new Rectangle(0, 0, 100, 120), "Attachment4")) - result = false; - - image1 = javax.imageio.ImageIO.read(url5); - image2 = attach5.value; - if (!AttachmentHelper.compareImages(image1, image2, - new Rectangle(0, 0, 100, 120), "Attachment5")) - result = false; - - dh1 = new DataHandler(url6); - sr1 = new StreamSource(dh1.getInputStream()); - sr2 = (StreamSource) attach6.value; - tmpStr = AttachmentHelper.validateAttachmentData(sr1, sr2, "Attachment6"); - if (tmpStr != null) { - TestUtil.logErr(tmpStr); - result = false; - } else - TestUtil.logMsg("Attachment6 xml content is equal in attachment"); - - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - return result; - } - - /******************************************************************************* - * Validate request, response and attachments (getAllAttachmentTypes) - ******************************************************************************/ - private boolean ValidateRequestResponseAttachmentsGetAllTestCase( - InputRequestGetAll request, OutputResponseGetAll response, - Holder attach1, - Holder attach2, - Holder attach3, - Holder attach4, Holder attach5, - Holder attach6) { - boolean result = true; - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil - .logMsg("Validating the request, the response, and the attachments"); - TestUtil - .logMsg("---------------------------------------------------------"); - TestUtil.logMsg("Check if the mime types are correct"); - if (!response.getMimeType1().equals(request.getMimeType1())) { - TestUtil.logErr("MimeType1 is not equal in request and response"); - TestUtil.logErr("Request MimeType1 = " + request.getMimeType1()); - TestUtil.logErr("Response MimeType1 = " + response.getMimeType1()); - result = false; - } - if (!response.getMimeType2().equals(request.getMimeType2())) { - TestUtil.logErr("MimeType2 is not equal in request and response"); - TestUtil.logErr("Request MimeType2 = " + request.getMimeType2()); - TestUtil.logErr("Response MimeType2 = " + response.getMimeType2()); - result = false; - } - if (!response.getMimeType3().equals(request.getMimeType3())) { - TestUtil.logErr("MimeType3 is not equal in request and response"); - TestUtil.logErr("Request MimeType3 = " + request.getMimeType3()); - TestUtil.logErr("Response MimeType3 = " + response.getMimeType3()); - result = false; - } - if (!response.getMimeType4().equals(request.getMimeType4())) { - TestUtil.logErr("MimeType4 is not equal in request and response"); - TestUtil.logErr("Request MimeType4 = " + request.getMimeType4()); - TestUtil.logErr("Response MimeType4 = " + response.getMimeType4()); - result = false; - } - if (!response.getMimeType5().equals(request.getMimeType5())) { - TestUtil.logErr("MimeType5 is not equal in request and response"); - TestUtil.logErr("Request MimeType5 = " + request.getMimeType5()); - TestUtil.logErr("Response MimeType5 = " + response.getMimeType5()); - result = false; - } - if (!response.getMimeType6().equals(request.getMimeType6())) { - TestUtil.logErr("MimeType6 is not equal in request and response"); - TestUtil.logErr("Request MimeType6 = " + request.getMimeType6()); - TestUtil.logErr("Response MimeType6 = " + response.getMimeType6()); - result = false; - } else { - TestUtil.logMsg("The mime types are correct"); - } - TestUtil.logMsg("Check if the response result is correct"); - if (!response.getResult().equals("ok")) { - TestUtil.logErr("Return status is " + response + ", expected ok"); - TestUtil.logErr("Return Reason is: " + response.getReason()); - result = false; - } else { - TestUtil.logMsg("The response result is correct"); - } - try { - TestUtil.logMsg("Check if the attachment contents are correct"); - DataHandler dh1 = new DataHandler(url1); - byte data1[] = new byte[4096]; - byte data2[] = new byte[4096]; - InputStream is = dh1.getInputStream(); - int count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach1.value.getInputStream(); - int count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment1")) - result = false; - - dh1 = new DataHandler(url2); - is = dh1.getInputStream(); - count1 = AttachmentHelper.readTheData(is, data1, 4096); - is = attach2.value.getInputStream(); - count2 = AttachmentHelper.readTheData(is, data2, 4096); - if (!AttachmentHelper.validateAttachmentData(count1, data1, count2, data2, - "Attachment2")) - result = false; - - dh1 = new DataHandler(url3); - StreamSource sr1 = new StreamSource(dh1.getInputStream()); - StreamSource sr2 = (StreamSource) attach3.value; - String tmpStr = AttachmentHelper.validateAttachmentData(sr1, sr2, - "Attachment3"); - if (tmpStr != null) { - TestUtil.logErr(tmpStr); - result = false; - } else - TestUtil.logMsg("Attachment3 xml content is equal in attachment"); - - Image image1 = javax.imageio.ImageIO.read(url4); - Image image2 = attach4.value; - if (!AttachmentHelper.compareImages(image1, image2, - new Rectangle(0, 0, 100, 120), "Attachment4")) - result = false; - - image1 = javax.imageio.ImageIO.read(url5); - image2 = attach5.value; - if (!AttachmentHelper.compareImages(image1, image2, - new Rectangle(0, 0, 100, 120), "Attachment5")) - result = false; - - dh1 = new DataHandler(url6); - sr1 = new StreamSource(dh1.getInputStream()); - sr2 = (StreamSource) attach6.value; - tmpStr = AttachmentHelper.validateAttachmentData(sr1, sr2, "Attachment6"); - if (tmpStr != null) { - TestUtil.logErr(tmpStr); - result = false; - } else - TestUtil.logMsg("Attachment6 xml content is equal in attachment"); - - } catch (Exception e) { - result = false; - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - } - return result; - } - - private String doSubstitution(String s) { - String tmp = s.replaceAll("localhost", hostname); - tmp = tmp.replaceAll("8080", new Integer(portnum).toString()); - String modified = tmp.replaceAll("/WSIRLSwaTest", ctxroot); - return modified; - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/ServerSOAPHandler.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/ServerSOAPHandler.java deleted file mode 100644 index a4e0dbc4d4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/ServerSOAPHandler.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest; - -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; - -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.AttachmentPart; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - protected void processInboundMessage(SOAPMessageContext context) { - String result = "FAILED"; - JAXWS_Util.dumpHTTPHeaders(context, false); - try { - if (!Handler_Util.checkForMsg(context, "putMultipleAttachments") - && !Handler_Util.checkForMsg(context, "echoNoAttachments")) { - System.out.println( - "SoapMessage does not contain expected putMultipleAttachments"); - System.out.println("or echoNoAttachments value (exiting handler)"); - return; - } - if (Handler_Util.checkForMsg(context, - "Check-Content-Transfer-Encoding")) { - result = verifyContentTransferEncodingMimeHeader(context); - System.out.println("result=" + result); - throw new RuntimeException(result); - } else { - result = verifyContentTypeHttpHeader(context); - System.out.println("result=" + result); - throw new RuntimeException(result); - } - } catch (Exception e) { - e.printStackTrace(); - throw new RuntimeException( - "Exception occurred in ServerSOAPHandler: " + e); - } - } - - protected String verifyContentTypeHttpHeader(SOAPMessageContext context) - throws Exception { - System.out.println("in ServerSOAPHandler:verifyContentTypeHttpHeader"); - String result = "FAILED"; - - Map> map1 = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - Map> map2 = JAXWS_Util.convertKeysToLowerCase(map1); - List values = map2.get("content-type"); - System.out.println("HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - int index = sValues.toLowerCase().indexOf("text/xml"); - int index2 = sValues.toLowerCase().indexOf("multipart/related"); - if ((index >= 0) || (index2 >= 0)) { - result = "PASSED: HTTP Content-Type header contains expected: text/xml, multipart/related"; - } else { - result = "FAILED: HTTP Content-Type header does not contain expected text/xml, multipart/related"; - } - } else { - result = "FAILED: HTTP Content-Type header was not found"; - } - return result; - } - - /** - * Verifies the contents of the Content-Transfer-Encoding mime header - */ - - protected String verifyContentTransferEncodingMimeHeader( - SOAPMessageContext context) throws Exception { - String result = null; - SOAPMessage sm = context.getMessage(); - try { - JAXWS_Util.dumpSOAPMessage(sm, false); - Iterator iterator = sm.getAttachments(); - int k = 0; - while (iterator.hasNext()) { - Object o = iterator.next(); - AttachmentPart ap = (AttachmentPart) o; - String[] mimeHeaderValues = ap - .getMimeHeader("Content-transfer-encoding"); - if (mimeHeaderValues != null && mimeHeaderValues.length > 0) { - for (int i = 0; i < mimeHeaderValues.length; i++) { - System.out.println( - "Content-transfer-encoding[" + i + "]=" + mimeHeaderValues[i]); - if ((mimeHeaderValues[i].indexOf("7bit") >= 0) - || (mimeHeaderValues[i].indexOf("8bit") >= 0) - || (mimeHeaderValues[i].indexOf("binary") >= 0) - || (mimeHeaderValues[i].indexOf("quoted-printable") >= 0) - || (mimeHeaderValues[i].indexOf("base64") >= 0)) { - if (result == null) - result = "PASSED: Attach[" + k + "]="; - else - result = result + "Attach[" + k + "]="; - result = result + mimeHeaderValues[i] + " "; - } else { - return "FAILED: INVALID Content-Transfer-Encoding mime header value of [" - + mimeHeaderValues[i] + "]"; - } - ++k; - } - } - } - if (result == null) - result = "PASSED: No Content-Transfer-Encoding mime headers were found"; - } catch (Exception e) { - result = "FAILED: exception occurred:" + e; - } - return result; - } - -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/SwaTestClient1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/SwaTestClient1.java deleted file mode 100644 index 2fe125bea6..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/SwaTestClient1.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -import com.sun.ts.tests.jaxws.common.*; - -public class SwaTestClient1 extends SOAPClient { - public SwaTestClient1(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public SwaTestClient1(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://SwaTestService.org/wsdl"); - stubContext.setService("WSIRLSwaTestService"); - stubContext.setPort("SwaTestOnePort"); - stubContext.setEndpointInterface(SwaTest1.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsirlswatest.endpoint.1"; - } - - protected String getWSDLURLProperty() { - return "wsirlswatest.wsdlloc.1"; - } - - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.OutputResponse echoMultipleAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequest request, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2) - throws Exception { - return ((SwaTest1) stubContext.getStub()).echoMultipleAttachments(request, - attach1, attach2); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/SwaTestClient2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/SwaTestClient2.java deleted file mode 100644 index dc15226d01..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/SwaTestClient2.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -import com.sun.ts.tests.jaxws.common.*; - -public class SwaTestClient2 extends SOAPClient { - public SwaTestClient2(String webServerHost, int port, int mode) - throws EETest.Fault { - this(webServerHost, port, mode, null); - } - - public SwaTestClient2(String webServerHost, int port, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, port, mode); - stubContext.setNamespace("http://SwaTestService.org/wsdl"); - stubContext.setService("WSIRLSwaTestService"); - stubContext.setPort("SwaTestTwoPort"); - stubContext.setEndpointInterface(SwaTest2.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsirlswatest.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsirlswatest.wsdlloc.1"; - } - - public java.lang.String putMultipleAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequestPut request, - jakarta.activation.DataHandler attach1, - jakarta.activation.DataHandler attach2) throws Exception { - return ((SwaTest2) stubContext.getStub()).putMultipleAttachments(request, - attach1, attach2); - } - - public java.lang.String echoNoAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequestString request) - throws Exception { - return ((SwaTest2) stubContext.getStub()).echoNoAttachments(request); - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/SwaTestImpl1.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/SwaTestImpl1.java deleted file mode 100644 index be7a4266dc..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/SwaTestImpl1.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -// This class was generated by the JAXWS SI, do not edit. - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest; - -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.soap.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.xml.ws.handler.*; -import jakarta.activation.*; -import javax.xml.transform.stream.*; -import javax.xml.transform.*; -import java.util.*; -import java.net.*; -import java.awt.*; - -import jakarta.jws.WebService; - -@WebService(portName = "SwaTestOnePort", serviceName = "WSIRLSwaTestService", targetNamespace = "http://SwaTestService.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JRLSwaTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.SwaTest1") - -public class SwaTestImpl1 implements SwaTest1 { - public void getMultipleAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequestGet request, - jakarta.xml.ws.Holder response, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2) { - try { - System.out.println("Enter getMultipleAttachments() ......"); - OutputResponse theResponse = new OutputResponse(); - theResponse.setMimeType1(request.getMimeType1()); - theResponse.setMimeType2(request.getMimeType2()); - theResponse.setResult("ok"); - theResponse.setReason("ok"); - DataHandler dh1 = new DataHandler(new URL(request.getUrl1())); - DataHandler dh2 = new DataHandler(new URL(request.getUrl2())); - attach1.value = dh1; - attach2.value = dh2; - response.value = theResponse; - System.out.println("Leave getMultipleAttachments() ......"); - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public java.lang.String putMultipleAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequestPut request, - jakarta.activation.DataHandler attach1, - jakarta.activation.DataHandler attach2) { - try { - String response = "ok"; - System.out.println("Enter putMultipleAttachments() ......"); - if (attach1 == null) { - System.err.println("attach1 is null (unexpected)"); - response = "not ok"; - } - if (attach2 == null) { - System.err.println("attach2 is null (unexpected)"); - response = "not ok"; - } - System.out.println("Leave putMultipleAttachments() ......"); - return response; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.OutputResponse echoMultipleAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequest request, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2) { - try { - System.out.println("Enter echoMultipleAttachments() ......"); - OutputResponse theResponse = new OutputResponse(); - theResponse.setMimeType1(request.getMimeType1()); - theResponse.setMimeType2(request.getMimeType2()); - theResponse.setResult("ok"); - theResponse.setReason("ok"); - if (attach1 == null || attach1.value == null) { - System.err.println("attach1.value is null (unexpected)"); - theResponse.setReason("attach1.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - if (attach2 == null || attach2.value == null) { - System.err.println("attach2.value is null (unexpected)"); - if (theResponse.getReason().equals("ok")) - theResponse.setReason("attach2.value is null (unexpected)"); - else - theResponse.setReason( - theResponse.getReason() + "\nattach2.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - System.out.println("Leave echoMultipleAttachments() ......"); - return theResponse; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public String echoGifImageType( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.VoidRequest request, - jakarta.xml.ws.Holder attach1) { - try { - String theResponse = "ok"; - System.out.println("Enter echoGifImageType() ......"); - if (attach1 == null || attach1.value == null) { - System.err.println("attach1 is null (unexpected)"); - theResponse = "not ok"; - } - System.out.println("Leave echoGifImageType() ......"); - return theResponse; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public java.lang.String echoNoAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequestString request) { - try { - System.out.println("Enter echoNoAttachments() ......"); - String response = request.getMyString(); - System.out.println("Leave echoNoAttachments() ......"); - return response; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.OutputResponseAll echoAllAttachmentTypes( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.VoidRequest request, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2, - jakarta.xml.ws.Holder attach3, - jakarta.xml.ws.Holder attach4, - jakarta.xml.ws.Holder attach5, - jakarta.xml.ws.Holder attach6) { - try { - System.out.println("Enter echoAllAttachmentTypes() ......"); - OutputResponseAll theResponse = new OutputResponseAll(); - theResponse.setResult("ok"); - theResponse.setReason("ok"); - if (attach1 == null || attach1.value == null) { - System.err.println("attach1.value is null (unexpected)"); - theResponse.setReason("attach1.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - if (attach2 == null || attach2.value == null) { - System.err.println("attach2.value is null (unexpected)"); - if (theResponse.getReason().equals("ok")) - theResponse.setReason("attach2.value is null (unexpected)"); - else - theResponse.setReason( - theResponse.getReason() + "\nattach2.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - if (attach3 == null || attach3.value == null) { - System.err.println("attach3.value is null (unexpected)"); - if (theResponse.getReason().equals("ok")) - theResponse.setReason("attach3.value is null (unexpected)"); - else - theResponse.setReason( - theResponse.getReason() + "\nattach3.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - if (attach4 == null || attach4.value == null) { - System.err.println("attach4.value is null (unexpected)"); - if (theResponse.getReason().equals("ok")) - theResponse.setReason("attach4.value is null (unexpected)"); - else - theResponse.setReason( - theResponse.getReason() + "\nattach4.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - if (attach5 == null || attach5.value == null) { - System.err.println("attach5.value is null (unexpected)"); - if (theResponse.getReason().equals("ok")) - theResponse.setReason("attach5.value is null (unexpected)"); - else - theResponse.setReason( - theResponse.getReason() + "\nattach5.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - if (attach6 == null || attach6.value == null) { - System.err.println("attach6.value is null (unexpected)"); - if (theResponse.getReason().equals("ok")) - theResponse.setReason("attach6.value is null (unexpected)"); - else - theResponse.setReason( - theResponse.getReason() + "\nattach6.value is null (unexpected)"); - theResponse.setResult("not ok"); - } - System.out.println("Leave echoAllAttachmentTypes() ......"); - return theResponse; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public void getAllAttachmentTypes( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequestGetAll request, - jakarta.xml.ws.Holder response, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2, - jakarta.xml.ws.Holder attach3, - jakarta.xml.ws.Holder attach4, - jakarta.xml.ws.Holder attach5, - jakarta.xml.ws.Holder attach6) { - try { - System.out.println("Enter getAllAttachmentTypes() ......"); - OutputResponseGetAll theResponse = new OutputResponseGetAll(); - theResponse.setMimeType1(request.getMimeType1()); - theResponse.setMimeType2(request.getMimeType2()); - theResponse.setMimeType3(request.getMimeType3()); - theResponse.setMimeType4(request.getMimeType4()); - theResponse.setMimeType5(request.getMimeType5()); - theResponse.setMimeType6(request.getMimeType6()); - theResponse.setResult("ok"); - theResponse.setReason("ok"); - DataHandler dh1 = new DataHandler(new URL(request.getUrl1())); - DataHandler dh2 = new DataHandler(new URL(request.getUrl2())); - DataHandler dh3 = new DataHandler(new URL(request.getUrl3())); - DataHandler dh6 = new DataHandler(new URL(request.getUrl6())); - attach1.value = dh1; - attach2.value = dh2; - attach3.value = new StreamSource(dh3.getInputStream()); - attach4.value = javax.imageio.ImageIO.read(new URL(request.getUrl4())); - attach5.value = javax.imageio.ImageIO.read(new URL(request.getUrl5())); - attach6.value = new StreamSource(dh6.getInputStream()); - System.out.println("Leave getAllAttachmentTypes() ......"); - response.value = theResponse; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public java.lang.String putAllAttachmentTypes( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequestPutAll request, - jakarta.activation.DataHandler attach1, - jakarta.activation.DataHandler attach2, javax.xml.transform.Source attach3, - java.awt.Image attach4, java.awt.Image attach5, - javax.xml.transform.Source attach6) { - try { - String response = "ok"; - System.out.println("Enter putAllAttachmentTypes() ......"); - if (attach1 == null) { - System.err.println("attach1 is null (unexpected)"); - response = "not ok"; - } - if (attach2 == null) { - System.err.println("attach2 is null (unexpected)"); - response = "not ok"; - } - if (attach3 == null) { - System.err.println("attach3 is null (unexpected)"); - response = "not ok"; - } - if (attach4 == null) { - System.err.println("attach4 is null (unexpected)"); - response = "not ok"; - } - if (attach5 == null) { - System.err.println("attach5 is null (unexpected)"); - response = "not ok"; - } - if (attach6 == null) { - System.err.println("attach6 is null (unexpected)"); - response = "not ok"; - } - System.out.println("Leave putAllAttachmentTypes() ......"); - return response; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.OutputResponse echoAttachmentsAndThrowAFault( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequest request, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2) - throws com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.MyFault { - System.out.println("Enter echoAttachmentsAndThrowAFault() ......"); - System.out.println("Throwing back a fault [MyFault] ......"); - throw new MyFault("This is my fault", new MyFaultType()); - } - - public com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.OutputResponse echoAttachmentsWithHeader( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequest request, - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.MyHeader header, - jakarta.xml.ws.Holder attach1, - jakarta.xml.ws.Holder attach2) - throws com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.MyFault { - System.out.println("Enter echoAttachmentsWithHeader() ......"); - if (header.getMessage().equals("do throw a fault")) { - System.out.println("Throwing back a fault [MyFault] ......"); - throw new MyFault("This is my fault", new MyFaultType()); - } - try { - OutputResponse theResponse = new OutputResponse(); - theResponse.setMimeType1(request.getMimeType1()); - theResponse.setMimeType2(request.getMimeType2()); - theResponse.setResult("ok"); - theResponse.setReason("ok"); - System.out.println("Leave echoAttachmentsWithHeader() ......"); - return theResponse; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/SwaTestImpl2.java b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/SwaTestImpl2.java deleted file mode 100644 index 18372793d1..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/SwaTestImpl2.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -// This class was generated by the JAXWS SI, do not edit. - -package com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "SwaTestTwoPort", serviceName = "WSIRLSwaTestService", targetNamespace = "http://SwaTestService.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WSW2JRLSwaTestService.wsdl", endpointInterface = "com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.SwaTest2") -public class SwaTestImpl2 implements SwaTest2 { - public java.lang.String putMultipleAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequestPut request, - jakarta.activation.DataHandler attach1, - jakarta.activation.DataHandler attach2) { - try { - String response = "ok"; - System.out.println("Enter putMultipleAttachments() ......"); - if (attach1 == null) { - System.err.println("attach1 is null (unexpected)"); - response = "not ok"; - } - if (attach2 == null) { - System.err.println("attach2 is null (unexpected)"); - response = "not ok"; - } - System.out.println("Leave putMultipleAttachments() ......"); - return response; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } - - public java.lang.String echoNoAttachments( - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.InputRequestString request) { - try { - System.out.println("Enter echoNoAttachments() ......"); - String response = request.getMyString(); - System.out.println("Leave echoNoAttachments() ......"); - return response; - } catch (Exception e) { - throw new WebServiceException(e.getMessage()); - } - } -} diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/WSW2JRLSwaTestService.wsdl b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/WSW2JRLSwaTestService.wsdl deleted file mode 100644 index d2b0019af4..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/WSW2JRLSwaTestService.wsdl +++ /dev/null @@ -1,647 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This is my header - - - - - - - - - - - This is my fault - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/build.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/build.xml deleted file mode 100644 index 7fdb319f70..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/build.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.gif b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.gif deleted file mode 100644 index aeb1567ecf..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.gif and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.html b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.html deleted file mode 100644 index 74211eca02..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - -This is a title - - -

This is a starting point


-

This is a header

-

This is a paragraph

-
    -
  • This is a bullet

  • -
- - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.jpeg b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.jpeg deleted file mode 100644 index a1ed71ba6a..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.jpeg and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.txt b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.txt deleted file mode 100644 index cdc8a13be3..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.txt +++ /dev/null @@ -1 +0,0 @@ -This is a plain text attachment. diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.xml deleted file mode 100644 index 9c0113605b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - http - - - - - http://www.wombats.com/remote/sender - - - http://127.0.0.1:8081/jaxm-provider/receiver/ebxml - - - - - - - 5 - - - 2000 - - - - - - - ebxml/ - - - 10 - - - - - - - https - - - - - jaxm.dummy.uri - - - https://127.0.0.1:8443/jaxm/dummy/ - - - - - - ebxml-https/ - - - 10 - - - - - - - - - - http - - - - - http://www.wombats.com/soaprp/sender - - - http://127.0.0.1:8081/jaxm-provider/receiver/soaprp - - - - - - - 3 - - - 2000 - - - - - - - soaprp/ - - - 20 - - - - - - - https - - - - - jaxm.dummy.uri - - - https://127.0.0.1:8443/jaxm/dummy - - - - - - - - - 3 - - - 2000 - - - - - - - tempdir/ - - - 11 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach2.jpeg b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach2.jpeg deleted file mode 100644 index a1ed71ba6a..0000000000 Binary files a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach2.jpeg and /dev/null differ diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach2.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach2.xml deleted file mode 100644 index d2f2beb920..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/contentRoot/attach2.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - This is Header1 - This is Header2 - This is Header3 - This is Header4 - - - - This is Child1 - This is Child2 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/custom-client.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/custom-client.xml deleted file mode 100644 index a301ec4530..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/custom-client.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - true - - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/custom-server.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/custom-server.xml deleted file mode 100644 index e2a1282894..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/custom-server.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - true - - - - - - - - - - - - ns1:SwaTestTwoPort - - ServerSOAPHandler - com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.ServerSOAPHandler - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/jakartaEE.tokens b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/jakartaEE.tokens deleted file mode 100644 index 21cb82811b..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSWSIRLSwaTestService") -SERVICE=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.WSIRLSwaTestService -SERVLETNAME=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.SwaTestImpl1 -IMPL=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.SwaTestImpl1 -URLALIAS=/jaxws/SwaTestOne -SERVLETNAME2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.SwaTestImpl2 -IMPL2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.SwaTestImpl2 -URLALIAS2=/jaxws/SwaTestTwo -SEI=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.SwaTest1 -SEI2=com.sun.ts.tests.jaxws.wsi.w2j.rpc.literal.swatest.SwaTest2 -NAMESPACEURI=http://SwaTestService.org/wsdl -PORT=SwaTestOnePort -PORT2=SwaTestTwoPort -WEBSERVICEDESCRIPTION=WSIRLSwaTestService -SERVICEREFNAMEWSSERVLET=service/WSWSIRLSwaTestService -SERVICEREFNAMEWSEJB=service/WSWSIRLSwaTestService -SERVICEREFNAMEWSAPPCLIENT=service/WSWSIRLSwaTestService diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/jakartaEE.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/standalone-sun-jaxws.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/standalone-sun-jaxws.xml deleted file mode 100644 index d9718a38ce..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/standalone-sun-jaxws.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - diff --git a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/standalone.web.xml b/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/standalone.web.xml deleted file mode 100644 index 70c2751216..0000000000 --- a/jaxws/src/main/java/com/sun/ts/tests/jaxws/wsi/w2j/rpc/literal/swatest/standalone.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - WSWSIRLSwaTestApp - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - WSIRLSwaTestOne - com.sun.xml.ws.transport.http.servlet.WSServlet - - - WSIRLSwaTestTwo - com.sun.xml.ws.transport.http.servlet.WSServlet - - - WSIRLSwaTestOne - /jaxws/SwaTestOne - - - WSIRLSwaTestTwo - /jaxws/SwaTestTwo - - - 54 - - diff --git a/pom.xml b/pom.xml index d96a49bdb2..5c999fdca0 100644 --- a/pom.xml +++ b/pom.xml @@ -43,6 +43,8 @@ core-profile-tck ejb ejb30 + + ejb30-ws ejb32 el @@ -50,8 +52,6 @@ javaee javamail jaxrs - jaxws - jaxws-common jdbc jms jpa @@ -74,9 +74,6 @@ webartifacts/jsp webartifacts/jstl webartifacts/servlet - - - websocket xa @@ -242,18 +239,6 @@ ${project.version} - - ${project.groupId} - jaxws - ${project.version} - - - - ${project.groupId} - jaxws-common - ${project.version} - - ${project.groupId} jdbc @@ -350,23 +335,12 @@ ${project.version} - - ${project.groupId} - webservices12 - ${project.version} - - - - ${project.groupId} - webservices13 - ${project.version} - - ${project.groupId} websocket ${project.version} + ${project.groupId} xa @@ -684,11 +658,6 @@ maven-failsafe-plugin 3.0.0 - - com.sun.xml.ws - jaxws-maven-plugin - 4.0.0 - org.apache.maven.plugins maven-dependency-plugin diff --git a/webservices12/pom.xml b/webservices12/pom.xml deleted file mode 100644 index 7381b6e791..0000000000 --- a/webservices12/pom.xml +++ /dev/null @@ -1,2336 +0,0 @@ - - - - - 4.0.0 - - - jakarta.tck - project - 11.0.0-SNAPSHOT - - - webservices12 - jar - - webservices12 - webservices12 - - - - ${project.groupId} - common - - - ${project.groupId} - jaxws-common - - - ${project.groupId} - jaxws - - - javatest - javatest - - - jakarta.ejb - jakarta.ejb-api - - - jakarta.xml.ws - jakarta.xml.ws-api - - - - - - - - src/main/java - - **/*.xml - - - **/build.xml - - - - - - - - maven-deploy-plugin - - true - - - - com.sun.xml.ws - jaxws-maven-plugin - - - com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/HelloService.wsdl - - - - - - - com/sun/ts/tests/webservices12/wsdlImport/file/simple1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Simple1FileSvc.wsdl - - - - - - - com/sun/ts/tests/webservices12/wsdlImport/file/simple2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/Simple2FileSvc.wsdl - - - - - - - com/sun/ts/tests/webservices12/wsdlImport/file/simple3 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/std/svc/Simple3FileSvc.wsdl - - - - - - - com/sun/ts/tests/webservices12/wsdlImport/file/simple4 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Simple4FileSvc.wsdl - - - - - - - com/sun/ts/tests/webservices12/wsdlImport/file/simple5 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/Simple5FileSvc.wsdl - - - - - - - com/sun/ts/tests/webservices12/wsdlImport/file/simple6 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/std/svc/Simple6FileSvc.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin1.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin1.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc1/Twin1FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin1.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin1.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc2/Twin1FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc1/Twin1FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc2/Twin1FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin2.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin2.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc1/Twin2FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin2.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin2.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc2/Twin2FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc1/Twin2FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc2/Twin2FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin3.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin3.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc1/Twin3FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin3.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin3.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc2/Twin3FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc1/Twin3FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc2/Twin3FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin4.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin4.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc1/Twin4FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin4.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin4.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc2/Twin4FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc1/Twin4FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc2/Twin4FileSvc2.wsdl - - - - - - - com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/server - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/server - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/customfile-server.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/HelloService.wsdl - - - - - - - com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/client - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/client - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/customfile-client.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/HelloService.wsdl - - - - - - - com/sun/ts/tests/webservices12/wsdlImport/file/nested1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - ${project.build.directory}/jaxws/stale/com/sun/ts/tests/webservices12/wsdlImport/file/nested1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/nestedimportwsdl.wsdl - - - - - - - com/sun/ts/tests/webservices12/wsdlImport/file/nested2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - ${project.build.directory}/jaxws/stale/com/sun/ts/tests/webservices12/wsdlImport/file/nested2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/nestedimportwsdl.wsdl - - - - - - - com/sun/ts/tests/webservices12/wsdlImport/file/nested3 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - ${project.build.directory}/jaxws/stale/com/sun/ts/tests/webservices12/wsdlImport/file/nested3 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/nestedimportwsdl.wsdl - - - - - - - com/sun/ts/tests/webservices12/wsdlImport/file/nested4 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - ${project.build.directory}/jaxws/stale/com/sun/ts/tests/webservices12/wsdlImport/file/nested4 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/nestedimportwsdl.wsdl - - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared1.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared1.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/Shared1FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared1.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared1.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/Shared1FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/Shared1FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/Shared1FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared2.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared2.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/svc1/Shared2FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared2.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared2.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/svc2/Shared2FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/svc1/Shared2FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/svc2/Shared2FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared3.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared3.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/Shared3FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared3.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared3.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/Shared3FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/Shared3FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/Shared3FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared4.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared4.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/svc1/Shared4FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared4.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared4.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/svc2/Shared4FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/svc1/Shared4FileSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/svc2/Shared4FileSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.nested1.client - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/nestedimportwsdl.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.nested2.client - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/nestedimportwsdl.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.nested3.client - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/nestedimportwsdl.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.nested4.client - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/nestedimportwsdl.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared1.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared1.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/Shared1HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared1.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared1.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/Shared1HttpSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/Shared1HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/Shared1HttpSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared2.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared2.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/svc1/Shared2HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared2.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared2.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/svc2/Shared2HttpSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/svc1/Shared2HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/svc2/Shared2HttpSvc2.wsdl - - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared3.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared3.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/Shared3HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared3.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared3.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/Shared3HttpSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/Shared3HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/Shared3HttpSvc2.wsdl - - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared4.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared4.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/svc1/Shared4HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared4.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared4.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/svc2/Shared4HttpSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/svc1/Shared4HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile2.xml - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile3.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/svc2/Shared4HttpSvc2.wsdl - - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.simple1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.simple1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Simple1HttpSvc.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.simple2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.simple2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/Simple2HttpSvc.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.simple3 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.simple3 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/std/svc/Simple3HttpSvc.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.simple4 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.simple4 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Simple4HttpSvc.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.simple5 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.simple5 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/Simple5HttpSvc.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.simple6 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.simple6 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/std/svc/Simple6HttpSvc.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin1.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin1.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc1/Twin1HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin1.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin1.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc2/Twin1HttpSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc1/Twin1HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc2/Twin1HttpSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin2.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin2.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc1/Twin2HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin2.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin2.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc2/Twin2HttpSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc1/Twin2HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc2/Twin2HttpSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin3.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin3.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc1/Twin3HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin3.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin3.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc2/Twin3HttpSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc1/Twin3HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc2/Twin3HttpSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin4.client-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin4.client-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc1/Twin4HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin4.client-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin4.client-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc2/Twin4HttpSvc2.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server-1 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server-1 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc1/Twin4HttpSvc1.wsdl - - - - - - - com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server-2 - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server-2 - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc2/Twin4HttpSvc2.wsdl - - - - - - - - com.sun.ts.tests.webservices12.deploy.jarDeploy - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.deploy.jarDeploy - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/JarDeploy.wsdl - - - - - - - com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.InterModuleService - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.InterModuleService - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/customfile.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/InterModuleService.wsdl - - - - - - - com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.IntraModuleService - generate-sources - - wsimport - - - ${project.build.directory}/generated-sources/ - - ${project.build.directory}/jaxws/stale/com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.IntraModuleService - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/customfile2.xml - - - - - ${project.basedir}/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/IntraModuleService.wsdl - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/README b/webservices12/src/main/java/com/sun/ts/tests/webservices12/README deleted file mode 100644 index ba6a8ec2aa..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/README +++ /dev/null @@ -1,86 +0,0 @@ -(1) The webservices12/ejb directory tree of tests all deal with ejb based - webservice endpoints. Below describes what is tested. - - The annotations directory of tests verify the use of the @WebServiceRef annotation - in the webservice Client. Here is what is tested: - - 1) Multiple client WebServiceRef injection (clients in single client ear) is tested - 2) Multiple client WebServiceRef injection (clients in multiple client ear's) is tested - 3) Port Field WebServiceRef injection is tested - 4) Port Method WebServiceRef injection is tested - 5) WebServiceRef and HandlerChain injection is tested using SOAPHandlers - 6) WebServiceRef with no attributes is tested - 7) WebServiceRef with name attribute is tested - 8) WebServiceRef with name and value attribute is tested - 9) WebServiceRef with name, value, and type attribute is tested - 10) WebServiceRef with WebServiceProvider based endpoint is tested - 11) WebServiceRef with WebService based endpoint is tested - 12) WebServiceRef with no deployment descriptors is tested - - The descriptors directory tests the use of full DD's to override the @WebServiceRef - annotation and the @HandlerChain annotation in the webservice Client file. - -(2) The webservices12/servlet directory tree of tests all deal with servlet - based webservice endpoints. Below describes what is tested. - - The WSMTOMSBFullDDsTest directory tests the enabling of MTOM and SOAP Protocol - Binding via the deployment descriptors. Basically it verifies the deployment - tags: - - true - ##SOAP11_HTTP - ##SOAP12_HTTP - - The WSMTOMSBAnnotationsTest directory tests the enabling of MTOM and SOAP - Protocol Binding using annotations. It verifies the following annotations - on the implementation class: - - @BindingType(SOAPBinding.SOAP11HTTP_MTOM_BINDING) - @BindingType(SOAPBinding.SOAP12HTTP_MTOM_BINDING) - - The WebServiceRefsTest directory tests the @WebServiceRefs annotation which - is a class level annotation that handles and processes multiple @WebServiceRef - annotations. - - The HandlerTest directory tests both LogicalHandler and SOAPHandler type - handlers. - -(3) The webservices12/specialcases directory tree of tests are special test cases - where the webservices are prebuilt and the clients are not prebuilt. When the - CTS harness runs these tests it will first deploy the prebuilt webservices then - it will build and package the clients by importing the wsdl's from the deployed - webservices via the wsimport command. The harness then deploys the clients and - runs them against the deployed webservices. This verifies whether importing the - wsdl from a deployed webservices endpoint works properly. The step to build the - clients is as follows: - - 1) Install the CTS - 2) Configure the CTS - % cd $TS_HOME/bin - % ant config.vi - - 3) Build the special webservices clients - % cd $TS_HOME/bin - % ant build.special.webservices.clients - -(4) The webservices12/narrow directory tests the use of PortableRemoteObject.narrow to - get the appropriate SEI for a given port. - -(5) The webservices12/sec/descriptors directory tests the use of certificate and - basic authentication security features for both ejb based and servlet based - endpoints. Username and passord info is passed via runtime DD's. Final - wsdl is published and looked up via runtime DD's. Authentication type, - roles, and method permissions are set via DD's and runtime DD's. - - The webservices12/sec/annotations directory tests the use of certificate and - basic authentication security features for both ejb based and servlet based - endpoints. All secuity features are driven by annotations. Username and - password info is set via the BindingProvider. Authentication type is set - via runtime DD's. Roles and method permissions are set via annotations on - the implementation bean class. - -(6) The webservices1/wsdlImport directory tests the importing of wsdl's and schema's - from various directory levels for both ejb based and servlet based endpoints. - -(7) The webservices12/deploy directory tests the various deployment features for - JavaEE based web services for both ejb based and servlet based endpoints. diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/build.xml deleted file mode 100644 index 0e6d9ccace..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/build.xml deleted file mode 100644 index 1cc04f41b4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/Client.java deleted file mode 100644 index 660b6fc7e6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/Client.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.deploy.jarDeploy; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import java.util.Iterator; -import jakarta.xml.ws.Service; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.util.Properties; - -public class Client extends EETest { - - @jakarta.xml.ws.WebServiceRef(name = "service/WSjarDeploy") - static HelloWsService svc; - - HelloWs port = null; - - private void getStub() throws Exception { - TestUtil.logMsg("WebServiceRef for service/WSjarDeploy"); - TestUtil.logMsg("svc=" + svc); - TestUtil.logMsg("Get port from Service"); - port = (HelloWs) svc.getPort(HelloWs.class); - TestUtil.logMsg("Port obtained"); - TestUtil.logMsg("port=" + port); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - getStub(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: call_hello - * - * @assertion_ids: WS4EE:SPEC:183; JavaEE:SPEC:247; - * - * - * @test_Strategy: call method on deployed web services implementation, which - * is deployed from a .jar file - */ - public void call_hello() throws Exception { - TestUtil.logMsg("call_hello"); - try { - HelloRequest req = new HelloRequest(); - req.setArgument("Hi there"); - TestUtil.logMsg("Invoke sayHello method ..."); - HelloResponse ret = port.sayHello(req); - if (!ret.getArgument().equals("'Hi there' to you too!")) { - TestUtil.logMsg("test call_hello failed: return value from server is: " - + ret.getArgument()); - throw new Exception("call_hello failed"); - } - } catch (Throwable t) { - TestUtil.logMsg("test call_hello failed: got exception " + t.toString()); - throw new Exception("call_hello failed"); - } - return; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/HelloWsBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/HelloWsBean.java deleted file mode 100644 index e31fb7bf92..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/HelloWsBean.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.deploy.jarDeploy; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "HelloWsPort", serviceName = "HelloWsService", targetNamespace = "http://JarDeploy.org/wsdl", wsdlLocation = "META-INF/wsdl/JarDeploy.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.deploy.jarDeploy.HelloWs") -@Stateless(name = "WSJarDeployApp") -public class HelloWsBean implements HelloWs { - - public HelloResponse sayHello(HelloRequest input) { - HelloResponse response = new HelloResponse(); - response.setArgument("'" + input.getArgument() + "' to you too!"); - return response; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/JarDeploy.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/JarDeploy.wsdl deleted file mode 100644 index bfd72b84db..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/JarDeploy.wsdl +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/WSJarDeployApp_component.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/WSJarDeployApp_component.jar.sun-ejb-jar.xml deleted file mode 100644 index 19d894e28b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/WSJarDeployApp_component.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSJarDeployApp - WSJarDeployApp - false - false - -1 - - - HelloWsBean - WSJarDeploy/jaxws/Hello - - - - HelloWsService - http://webServerHost.1:webServerPort.1/WSJarDeploy/jaxws/Hello?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/WSJarDeployClient_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/WSJarDeployClient_client.jar.sun-application-client.xml deleted file mode 100644 index fe30c49ed0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/WSJarDeployClient_client.jar.sun-application-client.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - service/WSjarDeploy - - com.sun.ts.tests.webservices12.deploy.jarDeploy.HelloWs - - http://JarDeploy.org/wsdl - HelloWsPort - - - http://webServerHost.1:webServerPort.1/WSJarDeploy/jaxws/Hello?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/build.xml deleted file mode 100644 index 2193a7c2ba..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/build.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/customfile.xml deleted file mode 100644 index ad60255a8b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/jarDeploy/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/build.xml deleted file mode 100644 index 29640a1b86..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/Client.java deleted file mode 100644 index df92b20dba..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/Client.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.deploy.portcomplink.ejb; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.util.Properties; - -import com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.inter.*; - -public class Client extends EETest { - InterModuleService svc = null; - - InterModuleSei port = null; - - private void getStub() throws Exception { - TestUtil.logMsg( - "Lookup webservice java:comp/env/service/WSportcomplinkejb/inter"); - InitialContext ctx = new InitialContext(); - InterModuleService svc = (InterModuleService) ctx - .lookup("java:comp/env/service/WSportcomplinkejb/inter"); - TestUtil.logMsg("service=" + svc); - TestUtil.logMsg("Get port from service"); - port = (InterModuleSei) svc.getPort(InterModuleSei.class); - TestUtil.logMsg("port=" + port); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - public void setup(String[] args, Properties p) throws Exception { - try { - getStub(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Exception { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: PortCompLinkEjbTest - * - * @assertion_ids: WS4EE:SPEC:175; WS4EE:SPEC:71; WS4EE:SPEC:72; - * WS4EE:SPEC:73; WS4EE:SPEC:74; WS4EE:SPEC:76; WS4EE:SPEC:77; WS4EE:SPEC:78; - * WS4EE:SPEC:79; WS4EE:SPEC:111; - * - * - * @test_Strategy: Call InterModuleSei implementation, which will in turn call - * IntraModuleSei implementation. - */ - public void PortCompLinkEjbTest() throws Exception { - TestUtil.logMsg("PortCompLinkEjbTest"); - try { - InterRequest req = new InterRequest(); - req.setArgument("WSPortCompLinkEjb"); - InterResponse ret = port.sayInter(req); - if (ret == null) { - TestUtil.logMsg( - "test PortCompLinkEjb failed: return value from server is: null"); - throw new Exception("PortCompLinkTest failed"); - } else if (!ret.getArgument().equals("inter intra WSPortCompLinkEjb")) { - TestUtil.logMsg( - "test PortCompLinkEjb failed: return value from server is: " + ret); - throw new Exception("PortCompLinkTest failed"); - } - } catch (Throwable t) { - TestUtil - .logMsg("test PortCompLinkEjb failed: got exception " + t.toString()); - throw new Exception("PortCompLinkTest failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/InterModuleService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/InterModuleService.wsdl deleted file mode 100644 index a6bdabc03e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/InterModuleService.wsdl +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/IntraModuleService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/IntraModuleService.wsdl deleted file mode 100644 index a2f54e3893..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/IntraModuleService.wsdl +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/WSPortCompLinkEjb_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/WSPortCompLinkEjb_client.jar.sun-application-client.xml deleted file mode 100644 index 79436a5c4a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/WSPortCompLinkEjb_client.jar.sun-application-client.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - service/WSportcomplinkejb/inter - - com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.inter.InterModuleSei - - http://InterModuleService.org/wsdl - InterModuleSeiPort - - - http://webServerHost.1:webServerPort.1/IntermoduleEjb/jaxws?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/WSPortCompLinkEjb_client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/WSPortCompLinkEjb_client.xml deleted file mode 100644 index fcd4c7741a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/WSPortCompLinkEjb_client.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - WSPortCompLinkEjb_client - - service/WSportcomplinkejb/inter - com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.inter.InterModuleService - META-INF/wsdl/InterModuleService.wsdl - servicens:InterModuleService - - com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.inter.InterModuleSei - WSPortCompLinkEjb_ejb.jar#InterModuleEjbBean - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/WSPortCompLinkEjb_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/WSPortCompLinkEjb_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 821bf2637b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/WSPortCompLinkEjb_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - 0 - - InterModuleEjb - InterModuleEjb - - service/WSportcomplinkejb/intra - - com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.intra.IntraModuleSei - - http://IntraModuleService.org/wsdl - IntraModuleSeiPort - - - http://webServerHost.1:webServerPort.1/IntramoduleEjb/jaxws?WSDL - - false - false - -1 - - - InterModuleEjbBean - IntermoduleEjb/jaxws - - - - IntraModuleEjb - IntraModuleEjb - false - false - -1 - - - IntraModuleEjbBean - IntramoduleEjb/jaxws - - - - InterModuleService - http://webServerHost.1:webServerPort.1/IntermoduleEjb/jaxws?WSDL - - - IntraModuleService - http://webServerHost.1:webServerPort.1/IntramoduleEjb/jaxws?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/WSPortCompLinkEjb_ejb.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/WSPortCompLinkEjb_ejb.xml deleted file mode 100644 index fb2f5a2952..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/WSPortCompLinkEjb_ejb.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - WSPortCompLinkEjb_ejb - - - InterModuleEjb - InterModuleEjb - com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.inter.InterModuleEjbBean - Stateless - Bean - - service/WSportcomplinkejb/intra - com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.intra.IntraModuleService - META-INF/wsdl/IntraModuleService.wsdl - servicens:IntraModuleService - - com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.intra.IntraModuleSei - IntraModuleEjbBean - - - - - - - - - IntraModuleEjb - IntraModuleEjb - com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.intra.IntraModuleEjbBean - Stateless - Bean - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/build.xml deleted file mode 100644 index 22b269bd88..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/build.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/customfile.xml deleted file mode 100644 index 5062ea61d9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/customfile2.xml deleted file mode 100644 index 6d43792218..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/customfile2.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/inter/InterModuleEjbBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/inter/InterModuleEjbBean.java deleted file mode 100644 index 41bb3c6576..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/inter/InterModuleEjbBean.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.inter; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; -import jakarta.xml.ws.WebServiceException; -import javax.naming.InitialContext; - -import com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.intra.*; - -@WebService(portName = "InterModuleSeiPort", serviceName = "InterModuleService", targetNamespace = "http://InterModuleService.org/wsdl", wsdlLocation = "META-INF/wsdl/InterModuleService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.inter.InterModuleSei") - -@Stateless(name = "InterModuleEjb") -public class InterModuleEjbBean { - - public InterResponse sayInter(InterRequest input) { - InterResponse response = new InterResponse(); - IntraRequest intra_input = null; - IntraResponse intra_response = null; - try { - intra_input = new IntraRequest(); - intra_input.setArgument(input.getArgument()); - - System.out.println( - "Lookup: webservice java:comp/env/service/WSportcomplinkejb/intra"); - InitialContext ctx = new InitialContext(); - IntraModuleService svc = (IntraModuleService) ctx - .lookup("java:comp/env/service/WSportcomplinkejb/intra"); - System.out.println("service=" + svc); - System.out.println("Get port from service"); - IntraModuleSei port = (IntraModuleSei) svc.getPort(IntraModuleSei.class); - System.out.println("port=" + port); - intra_response = port.sayIntra(intra_input); - response.setArgument("inter " + intra_response.getArgument()); - } catch (Exception e) { - System.out.println("Exception: " + e); - throw new WebServiceException(e); - } - return response; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/intra/IntraModuleEjbBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/intra/IntraModuleEjbBean.java deleted file mode 100644 index 46bb741aeb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/intra/IntraModuleEjbBean.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.intra; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "IntraModuleSeiPort", serviceName = "IntraModuleService", targetNamespace = "http://IntraModuleService.org/wsdl", wsdlLocation = "META-INF/wsdl/IntraModuleService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.intra.IntraModuleSei") - -@Stateless(name = "IntraModuleEjb") -public class IntraModuleEjbBean { - - public IntraResponse sayIntra(IntraRequest input) { - IntraResponse response = new IntraResponse(); - response.setArgument("intra " + input.getArgument()); - return response; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/webservices.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/webservices.xml deleted file mode 100644 index 5d66f37751..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/portcomplink/ejb/webservices.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - InterModuleService - META-INF/wsdl/InterModuleService.wsdl - - InterModuleEjbBean - inter:InterModuleService - inter:InterModuleSeiPort - com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.inter.InterModuleSei - - InterModuleEjb - - - - - IntraModuleService - META-INF/wsdl/IntraModuleService.wsdl - - IntraModuleEjbBean - intra:IntraModuleService - intra:IntraModuleSeiPort - com.sun.ts.tests.webservices12.deploy.portcomplink.ejb.intra.IntraModuleSei - - IntraModuleEjb - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/Client.java deleted file mode 100644 index 428a67dd88..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/Client.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.deploy.warDeploy; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.Iterator; -import jakarta.xml.ws.Service; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.util.Properties; - -public class Client extends EETest { - - @jakarta.xml.ws.WebServiceRef(name = "service/WSwarDeploy") - static HelloWsService svc; - - HelloWs port = null; - - private void getStub() throws Exception { - TestUtil.logMsg("WebServiceRef for service/WSwarDeploy"); - TestUtil.logMsg("svc=" + svc); - TestUtil.logMsg("Get port from Service"); - port = (HelloWs) svc.getPort(HelloWs.class); - TestUtil.logMsg("Port obtained"); - TestUtil.logMsg("port=" + port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - getStub(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: warDeployCall - * - * @assertion_ids: WS4EE:SPEC:183; WS4EE:SPEC:141; JavaEE:SPEC:247; - * - * - * @test_Strategy: call method on deployed web services implementation, which - * is deployed from a .war file - */ - public void warDeployCall() throws Exception { - TestUtil.logMsg("WarDeployCall"); - try { - HelloRequest req = new HelloRequest(); - req.setArgument("warDeploy"); - TestUtil.logMsg("Invoke sayHello method ..."); - HelloResponse ret = port.sayHello(req); - if (!ret.getArgument().equals("'warDeploy' to you too!")) { - TestUtil - .logMsg("test WarDeployCall failed: return value from server is: " - + ret.getArgument()); - throw new Exception("WarDeployCall failed"); - } - } catch (Throwable t) { - TestUtil - .logMsg("test WarDeployCall failed: got exception " + t.toString()); - throw new Exception("WarDeployCall failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/HelloWsBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/HelloWsBean.java deleted file mode 100644 index fbbb0c0613..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/HelloWsBean.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.deploy.warDeploy; - -import jakarta.jws.WebService; - -@WebService(portName = "HelloWsPort", serviceName = "HelloWsService", targetNamespace = "http://WarDeploy.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WarDeploy.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.deploy.warDeploy.HelloWs") - -public class HelloWsBean implements HelloWs { - - public HelloResponse sayHello(HelloRequest input) { - HelloResponse response = new HelloResponse(); - response.setArgument("'" + input.getArgument() + "' to you too!"); - return response; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/WSWarDeployApp_component_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/WSWarDeployApp_component_web.war.sun-web.xml deleted file mode 100644 index 5848d846ca..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/WSWarDeployApp_component_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - HelloWsService - http://webServerHost.1:webServerPort.1/WSWarDeployApp_component_web/jaxws/warDeploy?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/WSWarDeployClient_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/WSWarDeployClient_client.jar.sun-application-client.xml deleted file mode 100644 index e243c54629..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/WSWarDeployClient_client.jar.sun-application-client.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - service/WSwarDeploy - - com.sun.ts.tests.webservices12.deploy.warDeploy.HelloWs - - http://WarDeploy.org/wsdl - HelloWsPort - - - http://webServerHost.1:webServerPort.1/WSWarDeployApp_component_web/jaxws/warDeploy?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/WarDeploy.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/WarDeploy.wsdl deleted file mode 100644 index f4593d1432..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/WarDeploy.wsdl +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/build.xml deleted file mode 100644 index 0d386e6fd5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/build.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/customfile.xml deleted file mode 100644 index 1768afcf92..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/web.xml deleted file mode 100644 index d5e6315026..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warDeploy/web.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - WSWarDeployApp_web - - com.sun.ts.tests.webservices12.deploy.warDeploy.HelloWsBean - com.sun.ts.tests.webservices12.deploy.warDeploy.HelloWsBean - 0 - - - com.sun.ts.tests.webservices12.deploy.warDeploy.HelloWsBean - /jaxws/warDeploy - - - 54 - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/Client.java deleted file mode 100644 index b7ed387ae4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/Client.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.deploy.warMirrorSEI; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.Iterator; -import jakarta.xml.ws.Service; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.util.Properties; - -public class Client extends EETest { - @jakarta.xml.ws.WebServiceRef(name = "service/WSwarMirrorSEI") - static HelloWsService svc; - - HelloWs port = null; - - private void getStub() throws Exception { - TestUtil.logMsg("WebServiceRef for service/WSwarMirrorSEI"); - TestUtil.logMsg("svc=" + svc); - TestUtil.logMsg("Get port from Service"); - port = (HelloWs) svc.getPort(HelloWs.class); - TestUtil.logMsg("Port obtained"); - TestUtil.logMsg("port=" + port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - getStub(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: warMirrorSEICall - * - * @assertion_ids: WS4EE:SPEC:110; WS4EE:SPEC:184; WS4EE:SPEC:55; - * - * - * @test_Strategy: call method on Java War that mirrors the methods of SEI, - * but does not implement SEI directly - */ - public void warMirrorSEICall() throws Exception { - TestUtil.logMsg("WarMirrorSEICall"); - try { - HelloRequest req = new HelloRequest(); - req.setArgument("warMirrorSEI"); - TestUtil.logMsg("Invoke sayHello method ..."); - HelloResponse ret = port.sayHello(req); - if (!ret.getArgument().equals("'warMirrorSEI' to you too!")) { - TestUtil.logMsg( - "test WarMirrorSEICall failed: return value from server is: " - + ret.getArgument()); - throw new Exception("WarMirrorSEICall failed"); - } else - TestUtil.logMsg("WarMirrorSEICall passed"); - } catch (Throwable t) { - TestUtil.logMsg( - "test WarMirrorSEICall failed: got exception " + t.toString()); - throw new Exception("WarMirrorSEICall failed"); - } - return; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/HelloWsWar.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/HelloWsWar.java deleted file mode 100644 index c7fdd593f0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/HelloWsWar.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.deploy.warMirrorSEI; - -import jakarta.jws.WebService; - -@WebService(portName = "HelloWsPort", serviceName = "HelloWsService", targetNamespace = "http://WarMirrorSEI.org/wsdl", wsdlLocation = "WEB-INF/wsdl/WarMirrorSEI.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.deploy.warMirrorSEI.HelloWs") - -public class HelloWsWar { - - public HelloResponse sayHello(HelloRequest input) { - HelloResponse response = new HelloResponse(); - response.setArgument("'" + input.getArgument() + "' to you too!"); - return response; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/WSWarMirrorSEIClient_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/WSWarMirrorSEIClient_client.jar.sun-application-client.xml deleted file mode 100644 index 11b1111d0c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/WSWarMirrorSEIClient_client.jar.sun-application-client.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - service/WSwarMirrorSEI - - com.sun.ts.tests.webservices12.deploy.warMirrorSEI.HelloWs - - http://WarMirrorSEI.org/wsdl - HelloWsPort - - - http://webServerHost.1:webServerPort.1/WSWarMirrorSEI_web/jaxws/warMirrorSEI?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/WSWarMirrorSEI_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/WSWarMirrorSEI_web.war.sun-web.xml deleted file mode 100644 index 66a0012edc..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/WSWarMirrorSEI_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - HelloWsService - http://webServerHost.1:webServerPort.1/WSWarMirrorSEI_web/jaxws/warMirrorSEI?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/WarMirrorSEI.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/WarMirrorSEI.wsdl deleted file mode 100644 index fcd4c90b7a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/WarMirrorSEI.wsdl +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/build.xml deleted file mode 100644 index d48720976e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/build.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/customfile.xml deleted file mode 100644 index 87320bd9f7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/web.xml deleted file mode 100644 index a351f023cd..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/deploy/warMirrorSEI/web.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - WSWarMirrorSEI - - com.sun.ts.tests.webservices12.deploy.warMirrorSEI.HelloWsWar - com.sun.ts.tests.webservices12.deploy.warMirrorSEI.HelloWsWar - 0 - - - com.sun.ts.tests.webservices12.deploy.warMirrorSEI.HelloWsWar - /jaxws/warMirrorSEI - - - 54 - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/build.xml deleted file mode 100644 index 4a5ca26717..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/Client.java deleted file mode 100644 index d799b67aee..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/Client.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - $Id$ - */ -package com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; - -import jakarta.xml.ws.*; -import java.util.Properties; -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - Hello port = null; - - HandlerTestService service = null; - - // Get Port and Stub access via porting layer interface - - private void getPortJavaEE() throws Exception { - port = (Hello) service.getHelloPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HandlerTestService) getSharedObject(); - getPortJavaEE(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Exception("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: transformBodyTest - * - * @assertion_ids: WS4EE:SPEC:6007 - * - * @test_Strategy: Use a handler to transform a SOAPBody. - */ - public void transformBodyTest() throws Exception { - TestUtil.logMsg("transformBodyTest"); - boolean pass = true; - boolean fault = false; - String expected1 = "transformBodyTest"; - String expected2 = "InboundClientLogicalHandler"; - String expected3 = "OutboundServerLogicalHandler"; - String expected4 = "InboundServerLogicalHandler"; - String expected5 = "OutboundClientLogicalHandler"; - String expected6 = "OutboundClientSOAPHandler"; - String expected7 = "InboundServerSOAPHandler"; - String expected8 = "OutboundServerSOAPHandler"; - String expected9 = "InboundClientSOAPHandler"; - - try { - String result = port.hello("transformBodyTest"); - TestUtil.logMsg("Return value = " + result); - if (result.indexOf(expected1) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected1 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected2) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected2 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected3) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected3 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected4) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected4 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected5) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected5 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected6) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected6 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected7) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected7 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected8) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected8 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected9) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected9 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - } catch (Throwable t) { - t.printStackTrace(); - throw new Exception(t.toString()); - } - - if (!pass) - throw new Exception("transformBodyTest failed"); - } - - /* - * @testName: transformHeaderTest - * - * @assertion_ids: WS4EE:SPEC:6006 - * - * @test_Strategy: Use a handler to transform a SOAPHeader. - */ - public void transformHeaderTest() throws Exception { - TestUtil.logMsg("transformHeaderTest"); - boolean pass = true; - HeaderType ht = null; - String expected = "theTransformHeaderOutboundClientSOAPHandlerInboundServerSOAPHandlerOutboundServerSOAPHandlerInboundClientSOAPHandler"; - try { - ht = new HeaderType(); - ht.setMyheader("theTransformHeader"); - Holder hht = new Holder(); - hht.value = ht; - - port.hello2("transformHeaderTest", hht); - - String result = hht.value.getMyheader(); - - TestUtil.logMsg("Return value = " + result); - if (!result.equals(expected)) { - pass = false; - TestUtil.logErr("Expected =" + expected); - TestUtil.logErr("Actual=" + result); - } - } catch (Throwable t) { - t.printStackTrace(); - throw new Exception(t.toString()); - } - - if (!pass) - throw new Exception("transformHeaderTest failed"); - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/LogicalHandler.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/LogicalHandler.java deleted file mode 100644 index eb0b27a91f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/LogicalHandler.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.*; -import jakarta.xml.ws.handler.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Constants; -import java.io.StringReader; -import javax.xml.transform.stream.StreamSource; - -public class LogicalHandler - implements jakarta.xml.ws.handler.LogicalHandler { - - private static final String HANDLER_NAME = "ClientLogicalHandler"; - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "transformBodyTest")) { - transformBodyTest(context, direction); - } else { - System.out.println( - "didn't find a transformBodyTest message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void transformBodyTest(LogicalMessageContext context, - String direction) { - System.out.println("in " + HANDLER_NAME + ":transformBodyTest"); - Handler_Util.dumpMsg(context); - String tmp = Handler_Util.getMessageAsString(context); - String newTmp = tmp.replaceAll("transformBodyTest", - "transformBodyTest" + direction + HANDLER_NAME); - context.getMessage().setPayload(new StreamSource(new StringReader(newTmp))); - Handler_Util.dumpMsg(context); - System.out.println("exiting " + HANDLER_NAME + ":transformBodyTest"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/SOAPHandler.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/SOAPHandler.java deleted file mode 100644 index 10818bc9c8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/SOAPHandler.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.*; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Iterator; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Constants; - -public class SOAPHandler - implements jakarta.xml.ws.handler.soap.SOAPHandler { - - private static final String HANDLER_NAME = "ClientSOAPHandler"; - - public Set getHeaders() { - return new HashSet(); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "transformBodyTest")) { - transformBodyTest(context, direction); - } else if (Handler_Util.checkForMsg(this, context, "transformHeaderTest")) { - transformHeaderTest(context, direction); - } else { - System.out - .println("didn't find any particular message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void transformBodyTest(MessageContext context, String direction) { - System.out.println("in " + HANDLER_NAME + ":transformBodyTest"); - try { - System.out.println("direction=" + direction); - Handler_Util.dumpMsg(context); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); - SOAPBody body = env.getBody(); - Iterator it = body.getChildElements(); - while (it.hasNext()) { - SOAPElement elem = (SOAPElement) it.next(); - Iterator it2 = ((SOAPElement) elem).getChildElements(); - while (it2.hasNext()) { - SOAPElement elem2 = (SOAPElement) it2.next(); - String value = elem2.getValue(); - if (value.indexOf("transformBodyTest") >= 0) { - value = value + direction + HANDLER_NAME; - elem2.setValue(value); - } - } - } - msg.saveChanges(); - Handler_Util.dumpMsg(context); - } catch (Exception e) { - TestUtil.printStackTrace(e); - e.printStackTrace(); - } - System.out.println("exiting " + HANDLER_NAME + ":doHandlerTest3"); - } - - public void transformHeaderTest(MessageContext context, String direction) { - System.out.println("in " + HANDLER_NAME + ":transformHeaderTest"); - try { - System.out.println("direction=" + direction); - System.out.println("transformHeaderTest:BEFORE"); - Handler_Util.dumpMsg(context); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); - if (env.getHeader() == null) { - System.out.println("ERROR: NO HEADER EXISTS"); - } else { - System.out.println("Changing the existing soap header"); - SOAPHeader sh = env.getHeader(); - Iterator it = sh.examineAllHeaderElements(); - while (it.hasNext()) { - SOAPElement elem = (SOAPElement) it.next(); - Iterator it2 = ((SOAPElement) elem).getChildElements(); - while (it2.hasNext()) { - SOAPElement elem2 = (SOAPElement) it2.next(); - String value = elem2.getValue(); - if (value.indexOf("theTransformHeader") >= 0) { - value = value + direction + HANDLER_NAME; - elem2.setValue(value); - } - } - } - } - msg.saveChanges(); - System.out.println("transformHeaderTest:AFTER"); - Handler_Util.dumpMsg(context); - } catch (Exception e) { - TestUtil.printStackTrace(e); - e.printStackTrace(); - } - System.out.println("exiting " + HANDLER_NAME + ":doHandlerTest3"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/build.xml deleted file mode 100644 index d1fc531764..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/build.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/customfile.xml deleted file mode 100644 index b00d45937e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/customfile.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/customfile2.xml deleted file mode 100644 index 7038949c6e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/handler.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/handler.xml deleted file mode 100644 index 2dcafe7ebd..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/handler.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - SOAPHandler - com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.client.SOAPHandler - - - LogicalHandler - com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.client.LogicalHandler - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/jakartaEE.tokens deleted file mode 100644 index 47f1aa400a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/client/jakartaEE.tokens +++ /dev/null @@ -1,14 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wshandlertestejb") -HANDLERCHAIN=@HandlerChain(name="", file="handler.xml") -SERVICE=com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.client.HandlerTestService -SEI=com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.client.Hello -NAMESPACEURI=http://handlertestservice.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -SERVLETNAME=HelloBean -WEBSERVICEDESCRIPTION=HandlerTestService -SERVICEREFNAMEWSSERVLET=service/wshandlertestejb -SERVICEREFNAMEWSEJB=service/wshandlertestejb -SERVICEREFNAMEWSAPPCLIENT=service/wshandlertestejb -BEANWEBSERVICENAME=HelloBean -STATELESSNAME=wshandlertestejb diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/HandlerTestDefs.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/HandlerTestDefs.xsd deleted file mode 100644 index 3e06d1455d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/HandlerTestDefs.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/HandlerTestService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/HandlerTestService.wsdl deleted file mode 100644 index a506e25af6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/HandlerTestService.wsdl +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/HelloBean.java deleted file mode 100644 index e464c19e5e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/HelloBean.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.server; - -import jakarta.xml.ws.Holder; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "HandlerTestService", targetNamespace = "http://handlertestservice.org/wsdl", wsdlLocation = "META-INF/wsdl/HandlerTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.server.Hello") - -@Stateless(name = "WSHandlerTestEJB") -public class HelloBean { - public String hello(String s) { - return s; - } - - public String hello2(String s, Holder theHeader) { - return s; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/LogicalHandler.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/LogicalHandler.java deleted file mode 100644 index bebf863b25..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/LogicalHandler.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.server; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.*; -import jakarta.xml.ws.handler.*; -import javax.xml.namespace.QName; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Constants; - -import java.io.StringReader; -import javax.xml.transform.stream.StreamSource; - -public class LogicalHandler - implements jakarta.xml.ws.handler.LogicalHandler { - private final String HANDLER_NAME = "ServerLogicalHandler"; - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "transformBodyTest")) { - transformBodyTest(context, direction); - } else { - System.out.println( - "didn't find transformBodyTest message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void transformBodyTest(LogicalMessageContext context, - String direction) { - System.out.println("in " + HANDLER_NAME + ":transformBodyTest"); - - Handler_Util.dumpMsg(context); - - String tmp = Handler_Util.getMessageAsString(context); - String newTmp = tmp.replaceAll("transformBodyTest", - "transformBodyTest" + direction + HANDLER_NAME); - context.getMessage().setPayload(new StreamSource(new StringReader(newTmp))); - Handler_Util.dumpMsg(context); - - System.out.println("exiting " + HANDLER_NAME + ":transformBodyTest"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/SOAPHandler.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/SOAPHandler.java deleted file mode 100644 index 92f5121d00..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/SOAPHandler.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.server; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.*; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Iterator; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Constants; - -public class SOAPHandler - implements jakarta.xml.ws.handler.soap.SOAPHandler { - - private final String HANDLER_NAME = "ServerSOAPHandler"; - - public Set getHeaders() { - return new HashSet(); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "transformBodyTest")) { - transformBodyTest(context, direction); - } else if (Handler_Util.checkForMsg(this, context, "transformHeaderTest")) { - transformHeaderTest(context, direction); - } else { - System.out.println( - "didn't find transformBodyTest message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void transformBodyTest(MessageContext context, String direction) { - System.out.println("in " + HANDLER_NAME + ":transformBodyTest"); - try { - System.out.println("direction=" + direction); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); - SOAPBody body = env.getBody(); - Iterator it = body.getChildElements(); - while (it.hasNext()) { - SOAPElement elem = (SOAPElement) it.next(); - Name elemName = elem.getElementName(); - Iterator it2 = ((SOAPElement) elem).getChildElements(); - while (it2.hasNext()) { - SOAPElement elem2 = (SOAPElement) it2.next(); - String value = elem2.getValue(); - if (value.indexOf("transformBodyTest") >= 0) { - value = value + direction + HANDLER_NAME; - elem2.setValue(value); - } - } - } - msg.saveChanges(); - Handler_Util.dumpMsg(context); - } catch (Exception e) { - TestUtil.printStackTrace(e); - e.printStackTrace(); - } - System.out.println("exiting " + HANDLER_NAME + ":transformBodyTest"); - } - - public void transformHeaderTest(MessageContext context, String direction) { - System.out.println("in " + HANDLER_NAME + ":transformHeaderTest"); - try { - System.out.println("direction=" + direction); - System.out.println("transformHeaderTest:BEFORE"); - Handler_Util.dumpMsg(context); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); - if (env.getHeader() == null) { - System.out.println("ERROR: NO HEADER EXISTS"); - } else { - System.out.println("Changing the existing soap header"); - SOAPHeader sh = env.getHeader(); - Iterator it = sh.examineAllHeaderElements(); - while (it.hasNext()) { - SOAPElement elem = (SOAPElement) it.next(); - Iterator it2 = ((SOAPElement) elem).getChildElements(); - while (it2.hasNext()) { - SOAPElement elem2 = (SOAPElement) it2.next(); - String value = elem2.getValue(); - if (value.indexOf("theTransformHeader") >= 0) { - value = value + direction + HANDLER_NAME; - elem2.setValue(value); - } - } - } - } - msg.saveChanges(); - Handler_Util.dumpMsg(context); - } catch (Exception e) { - TestUtil.printStackTrace(e); - e.printStackTrace(); - } - System.out.println("exiting " + HANDLER_NAME + ":doHandlerTest3"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/WSHandlerTestEJB_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/WSHandlerTestEJB_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index a780e426b1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/WSHandlerTestEJB_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSHandlerTestEJB - WSHandlerTestEJB - false - false - -1 - - - HelloBean - WSHandlerTestEJB/jaxws/Hello - - - - HandlerTestService - http://webServerHost.1:webServerPort.1/WSHandlerTestEJB/jaxws/Hello?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/build.xml deleted file mode 100644 index 734f989187..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/build.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/customfile.xml deleted file mode 100644 index 5c1e9f95dd..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/customfile.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - SOAPHandler - com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.server.SOAPHandler - - - LogicalHandler - com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.server.LogicalHandler - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/customfile2.xml deleted file mode 100644 index 6e6df052c8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/server-handler.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/server-handler.xml deleted file mode 100644 index 56e17212f7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/HandlerTest/server/server-handler.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - SOAPHandler - com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.server.SOAPHandler - - - LogicalHandler - com.sun.ts.tests.webservices12.ejb.annotations.HandlerTest.server.LogicalHandler - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/build.xml deleted file mode 100644 index ea6b111be1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/Client.java deleted file mode 100644 index 22d29cc3c2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/Client.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbAsyncTest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.*; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; - -import com.sun.javatest.Status; - -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; - -import javax.naming.InitialContext; - -public class Client extends EETest { - // need to create jaxbContext - private static final ObjectFactory of = new ObjectFactory(); - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.webservices12.ejb.annotations.WSEjbAsyncTest.client."; - - // service and port information - private static final String NAMESPACEURI = "http://helloservice.org/wsdl"; - - private static final String SERVICE_NAME = "HelloService"; - - private static final String PORT_NAME = "HelloPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - Hello port = null; - - @WebServiceRef(name = "service/wsejbasynctest") - static HelloService service = null; - - private static class HelloCallbackHandler - implements AsyncHandler { - private HelloResponse output; - - public void handleResponse(Response response) { - try { - output = response.get(); - } catch (ExecutionException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - HelloResponse getResponse() { - return output; - } - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (Hello) service.getPort(Hello.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - getPortJavaEE(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: invokeSynchronousTest - * - * @assertion_ids: JAXWS:SPEC:2032; JAXWS:SPEC:2033; JAXWS:SPEC:2034; - * JAXWS:SPEC:2034; JAXWS:SPEC:2035; JAXWS:SPEC:2038; JAXWS:SPEC:2039; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke an RPC method using - * synchronous method. - * - * Description A client can invoke an RPC method via generated stub. - */ - public void invokeSynchronousTest() throws Exception { - TestUtil.logTrace("invokeSynchronousTest"); - boolean pass = true; - String reqStr = "foo"; - String resStr = "Hello, foo!"; - try { - HelloRequest helloReq = of.createHelloRequest(); - helloReq.setString(reqStr); - HelloResponse helloRes = port.hello(helloReq); - String result = helloRes.getResult(); - TestUtil.logMsg("result=" + result); - if (!result.equals(resStr)) { - TestUtil.logErr("expected: " + resStr + ", received: " + result); - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - - if (!pass) - throw new Exception("invokeSynchronousTest failed"); - } - - /* - * @testName: invokeAsyncPollTest - * - * @assertion_ids: JAXWS:SPEC:2032; JAXWS:SPEC:2033; JAXWS:SPEC:2034; - * JAXWS:SPEC:2034; JAXWS:SPEC:2035; JAXWS:SPEC:2038; JAXWS:SPEC:2039; - * WS4EE:SPEC:4006; WS4EE:SPEC:4007; WS4EE:SPEC:4008; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke an RPC method using - * AsyncPoll method. - * - * Description A client can invoke an RPC method via generated stub. - */ - public void invokeAsyncPollTest() throws Exception { - TestUtil.logTrace("invokeAsyncPollTest"); - boolean pass = true; - String reqStr = "foo"; - String resStr = "Hello, foo!"; - try { - HelloRequest helloReq = of.createHelloRequest(); - helloReq.setString(reqStr); - Response response = port.helloAsync(helloReq); - TestUtil.logMsg("Polling and waiting for data ..."); - while (!response.isDone()) - ; - HelloResponse helloRes = response.get(); - String result = helloRes.getResult(); - TestUtil.logMsg("result=" + result); - if (!result.equals(resStr)) { - TestUtil.logErr("expected: " + resStr + ", received: " + result); - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - - if (!pass) - throw new Exception("invokeAsyncPollTest failed"); - } - - /* - * @testName: invokeAsyncCallbackTest - * - * @assertion_ids: JAXWS:SPEC:2032; JAXWS:SPEC:2033; JAXWS:SPEC:2034; - * JAXWS:SPEC:2034; JAXWS:SPEC:2035; JAXWS:SPEC:2038; JAXWS:SPEC:2039; - * WS4EE:SPEC:4006; WS4EE:SPEC:4007; WS4EE:SPEC:4008; - * - * @test_Strategy: Create a stub instance to our service definition interface, - * set the target endpoint to the servlet, and invoke an RPC method using - * AsyncCallback method. - * - * Description A client can invoke an RPC method via generated stub. - */ - public void invokeAsyncCallbackTest() throws Exception { - TestUtil.logTrace("invokeAsyncCallbackTest"); - boolean pass = true; - String reqStr = "foo"; - String resStr = "Hello, foo!"; - try { - HelloRequest helloReq = of.createHelloRequest(); - helloReq.setString(reqStr); - HelloCallbackHandler callbackHandler = new HelloCallbackHandler(); - Future response = port.helloAsync(helloReq, callbackHandler); - TestUtil.logMsg("Waiting for Callback to complete to obtain data ..."); - while (!response.isDone()) - ; - HelloResponse helloRes = callbackHandler.getResponse(); - String result = helloRes.getResult(); - TestUtil.logMsg("result=" + result); - if (!result.equals(resStr)) { - TestUtil.logErr("expected: " + resStr + ", received: " + result); - pass = false; - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - - if (!pass) - throw new Exception("invokeAsyncCallbackTest failed"); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/HelloService.wsdl deleted file mode 100644 index 85029bde41..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/HelloService.wsdl +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/WSEjbAsyncTestClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/WSEjbAsyncTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 28191a6213..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/WSEjbAsyncTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbasynctest - http://webServerHost.1:webServerPort.1/WSEjbAsyncTest/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/build.xml deleted file mode 100644 index 01a2196156..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/build.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/customfile-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/customfile-client.xml deleted file mode 100644 index 527a7b6fd7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/client/customfile-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - true - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/HelloBean.java deleted file mode 100644 index e6878858f6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/HelloBean.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbAsyncTest.server; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "HelloService", targetNamespace = "http://helloservice.org/wsdl", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.annotations.WSEjbAsyncTest.server.Hello") -@Stateless(name = "WSEjbAsyncTest") -public class HelloBean { - - public HelloResponse hello(HelloRequest request) { - HelloResponse response = null; - System.out.println("Hello, " + request.getString() + "!"); - response = new HelloResponse(); - response.setResult("Hello, " + request.getString() + "!"); - return response; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/HelloService.wsdl deleted file mode 100644 index 85029bde41..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/HelloService.wsdl +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/WSEjbAsyncTest_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/WSEjbAsyncTest_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index cc4bdb8501..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/WSEjbAsyncTest_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbAsyncTest - WSEjbAsyncTest - false - false - -1 - - - HelloBean - WSEjbAsyncTest/ejb - - - - HelloService - http://webServerHost.1:webServerPort.1/WSEjbAsyncTest/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/build.xml deleted file mode 100644 index 0df949a720..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/build.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/customfile-server.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/customfile-server.xml deleted file mode 100644 index 62a94b8a6f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbAsyncTest/server/customfile-server.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/Client.java deleted file mode 100644 index e582db09be..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/Client.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest1; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.*; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private URL url = null; - - private URLConnection urlConn = null; - - private String SERVLET = "/WSEjbMultipleClientInjectionTest1Clnt_web/ServletTest"; - - private Hello port; - - @WebServiceRef(name = "service/wsejbmultipleclientinjectiontest1") - static HelloService service = null; - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get wsejbmultipleclientinjectiontest1 Service via @WebServiceRef annotation"); - TestUtil.logMsg( - "Uses name attribute @WebServiceRef(name=\"service/wsejbmultipleclientinjectiontest1\")"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHello(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) - getPort(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: MultipleClientInjectionSingleClntEarTest - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: Test that injection works for multiple clients packaged in - * a single client ear file. An appclient and servletclient is packaged in a - * single client ear file. Injection should happen in both clients. - */ - public void MultipleClientInjectionSingleClntEarTest() throws Exception { - boolean pass = true; - - TestUtil.logMsg("MultipleClientInjectionSingleClntEarTest"); - TestUtil.logMsg("Test injection in both appclient and servletclient"); - try { - TestUtil.logMsg("Test appclient injection ....."); - if (service == null) { - TestUtil.logErr("appclient injection failed"); - pass = false; - } else - TestUtil.logMsg("appclient injection passed"); - TestUtil.logMsg("Test servletclient injection ....."); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - props.setProperty("TEST", "test1"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - TestUtil.logErr("servletclient injection failed"); - pass = false; - } else - TestUtil.logMsg("servletclient injection passed"); - } catch (Throwable t) { - throw new Exception("MultipleClientInjectionSingleClntEarTest failed"); - } - if (!pass) - throw new Exception("MultipleClientInjectionSingleClntEarTest failed"); - } - - /* - * @testName: MultipleClientInjectionSingleClntEarInvokeHelloBye - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: Test that invocation works for multiple injection. Call - * methods hello and bye. - */ - public void MultipleClientInjectionSingleClntEarInvokeHelloBye() - throws Exception { - boolean pass = true; - - TestUtil.logMsg("MultipleClientInjectionSingleClntEarInvokeHelloBye"); - TestUtil.logMsg("Test injection in both appclient and servletclient"); - try { - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("Invoke hello method"); - String txt = port.hello("Hello there"); - if (txt.equals("Hello there to you too!")) - TestUtil.logMsg("Invoke of hello passed"); - else { - pass = false; - TestUtil.logErr("Invoke of hello failed"); - } - TestUtil.logMsg("Invoke bye method"); - txt = port.bye("Bye"); - if (txt.equals("Bye and take care!")) - TestUtil.logMsg("Invoke of bye passed"); - else { - pass = false; - TestUtil.logErr("Invoke of bye failed"); - } - TestUtil.logMsg("Test servletclient invocation ....."); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - props.setProperty("TEST", "test2"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) - pass = false; - } catch (Throwable t) { - throw new Exception( - "MultipleClientInjectionSingleClntEarInvokeHelloBye failed"); - } - if (!pass) - throw new Exception( - "MultipleClientInjectionSingleClntEarInvokeHelloBye failed"); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/HelloBean.java deleted file mode 100644 index 825100d80c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/HelloBean.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest1; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "Hello", serviceName = "HelloService", targetNamespace = "http://Hello.org", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest1.Hello") -@Stateless(name = "WSEjbMultipleClientInjectionTest1") -public class HelloBean { - - public String hello(String str) { - return str + " to you too!"; - } - - public String bye(String str) { - return str + " and take care!"; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/HelloService.wsdl deleted file mode 100644 index 83472ec585..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/HelloService.wsdl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/ServletClient.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/ServletClient.java deleted file mode 100644 index e309fbb2fa..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/ServletClient.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest1; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; - -import java.io.*; -import java.sql.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import java.util.*; -import jakarta.xml.ws.*; - -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - private Hello port; - - private String targetEndpointAddress; - - @WebServiceRef(name = "service/wsejbmultipleclientinjectiontest1") - HelloService service = null; - - private void getPort() throws Exception { - port = (Hello) service.getHello(); - } - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("DEBUG init: service=" + service); - try { - if (service != null) - getPort(); - System.out.println("DEBUG init: port=" + port); - BindingProvider bindingprovider = (BindingProvider) port; - java.util.Map context = bindingprovider - .getRequestContext(); - targetEndpointAddress = (String) context - .get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY); - System.out.println( - "DEBUG init: target endpoint address=" + targetEndpointAddress); - } catch (Exception e) { - System.err.println("DEBUG init: Exception: " + e); - e.printStackTrace(); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - try { - String test = harnessProps.getProperty("TEST"); - TestUtil.logMsg("doGet: test to execute is: " + test); - System.out.println("doGet: test to execute is: " + test); - if (test.equals("test1")) { - - if (service != null) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else { - TestUtil.logMsg("Invoke hello method"); - if (port != null) { - String txt = port.hello("Hello there"); - if (txt.equals("Hello there to you too!")) - TestUtil.logMsg("Invoke of hello passed"); - else { - pass = false; - TestUtil.logErr("Invoke of hello failed"); - } - } else - pass = false; - TestUtil.logMsg("Invoke bye method"); - if (port != null) { - String txt = port.bye("Bye"); - if (txt.equals("Bye and take care!")) - TestUtil.logMsg("Invoke of bye passed"); - else { - pass = false; - TestUtil.logErr("Invoke of bye failed"); - } - } else - pass = false; - if (pass) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } - p.list(out); - } catch (Exception e) { - TestUtil.logErr("doGet: Exception: " + e); - e.printStackTrace(out); - System.out.println("doGet: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - TestUtil.logMsg("doPost: service=" + service); - TestUtil.logMsg("doPost: port=" + port); - TestUtil.logMsg("doPost: target endpoint address=" + targetEndpointAddress); - System.out.println("doPost: service=" + service); - System.out.println("doPost: port=" + port); - System.out - .println("doPost: target endpoint address=" + targetEndpointAddress); - - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - if (debug) { - TestUtil.logMsg("Remote logging intialized for Servlet"); - System.out.println("Remote logging intialized for Servlet"); - TestUtil.logMsg("Here are the harness props"); - TestUtil.list(harnessProps); - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - TestUtil.logErr("doPost: Exception: " + e); - System.out.println("doPost: Exception: " + e); - e.printStackTrace(); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1Clnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1Clnt_client.jar.sun-application-client.xml deleted file mode 100644 index ecba0e315e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1Clnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbmultipleclientinjectiontest1 - http://webServerHost.1:webServerPort.1/WSEjbMultipleClientInjectionTest1/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1Clnt_client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1Clnt_client.xml deleted file mode 100644 index eb0213a36e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1Clnt_client.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - WSEjbMultipleClientInjectionTest1Clnt_client - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1Clnt_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1Clnt_web.war.sun-web.xml deleted file mode 100644 index f393dc205b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1Clnt_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbmultipleclientinjectiontest1 - http://webServerHost.1:webServerPort.1/WSEjbMultipleClientInjectionTest1/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1Clnt_web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1Clnt_web.xml deleted file mode 100644 index 64d94e5352..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1Clnt_web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - ServletClientWebApp - - ServletClient - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest1.ServletClient - - - ServletClient - /ServletTest - - - 54 - - - service/wsejbmultipleclientinjectiontest1 - jakarta.xml.ws.Service - WEB-INF/wsdl/HelloService.wsdl - - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest1.Hello - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 1806a40008..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbMultipleClientInjectionTest1 - WSEjbMultipleClientInjectionTest1 - false - false - -1 - - - HelloBean - WSEjbMultipleClientInjectionTest1/ejb - - - - HelloService - http://webServerHost.1:webServerPort.1/WSEjbMultipleClientInjectionTest1/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1_ejb.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1_ejb.xml deleted file mode 100644 index 212a2a2c9d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/WSEjbMultipleClientInjectionTest1_ejb.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - WSEjbMultipleClientInjectionTest1 - - - WSEjbMultipleClientInjectionTest1 - WSEjbMultipleClientInjectionTest1 - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest1.HelloBean - Stateless - Container - - - - - - - - - - - WSEjbMultipleClientInjectionTest1 - hello - - Supports - - - - WSEjbMultipleClientInjectionTest1 - bye - - Supports - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/application.xml.clientear b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/application.xml.clientear deleted file mode 100644 index d528691c13..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/application.xml.clientear +++ /dev/null @@ -1,32 +0,0 @@ - - - - - Application description - WSEjbMultipleClientInjectionTest1Clnt - - - WSEjbMultipleClientInjectionTest1Clnt_web.war - WSEjbMultipleClientInjectionTest1Clnt_web - - - - WSEjbMultipleClientInjectionTest1Clnt_client.jar - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/application.xml.ejbear b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/application.xml.ejbear deleted file mode 100644 index 9e8abbfbac..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/application.xml.ejbear +++ /dev/null @@ -1,26 +0,0 @@ - - - - -Application description - WSEjbMultipleClientInjectionTest1 - - WSEjbMultipleClientInjectionTest1_ejb.jar - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/build.xml deleted file mode 100644 index b5a4a97df1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/build.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/customfile.xml deleted file mode 100644 index 188af7d275..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest1/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/Client.java deleted file mode 100644 index aac6d726f7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/Client.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest2; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.*; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private URL url = null; - - private URLConnection urlConn = null; - - private String SERVLET = "/WSEjbMultipleClientInjectionTest2Clnt2_web/ServletTest"; - - private Hello port; - - @WebServiceRef(name = "service/wsejbmultipleclientinjectiontest2") - static HelloService service = null; - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get wsejbmultipleclientinjectiontest2 Service via @WebServiceRef annotation"); - TestUtil.logMsg( - "Uses name attribute @WebServiceRef(name=\"service/wsejbmultipleclientinjectiontest2\")"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHello(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) - getPort(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: MultipleClientInjectionMultipleClntEarsTest - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: Test that injection works for multiple clients packaged in - * separate client ear files. An appclient and servletclient is packaged in - * separate client ear files. Injection should happen in both clients. - */ - public void MultipleClientInjectionMultipleClntEarsTest() throws Exception { - boolean pass = true; - - TestUtil.logMsg("MultipleClientInjectionMultipleClntEarsTest"); - TestUtil.logMsg("Test injection in both appclient and servletclient"); - try { - TestUtil.logMsg("Test appclient injection ....."); - if (service == null) { - TestUtil.logErr("appclient injection failed"); - pass = false; - } else - TestUtil.logMsg("appclient injection passed"); - TestUtil.logMsg("Test servletclient injection ....."); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - props.setProperty("TEST", "test2"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - TestUtil.logErr("servletclient injection failed"); - pass = false; - } else - TestUtil.logMsg("servletclient injection passed"); - } catch (Throwable t) { - throw new Exception("MultipleClientInjectionMultipleClntEarsTest failed"); - } - if (!pass) - throw new Exception("MultipleClientInjectionMultipleClntEarsTest failed"); - } - - /* - * @testName: MultipleClientInjectionMultipleClntEarsInvokeHelloBye - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: Test that invocation works for multiple injection. Call - * methods hello and bye. - */ - public void MultipleClientInjectionMultipleClntEarsInvokeHelloBye() - throws Exception { - boolean pass = true; - - TestUtil.logMsg("MultipleClientInjectionMultipleClntEarsInvokeHelloBye"); - TestUtil.logMsg("Test injection in both appclient and servletclient"); - try { - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("Invoke hello method"); - String txt = port.hello("Hello there"); - if (txt.equals("Hello there to you too!")) - TestUtil.logMsg("Invoke of hello passed"); - else { - pass = false; - TestUtil.logErr("Invoke of hello failed"); - } - TestUtil.logMsg("Invoke bye method"); - txt = port.bye("Bye"); - if (txt.equals("Bye and take care!")) - TestUtil.logMsg("Invoke of bye passed"); - else { - pass = false; - TestUtil.logErr("Invoke of bye failed"); - } - TestUtil.logMsg("Test servletclient invocation ....."); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - props.setProperty("TEST", "test2"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) - pass = false; - } catch (Throwable t) { - throw new Exception( - "MultipleClientInjectionMultipleClntEarsInvokeHelloBye failed"); - } - if (!pass) - throw new Exception( - "MultipleClientInjectionMultipleClntEarsInvokeHelloBye failed"); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/HelloBean.java deleted file mode 100644 index 47d2cf0983..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/HelloBean.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest2; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "Hello", serviceName = "HelloService", targetNamespace = "http://Hello.org", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest2.Hello") -@Stateless(name = "WSEjbMultipleClientInjectionTest2") -public class HelloBean { - - public String hello(String str) { - return str + " to you too!"; - } - - public String bye(String str) { - return str + " and take care!"; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/HelloService.wsdl deleted file mode 100644 index 83472ec585..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/HelloService.wsdl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/ServletClient.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/ServletClient.java deleted file mode 100644 index 5c2457b0f7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/ServletClient.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest2; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; - -import java.io.*; -import java.sql.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import java.util.*; -import jakarta.xml.ws.*; - -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - private Hello port; - - private String targetEndpointAddress; - - @WebServiceRef(name = "service/wsejbmultipleclientinjectiontest2") - HelloService service = null; - - private void getPort() throws Exception { - port = (Hello) service.getHello(); - } - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("DEBUG init: service=" + service); - try { - if (service != null) - getPort(); - System.out.println("DEBUG init: port=" + port); - BindingProvider bindingprovider = (BindingProvider) port; - java.util.Map context = bindingprovider - .getRequestContext(); - targetEndpointAddress = (String) context - .get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY); - System.out.println( - "DEBUG init: target endpoint address=" + targetEndpointAddress); - } catch (Exception e) { - System.err.println("DEBUG init: Exception: " + e); - e.printStackTrace(); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - try { - String test = harnessProps.getProperty("TEST"); - TestUtil.logMsg("doGet: test to execute is: " + test); - System.out.println("doGet: test to execute is: " + test); - if (test.equals("test1")) { - - if (service != null) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else { - TestUtil.logMsg("Invoke hello method"); - if (port != null) { - String txt = port.hello("Hello there"); - if (txt.equals("Hello there to you too!")) - TestUtil.logMsg("Invoke of hello passed"); - else { - pass = false; - TestUtil.logErr("Invoke of hello failed"); - } - } else - pass = false; - TestUtil.logMsg("Invoke bye method"); - if (port != null) { - String txt = port.bye("Bye"); - if (txt.equals("Bye and take care!")) - TestUtil.logMsg("Invoke of bye passed"); - else { - pass = false; - TestUtil.logErr("Invoke of bye failed"); - } - } else - pass = false; - if (pass) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } - p.list(out); - } catch (Exception e) { - TestUtil.logErr("doGet: Exception: " + e); - e.printStackTrace(out); - System.out.println("doGet: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - TestUtil.logMsg("doPost: service=" + service); - TestUtil.logMsg("doPost: port=" + port); - TestUtil.logMsg("doPost: target endpoint address=" + targetEndpointAddress); - System.out.println("doPost: service=" + service); - System.out.println("doPost: port=" + port); - System.out - .println("doPost: target endpoint address=" + targetEndpointAddress); - - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - if (debug) { - TestUtil.logMsg("Remote logging intialized for Servlet"); - System.out.println("Remote logging intialized for Servlet"); - TestUtil.logMsg("Here are the harness props"); - TestUtil.list(harnessProps); - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - TestUtil.logErr("doPost: Exception: " + e); - System.out.println("doPost: Exception: " + e); - e.printStackTrace(); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2Clnt1_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2Clnt1_client.jar.sun-application-client.xml deleted file mode 100644 index d0e28e5f7d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2Clnt1_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbmultipleclientinjectiontest2 - http://webServerHost.1:webServerPort.1/WSEjbMultipleClientInjectionTest2/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2Clnt1_client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2Clnt1_client.xml deleted file mode 100644 index c71a201335..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2Clnt1_client.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - WSEjbMultipleClientInjectionTest2Clnt1_client - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2Clnt2_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2Clnt2_web.war.sun-web.xml deleted file mode 100644 index 9db9591613..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2Clnt2_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbmultipleclientinjectiontest2 - http://webServerHost.1:webServerPort.1/WSEjbMultipleClientInjectionTest2/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2Clnt2_web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2Clnt2_web.xml deleted file mode 100644 index 302e558cc9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2Clnt2_web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - ServletClientWebApp - - ServletClient - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest2.ServletClient - - - ServletClient - /ServletTest - - - 54 - - - service/wsejbmultipleclientinjectiontest2 - jakarta.xml.ws.Service - WEB-INF/wsdl/HelloService.wsdl - - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest2.Hello - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 318798af2c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbMultipleClientInjectionTest2 - WSEjbMultipleClientInjectionTest2 - false - false - -1 - - - HelloBean - WSEjbMultipleClientInjectionTest2/ejb - - - - HelloService - http://webServerHost.1:webServerPort.1/WSEjbMultipleClientInjectionTest2/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2_ejb.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2_ejb.xml deleted file mode 100644 index 9eff83044d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/WSEjbMultipleClientInjectionTest2_ejb.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - WSEjbMultipleClientInjectionTest2 - - - WSEjbMultipleClientInjectionTest2 - WSEjbMultipleClientInjectionTest2 - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbMultipleClientInjectionTest2.HelloBean - Stateless - Container - - - - - - - - - - - WSEjbMultipleClientInjectionTest2 - hello - - Supports - - - - WSEjbMultipleClientInjectionTest2 - bye - - Supports - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/application.xml.clientear1 b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/application.xml.clientear1 deleted file mode 100644 index 923d1a9e32..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/application.xml.clientear1 +++ /dev/null @@ -1,26 +0,0 @@ - - - - - Application description - WSEjbMultipleClientInjectionTest2Clnt1 - - WSEjbMultipleClientInjectionTest2Clnt1_client.jar - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/application.xml.clientear2 b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/application.xml.clientear2 deleted file mode 100644 index e58848f92f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/application.xml.clientear2 +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Application description - WSEjbMultipleClientInjectionTest2Clnt2 - - - WSEjbMultipleClientInjectionTest2Clnt2_web.war - WSEjbMultipleClientInjectionTest2Clnt2_web - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/application.xml.ejbear b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/application.xml.ejbear deleted file mode 100644 index b8a60d2b2b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/application.xml.ejbear +++ /dev/null @@ -1,26 +0,0 @@ - - - - -Application description - WSEjbMultipleClientInjectionTest2 - - WSEjbMultipleClientInjectionTest2_ejb.jar - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/build.xml deleted file mode 100644 index 04a6ca5e20..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/build.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/customfile.xml deleted file mode 100644 index 49e9855021..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbMultipleClientInjectionTest2/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/Client.java deleted file mode 100644 index 3d780e43ef..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/Client.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbNoWebServiceRefInClientTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.URL; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private Hello port; - - HelloService service; - - private void getPort() throws Exception { - InitialContext ctx = new InitialContext(); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsejbnowebservicerefinclienttest"); - HelloService service = (HelloService) ctx - .lookup("java:comp/env/service/wsejbnowebservicerefinclienttest"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHello(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) - getPort(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: WSEjbNoWebServiceRefInClientTestVerifyJNDILookupOfService - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. There is no @WebServiceRef annotation in client. The EJBBean - * Implementation class is packaged in the ear file. There is no EJBHome or - * EJBRemote implementation class packaged. Since no @WebServiceRef exists in - * the client verify that the webservice can be obtained via a JNDI lookup. - * Verify that the container correctly publishes the web service - * implementation under "java:comp/env/service-ref-name". - */ - public void WSEjbNoWebServiceRefInClientTestVerifyJNDILookupOfService() - throws Exception { - TestUtil - .logMsg("WSEjbNoWebServiceRefInClientTestVerifyJNDILookupOfService"); - try { - TestUtil.logMsg( - "Verify JNDI lookup of \"java:comp/env/service/wsejbnowebservicerefinclienttest\""); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsejbnowebservicerefinclienttest"); - HelloService service = (HelloService) ctx - .lookup("java:comp/env/service/wsejbnowebservicerefinclienttest"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg( - "WSEjbNoWebServiceRefInClientTestVerifyJNDILookupOfService passed"); - } catch (Throwable t) { - throw new Exception( - "WSEjbNoWebServiceRefInClientTestVerifyJNDILookupOfService failed"); - } - return; - } - - /* - * @testName: WSEjbNoWebServiceRefInClientTestInvokeHelloBye - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: Test that invocation works. Call methods hello and bye. - */ - public void WSEjbNoWebServiceRefInClientTestInvokeHelloBye() throws Exception { - boolean pass = true; - - TestUtil.logMsg("WSEjbNoWebServiceRefInClientTestInvokeHelloBye"); - try { - TestUtil.logMsg("Test invocation ....."); - TestUtil.logMsg("Invoke hello method"); - String txt = port.hello("Hello there"); - if (txt.equals("Hello there to you too!")) - TestUtil.logMsg("Invoke of hello passed"); - else { - pass = false; - TestUtil.logErr("Invoke of hello failed"); - } - TestUtil.logMsg("Invoke bye method"); - txt = port.bye("Bye"); - if (txt.equals("Bye and take care!")) - TestUtil.logMsg("Invoke of bye passed"); - else { - pass = false; - TestUtil.logErr("Invoke of bye failed"); - } - } catch (Throwable t) { - throw new Exception("WSEjbNoWebServiceRefInClientTestInvokeHelloBye failed"); - } - if (!pass) - throw new Exception("WSEjbNoWebServiceRefInClientTestInvokeHelloBye failed"); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/HelloBean.java deleted file mode 100644 index ce0eceda3a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/HelloBean.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbNoWebServiceRefInClientTest; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "Hello", serviceName = "HelloService", targetNamespace = "http://Hello.org", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.annotations.WSEjbNoWebServiceRefInClientTest.Hello") -@Stateless(name = "WSEjbNoWebServiceRefInClientTest") -public class HelloBean { - - public String hello(String str) { - return str + " to you too!"; - } - - public String bye(String str) { - return str + " and take care!"; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/HelloService.wsdl deleted file mode 100644 index 83472ec585..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/HelloService.wsdl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/WSEjbNoWebServiceRefInClientTestClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/WSEjbNoWebServiceRefInClientTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index a75e636744..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/WSEjbNoWebServiceRefInClientTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - service/wsejbnowebservicerefinclienttest - - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbNoWebServiceRefInClientTest.Hello - - http://Hello.org - Hello - - - http://webServerHost.1:webServerPort.1/WSEjbNoWebServiceRefInClientTest/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/WSEjbNoWebServiceRefInClientTestClnt_client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/WSEjbNoWebServiceRefInClientTestClnt_client.xml deleted file mode 100644 index 81f08af75f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/WSEjbNoWebServiceRefInClientTestClnt_client.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - WSEjbNoWebServiceRefInClientTestClnt_client - - service/wsejbnowebservicerefinclienttest - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbNoWebServiceRefInClientTest.HelloService - META-INF/wsdl/HelloService.wsdl - servicens:HelloService - - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbNoWebServiceRefInClientTest.Hello - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/WSEjbNoWebServiceRefInClientTest_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/WSEjbNoWebServiceRefInClientTest_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 82ed930d4f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/WSEjbNoWebServiceRefInClientTest_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbNoWebServiceRefInClientTest - WSEjbNoWebServiceRefInClientTest - false - false - -1 - - - HelloBean - WSEjbNoWebServiceRefInClientTest/ejb - - - - HelloService - http://webServerHost.1:webServerPort.1/WSEjbNoWebServiceRefInClientTest/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/WSEjbNoWebServiceRefInClientTest_ejb.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/WSEjbNoWebServiceRefInClientTest_ejb.xml deleted file mode 100644 index a6e17f5595..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/WSEjbNoWebServiceRefInClientTest_ejb.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - WSEjbNoWebServiceRefInClientTest_ejb - - - WSEjbNoWebServiceRefInClientTest - WSEjbNoWebServiceRefInClientTest - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbNoWebServiceRefInClientTest.HelloBean - Stateless - Container - - - - - - - - - - - WSEjbNoWebServiceRefInClientTest - hello - - Supports - - - - WSEjbNoWebServiceRefInClientTest - bye - - Supports - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/application.xml.clientear b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/application.xml.clientear deleted file mode 100644 index 7e32ebd836..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/application.xml.clientear +++ /dev/null @@ -1,26 +0,0 @@ - - - - -Application description - WSEjbNoWebServiceRefInClientTestClnt - - WSEjbNoWebServiceRefInClientTestClnt_client.jar - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/application.xml.ejbear b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/application.xml.ejbear deleted file mode 100644 index 1361ca1d6d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/application.xml.ejbear +++ /dev/null @@ -1,26 +0,0 @@ - - - - -Application description - WSEjbNoWebServiceRefInClientTest - - WSEjbNoWebServiceRefInClientTest_ejb.jar - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/build.xml deleted file mode 100644 index 577cb54775..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/build.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/customfile.xml deleted file mode 100644 index bb8259eb99..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbNoWebServiceRefInClientTest/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/Client.java deleted file mode 100644 index 6ce3bd05f9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/Client.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbPkgEPAndClientInSameEarTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.URL; -import java.util.Properties; -import java.util.Iterator; -import java.util.Map; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private String urlString = null; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private Hello port; - - @WebServiceRef(name = "service/wsejbpkgepandclientinsameeartest") - static HelloService service; - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get wsejbpkgepandclientinsameeartest Service via @WebServiceRef annotation"); - TestUtil.logMsg( - "Uses name attribute @WebServiceRef(name=\"service/wsejbpkgepandclientinsameeartest\")"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHello(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - BindingProvider bindingProvider = (BindingProvider) port; - Map map = bindingProvider.getRequestContext(); - TestUtil - .logMsg("Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum, - "/WSEjbPkgEPAndClientInSameEarTest/ejb"); - if (pass) - getPort(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: WSEjbPkgEPAndClientInSameEarTestCallHello - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: Package endpoint and client in same ear file. - */ - public void WSEjbPkgEPAndClientInSameEarTestCallHello() throws Exception { - TestUtil.logMsg("WSEjbPkgEPAndClientInSameEarTestCallHello"); - try { - String txt = port.hello("Hi there"); - if (txt.equals("Hi there to you too!")) - TestUtil.logMsg("WSEjbPkgEPAndClientInSameEarTestCallHello passed"); - else - throw new RuntimeException("Msg returned from hello() incorrect"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Exception("WSEjbPkgEPAndClientInSameEarTestCallHello failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/HelloBean.java deleted file mode 100644 index cf01af19c8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/HelloBean.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbPkgEPAndClientInSameEarTest; - -import jakarta.ejb.Remote; -import jakarta.ejb.Stateless; -import jakarta.ejb.SessionContext; -import jakarta.jws.WebService; -import jakarta.annotation.Resource; - -@WebService(portName = "Hello", serviceName = "HelloService", targetNamespace = "http://Hello.org", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.annotations.WSEjbPkgEPAndClientInSameEarTest.Hello") -@Stateless(name = "WSEjbPkgEPAndClientInSameEarTest") -public class HelloBean { - - @Resource - private SessionContext sc; - - public String hello(String str) { - return str + " to you too!"; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/HelloService.wsdl deleted file mode 100644 index 5d39bdcb8c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/HelloService.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/WSEjbPkgEPAndClientInSameEarTest_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/WSEjbPkgEPAndClientInSameEarTest_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 58f27e1cb6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/WSEjbPkgEPAndClientInSameEarTest_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbPkgEPAndClientInSameEarTest - WSEjbPkgEPAndClientInSameEarTest - false - false - -1 - - - HelloBean - WSEjbPkgEPAndClientInSameEarTest/ejb - - - - HelloService - http://webServerHost.1:webServerPort.1/WSEjbPkgEPAndClientInSameEarTest/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/build.xml deleted file mode 100644 index 39b0a948cb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/build.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/customfile.xml deleted file mode 100644 index 3f2763fd1e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPkgEPAndClientInSameEarTest/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/Client.java deleted file mode 100644 index 8471697064..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/Client.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbPortFieldInjectionTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - @WebServiceRef(name = "service/wsejbportfieldinjectiontest", value = HelloService.class) - static Hello port = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) { - TestUtil.logMsg("Test port field injection"); - TestUtil.logMsg("port=" + port); - if (port != null) - JAXWS_Util.dumpTargetEndpointAddress(port); - } - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: WSEjbPortFieldInjectionTest - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: Test that port field injection works. - */ - public void WSEjbPortFieldInjectionTest() throws Exception { - TestUtil.logMsg("WSEjbPortFieldInjectionTest"); - try { - if (port == null) - throw new RuntimeException("Port field injection failed: port=null"); - String txt = port.hello("Hello There!"); - if (txt.equals("WebSvcTest-Hello Hello There!")) - TestUtil.logMsg("WSEjbPortFieldInjectionTest passed"); - else - throw new RuntimeException("Msg returned from hello() incorrect"); - } catch (Throwable t) { - throw new Exception("WSEjbPortFieldInjectionTest failed"); - } - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/HelloBean.java deleted file mode 100644 index 048e2b873a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/HelloBean.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbPortFieldInjectionTest; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "Hello", serviceName = "HelloService", targetNamespace = "http://Hello.org", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.annotations.WSEjbPortFieldInjectionTest.Hello") -@Stateless(name = "WSEjbPortFieldInjectionTest") -public class HelloBean { - - public String hello(String str) { - return "WebSvcTest-Hello " + str; - } - - public String bye(String str) { - return "WebSvcTest-Bye and take care " + str; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/HelloService.wsdl deleted file mode 100644 index 83472ec585..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/HelloService.wsdl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/WSEjbPortFieldInjectionTestClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/WSEjbPortFieldInjectionTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 7be3671a90..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/WSEjbPortFieldInjectionTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbportfieldinjectiontest - http://webServerHost.1:webServerPort.1/WSEjbPortFieldInjectionTest/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/WSEjbPortFieldInjectionTest_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/WSEjbPortFieldInjectionTest_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 28661bc8e3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/WSEjbPortFieldInjectionTest_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbPortFieldInjectionTest - WSEjbPortFieldInjectionTest - false - false - -1 - - - HelloBean - WSEjbPortFieldInjectionTest/ejb - - - - HelloService - http://webServerHost.1:webServerPort.1/WSEjbPortFieldInjectionTest/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/build.xml deleted file mode 100644 index 134eef1d82..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/build.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/customfile.xml deleted file mode 100644 index 4125608715..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortFieldInjectionTest/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/Client.java deleted file mode 100644 index e24e7d9ecf..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/Client.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbPortMethodInjectionTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - @WebServiceRef(name = "service/wsejbportmethodinjectiontest", value = HelloService.class) - static void setPort(Hello s) { - port = s; - } - - static Hello port = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) { - TestUtil.logMsg("Test port method injection"); - TestUtil.logMsg("port=" + port); - if (port != null) - JAXWS_Util.dumpTargetEndpointAddress(port); - } - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: WSEjbPortMethodInjectionTest - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: Test that port method injection works. - */ - public void WSEjbPortMethodInjectionTest() throws Exception { - TestUtil.logMsg("WSEjbPortMethodInjectionTest"); - try { - if (port == null) - throw new RuntimeException("Port method injection failed: port=null"); - String txt = port.hello("Hello There!"); - if (txt.equals("WebSvcTest-Hello Hello There!")) - TestUtil.logMsg("WSEjbPortMethodInjectionTest passed"); - else - throw new RuntimeException("Msg returned from hello() incorrect"); - } catch (Throwable t) { - throw new Exception("WSEjbPortMethodInjectionTest failed"); - } - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/HelloBean.java deleted file mode 100644 index 450d7a75c2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/HelloBean.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbPortMethodInjectionTest; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; - -@WebService(portName = "Hello", serviceName = "HelloService", targetNamespace = "http://Hello.org", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.annotations.WSEjbPortMethodInjectionTest.Hello") -@Stateless(name = "WSEjbPortMethodInjectionTest") -public class HelloBean { - - public String hello(String str) { - return "WebSvcTest-Hello " + str; - } - - public String bye(String str) { - return "WebSvcTest-Bye and take care " + str; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/HelloService.wsdl deleted file mode 100644 index 83472ec585..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/HelloService.wsdl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/WSEjbPortMethodInjectionTestClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/WSEjbPortMethodInjectionTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 13aff4260c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/WSEjbPortMethodInjectionTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbportmethodinjectiontest - http://webServerHost.1:webServerPort.1/WSEjbPortMethodInjectionTest/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/WSEjbPortMethodInjectionTest_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/WSEjbPortMethodInjectionTest_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 8129f51b58..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/WSEjbPortMethodInjectionTest_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbPortMethodInjectionTest - WSEjbPortMethodInjectionTest - false - false - -1 - - - HelloBean - WSEjbPortMethodInjectionTest/ejb - - - - HelloService - http://webServerHost.1:webServerPort.1/WSEjbPortMethodInjectionTest/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/build.xml deleted file mode 100644 index 345e8074f2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/build.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/customfile.xml deleted file mode 100644 index 4e010ce944..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbPortMethodInjectionTest/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/Client.java deleted file mode 100644 index 7e2c279fef..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/Client.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.jws.*; -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.URL; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private Hello port; - - @HandlerChain(name = "", file = "Hello_handler.xml") - @WebServiceRef(name = "service/wsejbsoaphandlerstest") - static HelloService service; - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get wsejbsoaphandlerstest Service via @WebServiceRef annotation"); - TestUtil.logMsg( - "Uses name attribute @WebServiceRef(name=\"service/wsejbsoaphandlerstest\")"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHello(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) - getPort(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: WSEjbSOAPHandlersTest - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; WS4EE:SPEC:6021; - * WS4EE:SPEC:6022; WS4EE:SPEC:6024; WS4EE:SPEC:6026; WS4EE:SPEC:6029; - * WS4EE:SPEC:6035; WS4EE:SPEC:6038; WS4EE:SPEC:6048; WS4EE:SPEC:6049; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef, @WebService, and @HandlerChain annotations. - * Tests client-side and server-side handlers and callbacks. - */ - public void WSEjbSOAPHandlersTest() throws Exception { - TestUtil.logMsg("WSEjbSOAPHandlersTest"); - boolean pass = true; - try { - TestUtil.logMsg("Invoke the webservice endpoint"); - String serverSideMsgs = port.helloEcho("firstcall"); - serverSideMsgs = port.helloEcho("secondcall"); - String clientSideMsgs = HandlerTracker.getMessages1(); - HandlerTracker.purge(); - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Dumping ClientSide Handler messages"); - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg(clientSideMsgs); - TestUtil.logMsg("Verify client side handler callbacks"); - if (!VerifyHandlerCallBacks("client", clientSideMsgs)) { - TestUtil.logErr("ClientSide Handler CallBacks (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("ClientSide Handler CallBacks (correct)"); - } - - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Dumping ServerSide Handler messages"); - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg(serverSideMsgs); - TestUtil.logMsg("Verify server side handler callbacks"); - if (!VerifyHandlerCallBacks("server", serverSideMsgs)) { - TestUtil.logErr("ServerSide Handler CallBacks (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("ServerSide Handler CallBacks (correct)"); - } - - if (!pass) - throw new Exception("WSEjbSOAPHandlersTest failed"); - } catch (Throwable t) { - throw new Exception("WSEjbSOAPHandlersTest failed"); - } - } - - private boolean VerifyHandlerCallBacks(String who, String calls) { - int startIdx = 0; - int endIdx = 0; - boolean pass = true; - - if (who.equals("client")) { - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - if (calls.indexOf("ClientHandler1.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - "ClientHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - "ClientHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - "ClientHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - "ClientHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler1.close()") == -1) { - TestUtil.logErr("ClientHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.close()") == -1) { - TestUtil.logErr("ClientHandler2.close() was not called"); - pass = false; - } - } else { - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - if (calls.indexOf("ServerHandler1.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - "ServerHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - "ServerHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - "ServerHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - "ServerHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler1.close()") == -1) { - TestUtil.logErr("ServerHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.close()") == -1) { - TestUtil.logErr("ServerHandler2.close() was not called"); - pass = false; - } - } - return pass; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/ClientHandler1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/ClientHandler1.java deleted file mode 100644 index 7e9738565a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/ClientHandler1.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2002 International Business Machines Corp. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ClientHandler1 implements SOAPHandler { - public void init(java.util.Map config) { - } - - public boolean handleFault(SOAPMessageContext context) { - HandlerTracker.reportHandleFault(this); - return true; - } - - public void close(MessageContext context) { - HandlerTracker.reportClose(this); - } - - public boolean handleMessage(SOAPMessageContext context) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - return true; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/ClientHandler2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/ClientHandler2.java deleted file mode 100644 index 7ecd77713b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/ClientHandler2.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2002 International Business Machines Corp. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ClientHandler2 implements SOAPHandler { - public void init(java.util.Map config) { - } - - public boolean handleFault(SOAPMessageContext context) { - HandlerTracker.reportHandleFault(this); - return true; - } - - public void close(MessageContext context) { - HandlerTracker.reportClose(this); - } - - public boolean handleMessage(SOAPMessageContext context) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - return true; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/HelloBean.java deleted file mode 100644 index c1276e7fb5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/HelloBean.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import jakarta.ejb.Stateless; -import jakarta.jws.*; - -@WebService(portName = "Hello", serviceName = "HelloService", targetNamespace = "http://Hello.org", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest.Hello") -@Stateless(name = "WSEjbSOAPHandlersTest") -public class HelloBean { - public String helloEcho(String s) { - String messages = HandlerTracker.getMessages1(); - if (s.equals("secondcall")) - HandlerTracker.purge(); - return messages; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/HelloService.wsdl deleted file mode 100644 index b09fdd785c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/HelloService.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/ServerHandler1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/ServerHandler1.java deleted file mode 100644 index 270ac1d5ba..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/ServerHandler1.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2002 International Business Machines Corp. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ServerHandler1 implements SOAPHandler { - public void init(java.util.Map config) { - } - - public boolean handleFault(SOAPMessageContext context) { - HandlerTracker.reportHandleFault(this); - return true; - } - - public void close(MessageContext context) { - HandlerTracker.reportClose(this); - } - - public boolean handleMessage(SOAPMessageContext context) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - return true; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/ServerHandler2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/ServerHandler2.java deleted file mode 100644 index 5e09d26fdd..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/ServerHandler2.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2002 International Business Machines Corp. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ServerHandler2 implements SOAPHandler { - public void init(java.util.Map config) { - } - - public boolean handleFault(SOAPMessageContext context) { - HandlerTracker.reportHandleFault(this); - return true; - } - - public void close(MessageContext context) { - HandlerTracker.reportClose(this); - } - - public boolean handleMessage(SOAPMessageContext context) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - return true; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/WSEjbSOAPHandlersTestClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/WSEjbSOAPHandlersTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index c2b15de337..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/WSEjbSOAPHandlersTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbsoaphandlerstest - http://webServerHost.1:webServerPort.1/WSEjbSOAPHandlersTest/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/WSEjbSOAPHandlersTest_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/WSEjbSOAPHandlersTest_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 5f50b0e0eb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/WSEjbSOAPHandlersTest_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbSOAPHandlersTest - WSEjbSOAPHandlersTest - false - false - -1 - - - HelloBean - WSEjbSOAPHandlersTest/ejb - - - - HelloService - http://webServerHost.1:webServerPort.1/WSEjbSOAPHandlersTest/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/build.xml deleted file mode 100644 index 200c54f581..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/build.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/customfile-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/customfile-client.xml deleted file mode 100644 index afd2e85e04..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/customfile-client.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - ClientHandler1 - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest.ClientHandler1 - - - ClientHandler2 - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest.ClientHandler2 - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/customfile-server.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/customfile-server.xml deleted file mode 100644 index 6658db92b6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest/customfile-server.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - ServerHandler1 - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest.ServerHandler1 - - - ServerHandler2 - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest.ServerHandler2 - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/Client.java deleted file mode 100644 index 9f44d3b0e3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/Client.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.jws.*; -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.URL; -import java.net.URLConnection; -import java.io.*; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private URL url = null; - - private URLConnection urlConn = null; - - private String SERVLET = "/WSEjbSOAPHandlersTest2Clnt_web/ServletTest"; - - private Hello port; - - @HandlerChain(name = "", file = "Hello_handler.xml") - @WebServiceRef(name = "service/wsejbsoaphandlerstest2") - static HelloService service; - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get wsejbsoaphandlerstest2 Service via @WebServiceRef annotation"); - TestUtil.logMsg( - "Uses name attribute @WebServiceRef(name=\"service/wsejbsoaphandlerstest2\")"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHello(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) - getPort(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: WSEjbSOAPHandlersApplicationClientTest - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; WS4EE:SPEC:6021; - * WS4EE:SPEC:6022; WS4EE:SPEC:6024; WS4EE:SPEC:6026; WS4EE:SPEC:6029; - * WS4EE:SPEC:6035; WS4EE:SPEC:6038; WS4EE:SPEC:6048; WS4EE:SPEC:6049; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef, @WebService, and @HandlerChain annotations. - * Tests client-side and server-side handlers and callbacks. Tests appclient - * container. - */ - public void WSEjbSOAPHandlersApplicationClientTest() throws Exception { - TestUtil.logMsg("WSEjbSOAPHandlersApplicationClientTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Invoke the webservice endpoint from AppClient container"); - String serverSideMsgs = port.helloEcho("firstcall"); - serverSideMsgs = port.helloEcho("secondcall"); - String clientSideMsgs = HandlerTracker.getMessages1(); - HandlerTracker.purge(); - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Dumping ClientSide Handler messages"); - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg(clientSideMsgs); - TestUtil.logMsg("Verify client side handler callbacks"); - if (!VerifyHandlerCallBacks("client", clientSideMsgs)) { - TestUtil.logErr("ClientSide Handler CallBacks (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("ClientSide Handler CallBacks (correct)"); - } - - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Dumping ServerSide Handler messages"); - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg(serverSideMsgs); - TestUtil.logMsg("Verify server side handler callbacks"); - if (!VerifyHandlerCallBacks("server", serverSideMsgs)) { - TestUtil.logErr("ServerSide Handler CallBacks (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("ServerSide Handler CallBacks (correct)"); - } - - if (!pass) - throw new Exception("WSEjbSOAPHandlersApplicationClientTest failed"); - } catch (Throwable t) { - throw new Exception("WSEjbSOAPHandlersApplicationClientTest failed"); - } - } - - /* - * @testName: WSEjbSOAPHandlersServletClientTest - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; WS4EE:SPEC:6021; - * WS4EE:SPEC:6022; WS4EE:SPEC:6024; WS4EE:SPEC:6026; WS4EE:SPEC:6029; - * WS4EE:SPEC:6035; WS4EE:SPEC:6038; WS4EE:SPEC:6048; WS4EE:SPEC:6049; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef, @WebService, and @HandlerChain annotations. - * Tests client-side and server-side handlers and callbacks. Tests web - * container. - */ - public void WSEjbSOAPHandlersServletClientTest() throws Exception { - TestUtil.logMsg("WSEjbSOAPHandlersServletClientTest"); - try { - TestUtil.logMsg("Invoke the webservice endpoint from Web container"); - TestUtil.logMsg("Create URL to WebClient (ServletClient)"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Invoke the WebClient (ServletClient)"); - TestUtil.logMsg("Get test result from WebClient (ServletClient)"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) - throw new Exception("WSEjbSOAPHandlersServletClientTest failed"); - } catch (Throwable t) { - throw new Exception("WSEjbSOAPHandlersServletClientTest failed"); - } - } - - private boolean VerifyHandlerCallBacks(String who, String calls) { - int startIdx = 0; - int endIdx = 0; - boolean pass = true; - - if (who.equals("client")) { - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - if (calls.indexOf("ClientHandler1.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - "ClientHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - "ClientHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - "ClientHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - "ClientHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler1.close()") == -1) { - TestUtil.logErr("ClientHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.close()") == -1) { - TestUtil.logErr("ClientHandler2.close() was not called"); - pass = false; - } - } else { - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - if (calls.indexOf("ServerHandler1.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - "ServerHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - "ServerHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - "ServerHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - "ServerHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler1.close()") == -1) { - TestUtil.logErr("ServerHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.close()") == -1) { - TestUtil.logErr("ServerHandler2.close() was not called"); - pass = false; - } - } - return pass; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ClientHandler1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ClientHandler1.java deleted file mode 100644 index 7bba30f201..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ClientHandler1.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2002 International Business Machines Corp. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ClientHandler1 implements SOAPHandler { - public void init(java.util.Map config) { - } - - public boolean handleFault(SOAPMessageContext context) { - HandlerTracker.reportHandleFault(this); - return true; - } - - public void close(MessageContext context) { - HandlerTracker.reportClose(this); - } - - public boolean handleMessage(SOAPMessageContext context) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - return true; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ClientHandler2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ClientHandler2.java deleted file mode 100644 index 4d8fe93ceb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ClientHandler2.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2002 International Business Machines Corp. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ClientHandler2 implements SOAPHandler { - public void init(java.util.Map config) { - } - - public boolean handleFault(SOAPMessageContext context) { - HandlerTracker.reportHandleFault(this); - return true; - } - - public void close(MessageContext context) { - HandlerTracker.reportClose(this); - } - - public boolean handleMessage(SOAPMessageContext context) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - return true; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/HelloBean.java deleted file mode 100644 index 1124272671..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/HelloBean.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import jakarta.ejb.Stateless; -import jakarta.jws.*; - -@WebService(portName = "Hello", serviceName = "HelloService", targetNamespace = "http://Hello.org", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2.Hello") -@Stateless(name = "WSEjbSOAPHandlersTest2") -public class HelloBean { - public String helloEcho(String s) { - String messages = HandlerTracker.getMessages1(); - if (s.equals("secondcall")) - HandlerTracker.purge(); - return messages; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/HelloService.wsdl deleted file mode 100644 index b09fdd785c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/HelloService.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ServerHandler1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ServerHandler1.java deleted file mode 100644 index b8ff867019..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ServerHandler1.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2002 International Business Machines Corp. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ServerHandler1 implements SOAPHandler { - public void init(java.util.Map config) { - } - - public boolean handleFault(SOAPMessageContext context) { - HandlerTracker.reportHandleFault(this); - return true; - } - - public void close(MessageContext context) { - HandlerTracker.reportClose(this); - } - - public boolean handleMessage(SOAPMessageContext context) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - return true; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ServerHandler2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ServerHandler2.java deleted file mode 100644 index 06b413b6cf..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ServerHandler2.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2002 International Business Machines Corp. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ServerHandler2 implements SOAPHandler { - public void init(java.util.Map config) { - } - - public boolean handleFault(SOAPMessageContext context) { - HandlerTracker.reportHandleFault(this); - return true; - } - - public void close(MessageContext context) { - HandlerTracker.reportClose(this); - } - - public boolean handleMessage(SOAPMessageContext context) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - return true; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ServletClient.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ServletClient.java deleted file mode 100644 index 2d09ce1811..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/ServletClient.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; - -import java.io.*; -import java.sql.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.jws.*; - -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - @HandlerChain(name = "", file = "Hello_handler.xml") - @WebServiceRef(name = "service/wsejbsoaphandlerstest2") - HelloService service = null; - - private Hello port; - - private void getPort() throws Exception { - System.out.println( - "Get wsejbsoaphandlerstest2 Service via @WebServiceRef annotation"); - System.out.println( - "Uses name attribute @WebServiceRef(name=\"service/wsejbsoaphandlerstest2\")"); - System.out.println("service=" + service); - System.out.println("Get port from service"); - port = (Hello) service.getHello(); - System.out.println("port=" + port); - System.out.println("Port obtained"); - } - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("DEBUG init: service=" + service); - try { - getPort(); - } catch (Exception e) { - System.err.println("init Exception: " + e); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - System.out.println("DEBUG doGet"); - try { - System.out.println("Invoke the webservice endpoint from Web container"); - String serverSideMsgs = port.helloEcho("firstcall"); - serverSideMsgs = port.helloEcho("secondcall"); - String clientSideMsgs = HandlerTracker.getMessages1(); - HandlerTracker.purge(); - System.out.println("-----------------------------------"); - System.out.println("Dumping ClientSide Handler messages"); - System.out.println("-----------------------------------"); - System.out.println(clientSideMsgs); - System.out.println("Verify client side handler callbacks"); - if (!VerifyHandlerCallBacks("client", clientSideMsgs)) { - System.err.println("ClientSide Handler CallBacks (incorrect)"); - pass = false; - } else { - System.out.println("ClientSide Handler CallBacks (correct)"); - } - - System.out.println("-----------------------------------"); - System.out.println("Dumping ServerSide Handler messages"); - System.out.println("-----------------------------------"); - System.out.println(serverSideMsgs); - System.out.println("Verify server side handler callbacks"); - if (!VerifyHandlerCallBacks("server", serverSideMsgs)) { - System.err.println("ServerSide Handler CallBacks (incorrect)"); - pass = false; - } else { - System.out.println("ServerSide Handler CallBacks (correct)"); - } - if (pass) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } catch (Exception e) { - System.err.println("doGet Exception: " + e); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - System.out.println("doPost"); - - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - System.out.println("Remote logging intialized for Servlet"); - if (debug) { - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - System.err.println("doPost Exception: " + e); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } - - private boolean VerifyHandlerCallBacks(String who, String calls) { - int startIdx = 0; - int endIdx = 0; - boolean pass = true; - - if (who.equals("client")) { - if (calls == null) { - System.err.println("Callback string is null (unexpected)"); - return false; - } - if (calls.indexOf("ClientHandler1.handleMessage().doInbound()") == -1) { - System.err.println( - "ClientHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.handleMessage().doInbound()") == -1) { - System.err.println( - "ClientHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler1.handleMessage().doOutbound()") == -1) { - System.err.println( - "ClientHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.handleMessage().doOutbound()") == -1) { - System.err.println( - "ClientHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler1.close()") == -1) { - System.err.println("ClientHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.close()") == -1) { - System.err.println("ClientHandler2.close() was not called"); - pass = false; - } - } else { - if (calls == null) { - System.err.println("Callback string is null (unexpected)"); - return false; - } - if (calls.indexOf("ServerHandler1.handleMessage().doInbound()") == -1) { - System.err.println( - "ServerHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.handleMessage().doInbound()") == -1) { - System.err.println( - "ServerHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler1.handleMessage().doOutbound()") == -1) { - System.err.println( - "ServerHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.handleMessage().doOutbound()") == -1) { - System.err.println( - "ServerHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler1.close()") == -1) { - System.err.println("ServerHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.close()") == -1) { - System.err.println("ServerHandler2.close() was not called"); - pass = false; - } - } - return pass; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/WSEjbSOAPHandlersTest2Clnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/WSEjbSOAPHandlersTest2Clnt_client.jar.sun-application-client.xml deleted file mode 100644 index c3ade77769..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/WSEjbSOAPHandlersTest2Clnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbsoaphandlerstest2 - http://webServerHost.1:webServerPort.1/WSEjbSOAPHandlersTest2/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/WSEjbSOAPHandlersTest2Clnt_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/WSEjbSOAPHandlersTest2Clnt_web.war.sun-web.xml deleted file mode 100644 index 8f4082c282..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/WSEjbSOAPHandlersTest2Clnt_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbsoaphandlerstest2 - http://webServerHost.1:webServerPort.1/WSEjbSOAPHandlersTest2/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/WSEjbSOAPHandlersTest2Clnt_web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/WSEjbSOAPHandlersTest2Clnt_web.xml deleted file mode 100644 index 7ae011da56..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/WSEjbSOAPHandlersTest2Clnt_web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - ServletClientWebApp - - ServletClient - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2.ServletClient - - - ServletClient - /ServletTest - - - 54 - - - service/wsejbsoaphandlerstest2 - jakarta.xml.ws.Service - WEB-INF/wsdl/HelloService.wsdl - - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2.Hello - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/WSEjbSOAPHandlersTest2_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/WSEjbSOAPHandlersTest2_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index e1de87c128..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/WSEjbSOAPHandlersTest2_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbSOAPHandlersTest2 - WSEjbSOAPHandlersTest2 - false - false - -1 - - - HelloBean - WSEjbSOAPHandlersTest2/ejb - - - - HelloService - http://webServerHost.1:webServerPort.1/WSEjbSOAPHandlersTest2/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/application.xml.clientear b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/application.xml.clientear deleted file mode 100644 index 13548b8010..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/application.xml.clientear +++ /dev/null @@ -1,32 +0,0 @@ - - - - -Application description - WSEjbSOAPHandlersTest2Clnt - - - WSEjbSOAPHandlersTest2Clnt_web.war - WSEjbSOAPHandlersTest2Clnt_web - - - - WSEjbSOAPHandlersTest2Clnt_client.jar - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/build.xml deleted file mode 100644 index 265f1815c1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/build.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/customfile-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/customfile-client.xml deleted file mode 100644 index 6e45400fb1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/customfile-client.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - ClientHandler1 - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2.ClientHandler1 - - - ClientHandler2 - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2.ClientHandler2 - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/customfile-server.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/customfile-server.xml deleted file mode 100644 index fe35be7c37..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbSOAPHandlersTest2/customfile-server.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - ServerHandler1 - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2.ServerHandler1 - - - ServerHandler2 - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbSOAPHandlersTest2.ServerHandler2 - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/Client.java deleted file mode 100644 index 7e4b37c2cc..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/Client.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceProviderTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.rmi.*; -import java.util.*; - -import jakarta.xml.ws.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends EETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - Hello port = null; - - @WebServiceRef(name = "service/wsejbwebserviceprovidertest") - static HelloService service; - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get wsejbwebserviceprovidertest Service via @WebServiceRef annotation"); - TestUtil.logMsg( - "Uses name attribute @WebServiceRef(name=\"service/wsejbwebserviceprovidertest\")"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHelloPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - getPort(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Exception("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: WSEjbWebServiceProviderTestCallSayHello - * - * @assertion_ids: WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5001; - * WS4EE:SPEC:5002; - * - * @test_Strategy: Client imports wsdl from a deployed webservice endpoint, - * builds the client-side artifacts, then uses the WebServiceRef annotation - * with name attribute to access and communicate with the deployed webservice - * endpoint. - */ - public void WSEjbWebServiceProviderTestCallSayHello() throws Exception { - TestUtil.logMsg("WSEjbWebServiceProviderTestCallSayHello"); - boolean pass = true; - - for (int i = 0; i < 10; i++) { - String ret = port.sayHello("ProviderRef Tester loop#" + i + "!"); - if (ret.indexOf("WSEjbWebServiceProvider-SayHello") == -1) { - TestUtil.logErr("Unexpected greeting " + ret); - pass = false; - break; - } else - TestUtil.logMsg("Got expected greeting " + ret); - } - if (!pass) - throw new Exception("WSEjbWebServiceProviderTestCallSayHello failed"); - } - - /* - * @testName: WSEjbWebServiceProviderTestVerifyTargetEndpointAddress - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The Remote interface is - * also packaged in the ear file. The @WebServiceRef uses the name attribute - * field to access the service ref. The runtime deployment descriptor - * specifies the endpoint address uri of "WSEjbWebServiceProviderTest/ejb". So - * verify that "WSEjbWebServiceProviderTest/ejb" is part of the target - * endpoint address. - */ - public void WSEjbWebServiceProviderTestVerifyTargetEndpointAddress() - throws Exception { - TestUtil.logMsg("WSEjbWebServiceProviderTestVerifyTargetEndpointAddress"); - try { - String endpointaddr = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg( - "Verify that the target endpoint address ends with [WSEjbWebServiceProviderTest/ejb]"); - if (endpointaddr.endsWith("WSEjbWebServiceProviderTest/ejb")) - TestUtil.logMsg( - "WSEjbWebServiceProviderTestVerifyTargetEndpointAddress passed"); - else - throw new RuntimeException( - "Target Endpoint Address is incorrect: " + endpointaddr); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Exception( - "WSEjbWebServiceProviderTestVerifyTargetEndpointAddress failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/HelloBean.java deleted file mode 100644 index d721d8acde..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/HelloBean.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceProviderTest; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; -import jakarta.xml.ws.Provider; -import jakarta.xml.ws.WebServiceProvider; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; -import jakarta.xml.bind.JAXBContext; -import jakarta.xml.bind.JAXBElement; -import jakarta.xml.bind.Marshaller; -import jakarta.xml.bind.Unmarshaller; -import jakarta.xml.ws.WebServiceException; -import java.io.ByteArrayOutputStream; -import java.io.ByteArrayInputStream; - -@WebServiceProvider(portName = "HelloPort", serviceName = "HelloService", targetNamespace = "http://hello.org/wsdl", wsdlLocation = "META-INF/wsdl/HelloService.wsdl") -@Stateless(name = "WSEjbWebServiceProviderTest") -public class HelloBean implements Provider { - private static final JAXBContext jaxbContext = createJAXBContext(); - - public jakarta.xml.bind.JAXBContext getJAXBContext() { - return jaxbContext; - } - - private static jakarta.xml.bind.JAXBContext createJAXBContext() { - try { - return jakarta.xml.bind.JAXBContext.newInstance(ObjectFactory.class); - } catch (jakarta.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("WSEjbWebServiceProvider-SayHello"); - ByteArrayOutputStream bout = new ByteArrayOutputStream(); - ObjectFactory factory = new ObjectFactory(); - Marshaller m = jaxbContext.createMarshaller(); - m.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE); - m.marshal(factory.createSayHelloResponse(resp), bout); - return new StreamSource(new ByteArrayInputStream(bout.toByteArray())); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/HelloService.wsdl deleted file mode 100644 index 9464a4a894..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/HelloService.wsdl +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/WSEjbWebServiceProviderTestClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/WSEjbWebServiceProviderTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 86c2cd8f40..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/WSEjbWebServiceProviderTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbwebserviceprovidertest - http://webServerHost.1:webServerPort.1/WSEjbWebServiceProviderTest/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/WSEjbWebServiceProviderTest_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/WSEjbWebServiceProviderTest_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 3684ec8126..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/WSEjbWebServiceProviderTest_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbWebServiceProviderTest - WSEjbWebServiceProviderTest - false - false - -1 - - - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceProviderTest.HelloBean - WSEjbWebServiceProviderTest/ejb - - - - HelloService - http://webServerHost.1:webServerPort.1/WSEjbWebServiceProviderTest/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/build.xml deleted file mode 100644 index 4f4d21d9c9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/build.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/customfile.xml deleted file mode 100644 index ba6b6dc549..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/customfile.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/customfile2.xml deleted file mode 100644 index 68045f5e68..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/schema1.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/schema1.xsd deleted file mode 100644 index 20067b6549..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceProviderTest/schema1.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/Client.java deleted file mode 100644 index 24d032d108..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/Client.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceRefTest1; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.URL; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private TSURL ctsurl = new TSURL(); - - private static final String ENDPOINT_URL = "wsejbwebservicereftest1.endpoint"; - - private static final String WSDLLOC_URL = "wsejbwebservicereftest1.wsdlloc"; - - private String url = null; - - private static URL wsdlurl = null; - - private Hello port; - - @WebServiceRef - static WSEjbWebServiceRefTest1HelloService service; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get wsejbwebservicereftest1 Service via @WebServiceRef annotation"); - TestUtil.logMsg("Uses no attribute @WebServiceRef"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHelloPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) { - getTestURLs(); - getPort(); - } - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: WSEjbWebServiceRefTest1CallHello - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The @WebServiceRef uses - * no field attributes so the service ref is accessed by its default service - * ref name. - */ - public void WSEjbWebServiceRefTest1CallHello() throws Exception { - TestUtil.logMsg("WSEjbWebServiceRefTest1CallHello"); - try { - String txt = port.hello("Hi there"); - if (txt.equals("Hi there to you too!")) - TestUtil.logMsg("WSEjbWebServiceRefTest1CallHello passed"); - else - throw new RuntimeException("Msg returned from hello() incorrect"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Exception("WSEjbWebServiceRefTest1CallHello failed"); - } - return; - } - - /* - * @testName: WSEjbWebServiceRefTest1CallBye - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The @WebServiceRef uses - * no field attributes so the service ref is accessed by its default service - * ref name. - */ - public void WSEjbWebServiceRefTest1CallBye() throws Exception { - TestUtil.logMsg("WSEjbWebServiceRefTest1CallBye"); - try { - String txt = port.bye("Bye-bye"); - if (txt.equals("Bye-bye and take care")) - TestUtil.logMsg("WSEjbWebServiceRefTest1CallBye passed"); - else - throw new RuntimeException("Msg returned from bye() incorrect"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Exception("WSEjbWebServiceRefTest1CallBye failed"); - } - return; - } - - /* - * @testName: WSEjbWebServiceRefTest1VerifyTargetEndpointAddress - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The Remote interface is - * also packaged in the ear file. The @WebServiceRef uses no field attributes - * so the service ref is accessed by its default service ref name. The runtime - * deployment descriptor does not specify an endpoint address uri so the - * endpoint address uri is implementation specific. For the JavaEE 6 RI the - * endpoint address uri is calculated as "service name/simple bean name" which - * is "WSEjbWebServiceRefTest1HelloService/HelloBean". For another JavaEE 6 - * implementation this can be different. - */ - public void WSEjbWebServiceRefTest1VerifyTargetEndpointAddress() - throws Exception { - TestUtil.logMsg("WSEjbWebServiceRefTest1VerifyTargetEndpointAddress"); - try { - String endpointaddr = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Verify the target endpoint address"); - if (endpointaddr.equals(url)) - TestUtil.logMsg( - "WSEjbWebServiceRefTest1VerifyTargetEndpointAddress passed"); - else - throw new RuntimeException( - "Target Endpoint Address is incorrect: " + endpointaddr); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Exception( - "WSEjbWebServiceRefTest1VerifyTargetEndpointAddress failed"); - } - return; - } - - /* - * @testName: WSEjbWebServiceRefTest1VerifyJNDILookupOfService - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The @WebServiceRef uses - * no field attributes so the service ref is accessed by its default service - * ref name. The runtime deployment descriptor specifies the default service - * ref. Verify that the container correctly publishes the web service - * implementation under the default service ref via the JNDI name - * "java:comp/env/default-service-ref-name". - */ - public void WSEjbWebServiceRefTest1VerifyJNDILookupOfService() throws Exception { - TestUtil.logMsg("WSEjbWebServiceRefTest1VerifyJNDILookupOfService"); - try { - TestUtil.logMsg("Test JNDI lookup for wsejbwebservicereftest1 Service"); - InitialContext ctx = new InitialContext(); - WSEjbWebServiceRefTest1HelloService service = (WSEjbWebServiceRefTest1HelloService) ctx - .lookup( - "java:comp/env/com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceRefTest1.Client/service"); - TestUtil.logMsg("service=" + service); - TestUtil - .logMsg("WSEjbWebServiceRefTest1VerifyJNDILookupOfService passed"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Exception( - "WSEjbWebServiceRefTest1VerifyJNDILookupOfService failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/HelloBean.java deleted file mode 100644 index 548fe0b44e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/HelloBean.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceRefTest1; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "WSEjbWebServiceRefTest1HelloService", targetNamespace = "http://Hello.org", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceRefTest1.Hello") -@Stateless(name = "WSEjbWebServiceRefTest1") -public class HelloBean { - - public String hello(String str) { - return str + " to you too!"; - } - - public String bye(String str) { - return str + " and take care"; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/HelloService.wsdl deleted file mode 100644 index e94ce0f10f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/HelloService.wsdl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/WSEjbWebServiceRefTest1Clnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/WSEjbWebServiceRefTest1Clnt_client.jar.sun-application-client.xml deleted file mode 100644 index 05d28d23f9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/WSEjbWebServiceRefTest1Clnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceRefTest1.Client/service - http://webServerHost.1:webServerPort.1/WSEjbWebServiceRefTest1HelloService/HelloBean?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/WSEjbWebServiceRefTest1_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/WSEjbWebServiceRefTest1_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 0f1d36746e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/WSEjbWebServiceRefTest1_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - 0 - - WSEjbWebServiceRefTest1 - WSEjbWebServiceRefTest1 - false - false - -1 - - - - WSEjbWebServiceRefTest1HelloService - http://webServerHost.1:webServerPort.1/WSEjbWebServiceRefTest1HelloService/HelloBean?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/build.xml deleted file mode 100644 index e144752c41..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/build.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/customfile.xml deleted file mode 100644 index a92c04039f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/Client.java deleted file mode 100644 index badd193ca1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/Client.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceRefTest2; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.URL; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private Hello port; - - @WebServiceRef(name = "service/wsejbwebservicereftest2") - static HelloService service; - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get wsejbwebservicereftest2 Service via @WebServiceRef annotation"); - TestUtil.logMsg( - "Uses name attribute @WebServiceRef(name=\"service/wsejbwebservicereftest2\")"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHello(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) - getPort(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: WSEjbWebServiceRefTest2CallHello - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The Remote interface is - * also packaged in the ear file. The @WebServiceRef uses the name attribute - * field to access the service ref. - */ - public void WSEjbWebServiceRefTest2CallHello() throws Exception { - TestUtil.logMsg("WSEjbWebServiceRefTest2CallHello"); - try { - String txt = port.hello("Hi there"); - if (txt.equals("Hi there to you too!")) - TestUtil.logMsg("WSEjbWebServiceRefTest2CallHello passed"); - else - throw new RuntimeException("Msg returned from hello() incorrect"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Exception("WSEjbWebServiceRefTest2CallHello failed"); - } - return; - } - - /* - * @testName: WSEjbWebServiceRefTest2CallBye - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The Remote interface is - * also packaged in the ear file. The @WebServiceRef uses the name attribute - * field to access the service ref. - */ - public void WSEjbWebServiceRefTest2CallBye() throws Exception { - TestUtil.logMsg("WSEjbWebServiceRefTest2CallBye"); - try { - String txt = port.bye("Bye-bye"); - if (txt.equals("Bye-bye and take care")) - TestUtil.logMsg("WSEjbWebServiceRefTest2CallBye passed"); - else - throw new RuntimeException("Msg returned from bye() incorrect"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Exception("WSEjbWebServiceRefTest2CallBye failed"); - } - return; - } - - /* - * @testName: WSEjbWebServiceRefTest2VerifyTargetEndpointAddress - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The Remote interface is - * also packaged in the ear file. The @WebServiceRef uses the name attribute - * field to access the service ref. The runtime deployment descriptor - * specifies the endpoint address uri of "WSEjbWebServiceRefTest2/ejb". So - * verify that "WSEjbWebServiceRefTest2/ejb" is part of the target endpoint - * address. - */ - public void WSEjbWebServiceRefTest2VerifyTargetEndpointAddress() - throws Exception { - TestUtil.logMsg("WSEjbWebServiceRefTest2VerifyTargetEndpointAddress"); - try { - String endpointaddr = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg( - "Verify that the target endpoint address ends with [WSEjbWebServiceRefTest2/ejb]"); - if (endpointaddr.endsWith("WSEjbWebServiceRefTest2/ejb")) - TestUtil.logMsg( - "WSEjbWebServiceRefTest2VerifyTargetEndpointAddress passed"); - else - throw new RuntimeException( - "Target Endpoint Address is incorrect: " + endpointaddr); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Exception( - "WSEjbWebServiceRefTest2VerifyTargetEndpointAddress failed"); - } - return; - } - - /* - * @testName: WSEjbWebServiceRefTest2VerifyJNDILookupOfService - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The Remote interface is - * also packaged in the ear file. The @WebServiceRef uses the name attribute - * field to access the service ref. Verify that the container correctly - * publishes the web service implementation under - * "java:comp/env/service-ref-name". - * - */ - public void WSEjbWebServiceRefTest2VerifyJNDILookupOfService() throws Exception { - TestUtil.logMsg("WSEjbWebServiceRefTest2VerifyJNDILookupOfService"); - try { - TestUtil.logMsg("Test JNDI lookup for wsejbwebservicereftest2 Service"); - InitialContext ctx = new InitialContext(); - HelloService service = (HelloService) ctx - .lookup("java:comp/env/service/wsejbwebservicereftest2"); - TestUtil.logMsg("service=" + service); - TestUtil - .logMsg("WSEjbWebServiceRefTest2VerifyJNDILookupOfService passed"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Exception( - "WSEjbWebServiceRefTest2VerifyJNDILookupOfService failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/HelloBean.java deleted file mode 100644 index f5d1dc3900..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/HelloBean.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceRefTest2; - -import jakarta.ejb.Remote; -import jakarta.ejb.Stateless; -import jakarta.ejb.SessionContext; -import jakarta.jws.WebService; -import jakarta.annotation.Resource; - -@WebService(portName = "Hello", serviceName = "HelloService", targetNamespace = "http://Hello.org", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceRefTest2.Hello") -@Stateless(name = "WSEjbWebServiceRefTest2") -@Remote({ HelloIF.class }) -public class HelloBean implements HelloIF { - - @Resource - private SessionContext sc; - - public String hello(String str) { - return str + " to you too!"; - } - - public String bye(String str) { - return str + " and take care"; - } - - public String extra(String str, int i) { - String tmp = str + i + ", all from yours truly"; - return tmp; - } - - public void extraExtra(long i) { - long ll = i * 2002 + 1999 + 8734895; - System.out.println("Long i=" + i + ", Long ll=" + ll); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/HelloIF.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/HelloIF.java deleted file mode 100644 index bfd452373e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/HelloIF.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceRefTest2; - -public interface HelloIF { - public String hello(String str); - - public String bye(String str); - - public String extra(String str, int i); - - public void extraExtra(long i); -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/HelloService.wsdl deleted file mode 100644 index 83472ec585..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/HelloService.wsdl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/WSEjbWebServiceRefTest2Clnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/WSEjbWebServiceRefTest2Clnt_client.jar.sun-application-client.xml deleted file mode 100644 index fe1e2982b2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/WSEjbWebServiceRefTest2Clnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbwebservicereftest2 - http://webServerHost.1:webServerPort.1/WSEjbWebServiceRefTest2/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/WSEjbWebServiceRefTest2_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/WSEjbWebServiceRefTest2_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 6ab8449a6f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/WSEjbWebServiceRefTest2_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbWebServiceRefTest2 - WSEjbWebServiceRefTest2 - false - false - -1 - - - HelloBean - WSEjbWebServiceRefTest2/ejb - - - - HelloService - http://webServerHost.1:webServerPort.1/WSEjbWebServiceRefTest2/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/build.xml deleted file mode 100644 index 11221e2ddf..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/build.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/customfile.xml deleted file mode 100644 index db292ef352..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest2/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefWithNoDDsTest/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefWithNoDDsTest/Client.java deleted file mode 100644 index 9fdba9f2fe..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefWithNoDDsTest/Client.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceRefWithNoDDsTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.URL; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsejbwebservicerefwithnoddstest.endpoint"; - - private static final String WSDLLOC_URL = "wsejbwebservicerefwithnoddstest.wsdlloc"; - - private String url = null; - - private static URL wsdlurl = null; - - private WSEjbWSRefWithNoDDsTestHelloEJB port; - - @WebServiceRef - static WSEjbWSRefWithNoDDsTestHelloEJBService service; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get wsejbwebservicerefwithnoddstest Service via @WebServiceRef annotation"); - TestUtil.logMsg("Uses no attribute @WebServiceRef"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (WSEjbWSRefWithNoDDsTestHelloEJB) service - .getWSEjbWSRefWithNoDDsTestHelloEJBPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - TestUtil.logMsg( - "Set the target endpoint address for this webservice since there are no DD's"); - JAXWS_Util.dumpTargetEndpointAddress(port); - JAXWS_Util.setTargetEndpointAddress(port, url); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) { - getTestURLs(); - getPort(); - } - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: WSEjbWebServiceRefWithNoDDsTestCallHello - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:115; WS4EE:SPEC:213; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * class and SEI class are packaged in the ear file. The @WebServiceRef uses - * no field attributes. No deployment descriptors are uses in the packaging. - */ - public void WSEjbWebServiceRefWithNoDDsTestCallHello() throws Exception { - TestUtil.logMsg("WSEjbWebServiceRefWithNoDDsTestCallHello"); - try { - String txt = port.hello("Hi there"); - if (txt.equals("Hi there to you too!")) - TestUtil.logMsg("WSEjbWebServiceRefWithNoDDsTestCallHello passed"); - else - throw new RuntimeException("Msg returned from hello() incorrect"); - } catch (Throwable t) { - throw new Exception("WSEjbWebServiceRefWithNoDDsTestCallHello failed"); - } - return; - } - - /* - * @testName: WSEjbWebServiceRefWithNoDDsTestCallBye - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:115; WS4EE:SPEC:213; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * class and SEI class are packaged in the ear file. The @WebServiceRef uses - * no field attributes. No deployment descriptors are uses in the packaging. - */ - public void WSEjbWebServiceRefWithNoDDsTestCallBye() throws Exception { - TestUtil.logMsg("WSEjbWebServiceRefWithNoDDsTestCallBye"); - try { - String txt = port.bye("Bye-bye"); - if (txt.equals("Bye-bye and take care")) - TestUtil.logMsg("WSEjbWebServiceRefWithNoDDsTestCallBye passed"); - else - throw new RuntimeException("Msg returned from bye() incorrect"); - } catch (Throwable t) { - throw new Exception("WSEjbWebServiceRefWithNoDDsTestCallBye failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefWithNoDDsTest/WSEjbWSRefWithNoDDsTestHelloEJB.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefWithNoDDsTest/WSEjbWSRefWithNoDDsTestHelloEJB.java deleted file mode 100644 index 75158e0ca0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefWithNoDDsTest/WSEjbWSRefWithNoDDsTestHelloEJB.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.annotations.WSEjbWebServiceRefWithNoDDsTest; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; -import jakarta.jws.soap.SOAPBinding; -import jakarta.jws.soap.SOAPBinding.Style; - -@WebService -@Stateless -@SOAPBinding(style = Style.RPC) -public class WSEjbWSRefWithNoDDsTestHelloEJB { - - @WebMethod - public String hello(String str) { - return str + " to you too!"; - } - - @WebMethod - public String bye(String str) { - return str + " and take care"; - } - - @WebMethod - public String extra(String str, int i) { - String tmp = str + i + ", all from yours truly"; - return tmp; - } - - @WebMethod - public void extraExtra(long i) { - long ll = i * 2002 + 1999 + 8734895; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefWithNoDDsTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefWithNoDDsTest/build.xml deleted file mode 100644 index 4629d77b71..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefWithNoDDsTest/build.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefWithNoDDsTest/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefWithNoDDsTest/customfile.xml deleted file mode 100644 index 319fa51203..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefWithNoDDsTest/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/build.xml deleted file mode 100644 index 11b66c41d0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/annotations/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/build.xml deleted file mode 100644 index f07f35d37a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/Client.java deleted file mode 100644 index 68a3b257bc..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/Client.java +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.jws.*; -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.URL; -import java.net.URLConnection; -import java.io.*; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsejboverridewsrefhcwithddstest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsejboverridewsrefhcwithddstest.wsdlloc.1"; - - private URL url = null; - - private URLConnection urlConn = null; - - private String SERVLET = "/WSEjbOverrideWSRefHCWithDDsTestClnt_web/ServletTest"; - - private Hello port; - - @WebServiceRef(name = "service/wsejboverridewsrefhcwithddstest", type = java.lang.Object.class, value = jakarta.xml.ws.Service.class) - static HelloService service; - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get wsejboverridewsrefhcwithddstest Service via @WebServiceRef annotation"); - TestUtil.logMsg( - "Uses name attribute @WebServiceRef(name=\"service/wsejboverridewsrefhcwithddstest\")"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHello(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) - getPort(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: WSEjbSOAPHandlersApplicationClientTest - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; WS4EE:SPEC:6021; - * WS4EE:SPEC:6022; WS4EE:SPEC:6024; WS4EE:SPEC:6026; WS4EE:SPEC:6029; - * WS4EE:SPEC:6035; WS4EE:SPEC:6038; WS4EE:SPEC:6048; WS4EE:SPEC:6049; - * WS4EE:SPEC:6009; WS4EE:SPEC:6010; WS4EE:SPEC:6011; WS4EE:SPEC:6023; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef, @WebService, and @HandlerChain annotations. - * Tests client-side and server-side handlers and callbacks. Deploy via full - * 109 deployment descriptors. The - * - * @WebserviceRef annotation on the client must be overridden by the - * deployment descriptors. The @HandleChain annotation does not have to be - * specified. The @WebserviceRef and if present the @HandlerChain annotations - * are ignored. Everything is obtained from the deployment descriptors so the - * annotations are ignored. Verifies that override via Deployment Descriptors - * works. Tests the appclient container. - */ - public void WSEjbSOAPHandlersApplicationClientTest() throws Exception { - TestUtil.logMsg("WSEjbSOAPHandlersApplicationClientTest"); - boolean pass = true; - try { - TestUtil - .logMsg("Invoke the webservice endpoint from AppClient container"); - String serverSideMsgs = port.helloEcho("firstcall"); - serverSideMsgs = port.helloEcho("secondcall"); - String clientSideMsgs = HandlerTracker.getMessages1(); - HandlerTracker.purge(); - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Dumping ClientSide Handler messages"); - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg(clientSideMsgs); - TestUtil.logMsg("Verify client side handler callbacks"); - if (!VerifyHandlerCallBacks("client", clientSideMsgs)) { - TestUtil.logErr("ClientSide Handler CallBacks (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("ClientSide Handler CallBacks (correct)"); - } - - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Dumping ServerSide Handler messages"); - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg(serverSideMsgs); - TestUtil.logMsg("Verify server side handler callbacks"); - if (!VerifyHandlerCallBacks("server", serverSideMsgs)) { - TestUtil.logErr("ServerSide Handler CallBacks (incorrect)"); - pass = false; - } else { - TestUtil.logMsg("ServerSide Handler CallBacks (correct)"); - } - - if (!pass) - throw new Exception("WSEjbSOAPHandlersApplicationClientTest failed"); - } catch (Throwable t) { - throw new Exception("WSEjbSOAPHandlersApplicationClientTest failed"); - } - } - - /* - * @testName: WSEjbSOAPHandlersServletClientTest - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; WS4EE:SPEC:6021; - * WS4EE:SPEC:6022; WS4EE:SPEC:6024; WS4EE:SPEC:6026; WS4EE:SPEC:6029; - * WS4EE:SPEC:6035; WS4EE:SPEC:6038; WS4EE:SPEC:6048; WS4EE:SPEC:6049; - * WS4EE:SPEC:6009; WS4EE:SPEC:6010; WS4EE:SPEC:6011; WS4EE:SPEC:6023; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef, @WebService, and @HandlerChain annotations. - * Tests client-side and server-side handlers and callbacks. Deploy via full - * 109 deployment descriptors. The - * - * @WebserviceRef annotation on the client must be overridden by the - * deployment descriptors. The @HandleChain annotation does not have to be - * specified. The @WebserviceRef and if present the @HandlerChain annotations - * are ignored. Everything is obtained from the deployment descriptors so the - * annotations are ignored. Verifies that override via Deployment Descriptors - * works. Tests the web container. - */ - public void WSEjbSOAPHandlersServletClientTest() throws Exception { - TestUtil.logMsg("WSEjbSOAPHandlersServletClientTest"); - try { - TestUtil.logMsg("Invoke the webservice endpoint from Web container"); - TestUtil.logMsg("Create URL to WebClient (ServletClient)"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Invoke the WebClient (ServletClient)"); - TestUtil.logMsg("Get test result from WebClient (ServletClient)"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) - throw new Exception("WSEjbSOAPHandlersServletClientTest failed"); - } catch (Throwable t) { - throw new Exception("WSEjbSOAPHandlersServletClientTest failed"); - } - } - - private boolean VerifyHandlerCallBacks(String who, String calls) { - int startIdx = 0; - int endIdx = 0; - boolean pass = true; - - if (who.equals("client")) { - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - if (calls.indexOf("ClientHandler1.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - "ClientHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - "ClientHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - "ClientHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - "ClientHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler1.close()") == -1) { - TestUtil.logErr("ClientHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.close()") == -1) { - TestUtil.logErr("ClientHandler2.close() was not called"); - pass = false; - } - } else { - if (calls == null) { - TestUtil.logErr("Callback string is null (unexpected)"); - return false; - } - if (calls.indexOf("ServerHandler1.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - "ServerHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.handleMessage().doInbound()") == -1) { - TestUtil.logErr( - "ServerHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler1.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - "ServerHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.handleMessage().doOutbound()") == -1) { - TestUtil.logErr( - "ServerHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler1.close()") == -1) { - TestUtil.logErr("ServerHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.close()") == -1) { - TestUtil.logErr("ServerHandler2.close() was not called"); - pass = false; - } - } - return pass; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ClientHandler1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ClientHandler1.java deleted file mode 100644 index 5fbe823ef0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ClientHandler1.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2002 International Business Machines Corp. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ClientHandler1 implements SOAPHandler { - public void init(java.util.Map config) { - } - - public boolean handleFault(SOAPMessageContext context) { - HandlerTracker.reportHandleFault(this); - return true; - } - - public void close(MessageContext context) { - HandlerTracker.reportClose(this); - } - - public boolean handleMessage(SOAPMessageContext context) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - return true; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ClientHandler2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ClientHandler2.java deleted file mode 100644 index 4658a1b335..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ClientHandler2.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2002 International Business Machines Corp. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ClientHandler2 implements SOAPHandler { - public void init(java.util.Map config) { - } - - public boolean handleFault(SOAPMessageContext context) { - HandlerTracker.reportHandleFault(this); - return true; - } - - public void close(MessageContext context) { - HandlerTracker.reportClose(this); - } - - public boolean handleMessage(SOAPMessageContext context) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - return true; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/HelloBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/HelloBean.java deleted file mode 100644 index 1f180cd395..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/HelloBean.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "JunkJunkJunkPortName", serviceName = "JunkJunkJunkServiceName", targetNamespace = "http://Hello.org", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.Hello") -@Stateless(name = "WSEjbOverrideWSRefHCWithDDsTest") -public class HelloBean { - public String helloEcho(String s) { - String messages = HandlerTracker.getMessages1(); - if (s.equals("secondcall")) - HandlerTracker.purge(); - return messages; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/HelloService.wsdl deleted file mode 100644 index b09fdd785c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/HelloService.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ServerHandler1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ServerHandler1.java deleted file mode 100644 index a640f51a47..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ServerHandler1.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2002 International Business Machines Corp. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ServerHandler1 implements SOAPHandler { - public void init(java.util.Map config) { - } - - public boolean handleFault(SOAPMessageContext context) { - HandlerTracker.reportHandleFault(this); - return true; - } - - public void close(MessageContext context) { - HandlerTracker.reportClose(this); - } - - public boolean handleMessage(SOAPMessageContext context) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - return true; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ServerHandler2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ServerHandler2.java deleted file mode 100644 index 153b2044a6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ServerHandler2.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2002 International Business Machines Corp. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest; - -import com.sun.ts.tests.jaxws.common.HandlerTracker; -import com.sun.ts.tests.jaxws.common.Handler_Util; - -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ServerHandler2 implements SOAPHandler { - public void init(java.util.Map config) { - } - - public boolean handleFault(SOAPMessageContext context) { - HandlerTracker.reportHandleFault(this); - return true; - } - - public void close(MessageContext context) { - HandlerTracker.reportClose(this); - } - - public boolean handleMessage(SOAPMessageContext context) { - HandlerTracker.reportHandleMessage(this, - Handler_Util.getDirection(context)); - return true; - } - - public Set getHeaders() { - HandlerTracker.reportGetHeaders(this); - return new HashSet(); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ServletClient.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ServletClient.java deleted file mode 100644 index 4fa6418a14..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/ServletClient.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; - -import java.io.*; -import java.sql.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.jws.*; - -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - @WebServiceRef(name = "service/wsejboverridewsrefhcwithddstest", type = java.lang.Object.class, value = jakarta.xml.ws.Service.class) - HelloService service = null; - - private Hello port; - - private void getPort() throws Exception { - System.out.println( - "Get wsejboverridewsrefhcwithddstest Service via @WebServiceRef annotation"); - System.out.println( - "Uses name attribute @WebServiceRef(name=\"service/wsejboverridewsrefhcwithddstest\")"); - System.out.println("service=" + service); - System.out.println("Get port from service"); - port = (Hello) service.getHello(); - System.out.println("port=" + port); - System.out.println("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("DEBUG init: service=" + service); - try { - getPort(); - } catch (Exception e) { - System.err.println("init Exception: " + e); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - System.out.println("DEBUG doGet"); - try { - System.out.println("Invoke the webservice endpoint from Web container"); - String serverSideMsgs = port.helloEcho("firstcall"); - serverSideMsgs = port.helloEcho("secondcall"); - String clientSideMsgs = HandlerTracker.getMessages1(); - HandlerTracker.purge(); - System.out.println("-----------------------------------"); - System.out.println("Dumping ClientSide Handler messages"); - System.out.println("-----------------------------------"); - System.out.println(clientSideMsgs); - System.out.println("Verify client side handler callbacks"); - if (!VerifyHandlerCallBacks("client", clientSideMsgs)) { - System.err.println("ClientSide Handler CallBacks (incorrect)"); - pass = false; - } else { - System.out.println("ClientSide Handler CallBacks (correct)"); - } - - System.out.println("-----------------------------------"); - System.out.println("Dumping ServerSide Handler messages"); - System.out.println("-----------------------------------"); - System.out.println(serverSideMsgs); - System.out.println("Verify server side handler callbacks"); - if (!VerifyHandlerCallBacks("server", serverSideMsgs)) { - System.err.println("ServerSide Handler CallBacks (incorrect)"); - pass = false; - } else { - System.out.println("ServerSide Handler CallBacks (correct)"); - } - if (pass) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } catch (Exception e) { - System.err.println("doGet Exception: " + e); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - System.out.println("doPost"); - - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - System.out.println("Remote logging intialized for Servlet"); - if (debug) { - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - System.err.println("doPost Exception: " + e); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } - - private boolean VerifyHandlerCallBacks(String who, String calls) { - int startIdx = 0; - int endIdx = 0; - boolean pass = true; - - if (who.equals("client")) { - if (calls == null) { - System.err.println("Callback string is null (unexpected)"); - return false; - } - if (calls.indexOf("ClientHandler1.handleMessage().doInbound()") == -1) { - System.err.println( - "ClientHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.handleMessage().doInbound()") == -1) { - System.err.println( - "ClientHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler1.handleMessage().doOutbound()") == -1) { - System.err.println( - "ClientHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.handleMessage().doOutbound()") == -1) { - System.err.println( - "ClientHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler1.close()") == -1) { - System.err.println("ClientHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf("ClientHandler2.close()") == -1) { - System.err.println("ClientHandler2.close() was not called"); - pass = false; - } - } else { - if (calls == null) { - System.err.println("Callback string is null (unexpected)"); - return false; - } - if (calls.indexOf("ServerHandler1.handleMessage().doInbound()") == -1) { - System.err.println( - "ServerHandler1.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.handleMessage().doInbound()") == -1) { - System.err.println( - "ServerHandler2.handleMessage().doInbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler1.handleMessage().doOutbound()") == -1) { - System.err.println( - "ServerHandler1.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.handleMessage().doOutbound()") == -1) { - System.err.println( - "ServerHandler2.handleMessage().doOutbound() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler1.close()") == -1) { - System.err.println("ServerHandler1.close() was not called"); - pass = false; - } - if (calls.indexOf("ServerHandler2.close()") == -1) { - System.err.println("ServerHandler2.close() was not called"); - pass = false; - } - } - return pass; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTestClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index e5d6f19a08..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejboverridewsrefhcwithddstest - http://webServerHost.1:webServerPort.1/WSEjbOverrideWSRefHCWithDDsTest/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTestClnt_client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTestClnt_client.xml deleted file mode 100644 index 7519dbe012..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTestClnt_client.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - WSEjbOverrideWSRefHCWithDDsTestClnt_client - - service/wsejboverridewsrefhcwithddstest - jakarta.xml.ws.Service - META-INF/wsdl/HelloService.wsdl - - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.Hello - - - - - ClientHandler1 - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.ClientHandler1 - - - ClientHandler2 - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.ClientHandler2 - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTestClnt_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTestClnt_web.war.sun-web.xml deleted file mode 100644 index 290440ccf2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTestClnt_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejboverridewsrefhcwithddstest - http://webServerHost.1:webServerPort.1/WSEjbOverrideWSRefHCWithDDsTest/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTestClnt_web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTestClnt_web.xml deleted file mode 100644 index c5a90dffbc..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTestClnt_web.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - ServletClientWebApp - - ServletClient - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.ServletClient - - - ServletClient - /ServletTest - - - 54 - - - service/wsejboverridewsrefhcwithddstest - jakarta.xml.ws.Service - WEB-INF/wsdl/HelloService.wsdl - - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.Hello - - - - - ClientHandler1 - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.ClientHandler1 - - - ClientHandler2 - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.ClientHandler2 - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTest_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTest_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 7f7e971307..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTest_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbOverrideWSRefHCWithDDsTest - WSEjbOverrideWSRefHCWithDDsTest - false - false - -1 - - - HelloBean - WSEjbOverrideWSRefHCWithDDsTest/ejb - - - - HelloService - http://webServerHost.1:webServerPort.1/WSEjbOverrideWSRefHCWithDDsTest/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTest_ejb.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTest_ejb.xml deleted file mode 100644 index 92342dc6bb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/WSEjbOverrideWSRefHCWithDDsTest_ejb.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - WSEjbOverrideWSRefHCWithDDsTest_ejb - - - WSEjbOverrideWSRefHCWithDDsTest - WSEjbOverrideWSRefHCWithDDsTest - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.HelloBean - Stateless - Container - - - - - - - - - - - WSEjbOverrideWSRefHCWithDDsTest - helloEcho - - Supports - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/application.xml.clientear b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/application.xml.clientear deleted file mode 100644 index 0ab7591fdd..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/application.xml.clientear +++ /dev/null @@ -1,32 +0,0 @@ - - - - -Application description - WSEjbOverrideWSRefHCWithDDsTestClnt - - - WSEjbOverrideWSRefHCWithDDsTestClnt_web.war - WSEjbOverrideWSRefHCWithDDsTestClnt_web - - - - WSEjbOverrideWSRefHCWithDDsTestClnt_client.jar - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/application.xml.ejbear b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/application.xml.ejbear deleted file mode 100644 index ff860abb11..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/application.xml.ejbear +++ /dev/null @@ -1,26 +0,0 @@ - - - - -Application description - WSEjbOverrideWSRefHCWithDDsTest - - WSEjbOverrideWSRefHCWithDDsTest_ejb.jar - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/build.xml deleted file mode 100644 index 42b29f12b7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/build.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/customfile-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/customfile-client.xml deleted file mode 100644 index 33bd32cdeb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/customfile-client.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - ClientHandler1 - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.ClientHandler1 - - - ClientHandler2 - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.ClientHandler2 - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/customfile-server.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/customfile-server.xml deleted file mode 100644 index 4846146223..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/customfile-server.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - ServerHandler1 - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.ServerHandler1 - - - ServerHandler2 - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.ServerHandler2 - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/webservices.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/webservices.xml deleted file mode 100644 index 5cd27e91b8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefHCWithDDsTest/webservices.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - HelloService - META-INF/wsdl/HelloService.wsdl - - HelloBean - wsdl:HelloService - wsdl:Hello - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.Hello - - WSEjbOverrideWSRefHCWithDDsTest - - - - - ServerHandler1 - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.ServerHandler1 - - - ServerHandler2 - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefHCWithDDsTest.ServerHandler2 - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/ChokeBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/ChokeBean.java deleted file mode 100644 index b9248e886a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/ChokeBean.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest; - -public class ChokeBean { - public void chokeMandatory() { - } - - public void chokeNever() { - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/ChokeRemote.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/ChokeRemote.java deleted file mode 100644 index 89ce050a12..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/ChokeRemote.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest; - -public interface ChokeRemote { - public void chokeMandatory(); - - public void chokeNever(); -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/Client.java deleted file mode 100644 index 427d3c26c9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/Client.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import java.rmi.RemoteException; -import java.util.Iterator; -import java.rmi.Remote; -import jakarta.xml.ws.WebServiceRef; -import jakarta.xml.ws.Service; -import jakarta.xml.ws.WebServiceException; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.util.Properties; - -import jakarta.jws.*; - -public class Client extends EETest { - - private Tx port; - - @WebServiceRef(name = "service/wsejboverridewsrefwithddstest", type = java.lang.Object.class, value = jakarta.xml.ws.Service.class) - static TxService service; - - private void getStub() throws Exception { - TestUtil.logMsg( - "Get wsejboverridewsrefwithddstest Service via DDs (ignore @WebServiceRef annotation)"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from Service"); - port = (Tx) service.getPort(Tx.class); - TestUtil.logMsg("Port obtained"); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap jaxws-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - getStub(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: call_txRequired - * - * @assertion_ids: WS4EE:SPEC:39; WS4EE:SPEC:69; WS4EE:SPEC:109; - * WS4EE:SPEC:112; WS4EE:SPEC:43; WS4EE:SPEC:115; WS4EE:SPEC:213; - * WS4EE:SPEC:219; WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; - * WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:113; WS4EE:SPEC:114; - * WS4EE:SPEC:117; WS4EE:SPEC:221; WS4EE:SPEC:224; WS4EE:SPEC:228; - * WS4EE:SPEC:248; WS4EE:SPEC:249; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:5000; - * - * @test_Strategy: Deploy via full 109 deployment descriptors. - * The @WebserviceRef annotation on the client must be overridden by the - * deployment descriptors. - */ - public void call_txRequired() throws Exception { - TestUtil.logMsg("call_txRequired"); - try { - String response = port.txRequired("Hello there!"); - TestUtil.logMsg("call_txRequired passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test call_txRequired failed: got exception " + t.toString()); - throw new Exception("call_txRequired failed"); - } - return; - } - - /* - * @testName: call_txSupports - * - * @assertion_ids: WS4EE:SPEC:39; WS4EE:SPEC:69; WS4EE:SPEC:109; - * WS4EE:SPEC:112; WS4EE:SPEC:43; WS4EE:SPEC:115; WS4EE:SPEC:213; - * WS4EE:SPEC:219; WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; - * WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:113; WS4EE:SPEC:114; - * WS4EE:SPEC:117; WS4EE:SPEC:221; WS4EE:SPEC:224; WS4EE:SPEC:228; - * WS4EE:SPEC:248; WS4EE:SPEC:249; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:5000; - * - * @test_Strategy: Deploy via full 109 deployment descriptors. - * The @WebserviceRef annotation on the client must be overridden by the - * deployment descriptors. - */ - public void call_txSupports() throws Exception { - TestUtil.logMsg("call_txSupports"); - try { - String response = port.txSupports("Hello there!"); - TestUtil.logMsg("call_txSupports passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test call_txSupports failed: got exception " + t.toString()); - throw new Exception("call_txSupports failed"); - } - return; - } - - /* - * @testName: call_txRequiresNew - * - * @assertion_ids: WS4EE:SPEC:39; WS4EE:SPEC:69; WS4EE:SPEC:109; - * WS4EE:SPEC:112; WS4EE:SPEC:43; WS4EE:SPEC:115; WS4EE:SPEC:213; - * WS4EE:SPEC:219; WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; - * WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:113; WS4EE:SPEC:114; - * WS4EE:SPEC:117; WS4EE:SPEC:221; WS4EE:SPEC:224; WS4EE:SPEC:228; - * WS4EE:SPEC:248; WS4EE:SPEC:249; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:5000; - * - * @test_Strategy: Deploy via full 109 deployment descriptors. - * The @WebserviceRef annotation on the client must be overridden by the - * deployment descriptors. - */ - public void call_txRequiresNew() throws Exception { - TestUtil.logMsg("call_txRequiresNew"); - try { - String response = port.txRequiresNew("Hello there!"); - TestUtil.logMsg("call_txRequiresNew passed"); - } catch (Throwable t) { - TestUtil.logMsg( - "test call_txRequiresNew failed: got exception " + t.toString()); - throw new Exception("call_txRequiresNew failed"); - } - return; - } - - /* - * @testName: call_txNotSupported - * - * @assertion_ids: WS4EE:SPEC:39; WS4EE:SPEC:69; WS4EE:SPEC:109; - * WS4EE:SPEC:112; WS4EE:SPEC:43; WS4EE:SPEC:115; WS4EE:SPEC:213; - * WS4EE:SPEC:219; WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; - * WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:113; WS4EE:SPEC:114; - * WS4EE:SPEC:117; WS4EE:SPEC:221; WS4EE:SPEC:224; WS4EE:SPEC:228; - * WS4EE:SPEC:248; WS4EE:SPEC:249; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:5000; - * - * @test_Strategy: Deploy via full 109 deployment descriptors. - * The @WebserviceRef annotation on the client must be overridden by the - * deployment descriptors. - */ - public void call_txNotSupported() throws Exception { - TestUtil.logMsg("call_txNotSupported"); - try { - String response = port.txNotSupported("Hello there!"); - TestUtil.logMsg("call_txNotSupported passed"); - } catch (Throwable t) { - TestUtil.logMsg( - "test call_txNotSupported failed: got exception " + t.toString()); - throw new Exception("call_txNotSupported failed"); - } - return; - } - - /* - * @testName: call_txNever - * - * @assertion_ids: WS4EE:SPEC:39; WS4EE:SPEC:69; WS4EE:SPEC:109; - * WS4EE:SPEC:112; WS4EE:SPEC:43; WS4EE:SPEC:115; WS4EE:SPEC:213; - * WS4EE:SPEC:219; WS4EE:SPEC:183; WS4EE:SPEC:184; WS4EE:SPEC:185; - * WS4EE:SPEC:186; WS4EE:SPEC:187; WS4EE:SPEC:113; WS4EE:SPEC:114; - * WS4EE:SPEC:117; WS4EE:SPEC:221; WS4EE:SPEC:224; WS4EE:SPEC:228; - * WS4EE:SPEC:248; WS4EE:SPEC:249; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:5000; - * - * @test_Strategy: Deploy via full 109 deployment descriptors. - * The @WebserviceRef annotation on the client must be overridden by the - * deployment descriptors. - */ - public void call_txNever() throws Exception { - TestUtil.logMsg("call_txNever"); - try { - String response = port.txNever("Hello there!"); - TestUtil.logMsg("call_txNever passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test call_txNever failed: got exception " + t.toString()); - throw new Exception("call_txNever failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/TxBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/TxBean.java deleted file mode 100644 index f614a1c495..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/TxBean.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -import javax.naming.InitialContext; - -@WebService(portName = "JunkJunkJunkPortName", serviceName = "JunkJunkJunkServiceName", targetNamespace = "http://Tx.org", wsdlLocation = "META-INF/wsdl/TxService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest.Tx") -@Stateless(name = "WsFrontEjb") -public class TxBean { - - private ChokeRemote choke = null; - - private Object o; - - private void lookupChoke() { - try { - if (choke == null) { - InitialContext ctx = new InitialContext(); - choke = (ChokeRemote) ctx.lookup("java:comp/env/ejb/wschokebean"); - } - } catch (Exception e) { - System.out.println("*** TxBean.lookupChoke: failed to find choke"); - e.printStackTrace(); - } - } - - public String txRequired(String s) { - try { - lookupChoke(); - choke.chokeMandatory(); - return s; - } catch (Exception e) { - throw new RuntimeException( - "TxBean.txRequired choked on " + e.getMessage()); - } - } - - public String txRequiresNew(String s) { - try { - lookupChoke(); - choke.chokeMandatory(); - return s; - } catch (Exception e) { - throw new RuntimeException( - "TxBean.txRequiresNew choked on " + e.getMessage()); - } - } - - public String txSupports(String s) { - try { - lookupChoke(); - choke.chokeNever(); - return s; - } catch (Exception e) { - throw new RuntimeException( - "TxBean.txSupports choked on " + e.getMessage()); - } - } - - public String txNotSupported(String s) { - try { - lookupChoke(); - choke.chokeNever(); - return s; - } catch (Exception e) { - throw new RuntimeException( - "TxBean.txNotSupported choked on " + e.getMessage()); - } - } - - public String txNever(String s) { - try { - lookupChoke(); - choke.chokeNever(); - return s; - } catch (Exception e) { - throw new RuntimeException("TxBean.txNever choked on " + e.getMessage()); - } - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/TxRemote.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/TxRemote.java deleted file mode 100644 index f187379bc5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/TxRemote.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest; - -public interface TxRemote { - public String txRequired(String str); - - public String txRequiresNew(String str); - - public String txSupports(String str); - - public String txNotSupported(String str); - - public String txNever(String str); -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/TxService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/TxService.wsdl deleted file mode 100644 index 5d7c06a8ca..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/TxService.wsdl +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/WSEjbOverrideWSRefWithDDsTestClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/WSEjbOverrideWSRefWithDDsTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 13252e0e5d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/WSEjbOverrideWSRefWithDDsTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - service/wsejboverridewsrefwithddstest - - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest.Tx - - http://Tx.org - TxPort - - - http://webServerHost.1:webServerPort.1/WSEjbOverrideWSRefWithDDsTest/ejb?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/WSEjbOverrideWSRefWithDDsTestClnt_client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/WSEjbOverrideWSRefWithDDsTestClnt_client.xml deleted file mode 100644 index 66d1ce6d13..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/WSEjbOverrideWSRefWithDDsTestClnt_client.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - WSEjbOverrideWSRefWithDDsTestClnt_client - - service/wsejboverridewsrefwithddstest - jakarta.xml.ws.Service - META-INF/wsdl/TxService.wsdl - - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest.Tx - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/WSEjbOverrideWSRefWithDDsTest_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/WSEjbOverrideWSRefWithDDsTest_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 710f528daf..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/WSEjbOverrideWSRefWithDDsTest_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - 0 - - WsChokeEjb - WsChokeEjb - false - false - -1 - - - - WsFrontEjb - WsFrontEjb - - ejb/wschokebean - WsChokeEjb - - false - false - -1 - - - TxBean - WSEjbOverrideWSRefWithDDsTest/ejb - - - - TxService - http://webServerHost.1:webServerPort.1/WSEjbOverrideWSRefWithDDsTest/ejb?WSDL - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/WSEjbOverrideWSRefWithDDsTest_ejb.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/WSEjbOverrideWSRefWithDDsTest_ejb.xml deleted file mode 100644 index d193b63162..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/WSEjbOverrideWSRefWithDDsTest_ejb.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - WSEjbOverrideWSRefWithDDSTest_ejb - - - WsFrontEjb - WsFrontEjb - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest.TxRemote - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest.TxBean - Stateless - Container - - ejb/wschokebean - Session - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest.ChokeRemote - WsChokeEjb - - - - - - - - - WsChokeEjb - WsChokeEjb - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest.ChokeRemote - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest.ChokeBean - Stateless - Container - - - - - - - - - - - WsFrontEjb - txRequired - - Required - - - - WsFrontEjb - txRequiresNew - - RequiresNew - - - - WsFrontEjb - txSupports - - Supports - - - - WsFrontEjb - txNotSupported - - NotSupported - - - - WsFrontEjb - txNever - - Never - - - - - WsChokeEjb - chokeMandatory - - Mandatory - - - - WsChokeEjb - chokeNever - - Never - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/application.xml.clientear b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/application.xml.clientear deleted file mode 100644 index 56febc5a63..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/application.xml.clientear +++ /dev/null @@ -1,26 +0,0 @@ - - - - -Application description - WSEjbOverrideWSRefWithDDsTestClnt - - WSEjbOverrideWSRefWithDDsTestClnt_client.jar - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/application.xml.ejbear b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/application.xml.ejbear deleted file mode 100644 index 0c2df5c434..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/application.xml.ejbear +++ /dev/null @@ -1,26 +0,0 @@ - - - - -Application description - WSEjbOverrideWSRefWithDDsTest - - WSEjbOverrideWSRefWithDDsTest_ejb.jar - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/build.xml deleted file mode 100644 index cb22f80526..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/build.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/customfile.xml deleted file mode 100644 index 04b1bad065..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/webservices.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/webservices.xml deleted file mode 100644 index 249d4b0909..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/WSEjbOverrideWSRefWithDDsTest/webservices.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - TxService - META-INF/wsdl/TxService.wsdl - - TxBean - wsdl:TxService - wsdl:TxPort - com.sun.ts.tests.webservices12.ejb.descriptors.WSEjbOverrideWSRefWithDDsTest.Tx - - WsFrontEjb - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/build.xml deleted file mode 100644 index 0d29cf4ac3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/ejb/descriptors/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/Client.java deleted file mode 100644 index bc4b331a24..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/Client.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.narrow; - -import com.sun.ts.lib.harness.ServiceEETest; - -import com.sun.ts.lib.util.TestUtil; - -import com.sun.javatest.Status; - -import javax.rmi.PortableRemoteObject; - -import javax.naming.InitialContext; - -import jakarta.xml.ws.Service; - -import java.util.Properties; - -public class Client extends ServiceEETest { - // Get Port and Stub access via InitialContext - InterfaceTest1 port1 = null; - - InterfaceTest2 port2 = null; - - private void getPort() throws Exception { - try { - InitialContext ic = new InitialContext(); - Service svc = (Service) ic - .lookup("java:comp/env/service/wsinterfacetest"); - - Object ret = svc.getPort(InterfaceTest1.class); - port1 = (InterfaceTest1) PortableRemoteObject.narrow(ret, - InterfaceTest1.class); - - ret = svc.getPort(InterfaceTest2.class); - port2 = (InterfaceTest2) PortableRemoteObject.narrow(ret, - InterfaceTest2.class); - - } catch (Throwable t) { - t.printStackTrace(); - throw new Exception(t.toString()); - } - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - boolean pass = true; - - try { - getPort(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - if (!pass) { - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /** - * @testName: narrowTest - * - * @assertion_ids: WS4EE:SPEC:31; WS4EE:SPEC:56 - * - * @test_Strategy: - * - * @test_Strategy: Get ports using PortableRemoteObject.narrow to cast the - * SEI's and call a method on each to verify it. - * - * port1 - Interface1 - is narrowed from service.getPort. - * port2 - Interface2 - is narrowed from service.getPort. - * - */ - public void narrowTest() throws Exception { - TestUtil.logTrace("narrowTest"); - boolean pass = true; - - TestUtil.logMsg("Invoking methods on interface 1 ..."); - if (interface1Test()) { - TestUtil.logMsg("interface 1 test PASSED ..."); - } else { - pass = false; - TestUtil.logErr("interface 1 test FAILED ..."); - } - - TestUtil.logMsg("Invoking methods on interface 2 ..."); - if (interface2Test()) { - TestUtil.logMsg("interface 2 test PASSED ..."); - } else { - pass = false; - TestUtil.logErr("interface 2 test FAILED ..."); - } - - if (!pass) - throw new Exception("narrowTest failed"); - } - - private boolean interface1Test() throws Exception { - TestUtil.logTrace("interface1Test"); - boolean pass = true; - String exp = "interface1:hello, world"; - - try { - String rec = port1.hello1("hello, world"); - TestUtil - .logMsg("Invoking RPC method port1.hello1(\"hello, world\")=" + rec); - if (rec.equals(exp)) { - TestUtil.logMsg("Result match - " + exp); - } else { - TestUtil.logErr( - "Result mismatch - expected: " + exp + ", received: " + rec); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean interface2Test() throws Exception { - TestUtil.logTrace("interface2Test"); - boolean pass = true; - String exp1 = "interface2:hello, world"; - String exp2 = "interface2:hello, world"; - try { - String rec = port2.hello1("hello, world"); - TestUtil - .logMsg("Invoking RPC method port2.hello1(\"hello, world\")=" + rec); - if (rec.equals(exp1)) { - TestUtil.logMsg("Result match - " + exp1); - } else { - TestUtil.logErr( - "Result mismatch - expected: " + exp1 + ", received: " + rec); - pass = false; - } - rec = port2.hello2("hello, world"); - TestUtil - .logMsg("Invoking RPC method port2.hello2(\"hello, world\")=" + rec); - if (rec.equals(exp2)) { - TestUtil.logMsg("Result match - " + exp2); - } else { - TestUtil.logErr( - "Result mismatch - expected: " + exp2 + ", received: " + rec); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/InterfaceTest1Impl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/InterfaceTest1Impl.java deleted file mode 100644 index 3c965638d9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/InterfaceTest1Impl.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.narrow; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "InterfaceTest1Port", serviceName = "InterfaceTestService", targetNamespace = "http://interfacetestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/InterfaceTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.narrow.InterfaceTest1") - -public class InterfaceTest1Impl implements InterfaceTest1 { - - public String hello1(String v) { - System.out.println("hello1"); - System.out.println("String=" + v); - return "interface1:" + v; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/InterfaceTest2Impl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/InterfaceTest2Impl.java deleted file mode 100644 index c2f3f23b33..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/InterfaceTest2Impl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.narrow; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -@WebService(portName = "InterfaceTest2Port", serviceName = "InterfaceTestService", targetNamespace = "http://interfacetestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/InterfaceTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.narrow.InterfaceTest2") - -public class InterfaceTest2Impl implements InterfaceTest2 { - - public String hello1(String v) { - System.out.println("hello1"); - System.out.println("String=" + v); - return "interface2:" + v; - } - - public String hello2(String v) { - System.out.println("hello2"); - System.out.println("String=" + v); - return "interface2:" + v; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/InterfaceTestService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/InterfaceTestService.wsdl deleted file mode 100644 index 4e2cc05ee0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/InterfaceTestService.wsdl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_web.war.sun-web.xml deleted file mode 100644 index 26a7abd934..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - InterfaceTestService - http://webServerHost.1:webServerPort.1/WSNarrow_web/jaxws/InterfaceTest1?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_wsappclient_vehicle_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index ea412fb102..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - service/wsinterfacetest - - com.sun.ts.tests.webservices12.narrow.InterfaceTest1 - - http://interfacetestservice.org/wsdl - InterfaceTest1Port - - - - com.sun.ts.tests.webservices12.narrow.InterfaceTest2 - - http://interfacetestservice.org/wsdl - InterfaceTest2Port - - - http://webServerHost.1:webServerPort.1/WSNarrow_web/jaxws/InterfaceTest1?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_wsejb_vehicle_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 6a21328e0e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - WSNarrow_wsejb_vehicle - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index a07b736aff..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - WSNarrow_wsejb_vehicle - - service/wsinterfacetest - - com.sun.ts.tests.webservices12.narrow.InterfaceTest1 - - http://interfacetestservice.org/wsdl - InterfaceTest1Port - - - - com.sun.ts.tests.webservices12.narrow.InterfaceTest2 - - http://interfacetestservice.org/wsdl - InterfaceTest2Port - - - http://webServerHost.1:webServerPort.1/WSNarrow_web/jaxws/InterfaceTest1?WSDL - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_wsservlet_vehicle_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index f9ec3016ff..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/WSNarrow_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - service/wsinterfacetest - - com.sun.ts.tests.webservices12.narrow.InterfaceTest1 - - http://interfacetestservice.org/wsdl - InterfaceTest1Port - - - - com.sun.ts.tests.webservices12.narrow.InterfaceTest2 - - http://interfacetestservice.org/wsdl - InterfaceTest2Port - - - http://webServerHost.1:webServerPort.1/WSNarrow_web/jaxws/InterfaceTest1?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/build.xml deleted file mode 100644 index 3ed862cbd4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/customfile.xml deleted file mode 100644 index c7a8e5a54f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/customfile.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/jakartaEE.tokens deleted file mode 100644 index 9045f06ad8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsinterfacetest") -SERVICE=com.sun.ts.tests.webservices12.narrow.InterfaceTestService -IMPL=com.sun.ts.tests.webservices12.narrow.InterfaceTest1Impl -IMPL2=com.sun.ts.tests.webservices12.narrow.InterfaceTest2Impl -SEI=com.sun.ts.tests.webservices12.narrow.InterfaceTest1 -SEI2=com.sun.ts.tests.webservices12.narrow.InterfaceTest2 -URLALIAS=/jaxws/InterfaceTest1 -URLALIAS2=/jaxws/InterfaceTest2 -SERVLETNAME=InterfaceTest1Impl -SERVLETNAME2=InterfaceTest2Impl -NAMESPACEURI=http://interfacetestservice.org/wsdl -PORT=InterfaceTest1Port -PORT2=InterfaceTest2Port -WEBSERVICEDESCRIPTION=InterfaceTestService -SERVICEREFNAMEWSSERVLET=service/wsinterfacetest -SERVICEREFNAMEWSEJB=service/wsinterfacetest -SERVICEREFNAMEWSAPPCLIENT=service/wsinterfacetest diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/jakartaEE.webservices.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/jakartaEE.webservices.xml deleted file mode 100644 index f5b2f707a4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/jakartaEE.webservices.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - InterfaceTestService - WEB-INF/wsdl/InterfaceTestService.wsdl - - InterfaceTest1Impl - wsdl:InterfaceTest1Port - com.sun.ts.tests.webservices12.narrow.InterfaceTest1 - - InterfaceTest1Impl - - - - - InterfaceTest2Impl - wsdl:InterfaceTest2Port - com.sun.ts.tests.webservices12.narrow.InterfaceTest2 - - InterfaceTest2Impl - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/wsappclient_vehicle_client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/wsappclient_vehicle_client.xml deleted file mode 100644 index b68846e787..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/wsappclient_vehicle_client.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - TS app client vehicle - appclient_vehicle_client - - service/wsinterfacetest - jakarta.xml.ws.Service - META-INF/wsdl/InterfaceTestService.wsdl - - com.sun.ts.tests.webservices12.narrow.InterfaceTest1 - - - com.sun.ts.tests.webservices12.narrow.InterfaceTest2 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/wsejb_vehicle_ejb.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/wsejb_vehicle_ejb.xml deleted file mode 100644 index 60701abacc..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/wsejb_vehicle_ejb.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - Ejb1 - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicleRemote - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicle - Stateful - Container - - service/wsinterfacetest - jakarta.xml.ws.Service - META-INF/wsdl/InterfaceTestService.wsdl - - com.sun.ts.tests.webservices12.narrow.InterfaceTest1 - - - com.sun.ts.tests.webservices12.narrow.InterfaceTest2 - - - - - - - - - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - Remote - runTest - - Required - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/wsservlet_vehicle_web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/wsservlet_vehicle_web.xml deleted file mode 100644 index f8c0cf972b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/narrow/wsservlet_vehicle_web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - wsservlet_vehicle - - WSServlet_VehicleLogicalName - com.sun.ts.tests.common.vehicle.wsservlet.WSServletVehicle - - - WSServlet_VehicleLogicalName - /wsservlet_vehicle - - - 54 - - - service/wsinterfacetest - jakarta.xml.ws.Service - WEB-INF/wsdl/InterfaceTestService.wsdl - - com.sun.ts.tests.webservices12.narrow.InterfaceTest1 - - - com.sun.ts.tests.webservices12.narrow.InterfaceTest2 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/build.xml deleted file mode 100644 index f26ea4b849..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/Client.java deleted file mode 100644 index 812a15dbc0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/Client.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - * @author Raja Perumal - */ - -package com.sun.ts.tests.webservices12.sec.annotations.ejb.basicauth; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.lib.porting.TSURL; -import com.sun.javatest.Status; - -import com.sun.ts.tests.webservices12.sec.annotations.ejb.basicauth.HelloService; -import com.sun.ts.tests.webservices12.sec.annotations.ejb.basicauth.Hello; - -import jakarta.xml.ws.WebServiceRef; -import jakarta.xml.ws.BindingProvider; -import jakarta.xml.ws.WebServiceException; -import java.util.Properties; -import java.util.Map; - -public class Client extends EETest { - @WebServiceRef - static HelloService service; - - private Hello port; - - private Properties props = null; - - private static final String UserNameProp = "user"; - - private static final String UserPasswordProp = "password"; - - private static final String UNAUTH_USERNAME = "authuser"; - - private static final String UNAUTH_PASSWORD = "authpassword"; - - private String username = ""; - - private String password = ""; - - private String unauthorizedUser = ""; - - private String unauthorizedUserPassword = ""; - - private TSURL ctsurl = new TSURL(); - - private String hostname = "localhost"; - - private String PROTOCOL = "http"; - - private String urlString = null; - - private int portnum = 8000; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* - * @class.setup_props: webServerHost; webServerPort; user; password; authuser; - * authpassword; - */ - public void setup(String[] args, Properties p) throws Exception { - props = p; - try { - username = props.getProperty(UserNameProp); - password = props.getProperty(UserPasswordProp); - unauthorizedUser = props.getProperty(UNAUTH_USERNAME); - unauthorizedUserPassword = props.getProperty(UNAUTH_PASSWORD); - hostname = props.getProperty("webServerHost"); - portnum = Integer.parseInt(props.getProperty("webServerPort")); - urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum, - "/WSEjbBasicAuth/HelloService/Hello"); - } catch (Exception e) { - throw new Exception("Setup failed:", e); - } - - TestUtil.logMsg("setup ok"); - } - - /* - * @testName: sayHelloProtected - * - * @assertion_ids: JAXWS:SPEC:4005; JAXWS:SPEC:7000; JAXWS:SPEC:7010; - * JAXWS:SPEC:7011; JavaEE:SPEC:10087; WS4EE:SPEC:9000 - * - * @test_Strategy: - */ - public void sayHelloProtected() throws Exception { - - try { - TestUtil.logMsg("Getting port from the Service : " + service); - Hello port = service.getHelloPort(); - - TestUtil.logMsg("Setting username and password in WS port"); - TestUtil.logMsg("username=" + username + " password=" + password); - - BindingProvider bindingProvider = (BindingProvider) port; - Map map = bindingProvider.getRequestContext(); - map.put(BindingProvider.USERNAME_PROPERTY, username); - map.put(BindingProvider.PASSWORD_PROPERTY, password); - - TestUtil.logMsg( - "Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg( - "Invoking sayHelloProtected with authorized user on Hello port"); - TestUtil.logMsg("Invocation must be allowed"); - String text = port.sayHelloProtected("Raja"); - TestUtil.logMsg("Test sayHelloProtected passed"); - TestUtil.logMsg("Got Output : " + text); - } catch (Exception e) { - e.printStackTrace(); - throw new Exception("Test sayHelloProtected failed"); - } - - return; - } - - /* - * @testName: sayHelloPermitAll - * - * @assertion_ids: JAXWS:SPEC:7010; JAXWS:SPEC:7011; JavaEE:SPEC:10087; - * WS4EE:SPEC:9000 - * - * @test_Strategy: - */ - public void sayHelloPermitAll() throws Exception { - - try { - TestUtil.logMsg("Getting port from the Service : " + service); - Hello port = service.getHelloPort(); - - TestUtil.logMsg("Setting username and password in WS port"); - TestUtil.logMsg("username=" + username + " password=" + password); - - BindingProvider bindingProvider = (BindingProvider) port; - Map map = bindingProvider.getRequestContext(); - map.put(BindingProvider.USERNAME_PROPERTY, username); - map.put(BindingProvider.PASSWORD_PROPERTY, password); - - TestUtil.logMsg( - "Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("Invoking sayHelloPermitAll with any user on Hello port"); - TestUtil.logMsg("Invocation must be allowed"); - String text = port.sayHelloPermitAll("Raja"); - TestUtil.logMsg("Test sayHelloPermitAll passed"); - TestUtil.logMsg("Got Output : " + text); - } catch (Exception e) { - e.printStackTrace(); - throw new Exception("Test sayHelloPermitAll failed"); - } - return; - } - - /* - * @testName: sayHelloDenyAll - * - * @assertion_ids: JAXWS:SPEC:6005; JAXWS:SPEC:7010; JAXWS:SPEC:7011; - * JavaEE:SPEC:10087; WS4EE:SPEC:9000 - * - * @test_Strategy: - */ - public void sayHelloDenyAll() throws Exception { - - try { - TestUtil.logMsg("Getting port from the Service : " + service); - Hello port = service.getHelloPort(); - - TestUtil.logMsg("Setting username and password in WS port"); - TestUtil.logMsg("username=" + username + " password=" + password); - - BindingProvider bindingProvider = (BindingProvider) port; - Map map = bindingProvider.getRequestContext(); - map.put(BindingProvider.USERNAME_PROPERTY, username); - map.put(BindingProvider.PASSWORD_PROPERTY, password); - - TestUtil.logMsg( - "Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("Invoking sayHelloDenyAll with any user on Hello port"); - TestUtil.logMsg("Invocation must not be allowed (throw exception)"); - port.sayHelloDenyAll("Raja"); - TestUtil.logErr("Test sayHelloDenyAll did not throw expected exception"); - throw new Exception("Test sayHelloDenyAll failed"); - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected WebServiceException"); - TestUtil.logMsg("Test sayHelloDenyAll Passed"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected Exception " + e.getMessage()); - throw new Exception("Test sayHelloDenyAll failed", e); - } - return; - } - - /* - * @testName: sayHelloProtectedUnauthorizedUser - * - * @assertion_ids: JAXWS:SPEC:4005; JAXWS:SPEC:7000; JAXWS:SPEC:7010; - * JAXWS:SPEC:7011; JavaEE:SPEC:10087; WS4EE:SPEC:9000 - * - * @test_Strategy: This will test that a user/password which is valid in the - * system but which is NOT a member of the Administrator role will/should - * yeild an access denied error when an attempt is made to access a method - * that has Administrator role access restriction. - */ - public void sayHelloProtectedUnauthorizedUser() throws Exception { - - try { - TestUtil.logMsg("Getting port from the Service : " + service); - Hello port = service.getHelloPort(); - - // we want to use a valid username/password that are recognized - // by the system but that do NOT exist in the Administrator - // role such that using these should yeild an access denied error - TestUtil.logMsg("Setting username and password in WS port"); - TestUtil.logMsg("username=" + unauthorizedUser + " password=" - + unauthorizedUserPassword); - - BindingProvider bindingProvider = (BindingProvider) port; - Map map = bindingProvider.getRequestContext(); - map.put(BindingProvider.USERNAME_PROPERTY, unauthorizedUser); - map.put(BindingProvider.PASSWORD_PROPERTY, unauthorizedUserPassword); - - TestUtil.logMsg( - "Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg( - "Invoking sayHelloProtected with unauthorized user on Hello port"); - TestUtil.logMsg("Invocation must not be allowed (throw exception)"); - port.sayHelloProtected("Raja"); - TestUtil.logErr( - "Test sayHelloProtectedUnauthorizedUser did not throw expected exception"); - throw new Exception("Test sayHelloProtectedUnauthorizedUser failed"); - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected WebServiceException"); - TestUtil.logMsg("Test sayHelloDenyAll Passed"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected Exception " + e.getMessage()); - throw new Exception("Test sayHelloDenyAll failed", e); - } - return; - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/Hello.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/Hello.java deleted file mode 100644 index b5cebeaa5e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/Hello.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - * @author Raja Perumal - */ - -package com.sun.ts.tests.webservices12.sec.annotations.ejb.basicauth; - -import jakarta.annotation.security.DeclareRoles; -import jakarta.annotation.security.RolesAllowed; -import jakarta.annotation.security.PermitAll; -import jakarta.annotation.security.DenyAll; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; -import jakarta.xml.ws.WebServiceContext; -import jakarta.annotation.Resource; - -@WebService -@Stateless - -@DeclareRoles({ "Administrator", "Manager" }) -public class Hello { - - @Resource - private WebServiceContext context; - - String username = null; - - boolean isUserInRoleAdministrator = false; - - @WebMethod - @RolesAllowed("Administrator") - public String sayHelloProtected(String param) { - - if (context.getUserPrincipal() != null) - username = context.getUserPrincipal().getName(); - isUserInRoleAdministrator = context.isUserInRole("Administrator"); - - return "Invoked as user :" + username + " : isUserInRoleAdministrator =" - + isUserInRoleAdministrator + " : Hello " + param; - } - - @WebMethod - @PermitAll - public String sayHelloPermitAll(String param) { - - if (context.getUserPrincipal() != null) - username = context.getUserPrincipal().getName(); - isUserInRoleAdministrator = context.isUserInRole("Administrator"); - - return "Invoked as user :" + username + " : isUserInRoleAdministrator =" - + isUserInRoleAdministrator + " : Hello " + param; - } - - @WebMethod - @DenyAll - public String sayHelloDenyAll(String param) { - - return "Hello " + param; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/HelloBasicAuth.ear.sun-application.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/HelloBasicAuth.ear.sun-application.xml deleted file mode 100644 index c0b30b59aa..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/HelloBasicAuth.ear.sun-application.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - 0 - - Administrator - j2ee - - - Manager - javajoe - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/Hello_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/Hello_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 24a32236e6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/Hello_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - 0 - - Hello - false - false - -1 - 0 - - - Hello - /WSEjbBasicAuth/HelloService/Hello - - BASIC - - - http://basicauth.ejb.annotations.sec.webservices12.tests.ts.sun.com/ - HelloService - - true - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/build.xml deleted file mode 100644 index 91bfbdd1f4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauth/build.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/Client.java deleted file mode 100644 index 287961e85b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/Client.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - * @author Raja Perumal - */ - -package com.sun.ts.tests.webservices12.sec.annotations.ejb.basicauthssl; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.lib.porting.TSURL; -import com.sun.javatest.Status; - -import com.sun.ts.tests.webservices12.sec.annotations.ejb.basicauthssl.HelloService; -import com.sun.ts.tests.webservices12.sec.annotations.ejb.basicauthssl.Hello; - -import jakarta.xml.ws.WebServiceRef; -import jakarta.xml.ws.BindingProvider; -import jakarta.xml.ws.WebServiceException; -import java.util.Properties; -import java.util.Map; -import javax.net.ssl.*; - -public class Client extends EETest { - @WebServiceRef - static HelloService service; - - private Hello port; - - private Properties props = null; - - private static final String UserNameProp = "user"; - - private static final String UserPasswordProp = "password"; - - private static final String UNAUTH_USERNAME = "authuser"; - - private static final String UNAUTH_PASSWORD = "authpassword"; - - private String username = ""; - - private String password = ""; - - private String unauthorizedUser = ""; - - private String unauthorizedUserPassword = ""; - - private TSURL ctsurl = new TSURL(); - - private String hostname = "localhost"; - - private String PROTOCOL = "https"; - - private String urlString = null; - - private int portnum = 8000; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* - * @class.setup_props: webServerHost; securedWebServicePort; user; password; - * authuser; authpassword; - */ - public void setup(String[] args, Properties p) throws Exception { - props = p; - try { - username = props.getProperty(UserNameProp); - password = props.getProperty(UserPasswordProp); - unauthorizedUser = props.getProperty(UNAUTH_USERNAME); - unauthorizedUserPassword = props.getProperty(UNAUTH_PASSWORD); - hostname = props.getProperty("webServerHost"); - portnum = Integer.parseInt(props.getProperty("securedWebServicePort")); - urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum, - "/WSEjbBasicAuthSSL/HelloService/Hello"); - HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { - public boolean verify(String hostname, SSLSession session) { - return true; - } - }); - } catch (Exception e) { - throw new Exception("Setup failed:", e); - } - TestUtil.logMsg("setup ok"); - } - - /* - * @testName: sayHelloProtected - * - * @assertion_ids: JAXWS:SPEC:4005; JAXWS:SPEC:7000; JAXWS:SPEC:7010; - * JAXWS:SPEC:7011; JavaEE:SPEC:10087; WS4EE:SPEC:9000 - * - * @test_Strategy: - */ - public void sayHelloProtected() throws Exception { - - try { - TestUtil.logMsg("Getting port from the Service : " + service); - Hello port = service.getHelloPort(); - - TestUtil.logMsg("Setting username and password in WS port"); - TestUtil.logMsg("username=" + username + " password=" + password); - - BindingProvider bindingProvider = (BindingProvider) port; - Map map = bindingProvider.getRequestContext(); - map.put(BindingProvider.USERNAME_PROPERTY, username); - map.put(BindingProvider.PASSWORD_PROPERTY, password); - - TestUtil.logMsg( - "Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg( - "Invoking sayHelloProtected with authorized user on Hello port"); - TestUtil.logMsg("Invocation must be allowed"); - String text = port.sayHelloProtected("Raja"); - TestUtil.logMsg("Test sayHelloProtected passed"); - TestUtil.logMsg("Got Output : " + text); - } catch (Exception e) { - e.printStackTrace(); - throw new Exception("Test sayHelloProtected failed"); - } - return; - } - - /* - * @testName: sayHelloPermitAll - * - * @assertion_ids: JAXWS:SPEC:7010; JAXWS:SPEC:7011; JavaEE:SPEC:10087; - * WS4EE:SPEC:9000 - * - * @test_Strategy: - */ - public void sayHelloPermitAll() throws Exception { - - try { - TestUtil.logMsg("Getting port from the Service : " + service); - Hello port = service.getHelloPort(); - - TestUtil.logMsg("Setting username and password in WS port"); - TestUtil.logMsg("username=" + username + " password=" + password); - - BindingProvider bindingProvider = (BindingProvider) port; - Map map = bindingProvider.getRequestContext(); - map.put(BindingProvider.USERNAME_PROPERTY, username); - map.put(BindingProvider.PASSWORD_PROPERTY, password); - - TestUtil.logMsg( - "Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("Invoking sayHelloPermitAll with any user on Hello port"); - TestUtil.logMsg("Invocation must be allowed"); - String text = port.sayHelloPermitAll("Raja"); - TestUtil.logMsg("Test sayHelloPermitAll passed"); - TestUtil.logMsg("Got Output : " + text); - } catch (Exception e) { - e.printStackTrace(); - throw new Exception("Test sayHelloPermitAll failed"); - } - return; - } - - /* - * @testName: sayHelloDenyAll - * - * @assertion_ids: JAXWS:SPEC:6005; JAXWS:SPEC:7010; JAXWS:SPEC:7011; - * JavaEE:SPEC:10087; WS4EE:SPEC:9000 - * - * @test_Strategy: - */ - public void sayHelloDenyAll() throws Exception { - - try { - TestUtil.logMsg("Getting port from the Service : " + service); - Hello port = service.getHelloPort(); - - TestUtil.logMsg("Setting username and password in WS port"); - TestUtil.logMsg("username=" + username + " password=" + password); - - BindingProvider bindingProvider = (BindingProvider) port; - Map map = bindingProvider.getRequestContext(); - map.put(BindingProvider.USERNAME_PROPERTY, username); - map.put(BindingProvider.PASSWORD_PROPERTY, password); - - TestUtil.logMsg( - "Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("Invoking sayHelloDenyAll with any user on Hello port"); - TestUtil.logMsg("Invocation must not be allowed (throw exception)"); - String text = port.sayHelloDenyAll("Raja"); - TestUtil.logErr("Test sayHelloDenyAll did not throw expected exception"); - TestUtil.logMsg("Got Output : " + text); - throw new Exception("Test sayHelloDenyAll failed"); - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected WebServiceException"); - TestUtil.logMsg("Test sayHelloDenyAll Passed"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected Exception " + e.getMessage()); - throw new Exception("Test sayHelloDenyAll failed", e); - } - return; - } - - /* - * @testName: sayHelloProtectedUnauthorizedUser - * - * @assertion_ids: JAXWS:SPEC:4005; JAXWS:SPEC:7000; JAXWS:SPEC:7010; - * JAXWS:SPEC:7011; JavaEE:SPEC:10087; WS4EE:SPEC:9000 - * - * @test_Strategy: This will test that a user/password which is valid in the - * system but which is NOT a member of the Administrator role will/should - * yeild an access denied error when an attempt is made to access a method - * that has Administrator role access restriction. - */ - public void sayHelloProtectedUnauthorizedUser() throws Exception { - - try { - TestUtil.logMsg("Getting port from the Service : " + service); - Hello port = service.getHelloPort(); - - // we want to use a valid username/password that are recognized - // by the system but that do NOT exist in the Administrator - // role such that using these should yeild an access denied error - TestUtil.logMsg("Setting username and password in WS port"); - TestUtil.logMsg("username=" + unauthorizedUser + " password=" - + unauthorizedUserPassword); - - BindingProvider bindingProvider = (BindingProvider) port; - Map map = bindingProvider.getRequestContext(); - map.put(BindingProvider.USERNAME_PROPERTY, unauthorizedUser); - map.put(BindingProvider.PASSWORD_PROPERTY, unauthorizedUserPassword); - - TestUtil.logMsg( - "Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg( - "Invoking sayHelloProtected with unauthorized user on Hello port"); - TestUtil.logMsg("Invocation must not be allowed (throw exception)"); - String text = port.sayHelloProtected("Raja"); - TestUtil.logErr( - "Test sayHelloProtectedUnauthorizedUser did not throw expected exception"); - TestUtil.logMsg("Got Output : " + text); - throw new Exception("Test sayHelloProtectedUnauthorizedUser failed"); - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected WebServiceException"); - TestUtil.logMsg("Test sayHelloDenyAll Passed"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected Exception " + e.getMessage()); - throw new Exception("Test sayHelloDenyAll failed", e); - } - return; - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/Hello.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/Hello.java deleted file mode 100644 index cca816c9f0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/Hello.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - * @author Raja Perumal - */ - -package com.sun.ts.tests.webservices12.sec.annotations.ejb.basicauthssl; - -import jakarta.annotation.security.DeclareRoles; -import jakarta.annotation.security.RolesAllowed; -import jakarta.annotation.security.PermitAll; -import jakarta.annotation.security.DenyAll; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; -import jakarta.xml.ws.WebServiceContext; -import jakarta.annotation.Resource; - -@WebService -@Stateless - -@DeclareRoles({ "Administrator", "Manager" }) -public class Hello { - - @Resource - private WebServiceContext context; - - String username = null; - - boolean isUserInRoleAdministrator = false; - - @WebMethod - @RolesAllowed("Administrator") - public String sayHelloProtected(String param) { - - if (context.getUserPrincipal() != null) - username = context.getUserPrincipal().getName(); - isUserInRoleAdministrator = context.isUserInRole("Administrator"); - - return "Invoked as user :" + username + " : isUserInRoleAdministrator =" - + isUserInRoleAdministrator + " : Hello " + param; - } - - @WebMethod - @PermitAll - public String sayHelloPermitAll(String param) { - - if (context.getUserPrincipal() != null) - username = context.getUserPrincipal().getName(); - isUserInRoleAdministrator = context.isUserInRole("Administrator"); - - return "Invoked as user :" + username + " : isUserInRoleAdministrator =" - + isUserInRoleAdministrator + " : Hello " + param; - } - - @WebMethod - @DenyAll - public String sayHelloDenyAll(String param) { - - return "Hello " + param; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/HelloBasicAuthSSL.ear.sun-application.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/HelloBasicAuthSSL.ear.sun-application.xml deleted file mode 100644 index c0b30b59aa..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/HelloBasicAuthSSL.ear.sun-application.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - 0 - - Administrator - j2ee - - - Manager - javajoe - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/Hello_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/Hello_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 6bb8cb71a3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/Hello_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - 0 - - Hello - false - false - -1 - 0 - - - Hello - WSEjbBasicAuthSSL/HelloService/Hello - - BASIC - - CONFIDENTIAL - - http://basicauthssl.ejb.annotations.sec.webservices12.tests.ts.sun.com/ - HelloService - - true - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/build.xml deleted file mode 100644 index e20a45ee95..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/basicauthssl/build.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/build.xml deleted file mode 100644 index 27a7afe410..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/Client.java deleted file mode 100644 index 255556fb7f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/Client.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - * @author Raja Perumal - */ - -package com.sun.ts.tests.webservices12.sec.annotations.ejb.clientcert; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.lib.porting.TSURL; -import com.sun.javatest.Status; - -import com.sun.ts.tests.webservices12.sec.annotations.ejb.clientcert.HelloService; -import com.sun.ts.tests.webservices12.sec.annotations.ejb.clientcert.Hello; - -import jakarta.xml.ws.WebServiceRef; -import jakarta.xml.ws.BindingProvider; -import jakarta.xml.ws.WebServiceException; -import java.util.Properties; -import java.util.Map; -import javax.net.ssl.*; - -public class Client extends EETest { - @WebServiceRef - static HelloService service; - - private Hello port; - - private Properties props = null; - - private TSURL ctsurl = new TSURL(); - - private String hostname = "localhost"; - - private String PROTOCOL = "https"; - - private String urlString = null; - - private int portnum = 8000; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* - * @class.setup_props: webServerHost; securedWebServicePort; - */ - public void setup(String[] args, Properties p) throws Exception { - props = p; - try { - hostname = props.getProperty("webServerHost"); - portnum = Integer.parseInt(props.getProperty("securedWebServicePort")); - String tlsVersion = p.getProperty("client.cert.test.jdk.tls.client.protocols"); - if (tlsVersion != null) { - TestUtil.logMsg("client.cert.test.jdk.tls.client.protocols=" + tlsVersion); - System.setProperty("https.protocols", tlsVersion); - } - urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum, - "/WSEjbClientCert/HelloService/Hello"); - HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { - public boolean verify(String hostname, SSLSession session) { - return true; - } - }); - } catch (Exception e) { - throw new Exception("Setup failed:", e); - } - - TestUtil.logMsg("setup ok"); - } - - /* - * @testName: sayHelloProtected - * - * @assertion_ids: JAXWS:SPEC:4005; JAXWS:SPEC:7000; JAXWS:SPEC:7010; - * JAXWS:SPEC:7011; JavaEE:SPEC:10087; WS4EE:SPEC:9000 - * - * @test_Strategy: - */ - public void sayHelloProtected() throws Exception { - - try { - TestUtil.logMsg("Getting port from the Service : " + service); - Hello port = service.getHelloPort(); - - TestUtil.logMsg( - "Setting the target endpoint address on WS port: " + urlString); - BindingProvider bindingProvider = (BindingProvider) port; - Map map = bindingProvider.getRequestContext(); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("Invoking sayHelloProtected on Hello port"); - String text = port.sayHelloProtected("Raja"); - TestUtil.logMsg("Got Output : " + text); - TestUtil.logMsg("Test sayHelloProtected passed"); - } catch (Exception e) { - e.printStackTrace(); - throw new Exception("Test sayHelloProtected failed"); - } - return; - } - - /* - * @testName: sayHelloPermitAll - * - * @assertion_ids: JAXWS:SPEC:7010; JAXWS:SPEC:7011; JavaEE:SPEC:10087; - * WS4EE:SPEC:9000 - * - * @test_Strategy: - */ - public void sayHelloPermitAll() throws Exception { - - try { - TestUtil.logMsg("Getting port from the Service : " + service); - Hello port = service.getHelloPort(); - - TestUtil.logMsg( - "Setting the target endpoint address on WS port: " + urlString); - BindingProvider bindingProvider = (BindingProvider) port; - Map map = bindingProvider.getRequestContext(); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("Invoking sayHelloPermitAll on Hello port"); - String text = port.sayHelloPermitAll("Raja"); - TestUtil.logMsg("Got Output : " + text); - TestUtil.logMsg("Test sayHelloPermitAll passed"); - } catch (Exception e) { - e.printStackTrace(); - throw new Exception("Test sayHelloPermitAll failed"); - } - return; - } - - /* - * @testName: sayHelloDenyAll - * - * @assertion_ids: JAXWS:SPEC:6005; JAXWS:SPEC:7010; JAXWS:SPEC:7011; - * JavaEE:SPEC:10087; WS4EE:SPEC:9000 - * - * @test_Strategy: - */ - public void sayHelloDenyAll() throws Exception { - - try { - TestUtil.logMsg("Getting port from the Service : " + service); - Hello port = service.getHelloPort(); - - TestUtil.logMsg( - "Setting the target endpoint address on WS port: " + urlString); - BindingProvider bindingProvider = (BindingProvider) port; - Map map = bindingProvider.getRequestContext(); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("Invoking sayHelloDenyAll on Hello port"); - String text = port.sayHelloDenyAll("Raja"); - TestUtil.logErr( - "Test sayHelloDenyAll failed, didn't get the expected exception"); - TestUtil.logErr("Got Output : " + text); - throw new Exception("Test sayHelloDenyAll failed"); - } catch (WebServiceException e) { - TestUtil.logMsg("Got expected WebServiceException"); - TestUtil.logMsg("Test sayHelloDenyAll Passed"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected Exception " + e.getMessage()); - throw new Exception("Test sayHelloDenyAll failed", e); - } - return; - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/Hello.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/Hello.java deleted file mode 100644 index 5d2497af72..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/Hello.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - * @author Raja Perumal - */ - -package com.sun.ts.tests.webservices12.sec.annotations.ejb.clientcert; - -import jakarta.annotation.security.DeclareRoles; -import jakarta.annotation.security.RolesAllowed; -import jakarta.annotation.security.PermitAll; -import jakarta.annotation.security.DenyAll; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; -import jakarta.xml.ws.WebServiceContext; -import jakarta.annotation.Resource; - -@WebService -@Stateless - -@DeclareRoles({ "Administrator", "Manager" }) -public class Hello { - - @Resource - private WebServiceContext context; - - String certname = null; - - boolean isUserInRoleAdministrator = false; - - @WebMethod - @RolesAllowed("Administrator") - public String sayHelloProtected(String param) { - - if (context.getUserPrincipal() != null) - certname = context.getUserPrincipal().getName(); - isUserInRoleAdministrator = context.isUserInRole("Administrator"); - - return "Invoked with client certificate :" + certname - + " : isUserInRoleAdministrator =" + isUserInRoleAdministrator - + " : Hello " + param; - } - - @WebMethod - @PermitAll - public String sayHelloPermitAll(String param) { - - if (context.getUserPrincipal() != null) - certname = context.getUserPrincipal().getName(); - isUserInRoleAdministrator = context.isUserInRole("Administrator"); - - return "Invoked with client certificate :" + certname - + " : isUserInRoleAdministrator =" + isUserInRoleAdministrator - + " : Hello " + param; - } - - @WebMethod - @DenyAll - public String sayHelloDenyAll(String param) { - - return "Hello " + param; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/HelloClientCert.ear.sun-application.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/HelloClientCert.ear.sun-application.xml deleted file mode 100644 index 4e2333d7bd..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/HelloClientCert.ear.sun-application.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - 0 - - Administrator - CN=CTS,OU=Java Software,O=Sun Microsystems Inc.,L=Burlington,ST=MA,C=US - CN=CTS, OU=Java Software, O=Sun Microsystems Inc., L=Burlington, ST=MA, C=US - - - Manager - javajoe - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/Hello_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/Hello_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index d4e4b919a6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/Hello_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - 0 - - Hello - false - false - -1 - 0 - - - Hello - /WSEjbClientCert/HelloService/Hello - - CLIENT-CERT - - CONFIDENTIAL - - http://clientcert.ejb.annotations.sec.webservices12.tests.ts.sun.com/ - HelloService - - true - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/build.xml deleted file mode 100644 index a45e340342..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/annotations/ejb/clientcert/build.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/build.xml deleted file mode 100644 index 1f16862b4f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/build.xml deleted file mode 100644 index c14758710d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/Client.java deleted file mode 100644 index 04cb8fb4ad..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/Client.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; -import java.util.Iterator; -import jakarta.xml.ws.Service; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.BindingProvider; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.util.Properties; -import java.util.Map; -import javax.net.ssl.*; - -public class Client extends ServiceEETest { - Service basicNoIdService; - - HelloBasic basicNoIdPort; - - Service basicAuthorizedIdService; - - HelloBasic basicAuthorizedIdPort; - - Service basicUnauthorizedIdService; - - HelloBasic basicUnauthorizedIdPort; - - Service basicInvalidIdService; - - HelloBasic basicInvalidIdPort; - - InitialContext ctx; - - String vehicle = null; - - private TSURL ctsurl = new TSURL(); - - private String hostname = "localhost"; - - private String PROTOCOL = "https"; - - private String urlString = null; - - private int portnum = 8000; - - private void getPorts() throws Exception { - ctx = new InitialContext(); - - TestUtil.logMsg("JNDI lookup for basicNoIdService"); - basicNoIdService = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/wssecEjb/basicNoId"); - TestUtil.logMsg("Get basicNoIdPort"); - basicNoIdPort = (HelloBasic) basicNoIdService.getPort(HelloBasic.class); - TestUtil.logMsg("basicNoIdPort obtained"); - BindingProvider bindingProvider = (BindingProvider) basicNoIdPort; - Map map = bindingProvider.getRequestContext(); - TestUtil - .logMsg("Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("JNDI lookup for basicAuthorizedIdService"); - basicAuthorizedIdService = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/wssecEjb/basicAuthorizedId"); - TestUtil.logMsg("Get basicAuthorizedIdPort"); - basicAuthorizedIdPort = (HelloBasic) basicAuthorizedIdService - .getPort(HelloBasic.class); - TestUtil.logMsg("basicAuthorizedIdPort obtained"); - bindingProvider = (BindingProvider) basicAuthorizedIdPort; - map = bindingProvider.getRequestContext(); - TestUtil - .logMsg("Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("JNDI lookup for basicUnauthorizedIdService"); - basicUnauthorizedIdService = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/wssecEjb/basicUnauthorizedId"); - TestUtil.logMsg("Get basicUnauthorizedIdPort"); - basicUnauthorizedIdPort = (HelloBasic) basicUnauthorizedIdService - .getPort(HelloBasic.class); - TestUtil.logMsg("basicUnauthorizedIdPort obtained"); - bindingProvider = (BindingProvider) basicUnauthorizedIdPort; - map = bindingProvider.getRequestContext(); - TestUtil - .logMsg("Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("JNDI lookup for basicInvalidIdService"); - basicInvalidIdService = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/wssecEjb/basicInvalidId"); - TestUtil.logMsg("Get basicInvalidIdPort"); - basicInvalidIdPort = (HelloBasic) basicInvalidIdService - .getPort(HelloBasic.class); - TestUtil.logMsg("basicInvalidIdPort obtained"); - bindingProvider = (BindingProvider) basicInvalidIdPort; - map = bindingProvider.getRequestContext(); - TestUtil - .logMsg("Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; securedWebServicePort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - hostname = p.getProperty("webServerHost"); - portnum = Integer.parseInt(p.getProperty("securedWebServicePort")); - vehicle = p.getProperty("vehicle"); - urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum, - "/WSSecEjbHelloBasicSSL/ejb"); - HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { - public boolean verify(String hostname, SSLSession session) { - return true; - } - }); - getPorts(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Exception { - TestUtil.logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: secEjbBasicNoId - * - * @assertion_ids: WS4EE:SPEC:193; WS4EE:SPEC:196; WS4EE:SPEC:194; - * WS4EE:SPEC:195; WS4EE:SPEC:9000; WS4EE:SPEC:9001; - * - * @test_Strategy: Call protected EJB without any user id/password. Expect a - * WebServiceException. - */ - public void secEjbBasicNoId() throws Exception { - TestUtil.logMsg("SecEjbBasicNoId"); - try { - if (vehicle.equals("wsappclient")) { - TestUtil.logMsg("Skipping secEjbBasicNoId test for appclient vehicle"); - return; - } - String ret1 = basicNoIdPort.sayHelloBasic("secEjbBasicNoId"); - TestUtil - .logMsg("SecEjbBasicNoId failed: unexpected return value " + ret1); - throw new Exception("SecEjbBasicNoId failed"); - } catch (WebServiceException ex) { - TestUtil - .logMsg("SecEjbBasicNoId success: got expected WebServiceException"); - } catch (Throwable t) { - TestUtil - .logMsg("test SecEjbBasicNoId failed: got exception " + t.toString()); - throw new Exception("SecEjbBasicNoId failed"); - } - return; - } - - /* - * @testName: secEjbBasicUnauthorizedId - * - * @assertion_ids: WS4EE:SPEC:193; WS4EE:SPEC:196; WS4EE:SPEC:194; - * WS4EE:SPEC:195; WS4EE:SPEC:9000; WS4EE:SPEC:9001; - * - * @test_Strategy: Call protected EJB with a user id/password that's not - * authorized for the port. Expect a WebServiceException. - */ - public void secEjbBasicUnauthorizedId() throws Exception { - TestUtil.logMsg("SecEjbBasicUnauthorizedId"); - try { - String ret1 = basicUnauthorizedIdPort - .sayHelloBasic("secEjbBasicUnauthorizedId"); - TestUtil.logMsg( - "SecEjbBasicUnauthorizedId failed: unexpected return value " + ret1); - throw new Exception("SecEjbBasicUnauthorizedId failed"); - } catch (WebServiceException ex) { - TestUtil.logMsg( - "SecEjbBasicUnauthorizedId success: got expected WebServiceException"); - } catch (Throwable t) { - TestUtil.logMsg("test SecEjbBasicUnauthorizedId failed: got exception " - + t.toString()); - throw new Exception("SecEjbBasicUnauthorizedId failed"); - } - return; - } - - /* - * @testName: secEjbBasicInvalidId - * - * @assertion_ids: WS4EE:SPEC:193; WS4EE:SPEC:196; WS4EE:SPEC:194; - * WS4EE:SPEC:195; WS4EE:SPEC:9000; WS4EE:SPEC:9001; - * - * @test_Strategy: Call protected EJB with an invalid id/password. Expect a - * WebServiceException. - */ - public void secEjbBasicInvalidId() throws Exception { - TestUtil.logMsg("SecEjbBasicInvalidId"); - try { - if (vehicle.equals("wsappclient")) { - TestUtil.logMsg("Skipping secEjbBasicNoId test for appclient vehicle"); - return; - } - String ret1 = basicInvalidIdPort.sayHelloBasic("secEjbBasicInvalidId"); - TestUtil.logMsg( - "SecEjbBasicInvalidId failed: unexpected return value " + ret1); - throw new Exception("SecEjbBasicInvalidId failed"); - } catch (WebServiceException ex) { - TestUtil.logMsg("SecEjbBasicInvalidId success: got WebServiceException"); - } catch (Throwable t) { - TestUtil.logMsg( - "test SecEjbBasicInvalidId failed: got exception " + t.toString()); - throw new Exception("SecEjbBasicInvalidId failed"); - } - return; - } - - /* - * @testName: secEjbBasicAuthorizedId - * - * @assertion_ids: WS4EE:SPEC:193; WS4EE:SPEC:196; WS4EE:SPEC:194; - * WS4EE:SPEC:195; - * - * @test_Strategy: Call protected EJB with valid id/password. - */ - public void secEjbBasicAuthorizedId() throws Exception { - TestUtil.logMsg("SecEjbBasicAuthorizedId"); - try { - String ret1 = basicAuthorizedIdPort - .sayHelloBasic("secEjbBasicAuthorizedId"); - if (!ret1.equals("'secEjbBasicAuthorizedId' from HelloBasicBean!")) { - TestUtil - .logMsg("test secEjbBasicAuthorized failed: return value: " + ret1); - throw new Exception("SecEjbBasicAuthorized failed"); - } - TestUtil.logMsg("SecEjbBasicAuthorizedId passed"); - } catch (Throwable t) { - TestUtil.logMsg( - "test SecEjbBasicAuthorizedId failed: got exception " + t.toString()); - throw new Exception("SecEjbBasicAuthorizedId failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/HelloBasic.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/HelloBasic.wsdl deleted file mode 100644 index a685058c9f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/HelloBasic.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/HelloBasicBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/HelloBasicBean.java deleted file mode 100644 index 13cc290aa0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/HelloBasicBean.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL; - -import jakarta.jws.WebService; -import jakarta.ejb.Stateless; - -@WebService(portName = "HelloBasicPort", serviceName = "HelloBasicService", targetNamespace = "http://HelloBasic.org", wsdlLocation = "META-INF/wsdl/HelloBasic.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic") -@Stateless(name = "WSSecEjbHelloBasicSSL") - -public class HelloBasicBean { - - public String sayHelloBasic(String input) { - return "'" + input + "' from HelloBasicBean!"; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL.ear.sun-application.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL.ear.sun-application.xml deleted file mode 100644 index c9a05c7659..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL.ear.sun-application.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - 0 - - Manager - javajoe - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index e6e5094b1b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - Manager - javajoe - - - 0 - - WSSecEjbHelloBasicSSL - WSSecEjbHelloBasicSSL - false - false - -1 - - - HelloBasicBean - WSSecEjbHelloBasicSSL/ejb - - BASIC - - CONFIDENTIAL - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_ejb.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_ejb.xml deleted file mode 100644 index 34f4ad2ed0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_ejb.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - WSSecEjbHelloBasicSSL_ejb - - - WSSecEjbHelloBasicSSL - WSSecEjbHelloBasicSSL - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicBean - Stateless - Bean - - - - - - - - - Manager - - - Manager - - WSSecEjbHelloBasicSSL - sayHelloBasic - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_wsappclient_vehicle_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 669147cfe5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - service/wssecEjb/basicNoId - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - - - service/wssecEjb/basicAuthorizedId - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.password - javajoe - - - jakarta.xml.ws.security.auth.username - javajoe - - - - - service/wssecEjb/basicUnauthorizedId - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.username - j2ee - - - jakarta.xml.ws.security.auth.password - j2ee - - - - - service/wssecEjb/basicInvalidId - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.username - nobody - - - jakarta.xml.ws.security.auth.password - nopassword - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_wsejb_vehicle_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index f1ff3a691c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - WSSecEjbBasicSSL_wsejb_vehicle - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index f43915e174..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - WSSecEjbBasicSSL_wsejb_vehicle - - service/wssecEjb/basicNoId - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - - - service/wssecEjb/basicAuthorizedId - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.password - javajoe - - - jakarta.xml.ws.security.auth.username - javajoe - - - - - service/wssecEjb/basicUnauthorizedId - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.username - j2ee - - - jakarta.xml.ws.security.auth.password - j2ee - - - - - service/wssecEjb/basicInvalidId - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.password - nopassword - - - jakarta.xml.ws.security.auth.username - nobody - - - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_wsservlet_vehicle_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index 6fc69e86c4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/WSSecEjbBasicSSL_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - service/wssecEjb/basicNoId - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - - - service/wssecEjb/basicAuthorizedId - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.password - javajoe - - - jakarta.xml.ws.security.auth.username - javajoe - - - - - service/wssecEjb/basicUnauthorizedId - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.password - j2ee - - - jakarta.xml.ws.security.auth.username - j2ee - - - - - service/wssecEjb/basicInvalidId - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.username - nobody - - - jakarta.xml.ws.security.auth.password - nopassword - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/build.xml deleted file mode 100644 index 341649a563..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/build.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/customfile.xml deleted file mode 100644 index b766730552..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/jakartaEE.tokens deleted file mode 100644 index ef88936ef9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/basicSSL/jakartaEE.tokens +++ /dev/null @@ -1,5 +0,0 @@ -WSREFSAPPCLIENT=@WebServiceRefs({ @WebServiceRef(name="service/wssecEjb/basicNoId", type=com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl"), @WebServiceRef(name="service/wssecEjb/basicAuthorizedId", type=com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl"), @WebServiceRef(name="service/wssecEjb/basicUnauthorizedId", type=com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl"), @WebServiceRef(name="service/wssecEjb/basicInvalidId", type=com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl") }) - -WSREFSWEBCLIENT=@WebServiceRefs({ @WebServiceRef(name="service/wssecEjb/basicNoId", type=com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicService.class, wsdlLocation="WEB-INF/wsdl/HelloBasic.wsdl"), @WebServiceRef(name="service/wssecEjb/basicAuthorizedId", type=com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicService.class, wsdlLocation="WEB-INF/wsdl/HelloBasic.wsdl"), @WebServiceRef(name="service/wssecEjb/basicUnauthorizedId", type=com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicService.class, wsdlLocation="WEB-INF/wsdl/HelloBasic.wsdl"), @WebServiceRef(name="service/wssecEjb/basicInvalidId", type=com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicService.class, wsdlLocation="WEB-INF/wsdl/HelloBasic.wsdl") }) - -WSREFSEJBCLIENT=@WebServiceRefs({ @WebServiceRef(name="service/wssecEjb/basicNoId", type=com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl"), @WebServiceRef(name="service/wssecEjb/basicAuthorizedId", type=com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl"), @WebServiceRef(name="service/wssecEjb/basicUnauthorizedId", type=com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl"), @WebServiceRef(name="service/wssecEjb/basicInvalidId", type=com.sun.ts.tests.webservices12.sec.descriptors.ejb.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl") }) diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/build.xml deleted file mode 100644 index a8e883c815..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/Client.java deleted file mode 100644 index 424d289c18..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/Client.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.sec.descriptors.ejb.certificate; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; -import java.util.Iterator; -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import java.util.Properties; -import java.util.Map; -import javax.net.ssl.*; - -public class Client extends EETest { - HelloCertificate certificatePort; - - private TSURL ctsurl = new TSURL(); - - private String hostname = "localhost"; - - private String PROTOCOL = "https"; - - private String urlString = null; - - private int portnum = 8000; - - @WebServiceRef(name = "service/secEjb/wscertificate") - static HelloCertificateService service = null; - - private void getPort() throws Exception { - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from certificate Service"); - certificatePort = (HelloCertificate) service.getHelloCertificatePort(); - TestUtil.logMsg("port=" + certificatePort); - TestUtil.logMsg("certificate port obtained"); - BindingProvider bindingProvider = (BindingProvider) certificatePort; - Map map = bindingProvider.getRequestContext(); - TestUtil - .logMsg("Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; securedWebServicePort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - hostname = p.getProperty("webServerHost"); - portnum = Integer.parseInt(p.getProperty("securedWebServicePort")); - String tlsVersion = p.getProperty("client.cert.test.jdk.tls.client.protocols"); - if (tlsVersion != null) { - TestUtil.logMsg("client.cert.test.jdk.tls.client.protocols=" + tlsVersion); - System.setProperty("https.protocols", tlsVersion); - } - urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum, - "/WSSecEjbCertificate/ejb"); - HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { - public boolean verify(String hostname, SSLSession session) { - return true; - } - }); - getPort(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Exception { - TestUtil.logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: secEjbCertificate - * - * @assertion_ids: WS4EE:SPEC:193; WS4EE:SPEC:196; WS4EE:SPEC:194; - * WS4EE:SPEC:195; WS4EE:SPEC:9002; - * - * @test_Strategy: Call EJB with client certificate authentication - */ - public void secEjbCertificate() throws Exception { - TestUtil.logMsg("secEjbCertificate"); - try { - String ret1 = certificatePort.sayHelloCertificate("secEjbCertificate"); - if (!ret1.equals("'secEjbCertificate' from HelloCertificateImpl!")) { - TestUtil.logMsg("secEjbCertificate failed: return value: " + ret1); - throw new Exception("SecEjbCertificate failed"); - } - TestUtil.logMsg("secEjbCertificate passed"); - } catch (Throwable t) { - TestUtil - .logMsg("secEjbCertificate failed: got exception " + t.toString()); - throw new Exception("secEjbCertificate failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/HelloCertificate.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/HelloCertificate.wsdl deleted file mode 100644 index da09aa2baa..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/HelloCertificate.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/HelloCertificateBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/HelloCertificateBean.java deleted file mode 100644 index 822fbaa6c6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/HelloCertificateBean.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.sec.descriptors.ejb.certificate; - -import jakarta.jws.WebService; -import jakarta.ejb.Stateless; - -@WebService(portName = "HelloCertificatePort", serviceName = "HelloCertificateService", targetNamespace = "http://HelloCertificate.org", wsdlLocation = "META-INF/wsdl/HelloCertificate.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.sec.descriptors.ejb.certificate.HelloCertificate") -@Stateless(name = "WSSecEjbHelloCertificate") - -public class HelloCertificateBean { - - public String sayHelloCertificate(String input) { - return "'" + input + "' from HelloCertificateImpl!"; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/WSSecEjbCertificateClient_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/WSSecEjbCertificateClient_client.jar.sun-application-client.xml deleted file mode 100644 index 831009d3a5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/WSSecEjbCertificateClient_client.jar.sun-application-client.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - service/secEjb/wscertificate - - com.sun.ts.tests.webservices12.sec.descriptors.ejb.certificate.HelloCertificate - - http://HelloCertificate.org - HelloCertificatePort - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/WSSecEjbCertificate_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/WSSecEjbCertificate_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 2b380030f3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/WSSecEjbCertificate_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSSecEjbHelloCertificate - WSSecEjbHelloCertificate - false - false - -1 - - - HelloCertificateBean - WSSecEjbCertificate/ejb - - CLIENT-CERT - - CONFIDENTIAL - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/build.xml deleted file mode 100644 index c72ca41380..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/build.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/customfile.xml deleted file mode 100644 index 320346669a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/ejb/certificate/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/Client.java deleted file mode 100644 index 81f5159ab4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/Client.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; -import java.util.Iterator; -import jakarta.xml.ws.Service; -import jakarta.xml.ws.WebServiceException; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.util.Properties; -import jakarta.xml.ws.BindingProvider; -import java.util.Map; -import javax.net.ssl.*; - -public class Client extends ServiceEETest { - - Service basicNoIdService; - - HelloBasic basicNoIdPort; - - Service basicAuthorizedIdService; - - HelloBasic basicAuthorizedIdPort; - - Service basicUnauthorizedIdService; - - HelloBasic basicUnauthorizedIdPort; - - Service basicInvalidIdService; - - HelloBasic basicInvalidIdPort; - - InitialContext ctx; - - String vehicle = null; - - private TSURL ctsurl = new TSURL(); - - private String hostname = "localhost"; - - private String PROTOCOL = "https"; - - private String urlString = null; - - private int portnum = 8000; - - private static final String ENDPOINTURL = "/WSSecWarBasicSSL_web/jaxws/WSSecWarBasicSSL"; - - private void getPorts() throws Exception { - ctx = new InitialContext(); - - TestUtil.logMsg("JNDI lookup for basicNoIdService"); - basicNoIdService = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/wssecWar/basicNoId"); - TestUtil.logMsg("Get basicNoIdPort"); - basicNoIdPort = (HelloBasic) basicNoIdService.getPort(HelloBasic.class); - TestUtil.logMsg("basicNoIdPort obtained"); - BindingProvider bindingProvider = (BindingProvider) basicNoIdPort; - Map map = bindingProvider.getRequestContext(); - TestUtil - .logMsg("Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("JNDI lookup for basicAuthorizedIdService"); - basicAuthorizedIdService = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/wssecWar/basicAuthorizedId"); - TestUtil.logMsg("Get basicAuthorizedIdPort"); - basicAuthorizedIdPort = (HelloBasic) basicAuthorizedIdService - .getPort(HelloBasic.class); - TestUtil.logMsg("basicAuthorizedIdPort obtained"); - bindingProvider = (BindingProvider) basicAuthorizedIdPort; - map = bindingProvider.getRequestContext(); - TestUtil - .logMsg("Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("JNDI lookup for basicUnauthorizedIdService"); - basicUnauthorizedIdService = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/wssecWar/basicUnauthorizedId"); - TestUtil.logMsg("Get basicUnauthorizedIdPort"); - basicUnauthorizedIdPort = (HelloBasic) basicUnauthorizedIdService - .getPort(HelloBasic.class); - TestUtil.logMsg("basicUnauthorizedIdPort obtained"); - bindingProvider = (BindingProvider) basicUnauthorizedIdPort; - map = bindingProvider.getRequestContext(); - TestUtil - .logMsg("Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - TestUtil.logMsg("JNDI lookup for basicInvalidIdService"); - basicInvalidIdService = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/wssecWar/basicInvalidId"); - TestUtil.logMsg("Get basicInvalidIdPort"); - basicInvalidIdPort = (HelloBasic) basicInvalidIdService - .getPort(HelloBasic.class); - TestUtil.logMsg("basicInvalidIdPort obtained"); - bindingProvider = (BindingProvider) basicInvalidIdPort; - map = bindingProvider.getRequestContext(); - TestUtil - .logMsg("Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; securedWebServicePort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - hostname = p.getProperty("webServerHost"); - portnum = Integer.parseInt(p.getProperty("securedWebServicePort")); - vehicle = p.getProperty("vehicle"); - urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum, ENDPOINTURL); - HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { - public boolean verify(String hostname, SSLSession session) { - return true; - } - }); - getPorts(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Exception { - TestUtil.logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: secWarBasicNoId - * - * @assertion_ids: WS4EE:SPEC:193; WS4EE:SPEC:196; WS4EE:SPEC:194; - * WS4EE:SPEC:195; WS4EE:SPEC:9000; WS4EE:SPEC:9001; - * - * @test_Strategy: Call protected EJB without any user id/password. Expect a - * WebServiceException. - */ - public void secWarBasicNoId() throws Exception { - TestUtil.logMsg("SecWarBasicNoId"); - try { - if (vehicle.equals("wsappclient")) { - TestUtil.logMsg("Skipping secWarBasicNoId test for appclient vehicle"); - return; - } - String ret1 = basicNoIdPort.sayHelloBasic("secWarBasicNoId"); - TestUtil - .logMsg("SecWarBasicNoId failed: unexpected return value " + ret1); - throw new Exception("SecWarBasicNoId failed"); - } catch (WebServiceException ex) { - TestUtil - .logMsg("SecWarBasicNoId success: got expected WebServiceException"); - } catch (Throwable t) { - TestUtil - .logMsg("test SecWarBasicNoId failed: got exception " + t.toString()); - throw new Exception("SecWarBasicNoId failed"); - } - return; - } - - /* - * @testName: secWarBasicUnauthorizedId - * - * @assertion_ids: WS4EE:SPEC:193; WS4EE:SPEC:196; WS4EE:SPEC:194; - * WS4EE:SPEC:195; WS4EE:SPEC:9000; WS4EE:SPEC:9001; - * - * @test_Strategy: Call protected EJB with a user id/password that's not - * authorized for the port. Expect a WebServiceException. - */ - public void secWarBasicUnauthorizedId() throws Exception { - TestUtil.logMsg("SecWarBasicUnauthorizedId"); - try { - String ret1 = basicUnauthorizedIdPort - .sayHelloBasic("secWarBasicUnauthorizedId"); - TestUtil.logMsg( - "SecWarBasicUnauthorizedId failed: unexpected return value " + ret1); - throw new Exception("SecWarBasicUnauthorizedId failed"); - } catch (WebServiceException ex) { - TestUtil.logMsg( - "SecWarBasicUnauthorizedId success: got expected WebServiceException"); - } catch (Throwable t) { - TestUtil.logMsg("test SecWarBasicUnauthorizedId failed: got exception " - + t.toString()); - throw new Exception("SecWarBasicUnauthorizedId failed"); - } - return; - } - - /* - * @testName: secWarBasicInvalidId - * - * @assertion_ids: WS4EE:SPEC:193; WS4EE:SPEC:196; WS4EE:SPEC:194; - * WS4EE:SPEC:195; WS4EE:SPEC:9000; WS4EE:SPEC:9001; - * - * @test_Strategy: Call protected EJB with an invalid id/password. Expect a - * WebServiceException. - */ - public void secWarBasicInvalidId() throws Exception { - TestUtil.logMsg("SecWarBasicInvalidId"); - try { - if (vehicle.equals("wsappclient")) { - TestUtil - .logMsg("Skipping secWarBasicInvalidId test for appclient vehicle"); - return; - } - String ret1 = basicInvalidIdPort.sayHelloBasic("secWarBasicInvalidId"); - TestUtil.logMsg( - "SecWarBasicInvalidId failed: unexpected return value " + ret1); - throw new Exception("SecWarBasicInvalidId failed"); - } catch (WebServiceException ex) { - TestUtil.logMsg("SecWarBasicInvalidId success: got WebServiceException"); - } catch (Throwable t) { - TestUtil.logMsg( - "test SecWarBasicInvalidId failed: got exception " + t.toString()); - throw new Exception("SecWarBasicInvalidId failed"); - } - return; - } - - /* - * @testName: secWarBasicAuthorizedId - * - * @assertion_ids: WS4EE:SPEC:193; WS4EE:SPEC:196; WS4EE:SPEC:194; - * WS4EE:SPEC:195; - * - * @test_Strategy: Call protected EJB with valid id/password. - */ - public void secWarBasicAuthorizedId() throws Exception { - TestUtil.logMsg("SecWarBasicAuthorizedId"); - try { - String ret1 = basicAuthorizedIdPort - .sayHelloBasic("secWarBasicAuthorizedId"); - if (!ret1.equals("'secWarBasicAuthorizedId' from HelloBasicImpl!")) { - TestUtil - .logMsg("test secWarBasicAuthorized failed: return value: " + ret1); - throw new Exception("SecWarBasicAuthorized failed"); - } - TestUtil.logMsg("SecWarBasicAuthorizedId passed"); - } catch (Throwable t) { - TestUtil.logMsg( - "test SecWarBasicAuthorizedId failed: got exception " + t.toString()); - throw new Exception("SecWarBasicAuthorizedId failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/HelloBasic.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/HelloBasic.wsdl deleted file mode 100644 index 32ae12397c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/HelloBasic.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/HelloBasicImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/HelloBasicImpl.java deleted file mode 100644 index 5c81f378aa..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/HelloBasicImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL; - -import jakarta.jws.WebService; - -@WebService(portName = "HelloBasicPort", serviceName = "HelloBasicService", targetNamespace = "http://HelloBasic.org", wsdlLocation = "WEB-INF/wsdl/HelloBasic.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic") - -public class HelloBasicImpl implements HelloBasic { - - public String sayHelloBasic(String input) { - return "'" + input + "' from HelloBasicImpl!"; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL.ear.sun-application.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL.ear.sun-application.xml deleted file mode 100644 index 2bf82b8c4c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL.ear.sun-application.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - WSSecWarBasicSSL_web.war - WSSecWarBasicSSL_web - - 0 - - Manager - javajoe - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL_wsappclient_vehicle_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index d73fff169c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - service/wssecWar/basicNoId - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - - - service/wssecWar/basicAuthorizedId - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.password - javajoe - - - jakarta.xml.ws.security.auth.username - javajoe - - - - - service/wssecWar/basicUnauthorizedId - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.username - j2ee - - - jakarta.xml.ws.security.auth.password - j2ee - - - - - service/wssecWar/basicInvalidId - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.username - nobody - - - jakarta.xml.ws.security.auth.password - nopassword - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL_wsejb_vehicle_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 003a8d87f6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - WSSecWarBasicSSL_wsejb_vehicle - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index d0897b7241..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - WSSecWarBasicSSL_wsejb_vehicle - - service/wssecWar/basicNoId - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - - - service/wssecWar/basicAuthorizedId - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.password - javajoe - - - jakarta.xml.ws.security.auth.username - javajoe - - - - - service/wssecWar/basicUnauthorizedId - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.username - j2ee - - - jakarta.xml.ws.security.auth.password - j2ee - - - - - service/wssecWar/basicInvalidId - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.password - nopassword - - - jakarta.xml.ws.security.auth.username - nobody - - - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL_wsservlet_vehicle_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index 418d3dba10..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/WSSecWarBasicSSL_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - service/wssecWar/basicNoId - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - - - service/wssecWar/basicAuthorizedId - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.password - javajoe - - - jakarta.xml.ws.security.auth.username - javajoe - - - - - service/wssecWar/basicUnauthorizedId - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.password - j2ee - - - jakarta.xml.ws.security.auth.username - j2ee - - - - - service/wssecWar/basicInvalidId - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasic - - http://HelloBasic.org - HelloBasicPort - - - jakarta.xml.ws.security.auth.username - nobody - - - jakarta.xml.ws.security.auth.password - nopassword - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/build.xml deleted file mode 100644 index 9e6c6065a4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/build.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/customfile.xml deleted file mode 100644 index df2033c3a5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/jakartaEE.tokens deleted file mode 100644 index c7323f1a1e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/jakartaEE.tokens +++ /dev/null @@ -1,5 +0,0 @@ -WSREFSAPPCLIENT=@WebServiceRefs({ @WebServiceRef(name="service/wssecWar/basicNoId", type=com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl"), @WebServiceRef(name="service/wssecWar/basicAuthorizedId", type=com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl"),@WebServiceRef(name="service/wssecWar/basicUnauthorizedId", type=com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl"),@WebServiceRef(name="service/wssecWar/basicInvalidId", type=com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl") }) - -WSREFSWEBCLIENT=@WebServiceRefs({ @WebServiceRef(name="service/wssecWar/basicNoId", type=com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicService.class, wsdlLocation="WEB-INF/wsdl/HelloBasic.wsdl"), @WebServiceRef(name="service/wssecWar/basicAuthorizedId", type=com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicService.class, wsdlLocation="WEB-INF/wsdl/HelloBasic.wsdl"),@WebServiceRef(name="service/wssecWar/basicUnauthorizedId", type=com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicService.class, wsdlLocation="WEB-INF/wsdl/HelloBasic.wsdl"),@WebServiceRef(name="service/wssecWar/basicInvalidId", type=com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicService.class, wsdlLocation="WEB-INF/wsdl/HelloBasic.wsdl") }) - -WSREFSEJBCLIENT=@WebServiceRefs({ @WebServiceRef(name="service/wssecWar/basicNoId", type=com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl"), @WebServiceRef(name="service/wssecWar/basicAuthorizedId", type=com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl"),@WebServiceRef(name="service/wssecWar/basicUnauthorizedId", type=com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl"),@WebServiceRef(name="service/wssecWar/basicInvalidId", type=com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicService.class, wsdlLocation="META-INF/wsdl/HelloBasic.wsdl") }) diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/jakartaEE.web.xml deleted file mode 100644 index 29fead535d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/basicSSL/jakartaEE.web.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - WSSecWarBasicSSL - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicImpl - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicImpl - 0 - - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.basicSSL.HelloBasicImpl - /jaxws/WSSecWarBasicSSL - - - 54 - - - - HelloBasicRes - /jaxws/WSSecWarBasicSSL - GET - POST - - - Manager - - - CONFIDENTIAL - - - - BASIC - default - - - Manager - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/build.xml deleted file mode 100644 index 1e98c399a9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/Client.java deleted file mode 100644 index bccc343f7e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/Client.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.sec.descriptors.servlet.certificate; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; -import java.util.Iterator; -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import java.util.Properties; -import java.util.Map; -import javax.net.ssl.*; - -public class Client extends EETest { - HelloCertificate certificatePort; - - private TSURL ctsurl = new TSURL(); - - private String hostname = "localhost"; - - private String PROTOCOL = "https"; - - private String urlString = null; - - private int portnum = 8000; - - private static final String ENDPOINTURL = "/WSSecWarCertificate_web/ws4ee/SecWarCertificate"; - - @WebServiceRef(name = "service/secWar/wscertificate") - static HelloCertificateService service = null; - - private void getPort() throws Exception { - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from certificate Service"); - certificatePort = (HelloCertificate) service.getHelloCertificatePort(); - TestUtil.logMsg("port=" + certificatePort); - TestUtil.logMsg("certificate port obtained"); - BindingProvider bindingProvider = (BindingProvider) certificatePort; - Map map = bindingProvider.getRequestContext(); - TestUtil - .logMsg("Setting the target endpoint address on WS port: " + urlString); - map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; securedWebServicePort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - hostname = p.getProperty("webServerHost"); - portnum = Integer.parseInt(p.getProperty("securedWebServicePort")); - urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum, ENDPOINTURL); - HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { - public boolean verify(String hostname, SSLSession session) { - return true; - } - }); - getPort(); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Exception { - TestUtil.logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: secWarCertificate - * - * @assertion_ids: WS4EE:SPEC:193; WS4EE:SPEC:196; WS4EE:SPEC:194; - * WS4EE:SPEC:195; WS4EE:SPEC:9002; - * - * @test_Strategy: Call EJB with client certificate authentication - */ - public void secWarCertificate() throws Exception { - TestUtil.logMsg("secWarCertificate"); - try { - String ret1 = certificatePort.sayHelloCertificate("secWarCertificate"); - if (!ret1.equals("'secWarCertificate' from HelloCertificateImpl!")) { - TestUtil.logMsg("secWarCertificate failed: return value: " + ret1); - throw new Exception("SecWarCertificate failed"); - } - TestUtil.logMsg("secWarCertificate passed"); - } catch (Throwable t) { - TestUtil - .logMsg("secWarCertificate failed: got exception " + t.toString()); - throw new Exception("secWarCertificate failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/HelloCertificate.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/HelloCertificate.wsdl deleted file mode 100644 index 4943660a30..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/HelloCertificate.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/HelloCertificateImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/HelloCertificateImpl.java deleted file mode 100644 index 429e4f4e39..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/HelloCertificateImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.sec.descriptors.servlet.certificate; - -import jakarta.jws.WebService; - -@WebService(portName = "HelloCertificatePort", serviceName = "HelloCertificateService", targetNamespace = "http://HelloCertificate.org", wsdlLocation = "WEB-INF/wsdl/HelloCertificate.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.sec.descriptors.servlet.certificate.HelloCertificate") -public class HelloCertificateImpl implements HelloCertificate { - - public String sayHelloCertificate(String input) { - return "'" + input + "' from HelloCertificateImpl!"; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/WSSecWarCertificateClient_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/WSSecWarCertificateClient_client.jar.sun-application-client.xml deleted file mode 100644 index 66c004e7b9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/WSSecWarCertificateClient_client.jar.sun-application-client.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - service/secWar/wscertificate - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.certificate.HelloCertificate - - http://HelloCertificate.org - HelloCertificatePort - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/build.xml deleted file mode 100644 index 3121a99290..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/build.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/customfile.xml deleted file mode 100644 index 801d622953..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/web.xml deleted file mode 100644 index f10d58a23c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/sec/descriptors/servlet/certificate/web.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - WSSecWarCertificate - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.certificate.HelloCertificateImpl - com.sun.ts.tests.webservices12.sec.descriptors.servlet.certificate.HelloCertificateImpl - 0 - - - com.sun.ts.tests.webservices12.sec.descriptors.servlet.certificate.HelloCertificateImpl - /ws4ee/SecWarCertificate - - - 54 - - - - HelloBasicRes - /ws4ee/SecWarCertificate - POST - - - CONFIDENTIAL - - - - CLIENT-CERT - certificate - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/build.xml deleted file mode 100644 index 390fdc1805..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/Client.java deleted file mode 100644 index cdfc7be4c5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/Client.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - $Id$ - */ -package com.sun.ts.tests.webservices12.servlet.HandlerTest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.rmi.*; - -import jakarta.xml.ws.*; -import java.util.Properties; -import com.sun.ts.tests.jaxws.common.*; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - Hello port = null; - - HandlerTestService service = null; - - // Get Port and Stub access via porting layer interface - - private void getPortJavaEE() throws Exception { - port = (Hello) service.getHelloPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (HandlerTestService) getSharedObject(); - getPortJavaEE(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Exception("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: transformBodyTest - * - * @assertion_ids: WS4EE:SPEC:6007 - * - * @test_Strategy: Use a handler to transform a SOAPBody. - */ - public void transformBodyTest() throws Exception { - TestUtil.logMsg("transformBodyTest"); - boolean pass = true; - boolean fault = false; - String expected1 = "transformBodyTest"; - String expected2 = "InboundClientLogicalHandler"; - String expected3 = "OutboundServerLogicalHandler"; - String expected4 = "InboundServerLogicalHandler"; - String expected5 = "OutboundClientLogicalHandler"; - String expected6 = "OutboundClientSOAPHandler"; - String expected7 = "InboundServerSOAPHandler"; - String expected8 = "OutboundServerSOAPHandler"; - String expected9 = "InboundClientSOAPHandler"; - - try { - String result = port.hello("transformBodyTest"); - TestUtil.logMsg("Return value = " + result); - if (result.indexOf(expected1) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected1 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected2) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected2 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected3) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected3 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected4) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected4 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected5) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected5 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected6) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected6 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected7) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected7 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected8) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected8 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - if (result.indexOf(expected9) == -1) { - pass = false; - TestUtil.logErr("The value:" + expected9 + " was not found "); - TestUtil.logErr("in the result:" + result); - } - } catch (Throwable t) { - t.printStackTrace(); - throw new Exception(t.toString()); - } - - if (!pass) - throw new Exception("transformBodyTest failed"); - } - - /* - * @testName: transformHeaderTest - * - * @assertion_ids: WS4EE:SPEC:6006 - * - * @test_Strategy: Use a handler to transform a SOAPHeader. - */ - public void transformHeaderTest() throws Exception { - TestUtil.logMsg("transformHeaderTest"); - boolean pass = true; - HeaderType ht = null; - String expected = "theTransformHeaderOutboundClientSOAPHandlerInboundServerSOAPHandlerOutboundServerSOAPHandlerInboundClientSOAPHandler"; - try { - ht = new HeaderType(); - ht.setMyheader("theTransformHeader"); - Holder hht = new Holder(); - hht.value = ht; - - port.hello2("transformHeaderTest", hht); - - String result = hht.value.getMyheader(); - - TestUtil.logMsg("Return value = " + result); - if (!result.equals(expected)) { - pass = false; - TestUtil.logErr("Expected =" + expected); - TestUtil.logErr("Actual=" + result); - } - } catch (Throwable t) { - t.printStackTrace(); - throw new Exception(t.toString()); - } - - if (!pass) - throw new Exception("transformHeaderTest failed"); - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/LogicalHandler.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/LogicalHandler.java deleted file mode 100644 index c34812f8ce..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/LogicalHandler.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.HandlerTest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.*; -import jakarta.xml.ws.handler.*; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Constants; -import java.io.StringReader; -import javax.xml.transform.stream.StreamSource; - -public class LogicalHandler - implements jakarta.xml.ws.handler.LogicalHandler { - - private static final String HANDLER_NAME = "ClientLogicalHandler"; - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "transformBodyTest")) { - transformBodyTest(context, direction); - } else { - System.out.println( - "didn't find a transformBodyTest message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void transformBodyTest(LogicalMessageContext context, - String direction) { - System.out.println("in " + HANDLER_NAME + ":transformBodyTest"); - Handler_Util.dumpMsg(context); - String tmp = Handler_Util.getMessageAsString(context); - String newTmp = tmp.replaceAll("transformBodyTest", - "transformBodyTest" + direction + HANDLER_NAME); - context.getMessage().setPayload(new StreamSource(new StringReader(newTmp))); - Handler_Util.dumpMsg(context); - System.out.println("exiting " + HANDLER_NAME + ":transformBodyTest"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/SOAPHandler.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/SOAPHandler.java deleted file mode 100644 index 7f79c01522..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/SOAPHandler.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.HandlerTest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.*; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Iterator; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Constants; - -public class SOAPHandler - implements jakarta.xml.ws.handler.soap.SOAPHandler { - - private static final String HANDLER_NAME = "ClientSOAPHandler"; - - public Set getHeaders() { - return new HashSet(); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "transformBodyTest")) { - transformBodyTest(context, direction); - } else if (Handler_Util.checkForMsg(this, context, "transformHeaderTest")) { - transformHeaderTest(context, direction); - } else { - System.out - .println("didn't find any particular message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void transformBodyTest(MessageContext context, String direction) { - System.out.println("in " + HANDLER_NAME + ":transformBodyTest"); - try { - System.out.println("direction=" + direction); - Handler_Util.dumpMsg(context); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); - SOAPBody body = env.getBody(); - Iterator it = body.getChildElements(); - while (it.hasNext()) { - SOAPElement elem = (SOAPElement) it.next(); - Iterator it2 = ((SOAPElement) elem).getChildElements(); - while (it2.hasNext()) { - SOAPElement elem2 = (SOAPElement) it2.next(); - String value = elem2.getValue(); - if (value.indexOf("transformBodyTest") >= 0) { - value = value + direction + HANDLER_NAME; - elem2.setValue(value); - } - } - } - msg.saveChanges(); - Handler_Util.dumpMsg(context); - } catch (Exception e) { - TestUtil.printStackTrace(e); - e.printStackTrace(); - } - System.out.println("exiting " + HANDLER_NAME + ":doHandlerTest3"); - } - - public void transformHeaderTest(MessageContext context, String direction) { - System.out.println("in " + HANDLER_NAME + ":transformHeaderTest"); - try { - System.out.println("direction=" + direction); - System.out.println("transformHeaderTest:BEFORE"); - Handler_Util.dumpMsg(context); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); - if (env.getHeader() == null) { - System.out.println("ERROR: NO HEADER EXISTS"); - } else { - System.out.println("Changing the existing soap header"); - SOAPHeader sh = env.getHeader(); - Iterator it = sh.examineAllHeaderElements(); - while (it.hasNext()) { - SOAPElement elem = (SOAPElement) it.next(); - Iterator it2 = ((SOAPElement) elem).getChildElements(); - while (it2.hasNext()) { - SOAPElement elem2 = (SOAPElement) it2.next(); - String value = elem2.getValue(); - if (value.indexOf("theTransformHeader") >= 0) { - value = value + direction + HANDLER_NAME; - elem2.setValue(value); - } - } - } - } - msg.saveChanges(); - System.out.println("transformHeaderTest:AFTER"); - Handler_Util.dumpMsg(context); - } catch (Exception e) { - TestUtil.printStackTrace(e); - e.printStackTrace(); - } - System.out.println("exiting " + HANDLER_NAME + ":doHandlerTest3"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/build.xml deleted file mode 100644 index 1fce309a42..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/customfile.xml deleted file mode 100644 index 466fb18e86..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/customfile.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/customfile2.xml deleted file mode 100644 index 815024db9b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/handler.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/handler.xml deleted file mode 100644 index 2ab5c9a715..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/handler.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - SOAPHandler - com.sun.ts.tests.webservices12.servlet.HandlerTest.client.SOAPHandler - - - LogicalHandler - com.sun.ts.tests.webservices12.servlet.HandlerTest.client.LogicalHandler - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/jakartaEE.tokens deleted file mode 100644 index 7c8ef1603e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/client/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wshandlertest") -HANDLERCHAIN=@HandlerChain(name="", file="handler.xml") -SERVICE=com.sun.ts.tests.webservices12.servlet.HandlerTest.client.HandlerTestService -SEI=com.sun.ts.tests.webservices12.servlet.HandlerTest.client.Hello -NAMESPACEURI=http://handlertestservice.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -SERVLETNAME=HelloPort -WEBSERVICEDESCRIPTION=HandlerTestService -SERVICEREFNAMEWSSERVLET=service/wshandlertest -SERVICEREFNAMEWSEJB=service/wshandlertest -SERVICEREFNAMEWSAPPCLIENT=service/wshandlertest diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/HandlerTestDefs.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/HandlerTestDefs.xsd deleted file mode 100644 index ecae616641..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/HandlerTestDefs.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/HandlerTestService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/HandlerTestService.wsdl deleted file mode 100644 index a506e25af6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/HandlerTestService.wsdl +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/HelloImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/HelloImpl.java deleted file mode 100644 index da824a7e30..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/HelloImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.servlet.HandlerTest.server; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.Holder; - -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "HandlerTestService", targetNamespace = "http://handlertestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/HandlerTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.servlet.HandlerTest.server.Hello") - -public class HelloImpl implements Hello { - - public String hello(String s) { - return s; - } - - public String hello2(String s, Holder theHeader) { - return s; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/LogicalHandler.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/LogicalHandler.java deleted file mode 100644 index c64261a079..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/LogicalHandler.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.HandlerTest.server; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.*; -import jakarta.xml.ws.handler.*; -import javax.xml.namespace.QName; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Constants; - -import java.io.StringReader; -import javax.xml.transform.stream.StreamSource; - -public class LogicalHandler - implements jakarta.xml.ws.handler.LogicalHandler { - private final String HANDLER_NAME = "ServerLogicalHandler"; - - public boolean handleMessage(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "transformBodyTest")) { - transformBodyTest(context, direction); - } else { - System.out.println( - "didn't find transformBodyTest message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void transformBodyTest(LogicalMessageContext context, - String direction) { - System.out.println("in " + HANDLER_NAME + ":transformBodyTest"); - - Handler_Util.dumpMsg(context); - - String tmp = Handler_Util.getMessageAsString(context); - String newTmp = tmp.replaceAll("transformBodyTest", - "transformBodyTest" + direction + HANDLER_NAME); - context.getMessage().setPayload(new StreamSource(new StringReader(newTmp))); - Handler_Util.dumpMsg(context); - - System.out.println("exiting " + HANDLER_NAME + ":transformBodyTest"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(LogicalMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/SOAPHandler.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/SOAPHandler.java deleted file mode 100644 index 4709748fbd..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/SOAPHandler.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.HandlerTest.server; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import jakarta.xml.soap.*; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.*; -import jakarta.xml.ws.handler.*; -import jakarta.xml.ws.handler.soap.*; -import javax.xml.namespace.QName; - -import java.util.HashSet; -import java.util.Set; -import java.util.Iterator; - -import com.sun.ts.tests.jaxws.common.Handler_Util; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Constants; - -public class SOAPHandler - implements jakarta.xml.ws.handler.soap.SOAPHandler { - - private final String HANDLER_NAME = "ServerSOAPHandler"; - - public Set getHeaders() { - return new HashSet(); - } - - public boolean handleMessage(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleMessage"); - - String direction = Handler_Util.getDirection(context); - if (Handler_Util.checkForMsg(this, context, "transformBodyTest")) { - transformBodyTest(context, direction); - } else if (Handler_Util.checkForMsg(this, context, "transformHeaderTest")) { - transformHeaderTest(context, direction); - } else { - System.out.println( - "didn't find transformBodyTest message, handler will ignore"); - } - System.out.println("exiting " + HANDLER_NAME + ":handleMessage"); - return true; - } - - public void transformBodyTest(MessageContext context, String direction) { - System.out.println("in " + HANDLER_NAME + ":transformBodyTest"); - try { - System.out.println("direction=" + direction); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); - SOAPBody body = env.getBody(); - Iterator it = body.getChildElements(); - while (it.hasNext()) { - SOAPElement elem = (SOAPElement) it.next(); - Name elemName = elem.getElementName(); - Iterator it2 = ((SOAPElement) elem).getChildElements(); - while (it2.hasNext()) { - SOAPElement elem2 = (SOAPElement) it2.next(); - String value = elem2.getValue(); - if (value.indexOf("transformBodyTest") >= 0) { - value = value + direction + HANDLER_NAME; - elem2.setValue(value); - } - } - } - msg.saveChanges(); - Handler_Util.dumpMsg(context); - } catch (Exception e) { - TestUtil.printStackTrace(e); - e.printStackTrace(); - } - System.out.println("exiting " + HANDLER_NAME + ":transformBodyTest"); - } - - public void transformHeaderTest(MessageContext context, String direction) { - System.out.println("in " + HANDLER_NAME + ":transformHeaderTest"); - try { - System.out.println("direction=" + direction); - System.out.println("transformHeaderTest:BEFORE"); - Handler_Util.dumpMsg(context); - SOAPMessage msg = ((SOAPMessageContext) context).getMessage(); - SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); - if (env.getHeader() == null) { - System.out.println("ERROR: NO HEADER EXISTS"); - } else { - System.out.println("Changing the existing soap header"); - SOAPHeader sh = env.getHeader(); - Iterator it = sh.examineAllHeaderElements(); - while (it.hasNext()) { - SOAPElement elem = (SOAPElement) it.next(); - Iterator it2 = ((SOAPElement) elem).getChildElements(); - while (it2.hasNext()) { - SOAPElement elem2 = (SOAPElement) it2.next(); - String value = elem2.getValue(); - if (value.indexOf("theTransformHeader") >= 0) { - value = value + direction + HANDLER_NAME; - elem2.setValue(value); - } - } - } - } - msg.saveChanges(); - Handler_Util.dumpMsg(context); - } catch (Exception e) { - TestUtil.printStackTrace(e); - e.printStackTrace(); - } - System.out.println("exiting " + HANDLER_NAME + ":doHandlerTest3"); - } - - public void close(MessageContext context) { - System.out.println("in " + HANDLER_NAME + ":close"); - } - - public boolean handleFault(SOAPMessageContext context) { - System.out.println("in " + HANDLER_NAME + ":handleFault"); - return true; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/build.xml deleted file mode 100644 index 1be4931bd5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/build.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/customfile.xml deleted file mode 100644 index 1e670bfdb3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/customfile.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - SOAPHandler - com.sun.ts.tests.webservices12.servlet.HandlerTest.server.SOAPHandler - - - LogicalHandler - com.sun.ts.tests.webservices12.servlet.HandlerTest.server.LogicalHandler - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/customfile2.xml deleted file mode 100644 index fc66844394..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/handler.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/handler.xml deleted file mode 100644 index 32c3205dd8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/handler.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - SOAPHandler - com.sun.ts.tests.webservices12.servlet.HandlerTest.server.SOAPHandler - - - LogicalHandler - com.sun.ts.tests.webservices12.servlet.HandlerTest.server.LogicalHandler - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/jakartaEE.tokens deleted file mode 100644 index c6ac60a34d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/jakartaEE.tokens +++ /dev/null @@ -1,9 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wshandlertest") -SERVICE=com.sun.ts.tests.webservices12.servlet.HandlerTest.server.HandlerTestService -SEI=com.sun.ts.tests.webservices12.servlet.HandlerTest.server.Hello -IMPL=com.sun.ts.tests.webservices12.servlet.HandlerTest.server.HelloImpl -NAMESPACEURI=http://handlertestservice.org/wsdl -PORT=HelloPort -URLALIAS=/jaxws/Hello -SERVLETNAME=com.sun.ts.tests.webservices12.servlet.HandlerTest.server.HelloImpl -WEBSERVICEDESCRIPTION=HandlerTestService diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/soap-env.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/soap-env.xsd deleted file mode 100644 index 311e3349a1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/HandlerTest/server/soap-env.xsd +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/CheckHttpHeadersFilter.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/CheckHttpHeadersFilter.java deleted file mode 100644 index 67c9c59a79..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/CheckHttpHeadersFilter.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest; - -import java.io.*; -import java.util.*; -import java.text.MessageFormat; - -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.servlet.Filter; -import jakarta.servlet.FilterChain; -import jakarta.servlet.FilterConfig; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.ServletResponse; -import jakarta.xml.soap.*; - -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; - -public final class CheckHttpHeadersFilter implements Filter, SOAPRequests { - - // The filter configuration object we are associated with. If this value - // is null, this filter instance is not currently configured. - private FilterConfig filterConfig = null; - - private boolean testValidCase = false; - - private boolean testInvalidCase = false; - - // remove the filter configuration object for this filter. - public void destroy() { - } - - // initialize the filter configuration object for this filter. - - public void init(FilterConfig filterConfig) { - this.filterConfig = filterConfig; - } - - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) throws ServletException, IOException { - String result = "null"; - String input = null; - String soapMsgAsString = null; - String xml = null; - System.out.println("Here in CheckHttpHeadersFilter.doFilter()\n"); - dumpHeaders((HttpServletRequest) request); - byte buffer[] = new byte[65536]; - int count = 0; - int tmpcount = 0; - if (request.getInputStream().markSupported()) - request.getInputStream().mark(8192); - while (tmpcount != -1) { - tmpcount = request.getInputStream().read(buffer, count, 8192); - if (tmpcount != -1) - count += tmpcount; - } - ByteArrayInputStream bais = new ByteArrayInputStream(buffer, 0, count); - input = new String(buffer); - if (filterConfig == null) { - result = "EXCEPTION"; - xml = MessageFormat.format(MTOM_RESPONSE_DOCLIT, result); - } else { - if (input.indexOf("MTOMIn2") < 0) { - System.out - .println("HTTP request does not contain expected JAXWS request"); - System.out - .println("Call next filter in chain which is the endpoint itself"); - if (request.getInputStream().markSupported()) - request.getInputStream().reset(); - chain.doFilter(request, response); - return; - } - int index = input.indexOf("=_Part_"); - String partialInput = input; - if (index >= 0) { - index = input.indexOf("=_Part_", index + 1); - partialInput = input.substring(0, index); - } - System.out.println("DEBUG: HTTP Request stream count=" + count); - try { - MimeHeaders headers = getHeaders((HttpServletRequest) request); - SOAPMessage soapMsg = MessageFactory.newInstance() - .createMessage(headers, bais); - soapMsgAsString = returnSOAPMessageAsStringWOA(soapMsg); - System.out.println( - "DEBUG: HTTP Request stream soap message=" + soapMsgAsString); - } catch (Exception e) { - System.out - .println("DEBUG: HTTP Request stream partialinput=" + partialInput); - } - testValidCase = false; - testInvalidCase = false; - if (input.indexOf("Check-Content-Transfer-Encoding") >= 0) { - if (input.indexOf("TestValidCase") >= 0) - testValidCase = true; - else if (input.indexOf("TestInvalidCase") >= 0) - testInvalidCase = true; - try { - result = verifyContentTransferEncodingHeader( - (HttpServletRequest) request, bais); - } catch (Exception e) { - System.out.println("Caught exception: " + e.getMessage()); - e.printStackTrace(); - result = "Exception"; - } - } else - result = verifyContentTypeHttpHeader((HttpServletRequest) request); - xml = MessageFormat.format(MTOM_RESPONSE_DOCLIT, result); - response.setContentType("text/xml"); - System.out.println("DEBUG: HTTP Response output=" + xml); - } - OutputStreamWriter osw = new OutputStreamWriter(response.getOutputStream()); - osw.write(xml); - osw.flush(); - osw.close(); - } - - /** - * Verifies the contents of the Content-Type HTTP header - * - * @param request - * the HTTP servlet request. - */ - protected String verifyContentTypeHttpHeader(HttpServletRequest request) { - String result = null; - String headerValue = request.getHeader("Content-Type"); - System.out.println("DEBUG: HTTP header Content-Type=" + headerValue); - String headerValueLC = headerValue.toLowerCase(); - if (headerValueLC != null) { - if ((headerValueLC.indexOf("multipart/related") >= 0) - && (headerValueLC.indexOf("text/xml") >= 0) - && (headerValueLC.indexOf("application/xop+xml") >= 0)) { - result = "PASSED: HTTP Content-Type header contains expected: multipart/related, text/xml, application/xop+xml"; - } else { - result = "FAILED: HTTP Content-Type header does not contain expected values"; - } - } else { - result = "FAILED: HTTP Content-Type header was not found"; - } - System.out.println("result=" + result); - return result; - } - - /** - * Verifies the contents of the Content-Transfer-Encoding mime header - * - * @param request - * the HTTP servlet request. - * - */ - protected String verifyContentTransferEncodingHeader( - HttpServletRequest request, ByteArrayInputStream bais) - throws ServletException { - MimeHeaders headers = getHeaders(request); - AttachmentPart ap = null; - Iterator iterator = null; - try { - SOAPMessage reqMsg = MessageFactory.newInstance().createMessage(headers, - bais); - iterator = reqMsg.getAttachments(); - } catch (Exception e) { - throw new ServletException( - "verifyContentTransferEncodingMimeHeader failed: " + e.getMessage()); - } - String[] headerValues = null; - String result = null; - int k = 0; - while (iterator.hasNext()) { - ap = (AttachmentPart) iterator.next(); - if (testValidCase) - ap.addMimeHeader("Content-Transfer-Encoding", "base64"); - if (testInvalidCase) - ap.addMimeHeader("Content-Transfer-Encoding", "invalid"); - headerValues = ap.getMimeHeader("Content-Transfer-Encoding"); - if (headerValues != null && headerValues.length > 0) { - for (int i = 0; i < headerValues.length; i++) { - headerValues[i] = headerValues[i].toLowerCase(); - if ((headerValues[i].indexOf("7bit") >= 0) - || (headerValues[i].indexOf("8bit") >= 0) - || (headerValues[i].indexOf("binary") >= 0) - || (headerValues[i].indexOf("quoted-printable") >= 0) - || (headerValues[i].indexOf("base64") >= 0)) { - if (i == 0) { - if (result == null) - result = "Attach[" + k + "]="; - else - result = result + "Attach[" + k + "]="; - } - result = result + headerValues[i] + " "; - } else { - result = "FAILED: INVALID Content-Transfer-Encoding mime header value of [" - + headerValues[i] + "]"; - break; - } - } - } - ++k; - } - if (result == null) - result = "No Content-Transfer-Encoding mime headers were found"; - System.out.println("result=" + result); - return result; - } - - private MimeHeaders getHeaders(HttpServletRequest req) { - - Enumeration enumlist = req.getHeaderNames(); - MimeHeaders headers = new MimeHeaders(); - int k = 0; - - while (enumlist.hasMoreElements()) { - String headerName = (String) enumlist.nextElement(); - String headerValue = req.getHeader(headerName); - StringTokenizer values = new StringTokenizer(headerValue, ","); - while (values.hasMoreTokens()) - headers.addHeader(headerName, values.nextToken().trim()); - } - return headers; - } - - private void dumpHeaders(HttpServletRequest req) { - - Enumeration enumlist = req.getHeaderNames(); - int k = 0; - while (enumlist.hasMoreElements()) { - String headerName = (String) enumlist.nextElement(); - String headerValue = req.getHeader(headerName); - System.out.println( - "DEBUG: HTTP request header=" + headerName + ",\t" + headerValue); - } - } - - public static String returnSOAPMessageAsStringWOA(SOAPMessage msg) { - ByteArrayOutputStream baos = null; - String s = null; - try { - - baos = new ByteArrayOutputStream(); - msg.removeAllAttachments(); - msg.saveChanges(); - msg.removeAllAttachments(); - msg.writeTo(baos); - s = baos.toString(); - } catch (Exception e) { - System.err.println("Exception occurred: " + e); - e.printStackTrace(); - } - return s; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/Client.java deleted file mode 100644 index ec1f64a975..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/Client.java +++ /dev/null @@ -1,663 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; - -import java.io.*; -import java.net.*; -import java.rmi.*; -import java.util.*; - -import java.awt.Image; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.SOAPBinding; -import javax.xml.namespace.QName; -import jakarta.xml.soap.*; - -import jakarta.activation.DataHandler; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; - -import java.util.Properties; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest."; - - // service and port information - private static final String NAMESPACEURI = "http://mtomtestservice.org/wsdl"; - - private static final String SERVICE_NAME = "MTOMTestService"; - - private static final String PORT_NAME1 = "MTOMTestPort"; - - private static final String PORT_NAME2 = "MTOMTestTwoPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private QName PORT_QNAME2 = new QName(NAMESPACEURI, PORT_NAME2); - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private URL docURL1 = null; - - private URL docURL2 = null; - - private URL docURL3 = null; - - private URL docURL4 = null; - - private URL docURL11 = null; - - private URL docURL12 = null; - - private URL docURL13 = null; - - private URL docURL14 = null; - - private URL docURLBigJpeg = null; - - String SDOC1 = "text.xml"; - - String SDOC2 = "application.xml"; - - String SDOC3 = "attach.html"; - - String SDOC4 = "attach.jpg"; - - String SDOC11 = "text2.xml"; - - String SDOC12 = "application2.xml"; - - String SDOC13 = "attach2.html"; - - String SDOC14 = "attach2.jpg"; - - String SDOCBigJpeg = "big.jpg"; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsservletmtomsoapbindingwithannotationstest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsservletmtomsoapbindingwithannotationstest.wsdlloc.1"; - - private static final String CTXROOT = "wsservletmtomsoapbindingwithannotationstest.cntxroot.1"; - - private String url = null; - - private String url3 = null; - - private URL wsdlurl = null; - - private String ctxroot = null; - - private MTOMTest port = null; - - private MTOMTestTwo port2 = null; - - private MTOMClientTwo client2; - - static MTOMTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - ctxroot = JAXWS_Util.getURLFromProp(CTXROOT); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - TestUtil.logMsg("Context Root: " + ctxroot); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (MTOMTest) service.getPort(MTOMTest.class); - SOAPBinding binding = (SOAPBinding) ((BindingProvider) port).getBinding(); - binding.setMTOMEnabled(true); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - client2 = (MTOMClientTwo) ClientFactory.getClient(MTOMClientTwo.class, p, - this, service); - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - TestUtil.logMsg("Get WebServiceRef from specific vehicle"); - service = (MTOMTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - port2 = client2.returnPort(); - SOAPBinding binding = (SOAPBinding) ((BindingProvider) port2) - .getBinding(); - binding.setMTOMEnabled(true); - docURL1 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC1); - docURL2 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC2); - docURL3 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC3); - docURL4 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC4); - docURL11 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC11); - docURL12 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC12); - docURL13 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC13); - docURL14 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC14); - docURLBigJpeg = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOCBigJpeg); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Exception("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: MTOMInTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Test MTOM attachments on input. Uses full deployment - * descriptors to enable mtom and protocol binding. - */ - public void MTOMInTest() throws Exception { - TestUtil.logMsg("MTOMInTest"); - boolean pass = true; - - try { - DataType data = new DataType(); - - data.setDocName1(SDOC1); - data.setDocName2(SDOC2); - data.setDocName3(SDOC3); - data.setDocName4(SDOC4); - - data.setDocUrl1(docURL1.toString()); - data.setDocUrl2(docURL2.toString()); - data.setDocUrl3(docURL3.toString()); - data.setDocUrl4(docURL4.toString()); - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - data.setDoc1(doc1); - data.setDoc2(doc2); - data.setDoc3(doc3); - data.setDoc4(doc4); - - TestUtil - .logMsg("Send 4 documents using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Documents to send: [" + SDOC1 + "," + SDOC2 + "," + SDOC3 - + "," + SDOC4 + "]"); - String result = port.mtomIn(data); - if (!result.equals("")) { - TestUtil - .logErr("An error occurred with one or more of the attachments"); - TestUtil.logErr("result=" + result); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("MTOMInTest failed"); - } - - /* - * @testName: MTOMInOutTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Test MTOM attachments on input and output. Uses full - * deployment descriptors to enable mtom and protocol binding. - */ - public void MTOMInOutTest() throws Exception { - TestUtil.logMsg("MTOMInOutTest"); - boolean pass = true; - - try { - Holder hDocName1 = new Holder(SDOC1); - Holder hDocName2 = new Holder(SDOC2); - Holder hDocName3 = new Holder(SDOC3); - Holder hDocName4 = new Holder(SDOC4); - - Holder hDocUrl1 = new Holder(docURL1.toString()); - Holder hDocUrl2 = new Holder(docURL2.toString()); - Holder hDocUrl3 = new Holder(docURL3.toString()); - Holder hDocUrl4 = new Holder(docURL4.toString()); - Holder hDocUrl11 = new Holder(docURL11.toString()); - Holder hDocUrl12 = new Holder(docURL12.toString()); - Holder hDocUrl13 = new Holder(docURL13.toString()); - Holder hDocUrl14 = new Holder(docURL14.toString()); - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - Holder hDoc1 = new Holder(doc1); - Holder hDoc2 = new Holder(doc2); - Holder hDoc3 = new Holder(doc3); - Holder hDoc4 = new Holder(doc4); - Holder hResult = new Holder(""); - TestUtil.logMsg( - "Send and receieve 4 documents using MTOM via webservice method mtomInOut()"); - TestUtil.logMsg("Documents to send: [" + SDOC1 + "," + SDOC2 + "," + SDOC3 - + "," + SDOC4 + "]"); - TestUtil.logMsg("Documents to receive: [" + SDOC11 + "," + SDOC12 + "," - + SDOC13 + "," + SDOC14 + "]"); - port.mtomInOut(hDocName1, hDocName2, hDocName3, hDocName4, hDocUrl1, - hDocUrl2, hDocUrl3, hDocUrl4, hDocUrl11, hDocUrl12, hDocUrl13, - hDocUrl14, hDoc1, hDoc2, hDoc3, hDoc4, hResult); - if (!(hResult.value).equals("")) { - TestUtil.logErr("Server-side errors occurred:\n" + hResult.value); - pass = false; - } - TestUtil.logMsg("Verify the contents of the received documents"); - - doc1 = AttachmentHelper.getSourceDoc(docURL11); - doc2 = AttachmentHelper.getSourceDoc(docURL12); - doc3 = AttachmentHelper.getDataHandlerDoc(docURL13); - doc4 = AttachmentHelper.getImageDoc(docURL14); - - // Now test the documents that were sent back by Server - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, hDoc1.value, - SDOC11); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, hDoc2.value, - SDOC12); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, hDoc3.value, - SDOC13); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, hDoc4.value, - SDOC14); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - if (pass) - TestUtil.logMsg("All received documents are as expected (ok)"); - - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("MTOMInOutTest failed"); - } - - /* - * @testName: MTOMOutTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Test MTOM attachments on output. Uses full deployment - * descriptors to enable mtom and protocol binding. - */ - public void MTOMOutTest() throws Exception { - TestUtil.logMsg("MTOMOutTest"); - boolean pass = true; - - try { - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - String urls = docURL1.toString() + "," + docURL2.toString() + "," - + docURL3.toString() + "," + docURL4.toString(); - TestUtil.logTrace("urls=" + urls); - TestUtil.logMsg( - "Receive 4 documents using MTOM via webservice method mtomOut()"); - TestUtil.logMsg("Documents to receive: [" + SDOC1 + "," + SDOC2 + "," - + SDOC3 + "," + SDOC4 + "]"); - DataType data = port.mtomOut(urls); - TestUtil.logMsg("Verify the contents of the received documents"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, - data.getDoc1(), SDOC1); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, data.getDoc2(), - SDOC2); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, data.getDoc3(), - SDOC3); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, data.getDoc4(), - SDOC4); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - if (pass) - TestUtil.logMsg("All received documents are as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("MTOMOutTest failed"); - } - - /* - * @testName: MTOMIn2CheckHttpHeadersTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Test MTOM HTTP Content-Type Header for correctness. Uses - * full deployment descriptors to enable mtom and protocol binding. - */ - public void MTOMIn2CheckHttpHeadersTest() throws Exception { - TestUtil.logMsg("MTOMIn2CheckHttpHeadersTest"); - boolean pass = true; - - try { - DataType3 data = new DataType3(); - Image doc = AttachmentHelper.getImageDoc(docURLBigJpeg); - data.setDoc(doc); - String result = ""; - try { - TestUtil.logMsg( - "Check Content-Type Request HTTP Request header for correctness"); - result = client2.mtomIn2(data); - } catch (Exception e) { - throw new Exception("Unable to invoke endpoint", e); - } - TestUtil.logMsg("Verify Content-Type Request HTTP header"); - TestUtil.logMsg("Content-Type Request HTTP header=" + result); - if (result.equals("EXCEPTION")) { - throw new Exception("Endpoint unable to process request "); - } else if (result.toLowerCase().indexOf("text/xml") < 0 - || result.toLowerCase().indexOf("multipart/related") < 0 - || result.toLowerCase().indexOf("application/xop+xml") < 0) { - TestUtil.logErr("Content-Type Request HTTP header was incorrect (ok)"); - TestUtil.logErr( - "Expected (multipart/related,application/xop+xml,text/xml) in header"); - pass = false; - } else - TestUtil.logMsg("Content-Type Request HTTP header was correct (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("MTOMIn2CheckHttpHeadersTest failed"); - } - - /* - * @testName: MTOMOut2Test - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Test MTOM attachments on output. Uses full deployment - * descriptors to enable mtom and protocol binding. - */ - public void MTOMOut2Test() throws Exception { - TestUtil.logMsg("MTOMOut2Test"); - boolean pass = true; - - try { - - Image doc = AttachmentHelper.getImageDoc(docURLBigJpeg); - String urls = docURLBigJpeg.toString(); - TestUtil.logMsg("urls=" + urls); - TestUtil.logMsg( - "Receive 1 document using MTOM via webservice method mtomOut2()"); - TestUtil.logMsg("Document to receive: [" + SDOCBigJpeg + "]"); - DataType3 data = port.mtomOut2(urls); - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc(), SDOCBigJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("MTOMOut2Test failed"); - } - - /* - * @testName: VerifySOAPProtocolBindingOnPorts - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Verify the soap protocol binding on the ports as specified - * by the deployment descriptors. Uses full deployment descriptors to set the - * soap protocol binding for each port. - */ - public void VerifySOAPProtocolBindingOnPorts() throws Exception { - TestUtil.logMsg("VerifySOAPProtocolBindingOnPorts"); - boolean pass = true; - - try { - BindingProvider bindingprovider1 = (BindingProvider) port; - BindingProvider bindingprovider2 = (BindingProvider) port2; - TestUtil - .logMsg("Binding for first port is " + bindingprovider1.getBinding()); - TestUtil.logMsg( - "Binding for second port is " + bindingprovider2.getBinding()); - if (!(bindingprovider1.getBinding() instanceof SOAPBinding)) { - TestUtil.logErr("First port is not instance of SOAPBinding"); - pass = false; - } else - TestUtil.logMsg("First port is an instance of SOAPBinding"); - if (!(bindingprovider2.getBinding() instanceof SOAPBinding)) { - TestUtil.logErr("Second port is not instance of SOAPBinding"); - pass = false; - } else - TestUtil.logMsg("Second port is an instance of SOAPBinding"); - if (pass) { - SOAPFactory factory1 = ((SOAPBinding) bindingprovider1.getBinding()) - .getSOAPFactory(); - SOAPFactory factory2 = ((SOAPBinding) bindingprovider2.getBinding()) - .getSOAPFactory(); - TestUtil.logMsg("SOAPFactory for first port is " + factory1); - TestUtil.logMsg("SOAPFactory for second port is " + factory2); - SOAPFault soapfault = factory1.createFault(); - try { - soapfault.setFaultRole("http://myfault.org"); - TestUtil.logErr( - "SOAPFactory for first port is a based on SOAP1.2 protocol (Unexpected)"); - pass = false; - } catch (UnsupportedOperationException e) { - TestUtil.logMsg( - "SOAPFactory for first port is a based on SOAP1.1 protocol (Expected)"); - } - soapfault = factory2.createFault(); - try { - soapfault.setFaultRole("http://myfault.org"); - TestUtil.logErr( - "SOAPFactory for second port is a based on SOAP1.2 protocol (Unexpected)"); - pass = false; - } catch (UnsupportedOperationException e) { - TestUtil.logMsg( - "SOAPFactory for second port is a based on SOAP1.1 protocol (Expected)"); - } - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("VerifySOAPProtocolBindingOnPorts failed"); - } - - /* - * @testName: VerifyMTOMEnabledOnPorts - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Verify the mtom enable setting on the ports as specified by - * the deployment descriptors. Uses full deployment descriptors to set the - * mtom enable setting for each port. - */ - public void VerifyMTOMEnabledOnPorts() throws Exception { - TestUtil.logMsg("VerifyMTOMEnabledOnPorts"); - boolean pass = true; - - try { - BindingProvider bindingprovider1 = (BindingProvider) port; - BindingProvider bindingprovider2 = (BindingProvider) port2; - if (!(((SOAPBinding) bindingprovider1.getBinding()).isMTOMEnabled())) { - TestUtil.logErr("First port does not have MTOM enabled"); - pass = false; - } else - TestUtil.logMsg("First port does have MTOM enabled"); - if (!(((SOAPBinding) bindingprovider2.getBinding()).isMTOMEnabled())) { - TestUtil.logErr("Second port does not have MTOM enabled"); - pass = false; - } else - TestUtil.logMsg("Second port does have MTOM enabled"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("VerifyMTOMEnabledOnPorts failed"); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/MTOMClientTwo.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/MTOMClientTwo.java deleted file mode 100644 index 1524de60f1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/MTOMClientTwo.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.SOAPBinding; - -public class MTOMClientTwo extends SOAPClient { - - public MTOMClientTwo(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public MTOMClientTwo(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace("http://mtomtestservice.org/wsdl"); - stubContext.setService("MTOMTestService"); - stubContext.setPort("MTOMTestTwoPort"); - stubContext.setEndpointInterface(MTOMTestTwo.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsservletmtomsoapbindingwithannotationstest.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsservletmtomsoapbindingwithannotationstest.wsdlloc.2"; - } - - public String mtomIn2(DataType3 d) throws Exception { - MTOMTestTwo port = (MTOMTestTwo) stubContext.getStub(); - return port.mtomIn2(d); - } - - public MTOMTestTwo returnPort() throws Exception { - MTOMTestTwo port = (MTOMTestTwo) stubContext.getStub(); - return port; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/MTOMTestImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/MTOMTestImpl.java deleted file mode 100644 index c84efb2f07..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/MTOMTestImpl.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import java.awt.Image; -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; -import jakarta.activation.DataHandler; -import javax.xml.transform.Source; - -@WebService(portName = "MTOMTestPort", serviceName = "MTOMTestService", targetNamespace = "http://mtomtestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.MTOMTest") -@BindingType(SOAPBinding.SOAP11HTTP_MTOM_BINDING) - -public class MTOMTestImpl implements MTOMTest { - - public String mtomIn( - com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.DataType data) { - System.out.println("--------------------------"); - System.out.println("In mtomIn"); - - String result = ""; - - try { - - String docName1 = data.getDocName1(); - String docName2 = data.getDocName2(); - String docName3 = data.getDocName3(); - String docName4 = data.getDocName4(); - System.out.println("docName1=" + docName1); - System.out.println("docName2=" + docName2); - System.out.println("docName3=" + docName3); - System.out.println("docName4=" + docName4); - - URL docURL1 = new URL(data.getDocUrl1()); - URL docURL2 = new URL(data.getDocUrl2()); - URL docURL3 = new URL(data.getDocUrl3()); - URL docURL4 = new URL(data.getDocUrl4()); - System.out.println("docURL1=" + docURL1.toString()); - System.out.println("docURL2=" + docURL2.toString()); - System.out.println("docURL3=" + docURL3.toString()); - System.out.println("docURL4=" + docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, - data.getDoc1(), docName1); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, data.getDoc2(), - docName2); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, data.getDoc3(), - docName3); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, data.getDoc4(), - docName4); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } - - public void mtomInOut(Holder hDocName1, Holder hDocName2, - Holder hDocName3, Holder hDocName4, - Holder hDocUrl1, Holder hDocUrl2, Holder hDocUrl3, - Holder hDocUrl4, Holder hDocUrl11, - Holder hDocUrl12, Holder hDocUrl13, - Holder hDocUrl14, Holder hDoc1, Holder hDoc2, - Holder hDoc3, Holder hDoc4, Holder hResult) { - - System.out.println("--------------------------"); - System.out.println("In mtomInOut"); - String result = ""; - try { - - String docName1 = hDocName1.value; - String docName2 = hDocName2.value; - String docName3 = hDocName3.value; - String docName4 = hDocName4.value; - System.out.println("docName1=" + docName1); - System.out.println("docName2=" + docName2); - System.out.println("docName3=" + docName3); - System.out.println("docName4=" + docName4); - - URL docURL1 = new URL(hDocUrl1.value); - URL docURL2 = new URL(hDocUrl2.value); - URL docURL3 = new URL(hDocUrl3.value); - URL docURL4 = new URL(hDocUrl4.value); - - System.out.println("docURL1=" + docURL1.toString()); - System.out.println("docURL2=" + docURL2.toString()); - System.out.println("docURL3=" + docURL3.toString()); - System.out.println("docURL4=" + docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, hDoc1.value, - docName1); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, hDoc2.value, - docName2); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, hDoc3.value, - docName3); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, hDoc4.value, - docName4); - if (tmpRes != null) { - result = result + tmpRes; - } - - URL docURL11 = new URL(hDocUrl11.value); - URL docURL12 = new URL(hDocUrl12.value); - URL docURL13 = new URL(hDocUrl13.value); - URL docURL14 = new URL(hDocUrl14.value); - - System.out.println("docURL11=" + docURL11.toString()); - System.out.println("docURL12=" + docURL12.toString()); - System.out.println("docURL13=" + docURL13.toString()); - System.out.println("docURL14=" + docURL14.toString()); - - hDoc1.value = AttachmentHelper.getSourceDoc(docURL11); - hDoc2.value = AttachmentHelper.getSourceDoc(docURL12); - hDoc3.value = AttachmentHelper.getDataHandlerDoc(docURL13); - hDoc4.value = AttachmentHelper.getImageDoc(docURL14); - - hResult.value = result; - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - } - - public com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.DataType mtomOut( - String urls) { - System.out.println("--------------------------"); - System.out.println("In mtomOut"); - - System.out.println("urls=" + urls); - String[] tmpUrls = urls.split(","); - - for (int i = 0; i < tmpUrls.length; i++) { - System.out.println("url[" + i + "]=" + tmpUrls[i]); - } - - DataType d = new DataType(); - try { - URL docURL1 = new URL(tmpUrls[0]); - URL docURL2 = new URL(tmpUrls[1]); - URL docURL3 = new URL(tmpUrls[2]); - URL docURL4 = new URL(tmpUrls[3]); - - d.setDocUrl1(docURL1.toString()); - d.setDocUrl2(docURL2.toString()); - d.setDocUrl3(docURL3.toString()); - d.setDocUrl4(docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - d.setDoc1(doc1); - d.setDoc2(doc2); - d.setDoc3(doc3); - d.setDoc4(doc4); - - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return d; - } - - public com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.DataType3 mtomOut2( - String urls) { - System.out.println("--------------------------"); - System.out.println("In mtomOut2"); - - System.out.println("urls=" + urls); - String[] tmpUrls = urls.split(","); - - for (int i = 0; i < tmpUrls.length; i++) { - System.out.println("url[" + i + "]=" + tmpUrls[i]); - } - - DataType3 d = new DataType3(); - try { - URL docURL = new URL(tmpUrls[0]); - Image doc = AttachmentHelper.getImageDoc(docURL); - d.setDoc(doc); - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return d; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/MTOMTestService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/MTOMTestService.wsdl deleted file mode 100644 index f6adfc50f7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/MTOMTestService.wsdl +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/MTOMTestTwoImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/MTOMTestTwoImpl.java deleted file mode 100644 index 42b4e0a1a2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/MTOMTestTwoImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.soap.SOAPBinding; -import java.awt.Image; -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; -import jakarta.activation.DataHandler; -import javax.xml.transform.Source; - -@WebService(portName = "MTOMTestTwoPort", serviceName = "MTOMTestService", targetNamespace = "http://mtomtestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.MTOMTestTwo") -@BindingType(SOAPBinding.SOAP11HTTP_MTOM_BINDING) - -public class MTOMTestTwoImpl implements MTOMTestTwo { - - private TSURL ctsurl = new TSURL(); - - public String mtomIn2( - com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.DataType3 data) { - System.out.println("--------------------------"); - System.out.println("In mtomIn2"); - - return "PASSED"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/build.xml deleted file mode 100644 index 42753a2409..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/build.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/application.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/application.xml deleted file mode 100644 index 5a6b4524af..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/application.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Simple example of application - Simple example - - ejb1.jar - - - ejb2.jar - - - - web.war - web - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/application2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/application2.xml deleted file mode 100644 index e298f72a57..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/application2.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Second Simple example of application - Second Simple example - - ejb3.jar - - - ejb4.jar - - - - web.war - secondWeb - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/attach.html b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/attach.html deleted file mode 100644 index 0404eb3cc0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/attach.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -This is a title - - -

This is a starting point


-

This is a header

-

This is a paragraph

-
    -
  • This is a bullet

  • -
- - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/attach.jpg b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/attach.jpg deleted file mode 100644 index 02d864db47..0000000000 Binary files a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/attach.jpg and /dev/null differ diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/attach2.html b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/attach2.html deleted file mode 100644 index 9a2133dc20..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/attach2.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -This is the second title - - -

This is the second starting point

-

This is the second header

-

This is the second paragraph

-
    -
  • This is the second bullet

  • -
- - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/attach2.jpg b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/attach2.jpg deleted file mode 100644 index 02d864db47..0000000000 Binary files a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/attach2.jpg and /dev/null differ diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/big.jpg b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/big.jpg deleted file mode 100644 index c6988d3efa..0000000000 Binary files a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/big.jpg and /dev/null differ diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/text.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/text.xml deleted file mode 100644 index a9fcc9a1e1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/text.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - http - - - - - http://www.wombats.com/remote/sender - - - http://127.0.0.1:8081/jaxm-provider/receiver/ebxml - - - - - - - 5 - - - 2000 - - - - - - - ebxml/ - - - 10 - - - - - - - https - - - - - jaxm.dummy.uri - - - https://127.0.0.1:8443/jaxm/dummy/ - - - - - - ebxml-https/ - - - 10 - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/text2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/text2.xml deleted file mode 100644 index 332bc47bab..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/contentRoot/text2.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - W2JDLMTOMTestApp2 - - com.sun.ts.tests.jaxws.common.JAXWSContextListener - - - MTOMTest2 - com.sun.ts.tests.jaxws.common.JAXWSServlet - 1 - - - MTOMTest2 - /jaxws/MTOMTest2 - - - 54 - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/customfile.xml deleted file mode 100644 index b8c195f45a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/jakartaEE.tokens deleted file mode 100644 index 8c5d3ac7b0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/jakartaEE.tokens +++ /dev/null @@ -1,19 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsservletmtomsoapbindingwithannotationstest") -SERVICE=com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.MTOMTestService -FILTERNAME=Filter -FILTERCLASS=com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.CheckHttpHeadersFilter -IMPL=com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.MTOMTestImpl -IMPL2=com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.MTOMTestTwoImpl -SEI=com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.MTOMTest -SEI2=com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.MTOMTestTwo -URLALIAS=/jaxws/MTOMTest -URLALIAS2=/jaxws/MTOMTestTwo -SERVLETNAME=com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.MTOMTestImpl -SERVLETNAME2=com.sun.ts.tests.webservices12.servlet.WSMTOMSBAnnotationsTest.MTOMTestTwoImpl -NAMESPACEURI=http://mtomtestservice.org/wsdl -PORT=MTOMTestPort -PORT2=MTOMTestTwoPort -WEBSERVICEDESCRIPTION=MTOMTestService -SERVICEREFNAMEWSSERVLET=service/wsservletmtomsoapbindingwithannotationstest -SERVICEREFNAMEWSEJB=service/wsservletmtomsoapbindingwithannotationstest -SERVICEREFNAMEWSAPPCLIENT=service/wsservletmtomsoapbindingwithannotationstest diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/jakartaEE.web.xml deleted file mode 100644 index 3e11004111..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBAnnotationsTest/jakartaEE.web.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - @APPNAME@ - - @FILTERNAME@ - @FILTERCLASS@ - - - @FILTERNAME@ - @SERVLETNAME2@ - - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/CheckHttpHeadersFilter.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/CheckHttpHeadersFilter.java deleted file mode 100644 index 92c42b9c87..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/CheckHttpHeadersFilter.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest; - -import java.io.*; -import java.util.*; -import java.text.MessageFormat; - -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.servlet.Filter; -import jakarta.servlet.FilterChain; -import jakarta.servlet.FilterConfig; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.ServletResponse; -import jakarta.xml.soap.*; - -import com.sun.ts.tests.jaxws.wsi.requests.SOAPRequests; - -public final class CheckHttpHeadersFilter implements Filter, SOAPRequests { - - // The filter configuration object we are associated with. If this value - // is null, this filter instance is not currently configured. - private FilterConfig filterConfig = null; - - private boolean testValidCase = false; - - private boolean testInvalidCase = false; - - // remove the filter configuration object for this filter. - public void destroy() { - } - - // initialize the filter configuration object for this filter. - - public void init(FilterConfig filterConfig) { - this.filterConfig = filterConfig; - } - - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) throws ServletException, IOException { - String result = "null"; - String input = null; - String soapMsgAsString = null; - String xml = null; - System.out.println("Here in CheckHttpHeadersFilter.doFilter()\n"); - dumpHeaders((HttpServletRequest) request); - byte buffer[] = new byte[65536]; - int count = 0; - int tmpcount = 0; - if (request.getInputStream().markSupported()) - request.getInputStream().mark(8192); - while (tmpcount != -1) { - tmpcount = request.getInputStream().read(buffer, count, 8192); - if (tmpcount != -1) - count += tmpcount; - } - ByteArrayInputStream bais = new ByteArrayInputStream(buffer, 0, count); - input = new String(buffer); - if (filterConfig == null) { - result = "EXCEPTION"; - xml = MessageFormat.format(MTOM_RESPONSE_DOCLIT, result); - } else { - if (input.indexOf("MTOMIn2") < 0) { - System.out - .println("HTTP request does not contain expected JAXWS request"); - System.out - .println("Call next filter in chain which is the endpoint itself"); - if (request.getInputStream().markSupported()) - request.getInputStream().reset(); - chain.doFilter(request, response); - return; - } - int index = input.indexOf("=_Part_"); - String partialInput = input; - if (index >= 0) { - index = input.indexOf("=_Part_", index + 1); - partialInput = input.substring(0, index); - } - System.out.println("DEBUG: HTTP Request stream count=" + count); - try { - MimeHeaders headers = getHeaders((HttpServletRequest) request); - SOAPMessage soapMsg = MessageFactory.newInstance() - .createMessage(headers, bais); - soapMsgAsString = returnSOAPMessageAsStringWOA(soapMsg); - System.out.println( - "DEBUG: HTTP Request stream soap message=" + soapMsgAsString); - } catch (Exception e) { - System.out - .println("DEBUG: HTTP Request stream partialinput=" + partialInput); - } - testValidCase = false; - testInvalidCase = false; - if (input.indexOf("Check-Content-Transfer-Encoding") >= 0) { - if (input.indexOf("TestValidCase") >= 0) - testValidCase = true; - else if (input.indexOf("TestInvalidCase") >= 0) - testInvalidCase = true; - try { - result = verifyContentTransferEncodingHeader( - (HttpServletRequest) request, bais); - } catch (Exception e) { - System.out.println("Caught exception: " + e.getMessage()); - e.printStackTrace(); - result = "Exception"; - } - } else - result = verifyContentTypeHttpHeader((HttpServletRequest) request); - xml = MessageFormat.format(MTOM_RESPONSE_DOCLIT, result); - response.setContentType("text/xml"); - System.out.println("DEBUG: HTTP Response output=" + xml); - } - OutputStreamWriter osw = new OutputStreamWriter(response.getOutputStream()); - osw.write(xml); - osw.flush(); - osw.close(); - } - - /** - * Verifies the contents of the Content-Type HTTP header - * - * @param request - * the HTTP servlet request. - */ - protected String verifyContentTypeHttpHeader(HttpServletRequest request) { - String result = null; - String headerValue = request.getHeader("Content-Type"); - System.out.println("DEBUG: HTTP header Content-Type=" + headerValue); - String headerValueLC = headerValue.toLowerCase(); - if (headerValueLC != null) { - if ((headerValueLC.indexOf("multipart/related") >= 0) - && (headerValueLC.indexOf("text/xml") >= 0) - && (headerValueLC.indexOf("application/xop+xml") >= 0)) { - result = "PASSED: HTTP Content-Type header contains expected: multipart/related, text/xml, application/xop+xml"; - } else { - result = "FAILED: HTTP Content-Type header does not contain expected values"; - } - } else { - result = "FAILED: HTTP Content-Type header was not found"; - } - System.out.println("result=" + result); - return result; - } - - /** - * Verifies the contents of the Content-Transfer-Encoding mime header - * - * @param request - * the HTTP servlet request. - * - */ - protected String verifyContentTransferEncodingHeader( - HttpServletRequest request, ByteArrayInputStream bais) - throws ServletException { - MimeHeaders headers = getHeaders(request); - AttachmentPart ap = null; - Iterator iterator = null; - try { - SOAPMessage reqMsg = MessageFactory.newInstance().createMessage(headers, - bais); - iterator = reqMsg.getAttachments(); - } catch (Exception e) { - throw new ServletException( - "verifyContentTransferEncodingMimeHeader failed: " + e.getMessage()); - } - String[] headerValues = null; - String result = null; - int k = 0; - while (iterator.hasNext()) { - ap = (AttachmentPart) iterator.next(); - if (testValidCase) - ap.addMimeHeader("Content-Transfer-Encoding", "base64"); - if (testInvalidCase) - ap.addMimeHeader("Content-Transfer-Encoding", "invalid"); - headerValues = ap.getMimeHeader("Content-Transfer-Encoding"); - if (headerValues != null && headerValues.length > 0) { - for (int i = 0; i < headerValues.length; i++) { - headerValues[i] = headerValues[i].toLowerCase(); - if ((headerValues[i].indexOf("7bit") >= 0) - || (headerValues[i].indexOf("8bit") >= 0) - || (headerValues[i].indexOf("binary") >= 0) - || (headerValues[i].indexOf("quoted-printable") >= 0) - || (headerValues[i].indexOf("base64") >= 0)) { - if (i == 0) { - if (result == null) - result = "Attach[" + k + "]="; - else - result = result + "Attach[" + k + "]="; - } - result = result + headerValues[i] + " "; - } else { - result = "FAILED: INVALID Content-Transfer-Encoding mime header value of [" - + headerValues[i] + "]"; - break; - } - } - } - ++k; - } - if (result == null) - result = "No Content-Transfer-Encoding mime headers were found"; - System.out.println("result=" + result); - return result; - } - - private MimeHeaders getHeaders(HttpServletRequest req) { - - Enumeration enumlist = req.getHeaderNames(); - MimeHeaders headers = new MimeHeaders(); - int k = 0; - - while (enumlist.hasMoreElements()) { - String headerName = (String) enumlist.nextElement(); - String headerValue = req.getHeader(headerName); - StringTokenizer values = new StringTokenizer(headerValue, ","); - while (values.hasMoreTokens()) - headers.addHeader(headerName, values.nextToken().trim()); - } - return headers; - } - - private void dumpHeaders(HttpServletRequest req) { - - Enumeration enumlist = req.getHeaderNames(); - int k = 0; - while (enumlist.hasMoreElements()) { - String headerName = (String) enumlist.nextElement(); - String headerValue = req.getHeader(headerName); - System.out.println( - "DEBUG: HTTP request header=" + headerName + ",\t" + headerValue); - } - } - - public static String returnSOAPMessageAsStringWOA(SOAPMessage msg) { - ByteArrayOutputStream baos = null; - String s = null; - try { - - baos = new ByteArrayOutputStream(); - msg.removeAllAttachments(); - msg.saveChanges(); - msg.removeAllAttachments(); - msg.writeTo(baos); - s = baos.toString(); - } catch (Exception e) { - System.err.println("Exception occurred: " + e); - e.printStackTrace(); - } - return s; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/Client.java deleted file mode 100644 index a04b94d869..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/Client.java +++ /dev/null @@ -1,658 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)Client.java 1.10 06/02/11 - */ - -package com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; - -import java.io.*; -import java.net.*; -import java.rmi.*; -import java.util.*; - -import java.awt.Image; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.SOAPBinding; -import javax.xml.namespace.QName; -import jakarta.xml.soap.*; - -import jakarta.activation.DataHandler; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; - -import java.util.Properties; -import com.sun.ts.tests.jaxws.sharedclients.ClientFactory; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - private static final String PKG_NAME = "com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest."; - - // service and port information - private static final String NAMESPACEURI = "http://mtomtestservice.org/wsdl"; - - private static final String SERVICE_NAME = "MTOMTestService"; - - private static final String PORT_NAME1 = "MTOMTestPort"; - - private static final String PORT_NAME2 = "MTOMTestTwoPort"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME1 = new QName(NAMESPACEURI, PORT_NAME1); - - private QName PORT_QNAME2 = new QName(NAMESPACEURI, PORT_NAME2); - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private URL docURL1 = null; - - private URL docURL2 = null; - - private URL docURL3 = null; - - private URL docURL4 = null; - - private URL docURL11 = null; - - private URL docURL12 = null; - - private URL docURL13 = null; - - private URL docURL14 = null; - - private URL docURLBigJpeg = null; - - String SDOC1 = "text.xml"; - - String SDOC2 = "application.xml"; - - String SDOC3 = "attach.html"; - - String SDOC4 = "attach.jpg"; - - String SDOC11 = "text2.xml"; - - String SDOC12 = "application2.xml"; - - String SDOC13 = "attach2.html"; - - String SDOC14 = "attach2.jpg"; - - String SDOCBigJpeg = "big.jpg"; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wsservletmtomsoapbindingwithfullddstest.endpoint.1"; - - private static final String WSDLLOC_URL = "wsservletmtomsoapbindingwithfullddstest.wsdlloc.1"; - - private static final String CTXROOT = "wsservletmtomsoapbindingwithfullddstest.cntxroot.1"; - - private String url = null; - - private String url3 = null; - - private URL wsdlurl = null; - - private String ctxroot = null; - - private MTOMTest port = null; - - private MTOMTestTwo port2 = null; - - private MTOMClientTwo client2; - - static MTOMTestService service = null; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - ctxroot = JAXWS_Util.getURLFromProp(CTXROOT); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - TestUtil.logMsg("Context Root: " + ctxroot); - } - - private void getPortJavaEE() throws Exception { - TestUtil.logMsg("Obtaining service via WebServiceRef annotation"); - TestUtil.logMsg("service=" + service); - port = (MTOMTest) service.getPort(MTOMTest.class); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Obtained port"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - client2 = (MTOMClientTwo) ClientFactory.getClient(MTOMClientTwo.class, p, - this, service); - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - TestUtil.logMsg("Get WebServiceRef from specific vehicle"); - service = (MTOMTestService) getSharedObject(); - getTestURLs(); - getPortJavaEE(); - port2 = client2.returnPort(); - docURL1 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC1); - docURL2 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC2); - docURL3 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC3); - docURL4 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC4); - docURL11 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC11); - docURL12 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC12); - docURL13 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC13); - docURL14 = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOC14); - docURLBigJpeg = ctsurl.getURL(PROTOCOL, hostname, portnum, - ctxroot + "/" + SDOCBigJpeg); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Exception("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: MTOMInTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Test MTOM attachments on input. Uses full deployment - * descriptors to enable mtom and protocol binding. - */ - public void MTOMInTest() throws Exception { - TestUtil.logMsg("MTOMInTest"); - boolean pass = true; - - try { - DataType data = new DataType(); - - data.setDocName1(SDOC1); - data.setDocName2(SDOC2); - data.setDocName3(SDOC3); - data.setDocName4(SDOC4); - - data.setDocUrl1(docURL1.toString()); - data.setDocUrl2(docURL2.toString()); - data.setDocUrl3(docURL3.toString()); - data.setDocUrl4(docURL4.toString()); - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - data.setDoc1(doc1); - data.setDoc2(doc2); - data.setDoc3(doc3); - data.setDoc4(doc4); - - TestUtil - .logMsg("Send 4 documents using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Documents to send: [" + SDOC1 + "," + SDOC2 + "," + SDOC3 - + "," + SDOC4 + "]"); - String result = port.mtomIn(data); - if (!result.equals("")) { - TestUtil - .logErr("An error occurred with one or more of the attachments"); - TestUtil.logErr("result=" + result); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("MTOMInTest failed"); - } - - /* - * @testName: MTOMInOutTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Test MTOM attachments on input and output. Uses full - * deployment descriptors to enable mtom and protocol binding. - */ - public void MTOMInOutTest() throws Exception { - TestUtil.logMsg("MTOMInOutTest"); - boolean pass = true; - - try { - Holder hDocName1 = new Holder(SDOC1); - Holder hDocName2 = new Holder(SDOC2); - Holder hDocName3 = new Holder(SDOC3); - Holder hDocName4 = new Holder(SDOC4); - - Holder hDocUrl1 = new Holder(docURL1.toString()); - Holder hDocUrl2 = new Holder(docURL2.toString()); - Holder hDocUrl3 = new Holder(docURL3.toString()); - Holder hDocUrl4 = new Holder(docURL4.toString()); - Holder hDocUrl11 = new Holder(docURL11.toString()); - Holder hDocUrl12 = new Holder(docURL12.toString()); - Holder hDocUrl13 = new Holder(docURL13.toString()); - Holder hDocUrl14 = new Holder(docURL14.toString()); - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - Holder hDoc1 = new Holder(doc1); - Holder hDoc2 = new Holder(doc2); - Holder hDoc3 = new Holder(doc3); - Holder hDoc4 = new Holder(doc4); - Holder hResult = new Holder(""); - TestUtil.logMsg( - "Send and receieve 4 documents using MTOM via webservice method mtomInOut()"); - TestUtil.logMsg("Documents to send: [" + SDOC1 + "," + SDOC2 + "," + SDOC3 - + "," + SDOC4 + "]"); - TestUtil.logMsg("Documents to receive: [" + SDOC11 + "," + SDOC12 + "," - + SDOC13 + "," + SDOC14 + "]"); - port.mtomInOut(hDocName1, hDocName2, hDocName3, hDocName4, hDocUrl1, - hDocUrl2, hDocUrl3, hDocUrl4, hDocUrl11, hDocUrl12, hDocUrl13, - hDocUrl14, hDoc1, hDoc2, hDoc3, hDoc4, hResult); - if (!(hResult.value).equals("")) { - TestUtil.logErr("Server-side errors occurred:\n" + hResult.value); - pass = false; - } - TestUtil.logMsg("Verify the contents of the received documents"); - - doc1 = AttachmentHelper.getSourceDoc(docURL11); - doc2 = AttachmentHelper.getSourceDoc(docURL12); - doc3 = AttachmentHelper.getDataHandlerDoc(docURL13); - doc4 = AttachmentHelper.getImageDoc(docURL14); - - // Now test the documents that were sent back by Server - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, hDoc1.value, - SDOC11); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, hDoc2.value, - SDOC12); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, hDoc3.value, - SDOC13); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, hDoc4.value, - SDOC14); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - if (pass) - TestUtil.logMsg("All received documents are as expected (ok)"); - - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("MTOMInOutTest failed"); - } - - /* - * @testName: MTOMOutTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Test MTOM attachments on output. Uses full deployment - * descriptors to enable mtom and protocol binding. - */ - public void MTOMOutTest() throws Exception { - TestUtil.logMsg("MTOMOutTest"); - boolean pass = true; - - try { - - StreamSource doc1 = AttachmentHelper.getSourceDoc(docURL1); - StreamSource doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - String urls = docURL1.toString() + "," + docURL2.toString() + "," - + docURL3.toString() + "," + docURL4.toString(); - TestUtil.logTrace("urls=" + urls); - TestUtil.logMsg( - "Receive 4 documents using MTOM via webservice method mtomOut()"); - TestUtil.logMsg("Documents to receive: [" + SDOC1 + "," + SDOC2 + "," - + SDOC3 + "," + SDOC4 + "]"); - DataType data = port.mtomOut(urls); - TestUtil.logMsg("Verify the contents of the received documents"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, - data.getDoc1(), SDOC1); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, data.getDoc2(), - SDOC2); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, data.getDoc3(), - SDOC3); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, data.getDoc4(), - SDOC4); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - if (pass) - TestUtil.logMsg("All received documents are as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("MTOMOutTest failed"); - } - - /* - * @testName: MTOMIn2CheckHttpHeadersTest - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Test MTOM HTTP Content-Type Header for correctness. Uses - * full deployment descriptors to enable mtom and protocol binding. - */ - public void MTOMIn2CheckHttpHeadersTest() throws Exception { - TestUtil.logMsg("MTOMIn2CheckHttpHeadersTest"); - boolean pass = true; - - try { - DataType3 data = new DataType3(); - Image doc = AttachmentHelper.getImageDoc(docURLBigJpeg); - data.setDoc(doc); - String result = ""; - try { - TestUtil.logMsg( - "Check Content-Type Request HTTP Request header for correctness"); - result = client2.mtomIn2(data); - } catch (Exception e) { - throw new Exception("Unable to invoke endpoint", e); - } - TestUtil.logMsg("Verify Content-Type Request HTTP header"); - TestUtil.logMsg("Content-Type Request HTTP header=" + result); - if (result.equals("EXCEPTION")) { - throw new Exception("Endpoint unable to process request "); - } else if (result.toLowerCase().indexOf("text/xml") < 0 - || result.toLowerCase().indexOf("multipart/related") < 0 - || result.toLowerCase().indexOf("application/xop+xml") < 0) { - TestUtil.logErr("Content-Type Request HTTP header was incorrect (ok)"); - TestUtil.logErr( - "Expected (multipart/related,application/xop+xml,text/xml) in header"); - pass = false; - } else - TestUtil.logMsg("Content-Type Request HTTP header was correct (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("MTOMIn2CheckHttpHeadersTest failed"); - } - - /* - * @testName: MTOMOut2Test - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Test MTOM attachments on output. Uses full deployment - * descriptors to enable mtom and protocol binding. - */ - public void MTOMOut2Test() throws Exception { - TestUtil.logMsg("MTOMOut2Test"); - boolean pass = true; - - try { - - Image doc = AttachmentHelper.getImageDoc(docURLBigJpeg); - String urls = docURLBigJpeg.toString(); - TestUtil.logMsg("urls=" + urls); - TestUtil.logMsg( - "Receive 1 document using MTOM via webservice method mtomOut2()"); - TestUtil.logMsg("Document to receive: [" + SDOCBigJpeg + "]"); - DataType3 data = port.mtomOut2(urls); - TestUtil.logMsg("Verify the content of the received document"); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc(), SDOCBigJpeg); - if (tmpRes != null) { - TestUtil.logErr("Client-side error: " + tmpRes); - pass = false; - } - if (pass) - TestUtil.logMsg("The received document is as expected (ok)"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("MTOMOut2Test failed"); - } - - /* - * @testName: VerifySOAPProtocolBindingOnPorts - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Verify the soap protocol binding on the ports as specified - * by the deployment descriptors. Uses full deployment descriptors to set the - * soap protocol binding for each port. - */ - public void VerifySOAPProtocolBindingOnPorts() throws Exception { - TestUtil.logMsg("VerifySOAPProtocolBindingOnPorts"); - boolean pass = true; - - try { - BindingProvider bindingprovider1 = (BindingProvider) port; - BindingProvider bindingprovider2 = (BindingProvider) port2; - TestUtil - .logMsg("Binding for first port is " + bindingprovider1.getBinding()); - TestUtil.logMsg( - "Binding for second port is " + bindingprovider2.getBinding()); - if (!(bindingprovider1.getBinding() instanceof SOAPBinding)) { - TestUtil.logErr("First port is not instance of SOAPBinding"); - pass = false; - } else - TestUtil.logMsg("First port is an instance of SOAPBinding"); - if (!(bindingprovider2.getBinding() instanceof SOAPBinding)) { - TestUtil.logErr("Second port is not instance of SOAPBinding"); - pass = false; - } else - TestUtil.logMsg("Second port is an instance of SOAPBinding"); - if (pass) { - SOAPFactory factory1 = ((SOAPBinding) bindingprovider1.getBinding()) - .getSOAPFactory(); - SOAPFactory factory2 = ((SOAPBinding) bindingprovider2.getBinding()) - .getSOAPFactory(); - TestUtil.logMsg("SOAPFactory for first port is " + factory1); - TestUtil.logMsg("SOAPFactory for second port is " + factory2); - SOAPFault soapfault = factory1.createFault(); - try { - soapfault.setFaultRole("http://myfault.org"); - TestUtil.logErr( - "SOAPFactory for first port is a based on SOAP1.2 protocol (Unexpected)"); - pass = false; - } catch (UnsupportedOperationException e) { - TestUtil.logMsg( - "SOAPFactory for first port is a based on SOAP1.1 protocol (Expected)"); - } - soapfault = factory2.createFault(); - try { - soapfault.setFaultRole("http://myfault.org"); - TestUtil.logErr( - "SOAPFactory for second port is a based on SOAP1.2 protocol (Unexpected)"); - pass = false; - } catch (UnsupportedOperationException e) { - TestUtil.logMsg( - "SOAPFactory for second port is a based on SOAP1.1 protocol (Expected)"); - } - } - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("VerifySOAPProtocolBindingOnPorts failed"); - } - - /* - * @testName: VerifyMTOMEnabledOnPorts - * - * @assertion_ids: JAXWS:SPEC:10013; JAXWS:SPEC:10014; WS4EE:SPEC:5006; - * WS4EE:SPEC:7001; WS4EE:SPEC:7002; WS4EE:SPEC:4013; - * - * @test_Strategy: Verify the mtom enable setting on the ports as specified by - * the deployment descriptors. Uses full deployment descriptors to set the - * mtom enable setting for each port. - */ - public void VerifyMTOMEnabledOnPorts() throws Exception { - TestUtil.logMsg("VerifyMTOMEnabledOnPorts"); - boolean pass = true; - - try { - BindingProvider bindingprovider1 = (BindingProvider) port; - BindingProvider bindingprovider2 = (BindingProvider) port2; - if (!(((SOAPBinding) bindingprovider1.getBinding()).isMTOMEnabled())) { - TestUtil.logErr("First port does not have MTOM enabled"); - pass = false; - } else - TestUtil.logMsg("First port does have MTOM enabled"); - if (!(((SOAPBinding) bindingprovider2.getBinding()).isMTOMEnabled())) { - TestUtil.logErr("Second port does not have MTOM enabled"); - pass = false; - } else - TestUtil.logMsg("Second port does have MTOM enabled"); - } catch (Exception e) { - TestUtil.logErr("Exception occurred"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Exception("VerifyMTOMEnabledOnPorts failed"); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/MTOMClientTwo.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/MTOMClientTwo.java deleted file mode 100644 index 66e9b1c931..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/MTOMClientTwo.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.jaxws.sharedclients.SOAPClient; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.SOAPBinding; - -public class MTOMClientTwo extends SOAPClient { - - public MTOMClientTwo(String webServerHost, int webServerPort, int mode) - throws EETest.Fault { - this(webServerHost, webServerPort, mode, null); - } - - public MTOMClientTwo(String webServerHost, int webServerPort, int mode, - jakarta.xml.ws.Service webServiceRef) throws EETest.Fault { - super(webServerHost, webServerPort, mode); - stubContext.setNamespace("http://mtomtestservice.org/wsdl"); - stubContext.setService("MTOMTestService"); - stubContext.setPort("MTOMTestTwoPort"); - stubContext.setEndpointInterface(MTOMTestTwo.class); - stubContext.setWebServiceRef(webServiceRef); - } - - protected String getEndpointURLProperty() { - return "wsservletmtomsoapbindingwithfullddstest.endpoint.2"; - } - - protected String getWSDLURLProperty() { - return "wsservletmtomsoapbindingwithfullddstest.wsdlloc.2"; - } - - public String mtomIn2(DataType3 d) throws Exception { - MTOMTestTwo port = (MTOMTestTwo) stubContext.getStub(); - return port.mtomIn2(d); - } - - public MTOMTestTwo returnPort() throws Exception { - MTOMTestTwo port = (MTOMTestTwo) stubContext.getStub(); - return port; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/MTOMTestImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/MTOMTestImpl.java deleted file mode 100644 index 3600e3e696..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/MTOMTestImpl.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -import jakarta.xml.ws.Holder; -import java.awt.Image; -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; -import jakarta.activation.DataHandler; -import javax.xml.transform.Source; - -@WebService(portName = "MTOMTestPort", serviceName = "MTOMTestService", targetNamespace = "http://mtomtestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTest") - -public class MTOMTestImpl implements MTOMTest { - - public String mtomIn( - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.DataType data) { - System.out.println("--------------------------"); - System.out.println("In mtomIn"); - - String result = ""; - - try { - - String docName1 = data.getDocName1(); - String docName2 = data.getDocName2(); - String docName3 = data.getDocName3(); - String docName4 = data.getDocName4(); - System.out.println("docName1=" + docName1); - System.out.println("docName2=" + docName2); - System.out.println("docName3=" + docName3); - System.out.println("docName4=" + docName4); - - URL docURL1 = new URL(data.getDocUrl1()); - URL docURL2 = new URL(data.getDocUrl2()); - URL docURL3 = new URL(data.getDocUrl3()); - URL docURL4 = new URL(data.getDocUrl4()); - System.out.println("docURL1=" + docURL1.toString()); - System.out.println("docURL2=" + docURL2.toString()); - System.out.println("docURL3=" + docURL3.toString()); - System.out.println("docURL4=" + docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, - data.getDoc1(), docName1); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, data.getDoc2(), - docName2); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, data.getDoc3(), - docName3); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, data.getDoc4(), - docName4); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } - - public void mtomInOut(Holder hDocName1, Holder hDocName2, - Holder hDocName3, Holder hDocName4, - Holder hDocUrl1, Holder hDocUrl2, Holder hDocUrl3, - Holder hDocUrl4, Holder hDocUrl11, - Holder hDocUrl12, Holder hDocUrl13, - Holder hDocUrl14, Holder hDoc1, Holder hDoc2, - Holder hDoc3, Holder hDoc4, Holder hResult) { - - System.out.println("--------------------------"); - System.out.println("In mtomInOut"); - String result = ""; - try { - - String docName1 = hDocName1.value; - String docName2 = hDocName2.value; - String docName3 = hDocName3.value; - String docName4 = hDocName4.value; - System.out.println("docName1=" + docName1); - System.out.println("docName2=" + docName2); - System.out.println("docName3=" + docName3); - System.out.println("docName4=" + docName4); - - URL docURL1 = new URL(hDocUrl1.value); - URL docURL2 = new URL(hDocUrl2.value); - URL docURL3 = new URL(hDocUrl3.value); - URL docURL4 = new URL(hDocUrl4.value); - - System.out.println("docURL1=" + docURL1.toString()); - System.out.println("docURL2=" + docURL2.toString()); - System.out.println("docURL3=" + docURL3.toString()); - System.out.println("docURL4=" + docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - String tmpRes = AttachmentHelper.validateAttachmentData(doc1, hDoc1.value, - docName1); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc2, hDoc2.value, - docName2); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc3, hDoc3.value, - docName3); - if (tmpRes != null) { - result = result + tmpRes; - } - tmpRes = AttachmentHelper.validateAttachmentData(doc4, hDoc4.value, - docName4); - if (tmpRes != null) { - result = result + tmpRes; - } - - URL docURL11 = new URL(hDocUrl11.value); - URL docURL12 = new URL(hDocUrl12.value); - URL docURL13 = new URL(hDocUrl13.value); - URL docURL14 = new URL(hDocUrl14.value); - - System.out.println("docURL11=" + docURL11.toString()); - System.out.println("docURL12=" + docURL12.toString()); - System.out.println("docURL13=" + docURL13.toString()); - System.out.println("docURL14=" + docURL14.toString()); - - hDoc1.value = AttachmentHelper.getSourceDoc(docURL11); - hDoc2.value = AttachmentHelper.getSourceDoc(docURL12); - hDoc3.value = AttachmentHelper.getDataHandlerDoc(docURL13); - hDoc4.value = AttachmentHelper.getImageDoc(docURL14); - - hResult.value = result; - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - } - - public com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.DataType mtomOut( - String urls) { - System.out.println("--------------------------"); - System.out.println("In mtomOut"); - - System.out.println("urls=" + urls); - String[] tmpUrls = urls.split(","); - - for (int i = 0; i < tmpUrls.length; i++) { - System.out.println("url[" + i + "]=" + tmpUrls[i]); - } - - DataType d = new DataType(); - try { - URL docURL1 = new URL(tmpUrls[0]); - URL docURL2 = new URL(tmpUrls[1]); - URL docURL3 = new URL(tmpUrls[2]); - URL docURL4 = new URL(tmpUrls[3]); - - d.setDocUrl1(docURL1.toString()); - d.setDocUrl2(docURL2.toString()); - d.setDocUrl3(docURL3.toString()); - d.setDocUrl4(docURL4.toString()); - - Source doc1 = AttachmentHelper.getSourceDoc(docURL1); - Source doc2 = AttachmentHelper.getSourceDoc(docURL2); - DataHandler doc3 = AttachmentHelper.getDataHandlerDoc(docURL3); - Image doc4 = AttachmentHelper.getImageDoc(docURL4); - - d.setDoc1(doc1); - d.setDoc2(doc2); - d.setDoc3(doc3); - d.setDoc4(doc4); - - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return d; - } - - public com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.DataType3 mtomOut2( - String urls) { - System.out.println("--------------------------"); - System.out.println("In mtomOut2"); - - System.out.println("urls=" + urls); - String[] tmpUrls = urls.split(","); - - for (int i = 0; i < tmpUrls.length; i++) { - System.out.println("url[" + i + "]=" + tmpUrls[i]); - } - - DataType3 d = new DataType3(); - try { - URL docURL = new URL(tmpUrls[0]); - Image doc = AttachmentHelper.getImageDoc(docURL); - d.setDoc(doc); - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return d; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/MTOMTestService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/MTOMTestService.wsdl deleted file mode 100644 index f6adfc50f7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/MTOMTestService.wsdl +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/MTOMTestTwoImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/MTOMTestTwoImpl.java deleted file mode 100644 index 4ee4ee3c8e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/MTOMTestTwoImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.xml.ws.WebServiceException; -import jakarta.jws.WebService; - -import jakarta.xml.ws.Holder; -import java.awt.Image; -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; -import jakarta.activation.DataHandler; -import javax.xml.transform.Source; - -@WebService(portName = "MTOMTestTwoPort", serviceName = "MTOMTestService", targetNamespace = "http://mtomtestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTestTwo") - -public class MTOMTestTwoImpl implements MTOMTestTwo { - - public String mtomIn2( - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.DataType3 data) { - System.out.println("--------------------------"); - System.out.println("In mtomIn2"); - - return "PASSED"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_web.war.sun-web.xml deleted file mode 100644 index bd5e2cdef9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - MTOMTestService - http://webServerHost.1:webServerPort.1/WSMTOMSBFullDDsTest_web/jaxws/MTOMTest?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_wsappclient_vehicle_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index c3f395f947..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - service/wsservletmtomsoapbindingwithfullddstest - - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTest - - http://mtomtestservice.org/wsdl - MTOMTestPort - - - - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTestTwo - - http://mtomtestservice.org/wsdl - MTOMTestTwoPort - - - http://webServerHost.1:webServerPort.1/WSMTOMSBFullDDsTest_web/jaxws/MTOMTest?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_wsejb_vehicle_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 2fe8bafe43..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - WSMTOMSBFullDDsTest_wsejb_vehicle - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 42f82693c0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - WSMTOMSBFullDDsTest_wsejb_vehicle - - service/wsservletmtomsoapbindingwithfullddstest - - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTest - - http://mtomtestservice.org/wsdl - MTOMTestPort - - - - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTestTwo - - http://mtomtestservice.org/wsdl - MTOMTestTwoPort - - - http://webServerHost.1:webServerPort.1/WSMTOMSBFullDDsTest_web/jaxws/MTOMTest?WSDL - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_wsservlet_vehicle_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index 386b347f7f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/WSMTOMSBFullDDsTest_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - service/wsservletmtomsoapbindingwithfullddstest - - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTest - - http://mtomtestservice.org/wsdl - MTOMTestPort - - - - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTestTwo - - http://mtomtestservice.org/wsdl - MTOMTestTwoPort - - - http://webServerHost.1:webServerPort.1/WSMTOMSBFullDDsTest_web/jaxws/MTOMTest?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/build.xml deleted file mode 100644 index f28a60aeaf..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/build.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/application.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/application.xml deleted file mode 100644 index 5a6b4524af..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/application.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Simple example of application - Simple example - - ejb1.jar - - - ejb2.jar - - - - web.war - web - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/application2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/application2.xml deleted file mode 100644 index e298f72a57..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/application2.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Second Simple example of application - Second Simple example - - ejb3.jar - - - ejb4.jar - - - - web.war - secondWeb - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/attach.html b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/attach.html deleted file mode 100644 index 0404eb3cc0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/attach.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -This is a title - - -

This is a starting point


-

This is a header

-

This is a paragraph

-
    -
  • This is a bullet

  • -
- - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/attach.jpg b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/attach.jpg deleted file mode 100644 index 02d864db47..0000000000 Binary files a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/attach.jpg and /dev/null differ diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/attach2.html b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/attach2.html deleted file mode 100644 index 9a2133dc20..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/attach2.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -This is the second title - - -

This is the second starting point

-

This is the second header

-

This is the second paragraph

-
    -
  • This is the second bullet

  • -
- - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/attach2.jpg b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/attach2.jpg deleted file mode 100644 index 02d864db47..0000000000 Binary files a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/attach2.jpg and /dev/null differ diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/big.jpg b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/big.jpg deleted file mode 100644 index c6988d3efa..0000000000 Binary files a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/big.jpg and /dev/null differ diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/text.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/text.xml deleted file mode 100644 index a9fcc9a1e1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/text.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - http - - - - - http://www.wombats.com/remote/sender - - - http://127.0.0.1:8081/jaxm-provider/receiver/ebxml - - - - - - - 5 - - - 2000 - - - - - - - ebxml/ - - - 10 - - - - - - - https - - - - - jaxm.dummy.uri - - - https://127.0.0.1:8443/jaxm/dummy/ - - - - - - ebxml-https/ - - - 10 - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/text2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/text2.xml deleted file mode 100644 index 332bc47bab..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/contentRoot/text2.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - W2JDLMTOMTestApp2 - - com.sun.ts.tests.jaxws.common.JAXWSContextListener - - - MTOMTest2 - com.sun.ts.tests.jaxws.common.JAXWSServlet - 1 - - - MTOMTest2 - /jaxws/MTOMTest2 - - - 54 - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/customfile.xml deleted file mode 100644 index 5c20ba31f0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/customfile.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/jakartaEE.tokens deleted file mode 100644 index 07416e9bc9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/jakartaEE.tokens +++ /dev/null @@ -1,19 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wsservletmtomsoapbindingwithfullddstest") -SERVICE=com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTestService -FILTERNAME=Filter -FILTERCLASS=com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.CheckHttpHeadersFilter -IMPL=com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTestImpl -IMPL2=com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTestTwoImpl -SEI=com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTest -SEI2=com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTestTwo -URLALIAS=/jaxws/MTOMTest -URLALIAS2=/jaxws/MTOMTestTwo -SERVLETNAME=MTOMTestImpl -SERVLETNAME2=MTOMTestTwoImpl -NAMESPACEURI=http://mtomtestservice.org/wsdl -PORT=MTOMTestPort -PORT2=MTOMTestTwoPort -WEBSERVICEDESCRIPTION=MTOMTestService -SERVICEREFNAMEWSSERVLET=service/wsservletmtomsoapbindingwithfullddstest -SERVICEREFNAMEWSEJB=service/wsservletmtomsoapbindingwithfullddstest -SERVICEREFNAMEWSAPPCLIENT=service/wsservletmtomsoapbindingwithfullddstest diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/jakartaEE.web.xml deleted file mode 100644 index 3c16bed4df..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/jakartaEE.web.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - @APPNAME@ - - @FILTERNAME@ - @FILTERCLASS@ - - - @FILTERNAME@ - @SERVLETNAME2@ - - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/jakartaEE.webservices.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/jakartaEE.webservices.xml deleted file mode 100644 index cf2a388e35..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/jakartaEE.webservices.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - MTOMTestService - WEB-INF/wsdl/MTOMTestService.wsdl - - MTOMTestImpl - wsdl:MTOMTestPort - true - ##SOAP11_HTTP - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTest - - MTOMTestImpl - - - - MTOMTestTwoImpl - wsdl:MTOMTestTwoPort - true - ##SOAP11_HTTP - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTestTwo - - MTOMTestTwoImpl - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/wsappclient_vehicle_client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/wsappclient_vehicle_client.xml deleted file mode 100644 index 4d80000eaf..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/wsappclient_vehicle_client.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - TS app client vehicle - wsappclient_vehicle_client - - service/wsservletmtomsoapbindingwithfullddstest - jakarta.xml.ws.Service - META-INF/wsdl/MTOMTestService.wsdl - - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTest - true - - - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTestTwo - true - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/wsejb_vehicle_ejb.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/wsejb_vehicle_ejb.xml deleted file mode 100644 index a80097c5fe..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/wsejb_vehicle_ejb.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - Ejb1 - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicleRemote - com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicle - Stateful - Container - - service/wsservletmtomsoapbindingwithfullddstest - jakarta.xml.ws.Service - META-INF/wsdl/MTOMTestService.wsdl - - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTest - true - - - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTestTwo - true - - - - - - - - - - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - Remote - runTest - - Required - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/wsservlet_vehicle_web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/wsservlet_vehicle_web.xml deleted file mode 100644 index 9aa05f1090..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WSMTOMSBFullDDsTest/wsservlet_vehicle_web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - wsservlet_vehicle - - WSServlet_VehicleLogicalName - com.sun.ts.tests.common.vehicle.wsservlet.WSServletVehicle - - - WSServlet_VehicleLogicalName - /wsservlet_vehicle - - - 54 - - - service/wsservletmtomsoapbindingwithfullddstest - jakarta.xml.ws.Service - WEB-INF/wsdl/MTOMTestService.wsdl - - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTest - true - - - com.sun.ts.tests.webservices12.servlet.WSMTOMSBFullDDsTest.MTOMTestTwo - true - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/build.xml deleted file mode 100644 index 7f70f801a0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/Client.java deleted file mode 100644 index 1b5d0cee40..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/Client.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.rmi.*; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; - -import java.util.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - WSHello1 port1 = null; - - WSHello2 port2 = null; - - private void getPort() throws Exception { - TestUtil.logMsg("Get JNDI InitialContext"); - javax.naming.InitialContext ic = new javax.naming.InitialContext(); - TestUtil.logMsg( - "Do JNDI lookup of service1 java:comp/env/service/wshello1service"); - WSHello1Service service1 = (WSHello1Service) ic - .lookup("java:comp/env/service/wshello1service"); - TestUtil.logMsg("service1=" + service1); - TestUtil.logMsg( - "Do JNDI lookup of service2 java:comp/env/service/wshello2service"); - WSHello2Service service2 = (WSHello2Service) ic - .lookup("java:comp/env/service/wshello2service"); - TestUtil.logMsg("service2=" + service2); - TestUtil.logMsg("Services obtained"); - TestUtil.logMsg("Get port from service1"); - port1 = (WSHello1) service1.getWSHello1Port(); - TestUtil.logMsg("port1=" + port1); - TestUtil.logMsg("Get port from service2"); - port2 = (WSHello2) service2.getWSHello2Port(); - TestUtil.logMsg("port2=" + port2); - TestUtil.logMsg("Ports obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port1); - JAXWS_Util.dumpTargetEndpointAddress(port2); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - getPort(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Exception("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: DoInvokeWebService1Test - * - * @assertion_ids: WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4003; - * WS4EE:SPEC:4004; WS4EE:SPEC:4010; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Invoke WebService1 endpoint. - */ - public void DoInvokeWebService1Test() throws Exception { - TestUtil.logMsg("DoInvokeWebService1Test"); - boolean pass = true; - - try { - String ret = port1.sayServletHello("Hello Hello!!!"); - if (!ret.equals("WSHello1Servlet: Hello Hello!!!")) - throw new Exception("DoInvokeWebService1Test failed"); - } catch (Exception e) { - throw new Exception("DoInvokeWebService1Test failed", e); - } - } - - /* - * @testName: DoInvokeWebService2Test - * - * @assertion_ids: WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4003; - * WS4EE:SPEC:4004; WS4EE:SPEC:4010; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Invoke WebService2 endpoint. - */ - public void DoInvokeWebService2Test() throws Exception { - TestUtil.logMsg("DoInvokeWebService2Test"); - boolean pass = true; - - try { - String ret = port2.sayServletHello("Hello Hello!!!"); - if (!ret.equals("WSHello2Servlet: Hello Hello!!!")) - throw new Exception("DoInvokeWebService2Test failed"); - } catch (Exception e) { - throw new Exception("DoInvokeWebService2Test failed", e); - } - } - - /* - * @testName: VerifyTargetEndpointAddressForBothWebServices - * - * @assertion_ids: WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4003; - * WS4EE:SPEC:4004; WS4EE:SPEC:4010; WS4EE:SPEC:5000; WS4EE:SPEC:5002; - * - * @test_Strategy: Verify target endpoint address for WebService1 and - * WebService2. - * - */ - public void VerifyTargetEndpointAddressForBothWebServices() throws Exception { - TestUtil.logMsg("VerifyTargetEndpointAddressForBothWebServices"); - try { - String endpointaddr1 = JAXWS_Util.getTargetEndpointAddress(port1); - String endpointaddr2 = JAXWS_Util.getTargetEndpointAddress(port2); - TestUtil.logMsg( - "Verify that target endpoint address for WebService1 ends with [jaxws/WSHello1]"); - TestUtil.logMsg( - "Verify that target endpoint address for WebService2 ends with [jaxws/WSHello2]"); - if (endpointaddr1.endsWith("jaxws/WSHello1") - && endpointaddr2.endsWith("jaxws/WSHello2")) - TestUtil.logMsg("VerifyTargetEndpointAddressForBothWebServices passed"); - else { - TestUtil.logErr( - "Target Endpoint Address for WebService1: " + endpointaddr1); - TestUtil.logErr( - "Target Endpoint Address for WebService2: " + endpointaddr2); - throw new Exception("VerifyTargetEndpointAddressForBothWebServices failed"); - } - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Exception("VerifyTargetEndpointAddressForBothWebServices failed"); - } - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/WebServiceRefsTest_wsappclient_vehicle_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/WebServiceRefsTest_wsappclient_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index 6dccdb6322..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/WebServiceRefsTest_wsappclient_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - service/wshello1service - http://webServerHost.1:webServerPort.1/WebServiceRefsTestService1_web/jaxws/WSHello1?WSDL - - - service/wshello2service - http://webServerHost.1:webServerPort.1/WebServiceRefsTestService2_web/jaxws/WSHello2?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/WebServiceRefsTest_wsejb_vehicle_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/WebServiceRefsTest_wsejb_vehicle_client.jar.sun-application-client.xml deleted file mode 100644 index f96682e230..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/WebServiceRefsTest_wsejb_vehicle_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - ejb/WSEJBVehicle - WebServiceRefsTest_wsejb_vehicle - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/WebServiceRefsTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/WebServiceRefsTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 5a697b6a6f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/WebServiceRefsTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - 0 - - com_sun_ts_tests_common_vehicle_wsejb_WSEJBVehicle - WebServiceRefsTest_wsejb_vehicle - - service/wshello1service - http://webServerHost.1:webServerPort.1/WebServiceRefsTestService1_web/jaxws/WSHello1?WSDL - - - service/wshello2service - http://webServerHost.1:webServerPort.1/WebServiceRefsTestService2_web/jaxws/WSHello2?WSDL - - false - - - supported - supported - supported - supported - - - username_password - default - false - - - supported - - - false - -1 - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/WebServiceRefsTest_wsservlet_vehicle_web.war.sun-web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/WebServiceRefsTest_wsservlet_vehicle_web.war.sun-web.xml deleted file mode 100644 index 7a0d9d3cef..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/WebServiceRefsTest_wsservlet_vehicle_web.war.sun-web.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - service/wshello1service - http://webServerHost.1:webServerPort.1/WebServiceRefsTestService1_web/jaxws/WSHello1?WSDL - - - service/wshello2service - http://webServerHost.1:webServerPort.1/WebServiceRefsTestService2_web/jaxws/WSHello2?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/build.xml deleted file mode 100644 index fe95d111e7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/build.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/customfile1.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/customfile1.xml deleted file mode 100644 index da666b37dc..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/customfile1.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/customfile2.xml deleted file mode 100644 index 9db5d9674c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/customfile2.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/jakartaEE.tokens deleted file mode 100644 index f3748da3fb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/client/jakartaEE.tokens +++ /dev/null @@ -1,5 +0,0 @@ -WSREFSAPPCLIENT=@WebServiceRefs({ @WebServiceRef(name="service/wshello1service", type=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.client.WSHello1Service.class, wsdlLocation="META-INF/wsdl/WSHello1Service.wsdl"), @WebServiceRef(name="service/wshello2service", type=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.client.WSHello2Service.class, wsdlLocation="META-INF/wsdl/WSHello2Service.wsdl") }) - -WSREFSWEBCLIENT=@WebServiceRefs({ @WebServiceRef(name="service/wshello1service", type=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.client.WSHello1Service.class, wsdlLocation="WEB-INF/wsdl/WSHello1Service.wsdl"), @WebServiceRef(name="service/wshello2service", type=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.client.WSHello2Service.class, wsdlLocation="WEB-INF/wsdl/WSHello2Service.wsdl") }) - -WSREFSEJBCLIENT=@WebServiceRefs({ @WebServiceRef(name="service/wshello1service", type=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.client.WSHello1Service.class, wsdlLocation="META-INF/wsdl/WSHello1Service.wsdl"), @WebServiceRef(name="service/wshello2service", type=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.client.WSHello2Service.class, wsdlLocation="META-INF/wsdl/WSHello2Service.wsdl") }) diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/WSHello1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/WSHello1.java deleted file mode 100644 index f78e87634e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/WSHello1.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server1; - -import jakarta.jws.WebService; -import jakarta.jws.soap.SOAPBinding; -import jakarta.jws.soap.SOAPBinding.Style; - -@WebService(targetNamespace = "http://helloservlet.org/wsdl") -@SOAPBinding(style = Style.RPC) -public interface WSHello1 { - public String sayServletHello(String who); -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/WSHello1Servlet.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/WSHello1Servlet.java deleted file mode 100644 index 5c103232c9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/WSHello1Servlet.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server1; - -import jakarta.jws.WebService; - -@WebService(portName = "WSHello1Port", serviceName = "WSHello1Service", targetNamespace = "http://helloservlet.org/wsdl", endpointInterface = "com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server1.WSHello1") -public class WSHello1Servlet implements WSHello1 { - public String sayServletHello(String who) { - return "WSHello1Servlet: " + who; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/build.xml deleted file mode 100644 index 2c592f4392..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/jakartaEE.tokens deleted file mode 100644 index e01fe01249..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/jakartaEE.tokens +++ /dev/null @@ -1,8 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server1.WSHello1Service -SEI=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server1.WSHello1 -IMPL=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server1.WSHello1Servlet -NAMESPACEURI=http://helloservlet.org/wsdl -PORT=WSHello1Port -SERVLETNAME=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server1.WSHello1Servlet -URLALIAS=/jaxws/WSHello1 -WEBSERVICEDESCRIPTION=WebServiceRefsTestService1 diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server1/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/WSHello2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/WSHello2.java deleted file mode 100644 index e2fd9e8854..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/WSHello2.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server2; - -import jakarta.jws.WebService; -import jakarta.jws.soap.SOAPBinding; -import jakarta.jws.soap.SOAPBinding.Style; - -@WebService(targetNamespace = "http://helloservlet.org/wsdl") -@SOAPBinding(style = Style.RPC) -public interface WSHello2 { - public String sayServletHello(String who); -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/WSHello2Servlet.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/WSHello2Servlet.java deleted file mode 100644 index f8fad5978e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/WSHello2Servlet.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server2; - -import jakarta.jws.WebService; - -@WebService(portName = "WSHello2Port", serviceName = "WSHello2Service", targetNamespace = "http://helloservlet.org/wsdl", endpointInterface = "com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server2.WSHello2") -public class WSHello2Servlet implements WSHello2 { - public String sayServletHello(String who) { - return "WSHello2Servlet: " + who; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/build.xml deleted file mode 100644 index aae9ab328d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/jakartaEE.tokens deleted file mode 100644 index c7314140cc..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/jakartaEE.tokens +++ /dev/null @@ -1,8 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server2.WSHello2Service -SEI=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server2.WSHello2 -IMPL=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server2.WSHello2Servlet -NAMESPACEURI=http://helloservlet.org/wsdl -PORT=WSHello2Port -SERVLETNAME=com.sun.ts.tests.webservices12.servlet.WebServiceRefsTest.server2.WSHello2Servlet -URLALIAS=/jaxws/WSHello2 -WEBSERVICEDESCRIPTION=WebServiceRefsTestService2 diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/WebServiceRefsTest/server2/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/build.xml deleted file mode 100644 index b7fa6b791c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/servlet/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/build.xml deleted file mode 100644 index 99ef9f8cc1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/build.xml deleted file mode 100644 index 915f3d7d6d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/build.xml deleted file mode 100644 index 1df10b18e4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/build.xml deleted file mode 100644 index 17a890c368..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/defaultserviceref/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/defaultserviceref/Client.java deleted file mode 100644 index e2bee5e251..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/defaultserviceref/Client.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.specialcases.clients.j2w.doclit.defaultserviceref; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.rmi.*; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; - -import java.util.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import javax.naming.InitialContext; - -import com.sun.ts.tests.webservices12.specialcases.services.j2w.doclit.noname.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "specialcases.defaultserviceref.endpoint"; - - private static final String WSDLLOC_URL = "specialcases.defaultserviceref.wsdlloc"; - - private String url = null; - - private URL wsdlurl = null; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - Echo port = null; - - EchoService service; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPort() throws Exception { - TestUtil.logMsg("Get Service via WebServiceRef default annotation"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Echo) service.getEchoPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setTargetEndpointAddress(port, url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - TestUtil.logMsg("Get WebServiceRef from specific vehicle"); - service = (EchoService) getSharedObject(); - getTestURLs(); - getPort(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Exception("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: SpecialCasesJ2wDefaultServiceRefTest - * - * @assertion_ids: WS4EE:SPEC:4000; WS4EE:SPEC:4001; WS4EE:SPEC:5000; - * WS4EE:SPEC:5002; - * - * @test_Strategy: Client imports wsdl from a deployed webservice endpoint, - * builds the client-side artifacts, then uses the WebServiceRef annotation - * with no attributes set to access and communicate with the deployed - * webservice endpoint. It uses the default service ref name. - */ - public void SpecialCasesJ2wDefaultServiceRefTest() throws Exception { - TestUtil.logMsg("SpecialCasesJ2wDefaultServiceRefTest"); - boolean pass = true; - - if (!stringTest()) - pass = false; - if (!stringArrayTest()) - pass = false; - if (!pass) - throw new Exception("SpecialCasesJ2wDefaultServiceRefTest failed"); - } - - public boolean stringTest() throws Exception { - TestUtil.logMsg("stringTest"); - boolean pass = true; - String request = "Mary"; - - try { - String response = port.echoString(request); - if (!JAXWS_Data.compareValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Exception("stringTest failed", e); - } - return pass; - } - - public boolean stringArrayTest() throws Exception { - TestUtil.logMsg("stringArrayTest"); - boolean pass = true; - List request = JAXWS_Data.list_String_nonull_data; - - try { - List response = port.echoStringArray(request); - if (!JAXWS_Data.compareArrayValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Exception("stringArrayTest failed", e); - } - return pass; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/defaultserviceref/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/defaultserviceref/build.xml deleted file mode 100644 index df716014c7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/defaultserviceref/build.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/defaultserviceref/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/defaultserviceref/jakartaEE.tokens deleted file mode 100644 index 3a4b2f0f64..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/defaultserviceref/jakartaEE.tokens +++ /dev/null @@ -1,10 +0,0 @@ -WSRAnn=@WebServiceRef -SERVICE=com.sun.ts.tests.webservices12.specialcases.services.j2w.doclit.noname.EchoService -SEI=com.sun.ts.tests.webservices12.specialcases.services.j2w.doclit.noname.Echo -NAMESPACEURI=http://noname.doclit.j2w.services.specialcases.webservices12.tests.ts.sun.com/ -PORT=Echo -URLALIAS=/jaxws -WEBSERVICEDESCRIPTION=EchoService -SERVICEREFNAMEWSSERVLET=com.sun.ts.tests.common.vehicle.wsservlet.WSServletVehicle/service -SERVICEREFNAMEWSEJB=com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicle/service -SERVICEREFNAMEWSAPPCLIENT=com.sun.ts.tests.common.vehicle.wsappclient.WSAppclient/service diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/nameattrserviceref/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/nameattrserviceref/Client.java deleted file mode 100644 index 7fba4532d9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/nameattrserviceref/Client.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.specialcases.clients.j2w.doclit.nameattrserviceref; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.rmi.*; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; - -import java.util.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import javax.naming.InitialContext; - -import org.echo.wsdl.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "specialcases.nameattrserviceref.endpoint"; - - private static final String WSDLLOC_URL = "specialcases.nameattrserviceref.wsdlloc"; - - private String url = null; - - private URL wsdlurl = null; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - EchoTest port = null; - - MyEchoWebService service; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get Service via WebServiceRef(name=\"nameattribute\") annotation"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (EchoTest) service.getEchoTest(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setTargetEndpointAddress(port, url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - TestUtil.logMsg("Get WebServiceRef from specific vehicle"); - service = (MyEchoWebService) getSharedObject(); - getTestURLs(); - getPort(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Exception("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: SpecialCasesJ2wNameAttrServiceRefTest - * - * @assertion_ids: WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5000; - * WS4EE:SPEC:5002; - * - * @test_Strategy: Client imports wsdl from a deployed webservice endpoint, - * builds the client-side artifacts, then uses the WebServiceRef annotation - * with name attribute to access and communicate with the deployed webservice - * endpoint. - */ - public void SpecialCasesJ2wNameAttrServiceRefTest() throws Exception { - TestUtil.logMsg("SpecialCasesJ2wNameAttrServiceRefTest"); - boolean pass = true; - - if (!stringTest()) - pass = false; - if (!stringArrayTest()) - pass = false; - if (!pass) - throw new Exception("SpecialCasesJ2wNameAttrServiceRefTest failed"); - } - - public boolean stringTest() throws Exception { - TestUtil.logMsg("stringTest"); - boolean pass = true; - String request = "Mary"; - - try { - String response = port.echoString(request); - if (!JAXWS_Data.compareValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Exception("stringTest failed", e); - } - return pass; - } - - public boolean stringArrayTest() throws Exception { - TestUtil.logMsg("stringArrayTest"); - boolean pass = true; - List request = JAXWS_Data.list_String_nonull_data; - - try { - List response = port.echoStringArray(request); - if (!JAXWS_Data.compareArrayValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Exception("stringArrayTest failed", e); - } - return pass; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/nameattrserviceref/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/nameattrserviceref/build.xml deleted file mode 100644 index a9bd3b04f2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/nameattrserviceref/build.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/nameattrserviceref/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/nameattrserviceref/jakartaEE.tokens deleted file mode 100644 index 0fa3e212de..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/nameattrserviceref/jakartaEE.tokens +++ /dev/null @@ -1,10 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/MyService") -SERVICE=org.echo.wsdl.MyEchoWebService -SEI=org.echo.wsdl.EchoTest -NAMESPACEURI=http://echo.org/wsdl -PORT=EchoTest -URLALIAS=/jaxws -WEBSERVICEDESCRIPTION=MyEchoWebService -SERVICEREFNAMEWSSERVLET=service/MyService -SERVICEREFNAMEWSEJB=service/MyService -SERVICEREFNAMEWSAPPCLIENT=service/MyService diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/providerserviceref/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/providerserviceref/Client.java deleted file mode 100644 index 1770f330bb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/providerserviceref/Client.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.webservices12.specialcases.clients.j2w.doclit.providerserviceref; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.rmi.*; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; - -import java.util.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import javax.naming.InitialContext; - -import endpoint.jaxws.*; - -public class Client extends ServiceEETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "specialcases.providerserviceref.endpoint"; - - private static final String WSDLLOC_URL = "specialcases.providerserviceref.wsdlloc"; - - private String url = null; - - private URL wsdlurl = null; - - String modeProperty = null; // platform.mode -> (standalone|jakartaEE) - - Hello port = null; - - HelloService service; - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - url = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + url); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get Service via WebServiceRef(name=\"nameattribute\") annotation"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHelloPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - // JAXWS_Util.setTargetEndpointAddress(port, url); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; platform.mode; - */ - public void setup(String[] args, Properties p) throws Exception { - props = p; - boolean pass = true; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - modeProperty = p.getProperty(MODEPROP); - TestUtil.logMsg("Get WebServiceRef from specific vehicle"); - service = (HelloService) getSharedObject(); - getTestURLs(); - getPort(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Exception("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Exception("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: SpecialCasesJ2wProviderServiceRefTest - * - * @assertion_ids: WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:5001; - * WS4EE:SPEC:5002; - * - * @test_Strategy: Client imports wsdl from a deployed webservice endpoint, - * builds the client-side artifacts, then uses the WebServiceRef annotation - * with name attribute to access and communicate with the deployed webservice - * endpoint. - */ - public void SpecialCasesJ2wProviderServiceRefTest() throws Exception { - TestUtil.logMsg("SpecialCasesJ2wProviderServiceRefTest"); - boolean pass = true; - - for (int i = 0; i < 10; i++) { - String ret = port.sayHello("ProviderRef Tester loop#" + i + "!"); - if (ret.indexOf("WebSvcProviderTest-SayHello") == -1) { - TestUtil.logErr("Unexpected greeting " + ret); - pass = false; - break; - } else - TestUtil.logMsg("Got expected greeting " + ret); - } - if (!pass) - throw new Exception("SpecialCasesJ2wProviderServiceRefTest failed"); - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/providerserviceref/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/providerserviceref/build.xml deleted file mode 100644 index 7ae32e0906..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/providerserviceref/build.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/providerserviceref/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/providerserviceref/jakartaEE.tokens deleted file mode 100644 index e227f4733b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/j2w/doclit/providerserviceref/jakartaEE.tokens +++ /dev/null @@ -1,10 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/MyProviderService") -SERVICE=endpoint.jaxws.HelloService -SEI=endpoint.jaxws.Hello -NAMESPACEURI=http://endpoint/jaxws -PORT=HelloPort -URLALIAS=/jaxws/Hello -WEBSERVICEDESCRIPTION=HelloService -SERVICEREFNAMEWSSERVLET=service/MyProviderService -SERVICEREFNAMEWSEJB=service/MyProviderService -SERVICEREFNAMEWSAPPCLIENT=service/MyProviderService diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/special.build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/special.build.xml deleted file mode 100644 index ef9a3e389c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/clients/special.build.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/build.xml deleted file mode 100644 index 7c64f474e4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/build.xml deleted file mode 100644 index 7af3dcb27d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/build.xml deleted file mode 100644 index 8c73eb7b6a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname/Echo.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname/Echo.java deleted file mode 100644 index 130c91a1e0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname/Echo.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.specialcases.services.j2w.doclit.noname; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; - -@WebService -public class Echo { - @WebMethod - public String echoString(String str) { - return str; - } - - @WebMethod - public String[] echoStringArray(String[] str) { - return str; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname/build.xml deleted file mode 100644 index 3d36ce55d9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname/jakartaEE.web.xml deleted file mode 100644 index be639e949a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - WSJ2WDLSCNONAME - - com.sun.ts.tests.webservices12.specialcases.services.j2w.doclit.noname.Echo - com.sun.ts.tests.webservices12.specialcases.services.j2w.doclit.noname.Echo - 0 - - - com.sun.ts.tests.webservices12.specialcases.services.j2w.doclit.noname.Echo - /jaxws - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname2/EchoTest.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname2/EchoTest.java deleted file mode 100644 index 4d1ad6f9cf..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname2/EchoTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.specialcases.services.j2w.doclit.noname2; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; -import jakarta.jws.soap.SOAPBinding; -import jakarta.jws.soap.SOAPBinding.Style; - -@WebService(name = "EchoTest", portName = "EchoTest", serviceName = "MyEchoWebService", targetNamespace = "http://echo.org/wsdl") -@SOAPBinding(style = Style.DOCUMENT) -public class EchoTest { - @WebMethod - public String echoString(String str) { - return str; - } - - @WebMethod - public String[] echoStringArray(String[] str) { - return str; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname2/build.xml deleted file mode 100644 index 256aa30992..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname2/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname2/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname2/jakartaEE.web.xml deleted file mode 100644 index b4274f7a3b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/j2w/doclit/noname2/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - WSJ2WDLSCNONAME2 - - com.sun.ts.tests.webservices12.specialcases.services.j2w.doclit.noname2.EchoTest - com.sun.ts.tests.webservices12.specialcases.services.j2w.doclit.noname2.EchoTest - 0 - - - com.sun.ts.tests.webservices12.specialcases.services.j2w.doclit.noname2.EchoTest - /jaxws - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/build.xml deleted file mode 100644 index 9c43633285..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/build.xml deleted file mode 100644 index b57e0dd03e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/HelloImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/HelloImpl.java deleted file mode 100644 index 2e587f0166..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/HelloImpl.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.webservices12.specialcases.services.w2j.doclit.provider; - -import java.io.*; -import java.util.Map; -import jakarta.xml.ws.Provider; -import jakarta.xml.ws.WebServiceProvider; -import jakarta.xml.ws.ServiceMode; -import jakarta.xml.ws.Service; -import jakarta.xml.soap.SOAPMessage; -import jakarta.ejb.Stateless; - -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; - -import jakarta.xml.bind.JAXBContext; -import jakarta.xml.bind.JAXBElement; -import jakarta.xml.bind.Marshaller; -import jakarta.xml.bind.Unmarshaller; -import jakarta.xml.ws.WebServiceException; - -@WebServiceProvider(portName = "HelloPort", serviceName = "HelloService", targetNamespace = "http://endpoint/jaxws", wsdlLocation = "WEB-INF/wsdl/HelloService.wsdl") -public class HelloImpl implements Provider { - - private static final JAXBContext jaxbContext = createJAXBContext(); - - public jakarta.xml.bind.JAXBContext getJAXBContext() { - return jaxbContext; - } - - private static jakarta.xml.bind.JAXBContext createJAXBContext() { - try { - return jakarta.xml.bind.JAXBContext.newInstance(ObjectFactory.class); - } catch (jakarta.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("WebSvcProviderTest-SayHello"); - ByteArrayOutputStream bout = new ByteArrayOutputStream(); - ObjectFactory factory = new ObjectFactory(); - Marshaller m = jaxbContext.createMarshaller(); - m.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE); - m.marshal(factory.createSayHelloResponse(resp), bout); - return new StreamSource(new ByteArrayInputStream(bout.toByteArray())); - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/HelloService.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/HelloService.wsdl deleted file mode 100644 index 636c098470..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/HelloService.wsdl +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/build.xml deleted file mode 100644 index 94e0b50e1f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/build.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/customfile.xml deleted file mode 100644 index 3b816bd3f4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/customfile.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/customfile2.xml deleted file mode 100644 index 4e98c3c24d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/jakartaEE.web.xml deleted file mode 100644 index a498533afc..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - WSW2JDLSCProvider - - com.sun.ts.tests.webservices12.specialcases.services.w2j.doclit.provider.HelloImpl - com.sun.ts.tests.webservices12.specialcases.services.w2j.doclit.provider.HelloImpl - 0 - - - com.sun.ts.tests.webservices12.specialcases.services.w2j.doclit.provider.HelloImpl - /jaxws/Hello - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/schema1.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/schema1.xsd deleted file mode 100644 index e664640b40..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/specialcases/services/w2j/doclit/provider/schema1.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/build.xml deleted file mode 100644 index b3a180176a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/build.xml deleted file mode 100644 index e5a9248b28..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/Client.java deleted file mode 100644 index 01e5dcea07..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/Client.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.nested1; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Nested1FileSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Nested1FileSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - JAXWS_Util.dumpServiceName((Service) service); - JAXWS_Util.dumpWSDLLocation((Service) service); - JAXWS_Util.dumpPorts((Service) service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/Nested1FileSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/Nested1FileSvc.wsdl deleted file mode 100644 index 36036cf232..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/Nested1FileSvc.wsdl +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/Nested1FileSvc.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/Nested1FileSvc.xsd deleted file mode 100644 index e7c0a43209..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/Nested1FileSvc.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/TestsImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/TestsImpl.java deleted file mode 100644 index 72eb19c84a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/TestsImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.nested1; - -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Nested1FileSvc", targetNamespace = "http://Nested1FileSvc.org/wsdl", wsdlLocation = "WEB-INF/wsdl/nestedimportwsdl.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.nested1.Tests") - -public class TestsImpl implements Tests { - public com.sun.ts.tests.webservices12.wsdlImport.file.nested1.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.file.nested1.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.nested1.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/build.xml deleted file mode 100644 index f81018f955..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/customfile.xml deleted file mode 100644 index af3d273409..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/customfile2.xml deleted file mode 100644 index 42d44964ad..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/jakartaEE.tokens deleted file mode 100644 index 321bd6a694..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSNested1File") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.nested1.Nested1FileSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.nested1.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.nested1.TestsImpl -NAMESPACEURI=http://Nested1FileSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.file.nested1.TestsImpl -WEBSERVICEDESCRIPTION=Nested1FileSvc -SERVICEREFNAMEWSSERVLET=service/WSNested1File -SERVICEREFNAMEWSEJB=service/WSNested1File -SERVICEREFNAMEWSAPPCLIENT=service/WSNested1File diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/nestedimportwsdl.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/nestedimportwsdl.wsdl deleted file mode 100644 index 27edb9a837..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested1/nestedimportwsdl.wsdl +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/Client.java deleted file mode 100644 index ad1005c716..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/Client.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.nested2; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Nested2FileSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Nested2FileSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - JAXWS_Util.dumpServiceName((Service) service); - JAXWS_Util.dumpWSDLLocation((Service) service); - JAXWS_Util.dumpPorts((Service) service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/TestsImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/TestsImpl.java deleted file mode 100644 index 4a69aea2fe..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/TestsImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.nested2; - -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Nested2FileSvc", targetNamespace = "http://Nested2FileSvc.org/wsdl", wsdlLocation = "WEB-INF/wsdl/nestedimportwsdl.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.nested2.Tests") - -public class TestsImpl implements Tests { - public com.sun.ts.tests.webservices12.wsdlImport.file.nested2.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.file.nested2.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.nested2.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/build.xml deleted file mode 100644 index 36f879c48e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/build.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/customfile.xml deleted file mode 100644 index fd66373178..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/customfile2.xml deleted file mode 100644 index f368f6aee1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/jakartaEE.tokens deleted file mode 100644 index 40da3c3bbb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSNested2File") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.nested2.Nested2FileSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.nested2.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.nested2.TestsImpl -NAMESPACEURI=http://Nested2FileSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.file.nested2.TestsImpl -WEBSERVICEDESCRIPTION=Nested2FileSvc -SERVICEREFNAMEWSSERVLET=service/WSNested2File -SERVICEREFNAMEWSEJB=service/WSNested2File -SERVICEREFNAMEWSAPPCLIENT=service/WSNested2File diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/nestedimportwsdl.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/nestedimportwsdl.wsdl deleted file mode 100644 index 2f2ff948e7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/nestedimportwsdl.wsdl +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/type/Nested2FileSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/type/Nested2FileSvc.wsdl deleted file mode 100644 index 724c4d2539..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/type/Nested2FileSvc.wsdl +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/type/subtype/Nested2FileSvc.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/type/subtype/Nested2FileSvc.xsd deleted file mode 100644 index 7debec658b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested2/type/subtype/Nested2FileSvc.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/Client.java deleted file mode 100644 index 6bec8f59d7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/Client.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.nested3; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Nested3FileSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Nested3FileSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - JAXWS_Util.dumpServiceName((Service) service); - JAXWS_Util.dumpWSDLLocation((Service) service); - JAXWS_Util.dumpPorts((Service) service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:65; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/Nested3FileSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/Nested3FileSvc.wsdl deleted file mode 100644 index ec2aa18a3c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/Nested3FileSvc.wsdl +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/Nested3FileSvc.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/Nested3FileSvc.xsd deleted file mode 100644 index c825f21d6e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/Nested3FileSvc.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/TestsBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/TestsBean.java deleted file mode 100644 index 5f0f4b042f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/TestsBean.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.nested3; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Nested3FileSvc", targetNamespace = "http://Nested3FileSvc.org/wsdl", wsdlLocation = "META-INF/wsdl/nestedimportwsdl.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.nested3.Tests") - -@Stateless(name = "WSNested3File") -public class TestsBean { - - public com.sun.ts.tests.webservices12.wsdlImport.file.nested3.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.file.nested3.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.nested3.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/build.xml deleted file mode 100644 index fabbbea90a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/customfile.xml deleted file mode 100644 index 11e30f1e2a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/customfile2.xml deleted file mode 100644 index 4fbbfecb09..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/jakartaEE.tokens deleted file mode 100644 index 24f990f8af..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/jakartaEE.tokens +++ /dev/null @@ -1,14 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSNested3File") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.nested3.Nested3FileSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.nested3.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.nested3.TestsBean -NAMESPACEURI=http://Nested3FileSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -WEBSERVICEDESCRIPTION=Nested3FileSvc -SERVICEREFNAMEWSSERVLET=service/WSNested3File -SERVICEREFNAMEWSEJB=service/WSNested3File -SERVICEREFNAMEWSAPPCLIENT=service/WSNested3File -BEANWEBSERVICENAME=TestsBean -STATELESSNAME=WSNested3File - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/nestedimportwsdl.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/nestedimportwsdl.wsdl deleted file mode 100644 index bed7a90a49..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested3/nestedimportwsdl.wsdl +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/Client.java deleted file mode 100644 index 7515291a52..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/Client.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.nested4; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Nested4FileSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Nested4FileSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - JAXWS_Util.dumpServiceName((Service) service); - JAXWS_Util.dumpWSDLLocation((Service) service); - JAXWS_Util.dumpPorts((Service) service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:65; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/TestsBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/TestsBean.java deleted file mode 100644 index 948d1386b2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/TestsBean.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.nested4; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Nested4FileSvc", targetNamespace = "http://Nested4FileSvc.org/wsdl", wsdlLocation = "META-INF/wsdl/nestedimportwsdl.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.nested4.Tests") - -@Stateless(name = "WSNested4File") -public class TestsBean { - - public com.sun.ts.tests.webservices12.wsdlImport.file.nested4.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.file.nested4.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.nested4.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/build.xml deleted file mode 100644 index 9a99029f1e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/build.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/customfile.xml deleted file mode 100644 index af644e98b7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/customfile2.xml deleted file mode 100644 index 336045f597..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/jakartaEE.tokens deleted file mode 100644 index fdcc193821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/jakartaEE.tokens +++ /dev/null @@ -1,13 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSNested4File") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.nested4.Nested4FileSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.nested4.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.nested4.TestsBean -NAMESPACEURI=http://Nested4FileSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -WEBSERVICEDESCRIPTION=Nested4FileSvc -SERVICEREFNAMEWSSERVLET=service/WSNested4File -SERVICEREFNAMEWSEJB=service/WSNested4File -SERVICEREFNAMEWSAPPCLIENT=service/WSNested4File -BEANWEBSERVICENAME=TestsBean -STATELESSNAME=WSNested4File diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/nestedimportwsdl.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/nestedimportwsdl.wsdl deleted file mode 100644 index acb7dc3177..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/nestedimportwsdl.wsdl +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/type/Nested4FileSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/type/Nested4FileSvc.wsdl deleted file mode 100644 index 7e6042023e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/type/Nested4FileSvc.wsdl +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/type/subtype/Nested4FileSvc.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/type/subtype/Nested4FileSvc.xsd deleted file mode 100644 index 61dfa5c688..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/nested4/type/subtype/Nested4FileSvc.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/build.xml deleted file mode 100644 index 4c7c0bc45c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/Client.java deleted file mode 100644 index f2a360a7b2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/Client.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared1.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.Properties; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSShared1File1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSShared1File2"; - - private Tests1 port1; - - private Tests11 port11; - - private Tests2 port2; - - private Tests22 port22; - - private Tests222 port222; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - InitialContext ctx = new InitialContext(); - Service svc1; - Service svc2; - - TestUtil.logMsg( - "JNDI lookup for shared1 Service: " + SERVICE_NAME_WITH_WSDL_1); - svc1 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_1); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_1 + "found"); - TestUtil.logMsg("service=" + svc1); - JAXWS_Util.dumpServiceName((Service) svc1); - JAXWS_Util.dumpWSDLLocation((Service) svc1); - JAXWS_Util.dumpPorts((Service) svc1); - TestUtil.logMsg("Get first port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - TestUtil.logMsg("Get second port from Service"); - port11 = (Tests11) svc1.getPort(Tests11.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg( - "JNDI lookup for shared1 Service: " + SERVICE_NAME_WITH_WSDL_2); - svc2 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_2); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_2 + "found"); - TestUtil.logMsg("service=" + svc2); - JAXWS_Util.dumpServiceName((Service) svc2); - JAXWS_Util.dumpWSDLLocation((Service) svc2); - JAXWS_Util.dumpPorts((Service) svc2); - TestUtil.logMsg("Get first port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - TestUtil.logMsg("Get second port from Service"); - port22 = (Tests22) svc2.getPort(Tests22.class); - TestUtil.logMsg("Port obtained"); - TestUtil.logMsg("Get third port from Service"); - port222 = (Tests222) svc2.getPort(Tests222.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:66; WS4EE:SPEC:214; WS4EE:SPEC:227; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking first method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Invoking second method on Service1"); - port11.invokeTest11(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking first method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Invoking second method on Service2"); - port22.invokeTest22(); - TestUtil.logMsg("Invoking third method on Service2"); - port222.invokeTest222(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/build.xml deleted file mode 100644 index 390d534ab5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/build.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile.xml deleted file mode 100644 index 2990c65938..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile2.xml deleted file mode 100644 index 2daee19b8b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile3.xml deleted file mode 100644 index fd1bd0107f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/jakartaEE.tokens deleted file mode 100644 index 86be3529fa..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/client/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSREFSEJBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared1File1", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.client.Shared1FileSvc1.class, wsdlLocation="META-INF/wsdl/Shared1FileSvc1.wsdl"), @WebServiceRef(name="service/WSShared1File2", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.client.Shared1FileSvc2.class, wsdlLocation="META-INF/wsdl/Shared1FileSvc2.wsdl") }) -WSREFSAPPCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared1File1", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.client.Shared1FileSvc1.class, wsdlLocation="META-INF/wsdl/Shared1FileSvc1.wsdl"), @WebServiceRef(name="service/WSShared1File2", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.client.Shared1FileSvc2.class, wsdlLocation="META-INF/wsdl/Shared1FileSvc2.wsdl") }) -WSREFSWEBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared1File1", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.client.Shared1FileSvc1.class, wsdlLocation="WEB-INF/wsdl/Shared1FileSvc1.wsdl"), @WebServiceRef(name="service/WSShared1File2", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.client.Shared1FileSvc2.class, wsdlLocation="WEB-INF/wsdl/Shared1FileSvc2.wsdl") }) -WEBSERVICEDESCRIPTION=Shared1FileSvc1 -WEBSERVICEDESCRIPTION2=Shared1FileSvc2 -SERVICEREFNAMEWSSERVLET=service/WSShared1File1 -SERVICEREFNAMEWSSERVLET2=service/WSShared1File2 -SERVICEREFNAMEWSEJB=service/WSShared1File1 -SERVICEREFNAMEWSEJB2=service/WSShared1File2 -SERVICEREFNAMEWSAPPCLIENT=service/WSShared1File1 -SERVICEREFNAMEWSAPPCLIENT2=service/WSShared1File2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/Shared1FileSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/Shared1FileSvc1.wsdl deleted file mode 100644 index 079a19e80b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/Shared1FileSvc1.wsdl +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/Shared1FileSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/Shared1FileSvc2.wsdl deleted file mode 100644 index f64af5ffa3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/Shared1FileSvc2.wsdl +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl1.java deleted file mode 100644 index ab06a78742..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl1.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Shared1FileSvc1", targetNamespace = "http://Shared1FileSvc1.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Shared1FileSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Tests1") - -public class TestsImpl1 implements Tests1 { - public com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring(); - result.setResult("Hello"); - return result; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl11.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl11.java deleted file mode 100644 index e513cb7edf..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl11.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests11Port", serviceName = "Shared1FileSvc1", targetNamespace = "http://Shared1FileSvc1.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Shared1FileSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Tests11") - -public class TestsImpl11 implements Tests11 { - public com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring invokeTest11() { - com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl2.java deleted file mode 100644 index 775952a07f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl2.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Shared1FileSvc2", targetNamespace = "http://Shared1FileSvc2.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Shared1FileSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Tests2") - -public class TestsImpl2 implements Tests2 { - public com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring invokeTest2() { - com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring(); - result.setResult("Hello"); - return result; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl22.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl22.java deleted file mode 100644 index b9147b2de7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl22.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests22Port", serviceName = "Shared1FileSvc2", targetNamespace = "http://Shared1FileSvc2.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Shared1FileSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Tests22") - -public class TestsImpl22 implements Tests22 { - public com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring invokeTest22() { - com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring(); - result.setResult("Hello"); - return result; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl222.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl222.java deleted file mode 100644 index d2dacb3418..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/TestsImpl222.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests222Port", serviceName = "Shared1FileSvc2", targetNamespace = "http://Shared1FileSvc2.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Shared1FileSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Tests222") - -public class TestsImpl222 implements Tests222 { - public com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring invokeTest222() { - com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Astring(); - result.setResult("Hello"); - return result; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/build.xml deleted file mode 100644 index 0a033d7c6b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/build.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile.xml deleted file mode 100644 index 6d709c849f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile2.xml deleted file mode 100644 index 41f935efc0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile3.xml deleted file mode 100644 index 30b574d257..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/jakartaEE.tokens deleted file mode 100644 index b6c1a7f028..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/jakartaEE.tokens +++ /dev/null @@ -1,30 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Shared1FileSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Shared1FileSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Tests2 -SEI3=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Tests11 -SEI4=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Tests22 -SEI5=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.Tests222 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.TestsImpl1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.TestsImpl2 -IMPL3=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.TestsImpl11 -IMPL4=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.TestsImpl22 -IMPL5=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.TestsImpl222 -PORT=Tests1Port -PORT2=Tests2Port -PORT3=Tests11Port -PORT4=Tests22Port -PORT5=Tests222Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -URLALIAS3=/jaxws/Tests11 -URLALIAS4=/jaxws/Tests22 -URLALIAS5=/jaxws/Tests222 -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.TestsImpl1 -SERVLETNAME2=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.TestsImpl2 -SERVLETNAME3=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.TestsImpl11 -SERVLETNAME4=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.TestsImpl22 -SERVLETNAME5=com.sun.ts.tests.webservices12.wsdlImport.file.shared1.server.TestsImpl222 -WEBSERVICEDESCRIPTION=Shared1FileSvc1 -WEBSERVICEDESCRIPTION2=Shared1FileSvc2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/jakartaEE.web.xml deleted file mode 100644 index bf49fe52ac..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/jakartaEE.web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME3@ - @IMPL3@ - 0 - - - @SERVLETNAME4@ - @IMPL4@ - 0 - - - @SERVLETNAME5@ - @IMPL5@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - @SERVLETNAME3@ - @URLALIAS3@ - - - @SERVLETNAME4@ - @URLALIAS4@ - - - @SERVLETNAME5@ - @URLALIAS5@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/type/Shared.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/type/Shared.xsd deleted file mode 100644 index f12091606e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared1/server/type/Shared.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/build.xml deleted file mode 100644 index a3ee15aebe..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/Client.java deleted file mode 100644 index 6159a05631..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/Client.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared2.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.Properties; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSShared2File1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSShared2File2"; - - private Tests1 port1; - - private Tests2 port2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - InitialContext ctx = new InitialContext(); - Service svc1; - Service svc2; - - TestUtil.logMsg( - "JNDI lookup for shared2 Service: " + SERVICE_NAME_WITH_WSDL_1); - svc1 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_1); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_1 + "found"); - TestUtil.logMsg("service=" + svc1); - JAXWS_Util.dumpServiceName((Service) svc1); - JAXWS_Util.dumpWSDLLocation((Service) svc1); - JAXWS_Util.dumpPorts((Service) svc1); - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg( - "JNDI lookup for shared2 Service: " + SERVICE_NAME_WITH_WSDL_2); - svc2 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_2); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_2 + "found"); - TestUtil.logMsg("service=" + svc2); - JAXWS_Util.dumpServiceName((Service) svc2); - JAXWS_Util.dumpWSDLLocation((Service) svc2); - JAXWS_Util.dumpPorts((Service) svc2); - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:66; WS4EE:SPEC:214; WS4EE:SPEC:227; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/build.xml deleted file mode 100644 index e1d4300688..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/build.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile.xml deleted file mode 100644 index 4d9faf8791..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile2.xml deleted file mode 100644 index 98bce1c5e9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile3.xml deleted file mode 100644 index 4ffdefebe0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/jakartaEE.tokens deleted file mode 100644 index 6f39f8fd7f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/client/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSREFSEJBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared2File1", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.client.Shared2FileSvc1.class, wsdlLocation="META-INF/wsdl/std/svc1/Shared2FileSvc1.wsdl"), @WebServiceRef(name="service/WSShared2File2", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.client.Shared2FileSvc2.class, wsdlLocation="META-INF/wsdl/std/svc2/Shared2FileSvc2.wsdl") }) -WSREFSAPPCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared2File1", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.client.Shared2FileSvc1.class, wsdlLocation="META-INF/wsdl/std/svc1/Shared2FileSvc1.wsdl"), @WebServiceRef(name="service/WSShared2File2", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.client.Shared2FileSvc2.class, wsdlLocation="META-INF/wsdl/std/svc2/Shared2FileSvc2.wsdl") }) -WSREFSWEBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared2File1", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.client.Shared2FileSvc1.class, wsdlLocation="WEB-INF/wsdl/std/svc1/Shared2FileSvc1.wsdl"), @WebServiceRef(name="service/WSShared2File2", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.client.Shared2FileSvc2.class, wsdlLocation="WEB-INF/wsdl/std/svc2/Shared2FileSvc2.wsdl") }) -WEBSERVICEDESCRIPTION=Shared2FileSvc1 -WEBSERVICEDESCRIPTION2=Shared2FileSvc2 -SERVICEREFNAMEWSSERVLET=service/WSShared2File1 -SERVICEREFNAMEWSSERVLET2=service/WSShared2File2 -SERVICEREFNAMEWSEJB=service/WSShared2File1 -SERVICEREFNAMEWSEJB2=service/WSShared2File2 -SERVICEREFNAMEWSAPPCLIENT=service/WSShared2File1 -SERVICEREFNAMEWSAPPCLIENT2=service/WSShared2File2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/TestsImpl1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/TestsImpl1.java deleted file mode 100644 index 807a95182f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/TestsImpl1.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Shared2FileSvc1", targetNamespace = "http://Shared2FileSvc1.org/wsdl", wsdlLocation = "WEB-INF/wsdl/std/svc1/Shared2FileSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.Tests1") - -public class TestsImpl1 implements Tests1 { - public com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/TestsImpl2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/TestsImpl2.java deleted file mode 100644 index 7e03009ab1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/TestsImpl2.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Shared2FileSvc2", targetNamespace = "http://Shared2FileSvc2.org/wsdl", wsdlLocation = "WEB-INF/wsdl/std/svc2/Shared2FileSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.Tests2") - -public class TestsImpl2 implements Tests2 { - public com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.Astring invokeTest2() { - com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/build.xml deleted file mode 100644 index 475c8579d1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/build.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile.xml deleted file mode 100644 index 252cce35c5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile2.xml deleted file mode 100644 index 37138c7b01..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile3.xml deleted file mode 100644 index 27f52d9b4c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/jakartaEE.tokens deleted file mode 100644 index 79fef171f4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/jakartaEE.tokens +++ /dev/null @@ -1,15 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.Shared2FileSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.Shared2FileSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.TestsImpl1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.TestsImpl2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.TestsImpl1 -SERVLETNAME2=com.sun.ts.tests.webservices12.wsdlImport.file.shared2.server.TestsImpl2 -WEBSERVICEDESCRIPTION=Shared2FileSvc1 -WEBSERVICEDESCRIPTION2=Shared2FileSvc2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/Shared.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/Shared.xsd deleted file mode 100644 index 6b508726a9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/Shared.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/svc1/Shared2FileSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/svc1/Shared2FileSvc1.wsdl deleted file mode 100644 index c611d625ad..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/svc1/Shared2FileSvc1.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/svc2/Shared2FileSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/svc2/Shared2FileSvc2.wsdl deleted file mode 100644 index 363f97c414..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared2/server/std/svc2/Shared2FileSvc2.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/build.xml deleted file mode 100644 index 77b1d64c21..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/Client.java deleted file mode 100644 index 08aec25511..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/Client.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared3.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.Properties; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSShared3File1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSShared3File2"; - - private Tests1 port1; - - private Tests2 port2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - InitialContext ctx = new InitialContext(); - Service svc1; - Service svc2; - - TestUtil.logMsg( - "JNDI lookup for shared3 Service: " + SERVICE_NAME_WITH_WSDL_1); - svc1 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_1); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_1 + "found"); - TestUtil.logMsg("service=" + svc1); - JAXWS_Util.dumpServiceName((Service) svc1); - JAXWS_Util.dumpWSDLLocation((Service) svc1); - JAXWS_Util.dumpPorts((Service) svc1); - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg( - "JNDI lookup for shared3 Service: " + SERVICE_NAME_WITH_WSDL_2); - svc2 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_2); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_2 + "found"); - TestUtil.logMsg("service=" + svc2); - JAXWS_Util.dumpServiceName((Service) svc2); - JAXWS_Util.dumpWSDLLocation((Service) svc2); - JAXWS_Util.dumpPorts((Service) svc2); - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:65; WS4EE:SPEC:214; WS4EE:SPEC:227; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/build.xml deleted file mode 100644 index bd29733286..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/build.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile.xml deleted file mode 100644 index cac17c3576..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile2.xml deleted file mode 100644 index 6e56f66b2f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile3.xml deleted file mode 100644 index 9cdc269892..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/jakartaEE.tokens deleted file mode 100644 index 0a66467aa0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/client/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSREFSEJBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared3File1", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared3.client.Shared3FileSvc1.class, wsdlLocation="META-INF/wsdl/Shared3FileSvc1.wsdl"), @WebServiceRef(name="service/WSShared3File2", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared3.client.Shared3FileSvc2.class, wsdlLocation="META-INF/wsdl/Shared3FileSvc2.wsdl") }) -WSREFSAPPCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared3File1", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared3.client.Shared3FileSvc1.class, wsdlLocation="META-INF/wsdl/Shared3FileSvc1.wsdl"), @WebServiceRef(name="service/WSShared3File2", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared3.client.Shared3FileSvc2.class, wsdlLocation="META-INF/wsdl/Shared3FileSvc2.wsdl") }) -WSREFSWEBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared3File1", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared3.client.Shared3FileSvc1.class, wsdlLocation="WEB-INF/wsdl/Shared3FileSvc1.wsdl"), @WebServiceRef(name="service/WSShared3File2", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared3.client.Shared3FileSvc2.class, wsdlLocation="WEB-INF/wsdl/Shared3FileSvc2.wsdl") }) -WEBSERVICEDESCRIPTION=Shared3FileSvc1 -WEBSERVICEDESCRIPTION2=Shared3FileSvc2 -SERVICEREFNAMEWSSERVLET=service/WSShared3File1 -SERVICEREFNAMEWSSERVLET2=service/WSShared3File2 -SERVICEREFNAMEWSEJB=service/WSShared3File1 -SERVICEREFNAMEWSEJB2=service/WSShared3File2 -SERVICEREFNAMEWSAPPCLIENT=service/WSShared3File1 -SERVICEREFNAMEWSAPPCLIENT2=service/WSShared3File2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/Shared3FileSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/Shared3FileSvc1.wsdl deleted file mode 100644 index 63be4a1db9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/Shared3FileSvc1.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/Shared3FileSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/Shared3FileSvc2.wsdl deleted file mode 100644 index 5277ff9599..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/Shared3FileSvc2.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/TestsBean1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/TestsBean1.java deleted file mode 100644 index adebb0c8fe..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/TestsBean1.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Shared3FileSvc1", targetNamespace = "http://Shared3FileSvc1.org/wsdl", wsdlLocation = "META-INF/wsdl/Shared3FileSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.Tests1") -@Stateless(name = "StatelessTestBean1") -public class TestsBean1 { - public com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/TestsBean2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/TestsBean2.java deleted file mode 100644 index 99e5b08da1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/TestsBean2.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Shared3FileSvc2", targetNamespace = "http://Shared3FileSvc2.org/wsdl", wsdlLocation = "META-INF/wsdl/Shared3FileSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.Tests2") -@Stateless(name = "StatelessTestBean2") -public class TestsBean2 { - public com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.Astring invokeTest2() { - com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/build.xml deleted file mode 100644 index c94c9b78cb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/build.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile.xml deleted file mode 100644 index 5034a60ed1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile2.xml deleted file mode 100644 index 1c35781989..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile2.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile3.xml deleted file mode 100644 index 4e33a6f702..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/customfile3.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/jakartaEE.tokens deleted file mode 100644 index 6c2109dbf8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.Shared3FileSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.Shared3FileSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.TestsBean1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.file.shared3.server.TestsBean2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -WEBSERVICEDESCRIPTION=Shared3FileSvc1 -WEBSERVICEDESCRIPTION2=Shared3FileSvc2 -BEANWEBSERVICENAME=TestsBean1 -STATELESSNAME=StatelessTestBean1 -BEANWEBSERVICENAME2=TestsBean2 -STATELESSNAME2=StatelessTestBean2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/type/Shared.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/type/Shared.xsd deleted file mode 100644 index 01af65fded..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared3/server/type/Shared.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/build.xml deleted file mode 100644 index 1dd1428348..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/Client.java deleted file mode 100644 index d40c948e41..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/Client.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared4.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.Properties; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSShared4File1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSShared4File2"; - - private Tests1 port1; - - private Tests2 port2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - InitialContext ctx = new InitialContext(); - Service svc1; - Service svc2; - - TestUtil.logMsg( - "JNDI lookup for shared4 Service: " + SERVICE_NAME_WITH_WSDL_1); - svc1 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_1); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_1 + "found"); - TestUtil.logMsg("service=" + svc1); - JAXWS_Util.dumpServiceName((Service) svc1); - JAXWS_Util.dumpWSDLLocation((Service) svc1); - JAXWS_Util.dumpPorts((Service) svc1); - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg( - "JNDI lookup for shared4 Service: " + SERVICE_NAME_WITH_WSDL_2); - svc2 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_2); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_2 + "found"); - TestUtil.logMsg("service=" + svc2); - JAXWS_Util.dumpServiceName((Service) svc2); - JAXWS_Util.dumpWSDLLocation((Service) svc2); - JAXWS_Util.dumpPorts((Service) svc2); - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:65; WS4EE:SPEC:214; WS4EE:SPEC:227; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/build.xml deleted file mode 100644 index de07a4e7d5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/build.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile.xml deleted file mode 100644 index 3c65876c99..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile2.xml deleted file mode 100644 index d706d27601..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile3.xml deleted file mode 100644 index dc196406fe..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/jakartaEE.tokens deleted file mode 100644 index 3ab9fc9eff..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/client/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSREFSEJBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared4File1", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared4.client.Shared4FileSvc1.class, wsdlLocation="META-INF/wsdl/std/svc1/Shared4FileSvc1.wsdl"), @WebServiceRef(name="service/WSShared4File2", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared4.client.Shared4FileSvc2.class, wsdlLocation="META-INF/wsdl/std/svc2/Shared4FileSvc2.wsdl") }) -WSREFSAPPCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared4File1", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared4.client.Shared4FileSvc1.class, wsdlLocation="META-INF/wsdl/std/svc1/Shared4FileSvc1.wsdl"), @WebServiceRef(name="service/WSShared4File2", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared4.client.Shared4FileSvc2.class, wsdlLocation="META-INF/wsdl/std/svc2/Shared4FileSvc2.wsdl") }) -WSREFSWEBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared4File1", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared4.client.Shared4FileSvc1.class, wsdlLocation="WEB-INF/wsdl/std/svc1/Shared4FileSvc1.wsdl"), @WebServiceRef(name="service/WSShared4File2", type=com.sun.ts.tests.webservices12.wsdlImport.file.shared4.client.Shared4FileSvc2.class, wsdlLocation="WEB-INF/wsdl/std/svc2/Shared4FileSvc2.wsdl") }) -WEBSERVICEDESCRIPTION=Shared4FileSvc1 -WEBSERVICEDESCRIPTION2=Shared4FileSvc2 -SERVICEREFNAMEWSSERVLET=service/WSShared4File1 -SERVICEREFNAMEWSSERVLET2=service/WSShared4File2 -SERVICEREFNAMEWSEJB=service/WSShared4File1 -SERVICEREFNAMEWSEJB2=service/WSShared4File2 -SERVICEREFNAMEWSAPPCLIENT=service/WSShared4File1 -SERVICEREFNAMEWSAPPCLIENT2=service/WSShared4File2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/TestsBean1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/TestsBean1.java deleted file mode 100644 index 1d0b06b09b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/TestsBean1.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Shared4FileSvc1", targetNamespace = "http://Shared4FileSvc1.org/wsdl", wsdlLocation = "META-INF/wsdl/std/svc1/Shared4FileSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.Tests1") -@Stateless(name = "StatelessTestBean1") -public class TestsBean1 { - public com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/TestsBean2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/TestsBean2.java deleted file mode 100644 index f5a8a69e0e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/TestsBean2.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Shared4FileSvc2", targetNamespace = "http://Shared4FileSvc2.org/wsdl", wsdlLocation = "META-INF/wsdl/std/svc2/Shared4FileSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.Tests2") -@Stateless(name = "StatelessTestBean2") -public class TestsBean2 { - public com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.Astring invokeTest2() { - com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/build.xml deleted file mode 100644 index 1b4babdea7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/build.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile.xml deleted file mode 100644 index f1cf9c7b0a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile2.xml deleted file mode 100644 index b402f8c808..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile2.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile3.xml deleted file mode 100644 index 0041c6d26c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/customfile3.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/jakartaEE.tokens deleted file mode 100644 index 1af7aa3594..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/jakartaEE.tokens +++ /dev/null @@ -1,16 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.Shared4FileSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.Shared4FileSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.TestsBean1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.file.shared4.server.TestsBean2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -WEBSERVICEDESCRIPTION=Shared4FileSvc1 -WEBSERVICEDESCRIPTION2=Shared4FileSvc2 -BEANWEBSERVICENAME=TestsBean1 -STATELESSNAME=StatelessTestBean1 -BEANWEBSERVICENAME2=TestsBean2 -STATELESSNAME2=StatelessTestBean2 diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/Shared.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/Shared.xsd deleted file mode 100644 index 495c586834..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/Shared.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/svc1/Shared4FileSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/svc1/Shared4FileSvc1.wsdl deleted file mode 100644 index 2d7ad0ec2b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/svc1/Shared4FileSvc1.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/svc2/Shared4FileSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/svc2/Shared4FileSvc2.wsdl deleted file mode 100644 index 23f0a97518..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/shared4/server/std/svc2/Shared4FileSvc2.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Client.java deleted file mode 100644 index 8ace0b8557..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Client.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple1; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.*; - -import javax.xml.namespace.QName; -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Simple1FileSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Simple1FileSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - JAXWS_Util.dumpServiceName((Service) service); - JAXWS_Util.dumpWSDLLocation((Service) service); - JAXWS_Util.dumpPorts((Service) service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Simple1FilePTSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Simple1FilePTSvc.wsdl deleted file mode 100644 index 7f255c688e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Simple1FilePTSvc.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Simple1FileSvc.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Simple1FileSvc.java deleted file mode 100644 index facb703b9b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Simple1FileSvc.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple1; - -public interface Simple1FileSvc extends jakarta.xml.ws.Service { - public Tests getTestsPort() throws jakarta.xml.ws.WebServiceException; -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Simple1FileSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Simple1FileSvc.wsdl deleted file mode 100644 index 2a9e77faa3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/Simple1FileSvc.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/TestsImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/TestsImpl.java deleted file mode 100644 index fec49d15e3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/TestsImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple1; - -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Simple1FileSvc", targetNamespace = "http://Simple1FileSvc.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Simple1FileSvc.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.simple1.Tests") - -public class TestsImpl implements Tests { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/build.xml deleted file mode 100644 index c1565c37f7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/customfile.xml deleted file mode 100644 index b76454225f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/jakartaEE.tokens deleted file mode 100644 index 3685c69dd5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSSimple1File") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.simple1.Simple1FileSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.simple1.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.simple1.TestsImpl -NAMESPACEURI=http://Simple1FileSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.file.simple1.TestsImpl -WEBSERVICEDESCRIPTION=Simple1FileSvc -SERVICEREFNAMEWSSERVLET=service/WSSimple1File -SERVICEREFNAMEWSEJB=service/WSSimple1File -SERVICEREFNAMEWSAPPCLIENT=service/WSSimple1File diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple1/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/Client.java deleted file mode 100644 index 2f1c3a6d24..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/Client.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple2; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Simple2FileSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Simple2FileSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - JAXWS_Util.dumpServiceName((Service) service); - JAXWS_Util.dumpWSDLLocation((Service) service); - JAXWS_Util.dumpPorts((Service) service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/Simple2FileSvc.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/Simple2FileSvc.java deleted file mode 100644 index b1aeb4ae65..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/Simple2FileSvc.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple2; - -public interface Simple2FileSvc extends jakarta.xml.ws.Service { - public Tests getTestsPort() throws jakarta.xml.ws.WebServiceException; -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/Simple2FileSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/Simple2FileSvc.wsdl deleted file mode 100644 index 99e4c5fe15..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/Simple2FileSvc.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/TestsImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/TestsImpl.java deleted file mode 100644 index 985099a58e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/TestsImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple2; - -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Simple2FileSvc", targetNamespace = "http://Simple2FileSvc.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Simple2FileSvc.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.simple2.Tests") - -public class TestsImpl implements Tests { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/build.xml deleted file mode 100644 index d1c2a26b7f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/build.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/common/Simple2FilePTSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/common/Simple2FilePTSvc.wsdl deleted file mode 100644 index faf0c1ead3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/common/Simple2FilePTSvc.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/customfile.xml deleted file mode 100644 index a58e52131c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/jakartaEE.tokens deleted file mode 100644 index c710ecff26..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSSimple2File") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.simple2.Simple2FileSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.simple2.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.simple2.TestsImpl -NAMESPACEURI=http://Simple2FileSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.file.simple2.TestsImpl -WEBSERVICEDESCRIPTION=Simple2FileSvc -SERVICEREFNAMEWSSERVLET=service/WSSimple2File -SERVICEREFNAMEWSEJB=service/WSSimple2File -SERVICEREFNAMEWSAPPCLIENT=service/WSSimple2File diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple2/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/Client.java deleted file mode 100644 index e39ca4930f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/Client.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple3; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Simple3FileSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Simple3FileSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - JAXWS_Util.dumpServiceName((Service) service); - JAXWS_Util.dumpWSDLLocation((Service) service); - JAXWS_Util.dumpPorts((Service) service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/Simple3FileSvc.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/Simple3FileSvc.java deleted file mode 100644 index e8f09471ac..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/Simple3FileSvc.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple3; - -public interface Simple3FileSvc extends jakarta.xml.ws.Service { - public Tests getTestsPort() throws jakarta.xml.ws.WebServiceException; -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/TestsImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/TestsImpl.java deleted file mode 100644 index a7f85f9736..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/TestsImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple3; - -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Simple3FileSvc", targetNamespace = "http://Simple3FileSvc.org/wsdl", wsdlLocation = "WEB-INF/wsdl/std/svc/Simple3FileSvc.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.simple3.Tests") - -public class TestsImpl implements Tests { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/build.xml deleted file mode 100644 index 77ff964cc8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/build.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/customfile.xml deleted file mode 100644 index a0e2119aa5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/jakartaEE.tokens deleted file mode 100644 index 2df313acc1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSSimple3File") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.simple3.Simple3FileSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.simple3.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.simple3.TestsImpl -NAMESPACEURI=http://Simple3FileSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.file.simple3.TestsImpl -WEBSERVICEDESCRIPTION=Simple3FileSvc -SERVICEREFNAMEWSSERVLET=service/WSSimple3File -SERVICEREFNAMEWSEJB=service/WSSimple3File -SERVICEREFNAMEWSAPPCLIENT=service/WSSimple3File diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/std/Simple3FilePTSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/std/Simple3FilePTSvc.wsdl deleted file mode 100644 index a4a0451980..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/std/Simple3FilePTSvc.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/std/svc/Simple3FileSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/std/svc/Simple3FileSvc.wsdl deleted file mode 100644 index bc42b983ba..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple3/std/svc/Simple3FileSvc.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Client.java deleted file mode 100644 index 60e61d204b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Client.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple4; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Simple4FileSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Simple4FileSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - JAXWS_Util.dumpServiceName((Service) service); - JAXWS_Util.dumpWSDLLocation((Service) service); - JAXWS_Util.dumpPorts((Service) service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:65; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Simple4FilePTSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Simple4FilePTSvc.wsdl deleted file mode 100644 index 0ed58938f0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Simple4FilePTSvc.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Simple4FileSvc.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Simple4FileSvc.java deleted file mode 100644 index b364d2faa6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Simple4FileSvc.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple4; - -public interface Simple4FileSvc extends jakarta.xml.ws.Service { - public Tests getTestsPort() throws jakarta.xml.ws.WebServiceException; -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Simple4FileSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Simple4FileSvc.wsdl deleted file mode 100644 index 2a8ef26c4e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/Simple4FileSvc.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/TestsBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/TestsBean.java deleted file mode 100644 index 377b950d2e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/TestsBean.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple4; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Simple4FileSvc", targetNamespace = "http://Simple4FileSvc.org/wsdl", wsdlLocation = "META-INF/wsdl/Simple4FileSvc.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.simple4.Tests") -@Stateless(name = "WSSimple4File") -public class TestsBean { - - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/build.xml deleted file mode 100644 index 8b6762ab17..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/customfile.xml deleted file mode 100644 index 4296e63df5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/jakartaEE.tokens deleted file mode 100644 index 756259f87b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple4/jakartaEE.tokens +++ /dev/null @@ -1,13 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSSimple4File") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.simple4.Simple4FileSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.simple4.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.simple4.TestsBean -NAMESPACEURI=http://Simple4FileSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -WEBSERVICEDESCRIPTION=Simple4FileSvc -SERVICEREFNAMEWSSERVLET=service/WSSimple4File -SERVICEREFNAMEWSEJB=service/WSSimple4File -SERVICEREFNAMEWSAPPCLIENT=service/WSSimple4File -BEANWEBSERVICENAME=TestsBean -STATELESSNAME=WSSimple4File diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/Client.java deleted file mode 100644 index 88d7132664..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/Client.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple5; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Simple5FileSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Simple5FileSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - JAXWS_Util.dumpServiceName((Service) service); - JAXWS_Util.dumpWSDLLocation((Service) service); - JAXWS_Util.dumpPorts((Service) service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:65; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/Simple5FileSvc.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/Simple5FileSvc.java deleted file mode 100644 index a7913cb8a4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/Simple5FileSvc.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple5; - -public interface Simple5FileSvc extends jakarta.xml.ws.Service { - public Tests getTestsPort() throws jakarta.xml.ws.WebServiceException; -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/Simple5FileSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/Simple5FileSvc.wsdl deleted file mode 100644 index a17fa19e1f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/Simple5FileSvc.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/TestsBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/TestsBean.java deleted file mode 100644 index 82ac050158..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/TestsBean.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple5; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Simple5FileSvc", targetNamespace = "http://Simple5FileSvc.org/wsdl", wsdlLocation = "META-INF/wsdl/Simple5FileSvc.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.simple5.Tests") -@Stateless(name = "WSSimple5File") -public class TestsBean { - - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/build.xml deleted file mode 100644 index b09b4131d2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/build.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/common/Simple5FilePTSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/common/Simple5FilePTSvc.wsdl deleted file mode 100644 index a72b4d229d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/common/Simple5FilePTSvc.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/customfile.xml deleted file mode 100644 index fe59f3e5ac..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/jakartaEE.tokens deleted file mode 100644 index 2e5378b3df..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple5/jakartaEE.tokens +++ /dev/null @@ -1,13 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSSimple5File") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.simple5.Simple5FileSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.simple5.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.simple5.TestsBean -NAMESPACEURI=http://Simple5FileSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -WEBSERVICEDESCRIPTION=Simple5FileSvc -SERVICEREFNAMEWSSERVLET=service/WSSimple5File -SERVICEREFNAMEWSEJB=service/WSSimple5File -SERVICEREFNAMEWSAPPCLIENT=service/WSSimple5File -BEANWEBSERVICENAME=TestsBean -STATELESSNAME=WSSimple5File diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/Client.java deleted file mode 100644 index dee8c80dbd..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/Client.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple6; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Simple6FileSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Simple6FileSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - JAXWS_Util.dumpServiceName((Service) service); - JAXWS_Util.dumpWSDLLocation((Service) service); - JAXWS_Util.dumpPorts((Service) service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:65; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/TestsBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/TestsBean.java deleted file mode 100644 index f69424ce34..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/TestsBean.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.simple6; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Simple6FileSvc", targetNamespace = "http://Simple6FileSvc.org/wsdl", wsdlLocation = "META-INF/wsdl/std/svc/Simple6FileSvc.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.simple6.Tests") -@Stateless(name = "WSSimple6File") -public class TestsBean { - - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/build.xml deleted file mode 100644 index d799ec43ee..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/customfile.xml deleted file mode 100644 index 83aabe0c5d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/jakartaEE.tokens deleted file mode 100644 index 723b76d11e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/jakartaEE.tokens +++ /dev/null @@ -1,13 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSSimple6File") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.simple6.Simple6FileSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.simple6.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.simple6.TestsBean -NAMESPACEURI=http://Simple6FileSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -WEBSERVICEDESCRIPTION=Simple6FileSvc -SERVICEREFNAMEWSSERVLET=service/WSSimple6File -SERVICEREFNAMEWSEJB=service/WSSimple6File -SERVICEREFNAMEWSAPPCLIENT=service/WSSimple6File -BEANWEBSERVICENAME=TestsBean -STATELESSNAME=WSSimple6File diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/std/Simple6FilePTSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/std/Simple6FilePTSvc.wsdl deleted file mode 100644 index 26139b2537..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/std/Simple6FilePTSvc.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/std/svc/Simple6FileSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/std/svc/Simple6FileSvc.wsdl deleted file mode 100644 index 8d7efb476a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/simple6/std/svc/Simple6FileSvc.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/build.xml deleted file mode 100644 index c55e0eb6de..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/Client.java deleted file mode 100644 index 4d3413d86d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/Client.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.twin1.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.Properties; - -import jakarta.xml.ws.Service; -import jakarta.xml.ws.WebServiceRef; - -import javax.naming.InitialContext; - -public class Client extends EETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSTwin1File1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSTwin1File2"; - - private Tests1 port1; - - private Tests2 port2; - - @WebServiceRef(name = "service/WSTwin1File1") - static Twin1FileSvc1 svc1; - - @WebServiceRef(name = "service/WSTwin1File2") - static Twin1FileSvc2 svc2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("service=" + svc1); - JAXWS_Util.dumpServiceName((Service) svc1); - JAXWS_Util.dumpWSDLLocation((Service) svc1); - JAXWS_Util.dumpPorts((Service) svc1); - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg("service=" + svc2); - JAXWS_Util.dumpServiceName((Service) svc2); - JAXWS_Util.dumpWSDLLocation((Service) svc2); - JAXWS_Util.dumpPorts((Service) svc2); - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/WSTwin1FileClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/WSTwin1FileClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 5e5d239beb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/WSTwin1FileClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - service/WSTwin1File1 - - com.sun.ts.tests.webservices12.wsdlImport.file.twin1.client.Tests1 - - http://Twin1FileSvc1.org/wsdl - Tests1Port - - - - file:wsdlRepository1/WSTwin1File/svc1/Twin1FileSvc1.wsdl - - - service/WSTwin1File2 - - com.sun.ts.tests.webservices12.wsdlImport.file.twin1.client.Tests2 - - http://Twin1FileSvc2.org/wsdl - Tests2Port - - - file:wsdlRepository1/WSTwin1File/svc2/Twin1FileSvc2.wsdl - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/build.xml deleted file mode 100644 index 0804e9bd50..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/build.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/customfile.xml deleted file mode 100644 index 7a735a633a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/customfile2.xml deleted file mode 100644 index 54e87ada0d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/TestsImpl1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/TestsImpl1.java deleted file mode 100644 index b68edcf2d9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/TestsImpl1.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Twin1FileSvc1", targetNamespace = "http://Twin1FileSvc1.org/wsdl", wsdlLocation = "WEB-INF/wsdl/svc1/Twin1FileSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server.Tests1") - -public class TestsImpl1 implements Tests1 { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/TestsImpl2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/TestsImpl2.java deleted file mode 100644 index 1bf0e48aa5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/TestsImpl2.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Twin1FileSvc2", targetNamespace = "http://Twin1FileSvc2.org/wsdl", wsdlLocation = "WEB-INF/wsdl/svc2/Twin1FileSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server.Tests2") - -public class TestsImpl2 implements Tests2 { - public String invokeTest2() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/build.xml deleted file mode 100644 index ac6d05251c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/build.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/customfile.xml deleted file mode 100644 index 58be0556a8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/customfile2.xml deleted file mode 100644 index de53ab7871..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/jakartaEE.tokens deleted file mode 100644 index 9e89fec14d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/jakartaEE.tokens +++ /dev/null @@ -1,15 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server.Twin1FileSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server.Twin1FileSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server.TestsImpl1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server.TestsImpl2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server.TestsImpl1 -SERVLETNAME2=com.sun.ts.tests.webservices12.wsdlImport.file.twin1.server.TestsImpl2 -WEBSERVICEDESCRIPTION=Twin1FileSvc1 -WEBSERVICEDESCRIPTION2=Twin1FileSvc2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc1/Twin1FilePTSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc1/Twin1FilePTSvc1.wsdl deleted file mode 100644 index 54c55e7bf5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc1/Twin1FilePTSvc1.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc1/Twin1FileSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc1/Twin1FileSvc1.wsdl deleted file mode 100644 index 9e1329e548..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc1/Twin1FileSvc1.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc2/Twin1FilePTSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc2/Twin1FilePTSvc2.wsdl deleted file mode 100644 index 0076e01a8d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc2/Twin1FilePTSvc2.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc2/Twin1FileSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc2/Twin1FileSvc2.wsdl deleted file mode 100644 index 497d64cbad..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin1/server/svc2/Twin1FileSvc2.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/build.xml deleted file mode 100644 index 1dc9f7946a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/Client.java deleted file mode 100644 index 4063c11135..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/Client.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.twin2.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.Properties; - -import jakarta.xml.ws.Service; -import jakarta.xml.ws.WebServiceRef; - -import javax.naming.InitialContext; - -public class Client extends EETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSTwin2File1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSTwin2File2"; - - private Tests1 port1; - - private Tests2 port2; - - @WebServiceRef(name = "service/WSTwin2File1") - static Twin2FileSvc1 svc1; - - @WebServiceRef(name = "service/WSTwin2File2") - static Twin2FileSvc2 svc2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("service=" + svc1); - JAXWS_Util.dumpServiceName((Service) svc1); - JAXWS_Util.dumpWSDLLocation((Service) svc1); - JAXWS_Util.dumpPorts((Service) svc1); - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg("service=" + svc2); - JAXWS_Util.dumpServiceName((Service) svc2); - JAXWS_Util.dumpWSDLLocation((Service) svc2); - JAXWS_Util.dumpPorts((Service) svc2); - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/WSTwin2FileClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/WSTwin2FileClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 21558dcf1c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/WSTwin2FileClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - service/WSTwin2File1 - - com.sun.ts.tests.webservices12.wsdlImport.file.twin2.client.Tests1 - - http://Twin2FileSvc1.org/wsdl - Tests1Port - - - - file:wsdlRepository1/WSTwin2File/svc1/Twin2FileSvc1.wsdl - - - service/WSTwin2File2 - - com.sun.ts.tests.webservices12.wsdlImport.file.twin2.client.Tests2 - - http://Twin2FileSvc2.org/wsdl - Tests2Port - - - file:wsdlRepository1/WSTwin2File/svc2/Twin2FileSvc2.wsdl - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/build.xml deleted file mode 100644 index 0e1513208a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/build.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/customfile.xml deleted file mode 100644 index a5ccee2384..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/customfile2.xml deleted file mode 100644 index eea55c92e7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/TestsImpl1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/TestsImpl1.java deleted file mode 100644 index b7a32a323b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/TestsImpl1.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Twin2FileSvc1", targetNamespace = "http://Twin2FileSvc1.org/wsdl", wsdlLocation = "WEB-INF/wsdl/svc1/Twin2FileSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server.Tests1") - -public class TestsImpl1 implements Tests1 { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/TestsImpl2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/TestsImpl2.java deleted file mode 100644 index b65118cc3f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/TestsImpl2.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Twin2FileSvc2", targetNamespace = "http://Twin2FileSvc2.org/wsdl", wsdlLocation = "WEB-INF/wsdl/svc2/Twin2FileSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server.Tests2") - -public class TestsImpl2 implements Tests2 { - public String invokeTest2() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/build.xml deleted file mode 100644 index 1e238f82b0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/build.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/customfile.xml deleted file mode 100644 index 63a33bdb19..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/customfile2.xml deleted file mode 100644 index 019c832788..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/jakartaEE.tokens deleted file mode 100644 index 00c5ab57b5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/jakartaEE.tokens +++ /dev/null @@ -1,15 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server.Twin2FileSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server.Twin2FileSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server.TestsImpl1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server.TestsImpl2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server.TestsImpl1 -SERVLETNAME2=com.sun.ts.tests.webservices12.wsdlImport.file.twin2.server.TestsImpl2 -WEBSERVICEDESCRIPTION=Twin2FileSvc1 -WEBSERVICEDESCRIPTION2=Twin2FileSvc2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc1/Twin2FileSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc1/Twin2FileSvc1.wsdl deleted file mode 100644 index beab7b7822..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc1/Twin2FileSvc1.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc1/type/Twin2FilePTSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc1/type/Twin2FilePTSvc1.wsdl deleted file mode 100644 index efe6aa4cc9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc1/type/Twin2FilePTSvc1.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc2/Twin2FileSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc2/Twin2FileSvc2.wsdl deleted file mode 100644 index a2eb03451e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc2/Twin2FileSvc2.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc2/type/Twin2FilePTSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc2/type/Twin2FilePTSvc2.wsdl deleted file mode 100644 index 5f5c70999f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin2/server/svc2/type/Twin2FilePTSvc2.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/build.xml deleted file mode 100644 index 097a35da74..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/Client.java deleted file mode 100644 index eba4fd60eb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/Client.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.twin3.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.Properties; - -import jakarta.xml.ws.Service; -import jakarta.xml.ws.WebServiceRef; - -import javax.naming.InitialContext; - -public class Client extends EETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSTwin3File1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSTwin3File2"; - - private Tests1 port1; - - private Tests2 port2; - - @WebServiceRef(name = "service/WSTwin3File1") - static Twin3FileSvc1 svc1; - - @WebServiceRef(name = "service/WSTwin3File2") - static Twin3FileSvc2 svc2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("service=" + svc1); - JAXWS_Util.dumpServiceName((Service) svc1); - JAXWS_Util.dumpWSDLLocation((Service) svc1); - JAXWS_Util.dumpPorts((Service) svc1); - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg("service=" + svc2); - JAXWS_Util.dumpServiceName((Service) svc2); - JAXWS_Util.dumpWSDLLocation((Service) svc2); - JAXWS_Util.dumpPorts((Service) svc2); - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/WSTwin3FileClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/WSTwin3FileClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 48cc7f6f21..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/WSTwin3FileClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - service/WSTwin3File1 - - com.sun.ts.tests.webservices12.wsdlImport.file.twin3.client.Tests1 - - http://Twin3FileSvc1.org/wsdl - Tests1Port - - - - file:wsdlRepository1/WSTwin3File/svc1/Twin3FileSvc1.wsdl - - - service/WSTwin3File2 - - com.sun.ts.tests.webservices12.wsdlImport.file.twin3.client.Tests2 - - http://Twin3FileSvc2.org/wsdl - Tests2Port - - - file:wsdlRepository1/WSTwin3File/svc2/Twin3FileSvc2.wsdl - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/build.xml deleted file mode 100644 index 23592ad9b7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/build.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/customfile.xml deleted file mode 100644 index 32af71936b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/customfile2.xml deleted file mode 100644 index ff30a15d10..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/TestsBean1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/TestsBean1.java deleted file mode 100644 index bf152d9b69..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/TestsBean1.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Twin3FileSvc1", targetNamespace = "http://Twin3FileSvc1.org/wsdl", wsdlLocation = "META-INF/wsdl/svc1/Twin3FileSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server.Tests1") - -@Stateless(name = "StatelessTestBean1") -public class TestsBean1 { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/TestsBean2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/TestsBean2.java deleted file mode 100644 index d1a3f05be2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/TestsBean2.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Twin3FileSvc2", targetNamespace = "http://Twin3FileSvc2.org/wsdl", wsdlLocation = "META-INF/wsdl/svc2/Twin3FileSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server.Tests2") - -@Stateless(name = "StatelessTestBean2") -public class TestsBean2 { - public String invokeTest2() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/build.xml deleted file mode 100644 index 396111fbec..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/build.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/customfile.xml deleted file mode 100644 index 02ed0c7d0b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/customfile2.xml deleted file mode 100644 index 357a64466c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/jakartaEE.tokens deleted file mode 100644 index b38a7a61e4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/jakartaEE.tokens +++ /dev/null @@ -1,18 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server.Twin3FileSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server.Twin3FileSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server.TestsBean1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.file.twin3.server.TestsBean2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -WEBSERVICEDESCRIPTION=Twin3FileSvc1 -WEBSERVICEDESCRIPTION2=Twin3FileSvc2 -BEANWEBSERVICENAME=TestsBean1 -STATELESSNAME=StatelessTestBean1 -BEANWEBSERVICENAME2=TestsBean2 -STATELESSNAME2=StatelessTestBean2 - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc1/Twin3FilePTSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc1/Twin3FilePTSvc1.wsdl deleted file mode 100644 index 3b98168751..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc1/Twin3FilePTSvc1.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc1/Twin3FileSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc1/Twin3FileSvc1.wsdl deleted file mode 100644 index 5160a3348f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc1/Twin3FileSvc1.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc2/Twin3FilePTSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc2/Twin3FilePTSvc2.wsdl deleted file mode 100644 index c5dfbd71f2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc2/Twin3FilePTSvc2.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc2/Twin3FileSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc2/Twin3FileSvc2.wsdl deleted file mode 100644 index 5525e43df0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin3/server/svc2/Twin3FileSvc2.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/build.xml deleted file mode 100644 index 15aa5cf6d8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/Client.java deleted file mode 100644 index b071facc8c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/Client.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.twin4.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.util.Properties; - -import jakarta.xml.ws.Service; -import jakarta.xml.ws.WebServiceRef; - -import javax.naming.InitialContext; - -public class Client extends EETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSTwin4File1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSTwin4File2"; - - private Tests1 port1; - - private Tests2 port2; - - @WebServiceRef(name = "service/WSTwin4File1") - static Twin4FileSvc1 svc1; - - @WebServiceRef(name = "service/WSTwin4File2") - static Twin4FileSvc2 svc2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - InitialContext ctx = new InitialContext(); - TestUtil.logMsg("service=" + svc1); - JAXWS_Util.dumpServiceName((Service) svc1); - JAXWS_Util.dumpWSDLLocation((Service) svc1); - JAXWS_Util.dumpPorts((Service) svc1); - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg("service=" + svc2); - JAXWS_Util.dumpServiceName((Service) svc2); - JAXWS_Util.dumpWSDLLocation((Service) svc2); - JAXWS_Util.dumpPorts((Service) svc2); - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/WSTwin4FileClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/WSTwin4FileClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 574765b3c1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/WSTwin4FileClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - service/WSTwin4File1 - - com.sun.ts.tests.webservices12.wsdlImport.file.twin4.client.Tests1 - - http://Twin4FileSvc1.org/wsdl - Tests1Port - - - - file:wsdlRepository1/WSTwin4File/svc1/Twin4FileSvc1.wsdl - - - service/WSTwin4File2 - - com.sun.ts.tests.webservices12.wsdlImport.file.twin4.client.Tests2 - - http://Twin4FileSvc2.org/wsdl - Tests2Port - - - file:wsdlRepository1/WSTwin4File/svc2/Twin4FileSvc2.wsdl - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/build.xml deleted file mode 100644 index 1c34707b61..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/customfile.xml deleted file mode 100644 index 8992bfdf37..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/customfile2.xml deleted file mode 100644 index 9dac400e5a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/TestsBean1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/TestsBean1.java deleted file mode 100644 index fb636a57f6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/TestsBean1.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Twin4FileSvc1", targetNamespace = "http://Twin4FileSvc1.org/wsdl", wsdlLocation = "META-INF/wsdl/svc1/Twin4FileSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server.Tests1") - -@Stateless(name = "StatelessTestBean1") -public class TestsBean1 { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/TestsBean2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/TestsBean2.java deleted file mode 100644 index f5740dc5ed..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/TestsBean2.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Twin4FileSvc2", targetNamespace = "http://Twin4FileSvc2.org/wsdl", wsdlLocation = "META-INF/wsdl/svc2/Twin4FileSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server.Tests2") - -@Stateless(name = "StatelessTestBean2") -public class TestsBean2 { - public String invokeTest2() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/build.xml deleted file mode 100644 index 4b2fcb92a5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/build.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/customfile.xml deleted file mode 100644 index 07c9ec02f4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/customfile2.xml deleted file mode 100644 index f68fa1df1f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/jakartaEE.tokens deleted file mode 100644 index bc1d90ff28..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/jakartaEE.tokens +++ /dev/null @@ -1,18 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server.Twin4FileSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server.Twin4FileSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server.TestsBean1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.file.twin4.server.TestsBean2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -WEBSERVICEDESCRIPTION=Twin4FileSvc1 -WEBSERVICEDESCRIPTION2=Twin4FileSvc2 -BEANWEBSERVICENAME=TestsBean1 -STATELESSNAME=StatelessTestBean1 -BEANWEBSERVICENAME2=TestsBean2 -STATELESSNAME2=StatelessTestBean2 - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc1/Twin4FileSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc1/Twin4FileSvc1.wsdl deleted file mode 100644 index da658584ad..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc1/Twin4FileSvc1.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc1/type/Twin4FilePTSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc1/type/Twin4FilePTSvc1.wsdl deleted file mode 100644 index a565792019..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc1/type/Twin4FilePTSvc1.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc2/Twin4FileSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc2/Twin4FileSvc2.wsdl deleted file mode 100644 index 259703e875..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc2/Twin4FileSvc2.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc2/type/Twin4FilePTSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc2/type/Twin4FilePTSvc2.wsdl deleted file mode 100644 index 680b438b68..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/file/twin4/server/svc2/type/Twin4FilePTSvc2.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/build.xml deleted file mode 100644 index 70d92a3330..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/Client.java deleted file mode 100644 index d1086d57ef..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/Client.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.nested1; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Nested1HttpSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Nested1HttpSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/Nested1HttpSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/Nested1HttpSvc.wsdl deleted file mode 100644 index 7ab46fff24..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/Nested1HttpSvc.wsdl +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/Nested1HttpSvc.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/Nested1HttpSvc.xsd deleted file mode 100644 index d4b85fa542..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/Nested1HttpSvc.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/TestsImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/TestsImpl.java deleted file mode 100644 index 443445cf10..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/TestsImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.nested1; - -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Nested1HttpSvc", targetNamespace = "http://Nested1HttpSvc.org/wsdl", wsdlLocation = "WEB-INF/wsdl/nestedimportwsdl.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.nested1.Tests") - -public class TestsImpl implements Tests { - public com.sun.ts.tests.webservices12.wsdlImport.http.nested1.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.http.nested1.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.nested1.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/build.xml deleted file mode 100644 index 17f9605f27..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/customfile.xml deleted file mode 100644 index 862ddf21a5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/customfile2.xml deleted file mode 100644 index fc70739017..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/jakartaEE.tokens deleted file mode 100644 index 4708ee3daa..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSNested1Http") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.nested1.Nested1HttpSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.nested1.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.nested1.TestsImpl -NAMESPACEURI=http://Nested1HttpSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.http.nested1.TestsImpl -WEBSERVICEDESCRIPTION=Nested1HttpSvc -SERVICEREFNAMEWSSERVLET=service/WSNested1Http -SERVICEREFNAMEWSEJB=service/WSNested1Http -SERVICEREFNAMEWSAPPCLIENT=service/WSNested1Http diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/nestedimportwsdl.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/nestedimportwsdl.wsdl deleted file mode 100644 index e7acf3caa6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested1/nestedimportwsdl.wsdl +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/Client.java deleted file mode 100644 index 1c42969bc1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/Client.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.nested2; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Nested2HttpSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Nested2HttpSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/TestsImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/TestsImpl.java deleted file mode 100644 index 1a52c63226..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/TestsImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.nested2; - -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Nested2HttpSvc", targetNamespace = "http://Nested2HttpSvc.org/wsdl", wsdlLocation = "WEB-INF/wsdl/nestedimportwsdl.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.nested2.Tests") - -public class TestsImpl implements Tests { - public com.sun.ts.tests.webservices12.wsdlImport.http.nested2.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.http.nested2.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.nested2.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/build.xml deleted file mode 100644 index fdf96b9fce..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/build.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/customfile.xml deleted file mode 100644 index c3c1d92eca..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/customfile2.xml deleted file mode 100644 index 960c1cfa6f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/jakartaEE.tokens deleted file mode 100644 index 7f79eaa48b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSNested2Http") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.nested2.Nested2HttpSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.nested2.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.nested2.TestsImpl -NAMESPACEURI=http://Nested2HttpSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.http.nested2.TestsImpl -WEBSERVICEDESCRIPTION=Nested2HttpSvc -SERVICEREFNAMEWSSERVLET=service/WSNested2Http -SERVICEREFNAMEWSEJB=service/WSNested2Http -SERVICEREFNAMEWSAPPCLIENT=service/WSNested2Http diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/nestedimportwsdl.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/nestedimportwsdl.wsdl deleted file mode 100644 index fc2c1f6e74..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/nestedimportwsdl.wsdl +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/type/Nested2HttpSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/type/Nested2HttpSvc.wsdl deleted file mode 100644 index 7f7b9a7ac8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/type/Nested2HttpSvc.wsdl +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/type/subtype/Nested2HttpSvc.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/type/subtype/Nested2HttpSvc.xsd deleted file mode 100644 index 74f1d55df3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested2/type/subtype/Nested2HttpSvc.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/Client.java deleted file mode 100644 index fba7b819aa..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/Client.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.nested3; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Nested3HttpSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Nested3HttpSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:65; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/Nested3HttpSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/Nested3HttpSvc.wsdl deleted file mode 100644 index 48ecc433b8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/Nested3HttpSvc.wsdl +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/Nested3HttpSvc.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/Nested3HttpSvc.xsd deleted file mode 100644 index 95d7730add..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/Nested3HttpSvc.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/TestsBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/TestsBean.java deleted file mode 100644 index 3dfa46b2fa..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/TestsBean.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.nested3; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Nested3HttpSvc", targetNamespace = "http://Nested3HttpSvc.org/wsdl", wsdlLocation = "META-INF/wsdl/nestedimportwsdl.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.nested3.Tests") - -@Stateless(name = "WSNested3Http") -public class TestsBean { - - public com.sun.ts.tests.webservices12.wsdlImport.http.nested3.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.http.nested3.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.nested3.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/build.xml deleted file mode 100644 index b62dc1f705..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/build.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/customfile.xml deleted file mode 100644 index 7f918d6ede..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/customfile2.xml deleted file mode 100644 index e538c36586..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/jakartaEE.tokens deleted file mode 100644 index ed17487679..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/jakartaEE.tokens +++ /dev/null @@ -1,13 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSNested3Http") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.nested3.Nested3HttpSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.nested3.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.nested3.TestsBean -NAMESPACEURI=http://Nested3HttpSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -WEBSERVICEDESCRIPTION=Nested3HttpSvc -SERVICEREFNAMEWSSERVLET=service/WSNested3Http -SERVICEREFNAMEWSEJB=service/WSNested3Http -SERVICEREFNAMEWSAPPCLIENT=service/WSNested3Http -BEANWEBSERVICENAME=TestsBean -STATELESSNAME=WSNested3Http diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/nestedimportwsdl.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/nestedimportwsdl.wsdl deleted file mode 100644 index 4c30416077..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested3/nestedimportwsdl.wsdl +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/Client.java deleted file mode 100644 index 8bbb159598..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/Client.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.nested4; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Nested4HttpSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Nested4HttpSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:65; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/TestsBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/TestsBean.java deleted file mode 100644 index 205d49675e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/TestsBean.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.nested4; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Nested4HttpSvc", targetNamespace = "http://Nested4HttpSvc.org/wsdl", wsdlLocation = "META-INF/wsdl/nestedimportwsdl.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.nested4.Tests") - -@Stateless(name = "WSNested4Http") -public class TestsBean { - - public com.sun.ts.tests.webservices12.wsdlImport.http.nested4.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.http.nested4.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.nested4.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/build.xml deleted file mode 100644 index ca85adaa2e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/build.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/customfile.xml deleted file mode 100644 index 4dc4c2594f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/customfile2.xml deleted file mode 100644 index bed1c7635e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/jakartaEE.tokens deleted file mode 100644 index 79178275ed..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/jakartaEE.tokens +++ /dev/null @@ -1,14 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSNested4Http") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.nested4.Nested4HttpSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.nested4.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.nested4.TestsBean -NAMESPACEURI=http://Nested4HttpSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -WEBSERVICEDESCRIPTION=Nested4HttpSvc -SERVICEREFNAMEWSSERVLET=service/WSNested4Http -SERVICEREFNAMEWSEJB=service/WSNested4Http -SERVICEREFNAMEWSAPPCLIENT=service/WSNested4Http -BEANWEBSERVICENAME=TestsBean -STATELESSNAME=WSNested4Http - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/nestedimportwsdl.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/nestedimportwsdl.wsdl deleted file mode 100644 index dd14a23233..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/nestedimportwsdl.wsdl +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/type/Nested4HttpSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/type/Nested4HttpSvc.wsdl deleted file mode 100644 index 57498f3f6d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/type/Nested4HttpSvc.wsdl +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/type/subtype/Nested4HttpSvc.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/type/subtype/Nested4HttpSvc.xsd deleted file mode 100644 index 8009dbc919..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/nested4/type/subtype/Nested4HttpSvc.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/build.xml deleted file mode 100644 index 726dd3dc69..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/Client.java deleted file mode 100644 index 2023eb96d2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/Client.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared1.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.Properties; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSShared1Http1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSShared1Http2"; - - private Tests1 port1; - - private Tests2 port2; - - private Tests11 port11; - - private Tests22 port22; - - private Tests222 port222; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - InitialContext ctx = new InitialContext(); - Service svc1; - Service svc2; - - TestUtil.logMsg( - "JNDI lookup for shared1 Service: " + SERVICE_NAME_WITH_WSDL_1); - svc1 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_1); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_1 + "found"); - TestUtil.logMsg("Get first port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - TestUtil.logMsg("Get second port from Service"); - port11 = (Tests11) svc1.getPort(Tests11.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg( - "JNDI lookup for shared1 Service: " + SERVICE_NAME_WITH_WSDL_2); - svc2 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_2); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_2 + "found"); - TestUtil.logMsg("Get first port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - TestUtil.logMsg("Get second port from Service"); - port22 = (Tests22) svc2.getPort(Tests22.class); - TestUtil.logMsg("Port obtained"); - TestUtil.logMsg("Get third port from Service"); - port222 = (Tests222) svc2.getPort(Tests222.class); - TestUtil.logMsg("Port obtained"); - - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:66; WS4EE:SPEC:214; WS4EE:SPEC:227; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking first method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Invoking second method on Service1"); - port11.invokeTest11(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking first method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Invoking second method on Service2"); - port22.invokeTest22(); - TestUtil.logMsg("Invoking third method on Service2"); - port222.invokeTest222(); - TestUtil.logMsg("Service2 passed"); - - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/build.xml deleted file mode 100644 index 46d4ed23ba..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/build.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile.xml deleted file mode 100644 index d2a1288d96..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile2.xml deleted file mode 100644 index c6e658f7e1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile3.xml deleted file mode 100644 index c1955bfb1b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/jakartaEE.tokens deleted file mode 100644 index cef32b32d2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/client/jakartaEE.tokens +++ /dev/null @@ -1,14 +0,0 @@ -WSREFSEJBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared1Http1", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.client.Shared1HttpSvc1.class, wsdlLocation="META-INF/wsdl/Shared1HttpSvc1.wsdl"), @WebServiceRef(name="service/WSShared1Http2", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.client.Shared1HttpSvc2.class, wsdlLocation="META-INF/wsdl/Shared1HttpSvc2.wsdl") }) -WSREFSAPPCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared1Http1", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.client.Shared1HttpSvc1.class, wsdlLocation="META-INF/wsdl/Shared1HttpSvc1.wsdl"), @WebServiceRef(name="service/WSShared1Http2", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.client.Shared1HttpSvc2.class, wsdlLocation="META-INF/wsdl/Shared1HttpSvc2.wsdl") }) -WSREFSWEBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared1Http1", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.client.Shared1HttpSvc1.class, wsdlLocation="WEB-INF/wsdl/Shared1HttpSvc1.wsdl"), @WebServiceRef(name="service/WSShared1Http2", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.client.Shared1HttpSvc2.class, wsdlLocation="WEB-INF/wsdl/Shared1HttpSvc2.wsdl") }) -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -WEBSERVICEDESCRIPTION=Shared1HttpSvc1 -WEBSERVICEDESCRIPTION2=Shared1HttpSvc2 -SERVICEREFNAMEWSSERVLET=service/WSShared1Http1 -SERVICEREFNAMEWSSERVLET2=service/WSShared1Http2 -SERVICEREFNAMEWSEJB=service/WSShared1Http1 -SERVICEREFNAMEWSEJB2=service/WSShared1Http2 -SERVICEREFNAMEWSAPPCLIENT=service/WSShared1Http1 -SERVICEREFNAMEWSAPPCLIENT2=service/WSShared1Http2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/Shared1HttpSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/Shared1HttpSvc1.wsdl deleted file mode 100644 index 9281101508..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/Shared1HttpSvc1.wsdl +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/Shared1HttpSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/Shared1HttpSvc2.wsdl deleted file mode 100644 index e1d538b86c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/Shared1HttpSvc2.wsdl +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl1.java deleted file mode 100644 index cc7d4ddd6a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl1.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Shared1HttpSvc1", targetNamespace = "http://Shared1HttpSvc1.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Shared1HttpSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Tests1") - -public class TestsImpl1 implements Tests1 { - public com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl11.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl11.java deleted file mode 100644 index 0ad41d03d1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl11.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests11Port", serviceName = "Shared1HttpSvc1", targetNamespace = "http://Shared1HttpSvc1.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Shared1HttpSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Tests11") - -public class TestsImpl11 implements Tests11 { - public com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring invokeTest11() { - com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl2.java deleted file mode 100644 index 1707350a76..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl2.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Shared1HttpSvc2", targetNamespace = "http://Shared1HttpSvc2.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Shared1HttpSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Tests2") - -public class TestsImpl2 implements Tests2 { - public com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring invokeTest2() { - com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl22.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl22.java deleted file mode 100644 index d9e67ef581..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl22.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests22Port", serviceName = "Shared1HttpSvc2", targetNamespace = "http://Shared1HttpSvc2.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Shared1HttpSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Tests22") - -public class TestsImpl22 implements Tests22 { - public com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring invokeTest22() { - com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring(); - result.setResult("Hello"); - return result; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl222.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl222.java deleted file mode 100644 index 9b09b21f4e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/TestsImpl222.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests222Port", serviceName = "Shared1HttpSvc2", targetNamespace = "http://Shared1HttpSvc2.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Shared1HttpSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Tests222") - -public class TestsImpl222 implements Tests222 { - public com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring invokeTest222() { - com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Astring(); - result.setResult("Hello"); - return result; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/build.xml deleted file mode 100644 index 68f9d196e9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/build.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile.xml deleted file mode 100644 index 45cbf86364..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile2.xml deleted file mode 100644 index 8c6d4e9481..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile3.xml deleted file mode 100644 index da4d7896eb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/jakartaEE.tokens deleted file mode 100644 index ee5663a5aa..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/jakartaEE.tokens +++ /dev/null @@ -1,30 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Shared1HttpSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Shared1HttpSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Tests2 -SEI3=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Tests11 -SEI4=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Tests22 -SEI5=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.Tests222 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.TestsImpl1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.TestsImpl2 -IMPL3=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.TestsImpl11 -IMPL4=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.TestsImpl22 -IMPL5=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.TestsImpl222 -PORT=Tests1Port -PORT2=Tests2Port -PORT3=Tests11Port -PORT4=Tests22Port -PORT5=Tests222Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -URLALIAS3=/jaxws/Tests11 -URLALIAS4=/jaxws/Tests22 -URLALIAS5=/jaxws/Tests222 -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.TestsImpl1 -SERVLETNAME2=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.TestsImpl2 -SERVLETNAME3=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.TestsImpl11 -SERVLETNAME4=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.TestsImpl22 -SERVLETNAME5=com.sun.ts.tests.webservices12.wsdlImport.http.shared1.server.TestsImpl222 -WEBSERVICEDESCRIPTION=Shared1HttpSvc1 -WEBSERVICEDESCRIPTION2=Shared1HttpSvc2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/jakartaEE.web.xml deleted file mode 100644 index bf49fe52ac..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/jakartaEE.web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME3@ - @IMPL3@ - 0 - - - @SERVLETNAME4@ - @IMPL4@ - 0 - - - @SERVLETNAME5@ - @IMPL5@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - @SERVLETNAME3@ - @URLALIAS3@ - - - @SERVLETNAME4@ - @URLALIAS4@ - - - @SERVLETNAME5@ - @URLALIAS5@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/type/Shared.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/type/Shared.xsd deleted file mode 100644 index 6c6116871d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared1/server/type/Shared.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/build.xml deleted file mode 100644 index 19d2b60f4b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/Client.java deleted file mode 100644 index d2f2d74a7a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/Client.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared2.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.Properties; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSShared2Http1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSShared2Http2"; - - private Tests1 port1; - - private Tests2 port2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - InitialContext ctx = new InitialContext(); - Service svc1; - Service svc2; - - TestUtil.logMsg( - "JNDI lookup for shared2 Service: " + SERVICE_NAME_WITH_WSDL_1); - svc1 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_1); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_1 + "found"); - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg( - "JNDI lookup for shared2 Service: " + SERVICE_NAME_WITH_WSDL_2); - svc2 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_2); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_2 + "found"); - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:66; WS4EE:SPEC:214; WS4EE:SPEC:227; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/build.xml deleted file mode 100644 index d038bc6f76..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/build.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile.xml deleted file mode 100644 index 4aafcc597d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile2.xml deleted file mode 100644 index 883ed6bf18..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile3.xml deleted file mode 100644 index 626da2bc15..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/jakartaEE.tokens deleted file mode 100644 index e403903d39..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/client/jakartaEE.tokens +++ /dev/null @@ -1,14 +0,0 @@ -WSREFSEJBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared2Http1", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.client.Shared2HttpSvc1.class, wsdlLocation="META-INF/wsdl/std/svc1/Shared2HttpSvc1.wsdl"), @WebServiceRef(name="service/WSShared2Http2", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.client.Shared2HttpSvc2.class, wsdlLocation="META-INF/wsdl/std/svc2/Shared2HttpSvc2.wsdl") }) -WSREFSAPPCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared2Http1", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.client.Shared2HttpSvc1.class, wsdlLocation="META-INF/wsdl/std/svc1/Shared2HttpSvc1.wsdl"), @WebServiceRef(name="service/WSShared2Http2", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.client.Shared2HttpSvc2.class, wsdlLocation="META-INF/wsdl/std/svc2/Shared2HttpSvc2.wsdl") }) -WSREFSWEBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared2Http1", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.client.Shared2HttpSvc1.class, wsdlLocation="WEB-INF/wsdl/std/svc1/Shared2HttpSvc1.wsdl"), @WebServiceRef(name="service/WSShared2Http2", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.client.Shared2HttpSvc2.class, wsdlLocation="WEB-INF/wsdl/std/svc2/Shared2HttpSvc2.wsdl") }) -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -WEBSERVICEDESCRIPTION=Shared2HttpSvc1 -WEBSERVICEDESCRIPTION2=Shared2HttpSvc2 -SERVICEREFNAMEWSSERVLET=service/WSShared2Http1 -SERVICEREFNAMEWSSERVLET2=service/WSShared2Http2 -SERVICEREFNAMEWSEJB=service/WSShared2Http1 -SERVICEREFNAMEWSEJB2=service/WSShared2Http2 -SERVICEREFNAMEWSAPPCLIENT=service/WSShared2Http1 -SERVICEREFNAMEWSAPPCLIENT2=service/WSShared2Http2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/TestsImpl1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/TestsImpl1.java deleted file mode 100644 index 8d73378181..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/TestsImpl1.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Shared2HttpSvc1", targetNamespace = "http://Shared2HttpSvc1.org/wsdl", wsdlLocation = "WEB-INF/wsdl/std/svc1/Shared2HttpSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.Tests1") - -public class TestsImpl1 implements Tests1 { - public com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/TestsImpl2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/TestsImpl2.java deleted file mode 100644 index e6dbd5b870..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/TestsImpl2.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Shared2HttpSvc2", targetNamespace = "http://Shared2HttpSvc2.org/wsdl", wsdlLocation = "WEB-INF/wsdl/std/svc2/Shared2HttpSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.Tests2") - -public class TestsImpl2 implements Tests2 { - public com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.Astring invokeTest2() { - com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/build.xml deleted file mode 100644 index 4af9dcf3f2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/build.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile.xml deleted file mode 100644 index 5b0762f652..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile2.xml deleted file mode 100644 index b81418e86d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile3.xml deleted file mode 100644 index cdd204eb81..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/jakartaEE.tokens deleted file mode 100644 index 05dd5d1241..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/jakartaEE.tokens +++ /dev/null @@ -1,15 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.Shared2HttpSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.Shared2HttpSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.TestsImpl1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.TestsImpl2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.TestsImpl1 -SERVLETNAME2=com.sun.ts.tests.webservices12.wsdlImport.http.shared2.server.TestsImpl2 -WEBSERVICEDESCRIPTION=Shared2HttpSvc1 -WEBSERVICEDESCRIPTION2=Shared2HttpSvc2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/Shared.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/Shared.xsd deleted file mode 100644 index 6679eb9d18..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/Shared.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/svc1/Shared2HttpSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/svc1/Shared2HttpSvc1.wsdl deleted file mode 100644 index 55702a0bec..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/svc1/Shared2HttpSvc1.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/svc2/Shared2HttpSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/svc2/Shared2HttpSvc2.wsdl deleted file mode 100644 index ac17713ca2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared2/server/std/svc2/Shared2HttpSvc2.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/build.xml deleted file mode 100644 index 8aea5ec523..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/Client.java deleted file mode 100644 index 2373e9ad44..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/Client.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared3.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.Properties; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSShared3Http1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSShared3Http2"; - - private Tests1 port1; - - private Tests2 port2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - InitialContext ctx = new InitialContext(); - Service svc1; - Service svc2; - - TestUtil.logMsg( - "JNDI lookup for shared3 Service: " + SERVICE_NAME_WITH_WSDL_1); - svc1 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_1); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_1 + "found"); - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg( - "JNDI lookup for shared3 Service: " + SERVICE_NAME_WITH_WSDL_2); - svc2 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_2); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_2 + "found"); - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:65; WS4EE:SPEC:214; WS4EE:SPEC:227; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/build.xml deleted file mode 100644 index 88210851c4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/build.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile.xml deleted file mode 100644 index 5df42cfaf4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile2.xml deleted file mode 100644 index a4f3e539b4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile3.xml deleted file mode 100644 index 937933d783..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/jakartaEE.tokens deleted file mode 100644 index ef7816a592..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/client/jakartaEE.tokens +++ /dev/null @@ -1,14 +0,0 @@ -WSREFSEJBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared3Http1", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared3.client.Shared3HttpSvc1.class, wsdlLocation="META-INF/wsdl/Shared3HttpSvc1.wsdl"), @WebServiceRef(name="service/WSShared3Http2", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared3.client.Shared3HttpSvc2.class, wsdlLocation="META-INF/wsdl/Shared3HttpSvc2.wsdl") }) -WSREFSAPPCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared3Http1", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared3.client.Shared3HttpSvc1.class, wsdlLocation="META-INF/wsdl/Shared3HttpSvc1.wsdl"), @WebServiceRef(name="service/WSShared3Http2", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared3.client.Shared3HttpSvc2.class, wsdlLocation="META-INF/wsdl/Shared3HttpSvc2.wsdl") }) -WSREFSWEBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared3Http1", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared3.client.Shared3HttpSvc1.class, wsdlLocation="WEB-INF/wsdl/Shared3HttpSvc1.wsdl"), @WebServiceRef(name="service/WSShared3Http2", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared3.client.Shared3HttpSvc2.class, wsdlLocation="WEB-INF/wsdl/Shared3HttpSvc2.wsdl") }) -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -WEBSERVICEDESCRIPTION=Shared3HttpSvc1 -WEBSERVICEDESCRIPTION2=Shared3HttpSvc2 -SERVICEREFNAMEWSSERVLET=service/WSShared3Http1 -SERVICEREFNAMEWSSERVLET2=service/WSShared3Http2 -SERVICEREFNAMEWSEJB=service/WSShared3Http1 -SERVICEREFNAMEWSEJB2=service/WSShared3Http2 -SERVICEREFNAMEWSAPPCLIENT=service/WSShared3Http1 -SERVICEREFNAMEWSAPPCLIENT2=service/WSShared3Http2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/Shared3HttpSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/Shared3HttpSvc1.wsdl deleted file mode 100644 index dc4c0f0784..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/Shared3HttpSvc1.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/Shared3HttpSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/Shared3HttpSvc2.wsdl deleted file mode 100644 index d82edc126c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/Shared3HttpSvc2.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/TestsBean1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/TestsBean1.java deleted file mode 100644 index e3392f5a5d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/TestsBean1.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Shared3HttpSvc1", targetNamespace = "http://Shared3HttpSvc1.org/wsdl", wsdlLocation = "META-INF/wsdl/Shared3HttpSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.Tests1") -@Stateless(name = "StatelessTestBean1") -public class TestsBean1 { - public com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/TestsBean2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/TestsBean2.java deleted file mode 100644 index 7586e13027..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/TestsBean2.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Shared3HttpSvc2", targetNamespace = "http://Shared3HttpSvc2.org/wsdl", wsdlLocation = "META-INF/wsdl/Shared3HttpSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.Tests2") -@Stateless(name = "StatelessTestBean2") -public class TestsBean2 { - public com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.Astring invokeTest2() { - com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/build.xml deleted file mode 100644 index 382e5a2df0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/build.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile.xml deleted file mode 100644 index a5181bbd02..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile2.xml deleted file mode 100644 index f26a38b04a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile3.xml deleted file mode 100644 index e1994726f0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/jakartaEE.tokens deleted file mode 100644 index 58e1fc86bc..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/jakartaEE.tokens +++ /dev/null @@ -1,17 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.Shared3HttpSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.Shared3HttpSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.TestsBean1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.http.shared3.server.TestsBean2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -WEBSERVICEDESCRIPTION=Shared3HttpSvc1 -WEBSERVICEDESCRIPTION2=Shared3HttpSvc2 -BEANWEBSERVICENAME=TestsBean1 -STATELESSNAME=StatelessTestBean1 -BEANWEBSERVICENAME2=TestsBean2 -STATELESSNAME2=StatelessTestBean2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/type/Shared.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/type/Shared.xsd deleted file mode 100644 index a8d412039f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared3/server/type/Shared.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/build.xml deleted file mode 100644 index 9e8f6794e6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/Client.java deleted file mode 100644 index f4756cefe9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/Client.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared4.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.Properties; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSShared4Http1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSShared4Http2"; - - private Tests1 port1; - - private Tests2 port2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - InitialContext ctx = new InitialContext(); - Service svc1; - Service svc2; - - TestUtil.logMsg( - "JNDI lookup for shared4 Service: " + SERVICE_NAME_WITH_WSDL_1); - svc1 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_1); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_1 + "found"); - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg( - "JNDI lookup for shared4 Service: " + SERVICE_NAME_WITH_WSDL_2); - svc2 = (jakarta.xml.ws.Service) ctx - .lookup("java:comp/env/service/" + SERVICE_NAME_WITH_WSDL_2); - TestUtil.logMsg("Service: " + SERVICE_NAME_WITH_WSDL_2 + "found"); - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:65; WS4EE:SPEC:214; WS4EE:SPEC:227; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/build.xml deleted file mode 100644 index 73accb9f07..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/build.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile.xml deleted file mode 100644 index eb6a4f86f1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile2.xml deleted file mode 100644 index 916f2a9f71..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile3.xml deleted file mode 100644 index 8bfa8d8f1d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/jakartaEE.tokens deleted file mode 100644 index f8f64769b0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/client/jakartaEE.tokens +++ /dev/null @@ -1,14 +0,0 @@ -WSREFSEJBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared4Http1", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared4.client.Shared4HttpSvc1.class, wsdlLocation="META-INF/wsdl/std/svc1/Shared4HttpSvc1.wsdl"), @WebServiceRef(name="service/WSShared4Http2", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared4.client.Shared4HttpSvc2.class, wsdlLocation="META-INF/wsdl/std/svc2/Shared4HttpSvc2.wsdl") }) -WSREFSAPPCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared4Http1", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared4.client.Shared4HttpSvc1.class, wsdlLocation="META-INF/wsdl/std/svc1/Shared4HttpSvc1.wsdl"), @WebServiceRef(name="service/WSShared4Http2", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared4.client.Shared4HttpSvc2.class, wsdlLocation="META-INF/wsdl/std/svc2/Shared4HttpSvc2.wsdl") }) -WSREFSWEBCLIENT=@WebServiceRefs({@WebServiceRef(name="service/WSShared4Http1", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared4.client.Shared4HttpSvc1.class, wsdlLocation="WEB-INF/wsdl/std/svc1/Shared4HttpSvc1.wsdl"), @WebServiceRef(name="service/WSShared4Http2", type=com.sun.ts.tests.webservices12.wsdlImport.http.shared4.client.Shared4HttpSvc2.class, wsdlLocation="WEB-INF/wsdl/std/svc2/Shared4HttpSvc2.wsdl") }) -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -WEBSERVICEDESCRIPTION=Shared4HttpSvc1 -WEBSERVICEDESCRIPTION2=Shared4HttpSvc2 -SERVICEREFNAMEWSSERVLET=service/WSShared4Http1 -SERVICEREFNAMEWSSERVLET2=service/WSShared4Http2 -SERVICEREFNAMEWSEJB=service/WSShared4Http1 -SERVICEREFNAMEWSEJB2=service/WSShared4Http2 -SERVICEREFNAMEWSAPPCLIENT=service/WSShared4Http1 -SERVICEREFNAMEWSAPPCLIENT2=service/WSShared4Http2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/TestsBean1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/TestsBean1.java deleted file mode 100644 index 382cc7e80d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/TestsBean1.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Shared4HttpSvc1", targetNamespace = "http://Shared4HttpSvc1.org/wsdl", wsdlLocation = "META-INF/wsdl/std/svc1/Shared4HttpSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.Tests1") -@Stateless(name = "StatelessTestBean1") -public class TestsBean1 { - public com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.Astring invokeTest1() { - com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/TestsBean2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/TestsBean2.java deleted file mode 100644 index 7c746b63eb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/TestsBean2.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Shared4HttpSvc2", targetNamespace = "http://Shared4HttpSvc2.org/wsdl", wsdlLocation = "META-INF/wsdl/std/svc2/Shared4HttpSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.Tests2") -@Stateless(name = "StatelessTestBean2") -public class TestsBean2 { - public com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.Astring invokeTest2() { - com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.Astring result = new com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.Astring(); - result.setResult("Hello"); - return result; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/build.xml deleted file mode 100644 index fb2e27671a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/build.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile.xml deleted file mode 100644 index 23dfb77774..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile2.xml deleted file mode 100644 index 1f5a6ac67b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile3.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile3.xml deleted file mode 100644 index 5fbdd56dea..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/customfile3.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/jakartaEE.tokens deleted file mode 100644 index 5e5adbf15e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/jakartaEE.tokens +++ /dev/null @@ -1,16 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.Shared4HttpSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.Shared4HttpSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.TestsBean1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.http.shared4.server.TestsBean2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -WEBSERVICEDESCRIPTION=Shared4HttpSvc1 -WEBSERVICEDESCRIPTION2=Shared4HttpSvc2 -BEANWEBSERVICENAME=TestsBean1 -STATELESSNAME=StatelessTestBean1 -BEANWEBSERVICENAME2=TestsBean2 -STATELESSNAME2=StatelessTestBean2 diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/Shared.xsd b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/Shared.xsd deleted file mode 100644 index 4e176cca54..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/Shared.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/svc1/Shared4HttpSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/svc1/Shared4HttpSvc1.wsdl deleted file mode 100644 index 879aed421f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/svc1/Shared4HttpSvc1.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/svc2/Shared4HttpSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/svc2/Shared4HttpSvc2.wsdl deleted file mode 100644 index a8701264a9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/shared4/server/std/svc2/Shared4HttpSvc2.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Client.java deleted file mode 100644 index 6124801dc2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Client.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple1; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Simple1HttpSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Simple1HttpSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Simple1HttpPTSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Simple1HttpPTSvc.wsdl deleted file mode 100644 index 198675ba8e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Simple1HttpPTSvc.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Simple1HttpSvc.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Simple1HttpSvc.java deleted file mode 100644 index d6b8fc198b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Simple1HttpSvc.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple1; - -public interface Simple1HttpSvc extends jakarta.xml.ws.Service { - public Tests getTestsPort() throws jakarta.xml.ws.WebServiceException; -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Simple1HttpSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Simple1HttpSvc.wsdl deleted file mode 100644 index f59d459bf0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/Simple1HttpSvc.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/TestsImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/TestsImpl.java deleted file mode 100644 index fd9fb87fe1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/TestsImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple1; - -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Simple1HttpSvc", targetNamespace = "http://Simple1HttpSvc.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Simple1HttpSvc.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.simple1.Tests") - -public class TestsImpl implements Tests { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/build.xml deleted file mode 100644 index 502b3984ff..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/customfile.xml deleted file mode 100644 index ca7cb8e883..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/jakartaEE.tokens deleted file mode 100644 index f560c19a29..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSSimple1Http") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.simple1.Simple1HttpSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.simple1.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.simple1.TestsImpl -NAMESPACEURI=http://Simple1HttpSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.http.simple1.TestsImpl -WEBSERVICEDESCRIPTION=Simple1HttpSvc -SERVICEREFNAMEWSSERVLET=service/WSSimple1Http -SERVICEREFNAMEWSEJB=service/WSSimple1Http -SERVICEREFNAMEWSAPPCLIENT=service/WSSimple1Http diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple1/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/Client.java deleted file mode 100644 index f5f2f09fcb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/Client.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple2; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Simple2HttpSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Simple2HttpSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/Simple2HttpSvc.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/Simple2HttpSvc.java deleted file mode 100644 index 78ce246192..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/Simple2HttpSvc.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple2; - -public interface Simple2HttpSvc extends jakarta.xml.ws.Service { - public Tests getTestsPort() throws jakarta.xml.ws.WebServiceException; -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/Simple2HttpSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/Simple2HttpSvc.wsdl deleted file mode 100644 index 67253cf805..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/Simple2HttpSvc.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/TestsImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/TestsImpl.java deleted file mode 100644 index 008fe8553a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/TestsImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple2; - -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Simple2HttpSvc", targetNamespace = "http://Simple2HttpSvc.org/wsdl", wsdlLocation = "WEB-INF/wsdl/Simple2HttpSvc.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.simple2.Tests") - -public class TestsImpl implements Tests { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/build.xml deleted file mode 100644 index af8440ae5d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/common/Simple2HttpPTSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/common/Simple2HttpPTSvc.wsdl deleted file mode 100644 index d0277a6326..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/common/Simple2HttpPTSvc.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/customfile.xml deleted file mode 100644 index 7b3484fa8d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/jakartaEE.tokens deleted file mode 100644 index 28d2aecf30..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSSimple2Http") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.simple2.Simple2HttpSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.simple2.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.simple2.TestsImpl -NAMESPACEURI=http://Simple2HttpSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.http.simple2.TestsImpl -WEBSERVICEDESCRIPTION=Simple2HttpSvc -SERVICEREFNAMEWSSERVLET=service/WSSimple2Http -SERVICEREFNAMEWSEJB=service/WSSimple2Http -SERVICEREFNAMEWSAPPCLIENT=service/WSSimple2Http diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple2/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/Client.java deleted file mode 100644 index cce018ef59..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/Client.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple3; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Simple3HttpSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Simple3HttpSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/TestsImpl.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/TestsImpl.java deleted file mode 100644 index 2cc66d5f3f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/TestsImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple3; - -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Simple3HttpSvc", targetNamespace = "http://Simple3HttpSvc.org/wsdl", wsdlLocation = "WEB-INF/wsdl/std/svc/Simple3HttpSvc.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.simple3.Tests") - -public class TestsImpl implements Tests { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/build.xml deleted file mode 100644 index ba13fbe15c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/customfile.xml deleted file mode 100644 index e840025112..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/jakartaEE.tokens deleted file mode 100644 index 5d3fae8a74..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/jakartaEE.tokens +++ /dev/null @@ -1,12 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSSimple3Http") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.simple3.Simple3HttpSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.simple3.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.simple3.TestsImpl -NAMESPACEURI=http://Simple3HttpSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.http.simple3.TestsImpl -WEBSERVICEDESCRIPTION=Simple3HttpSvc -SERVICEREFNAMEWSSERVLET=service/WSSimple3Http -SERVICEREFNAMEWSEJB=service/WSSimple3Http -SERVICEREFNAMEWSAPPCLIENT=service/WSSimple3Http diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/std/Simple3HttpPTSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/std/Simple3HttpPTSvc.wsdl deleted file mode 100644 index 50876f780c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/std/Simple3HttpPTSvc.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/std/svc/Simple3HttpSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/std/svc/Simple3HttpSvc.wsdl deleted file mode 100644 index 5f5e2b0b97..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple3/std/svc/Simple3HttpSvc.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Client.java deleted file mode 100644 index eaeb94d95c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Client.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple4; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Simple4HttpSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Simple4HttpSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:65; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Simple4HttpPTSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Simple4HttpPTSvc.wsdl deleted file mode 100644 index 530e77e439..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Simple4HttpPTSvc.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Simple4HttpSvc.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Simple4HttpSvc.java deleted file mode 100644 index c26bfbe895..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Simple4HttpSvc.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple4; - -public interface Simple4HttpSvc extends jakarta.xml.ws.Service { - public Tests getTestsPort() throws jakarta.xml.ws.WebServiceException; -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Simple4HttpSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Simple4HttpSvc.wsdl deleted file mode 100644 index 59595c3a22..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/Simple4HttpSvc.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/TestsBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/TestsBean.java deleted file mode 100644 index fe12f976a7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/TestsBean.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple4; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Simple4HttpSvc", targetNamespace = "http://Simple4HttpSvc.org/wsdl", wsdlLocation = "META-INF/wsdl/Simple4HttpSvc.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.simple4.Tests") -@Stateless(name = "WSSimple4Http") -public class TestsBean { - - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/build.xml deleted file mode 100644 index f2ed57fc65..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/customfile.xml deleted file mode 100644 index d7649bfb3e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/jakartaEE.tokens deleted file mode 100644 index 658707bb1d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple4/jakartaEE.tokens +++ /dev/null @@ -1,14 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSSimple4Http") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.simple4.Simple4HttpSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.simple4.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.simple4.TestsBean -NAMESPACEURI=http://Simple4HttpSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -WEBSERVICEDESCRIPTION=Simple4HttpSvc -SERVICEREFNAMEWSSERVLET=service/WSSimple4Http -SERVICEREFNAMEWSEJB=service/WSSimple4Http -SERVICEREFNAMEWSAPPCLIENT=service/WSSimple4Http -BEANWEBSERVICENAME=TestsBean -STATELESSNAME=WSSimple4Http - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/Client.java deleted file mode 100644 index 1c8228eb29..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/Client.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple5; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Simple5HttpSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Simple5HttpSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:65; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/Simple5HttpSvc.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/Simple5HttpSvc.java deleted file mode 100644 index 237ce76734..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/Simple5HttpSvc.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple5; - -public interface Simple5HttpSvc extends jakarta.xml.ws.Service { - public Tests getTestsPort() throws jakarta.xml.ws.WebServiceException; -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/Simple5HttpSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/Simple5HttpSvc.wsdl deleted file mode 100644 index b177df071d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/Simple5HttpSvc.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/TestsBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/TestsBean.java deleted file mode 100644 index adfa47c6c2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/TestsBean.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple5; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Simple5HttpSvc", targetNamespace = "http://Simple5HttpSvc.org/wsdl", wsdlLocation = "META-INF/wsdl/Simple5HttpSvc.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.simple5.Tests") -@Stateless(name = "WSSimple5Http") -public class TestsBean { - - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/build.xml deleted file mode 100644 index 39a25678f1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/build.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/common/Simple5HttpPTSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/common/Simple5HttpPTSvc.wsdl deleted file mode 100644 index f7313855f9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/common/Simple5HttpPTSvc.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/customfile.xml deleted file mode 100644 index b13c3d147a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/jakartaEE.tokens deleted file mode 100644 index 99f45ae8e7..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple5/jakartaEE.tokens +++ /dev/null @@ -1,14 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSSimple5Http") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.simple5.Simple5HttpSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.simple5.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.simple5.TestsBean -NAMESPACEURI=http://Simple5HttpSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -WEBSERVICEDESCRIPTION=Simple5HttpSvc -SERVICEREFNAMEWSSERVLET=service/WSSimple5Http -SERVICEREFNAMEWSEJB=service/WSSimple5Http -SERVICEREFNAMEWSAPPCLIENT=service/WSSimple5Http -BEANWEBSERVICENAME=TestsBean -STATELESSNAME=WSSimple5Http - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/Client.java deleted file mode 100644 index ac792dea82..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/Client.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple6; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.*; - -import jakarta.xml.ws.Service; - -import javax.naming.InitialContext; - -public class Client extends ServiceEETest { - private Tests port; - - Simple6HttpSvc service = null; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg( - "WebServiceRef is not set in Client (get it from specific vehicle)"); - service = (Simple6HttpSvc) getSharedObject(); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from Service"); - port = (Tests) service.getPort(Tests.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:65; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - port.invokeTest1(); - TestUtil.logMsg("InvokeMethod passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/TestsBean.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/TestsBean.java deleted file mode 100644 index f5f51307ba..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/TestsBean.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.simple6; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; - -@WebService(portName = "TestsPort", serviceName = "Simple6HttpSvc", targetNamespace = "http://Simple6HttpSvc.org/wsdl", wsdlLocation = "META-INF/wsdl/std/svc/Simple6HttpSvc.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.simple6.Tests") -@Stateless(name = "WSSimple6Http") -public class TestsBean { - - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/build.xml deleted file mode 100644 index 302081bdf0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/customfile.xml deleted file mode 100644 index cc5697da65..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/customfile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/jakartaEE.tokens deleted file mode 100644 index 73559ecd7d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/jakartaEE.tokens +++ /dev/null @@ -1,13 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/WSSimple6Http") -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.simple6.Simple6HttpSvc -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.simple6.Tests -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.simple6.TestsBean -NAMESPACEURI=http://Simple6HttpSvc.org/wsdl -PORT=TestsPort -URLALIAS=/jaxws/Tests -WEBSERVICEDESCRIPTION=Simple6HttpSvc -SERVICEREFNAMEWSSERVLET=service/WSSimple6Http -SERVICEREFNAMEWSEJB=service/WSSimple6Http -SERVICEREFNAMEWSAPPCLIENT=service/WSSimple6Http -BEANWEBSERVICENAME=TestsBean -STATELESSNAME=WSSimple6Http diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/std/Simple6HttpPTSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/std/Simple6HttpPTSvc.wsdl deleted file mode 100644 index 7bcf30b8cf..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/std/Simple6HttpPTSvc.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/std/svc/Simple6HttpSvc.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/std/svc/Simple6HttpSvc.wsdl deleted file mode 100644 index 8474f953f6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/simple6/std/svc/Simple6HttpSvc.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/build.xml deleted file mode 100644 index 73352c1c94..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/Client.java deleted file mode 100644 index 5c9129e501..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/Client.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.twin1.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.Properties; - -import jakarta.xml.ws.Service; -import jakarta.xml.ws.WebServiceRef; - -public class Client extends EETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSTwin1Http1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSTwin1Http2"; - - private Tests1 port1; - - private Tests2 port2; - - @WebServiceRef(name = "service/WSTwin1Http1") - static Twin1HttpSvc1 svc1; - - @WebServiceRef(name = "service/WSTwin1Http2") - static Twin1HttpSvc2 svc2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/WSTwin1HttpClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/WSTwin1HttpClnt_client.jar.sun-application-client.xml deleted file mode 100644 index c14e6e3836..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/WSTwin1HttpClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - service/WSTwin1Http1 - - com.sun.ts.tests.webservices12.wsdlImport.http.twin1.client.Tests1 - - http://Twin1HttpSvc1.org/wsdl - Tests1Port - - - http://webServerHost.1:webServerPort.1/WSTwin1Http_web/jaxws/Tests1?WSDL - - - service/WSTwin1Http2 - - com.sun.ts.tests.webservices12.wsdlImport.http.twin1.client.Tests2 - - http://Twin1HttpSvc2.org/wsdl - Tests2Port - - - http://webServerHost.1:webServerPort.1/WSTwin1Http_web/jaxws/Tests2?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/build.xml deleted file mode 100644 index e939e6d74d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/build.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/customfile.xml deleted file mode 100644 index fa255922d1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/customfile2.xml deleted file mode 100644 index 7775842b8d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/TestsImpl1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/TestsImpl1.java deleted file mode 100644 index e497e5d6f2..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/TestsImpl1.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Twin1HttpSvc1", targetNamespace = "http://Twin1HttpSvc1.org/wsdl", wsdlLocation = "WEB-INF/wsdl/svc1/Twin1HttpSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server.Tests1") - -public class TestsImpl1 implements Tests1 { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/TestsImpl2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/TestsImpl2.java deleted file mode 100644 index 04b8fa9159..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/TestsImpl2.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Twin1HttpSvc2", targetNamespace = "http://Twin1HttpSvc2.org/wsdl", wsdlLocation = "WEB-INF/wsdl/svc2/Twin1HttpSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server.Tests2") - -public class TestsImpl2 implements Tests2 { - public String invokeTest2() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/build.xml deleted file mode 100644 index 595f1d68de..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/build.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/customfile.xml deleted file mode 100644 index 36f1f09dc1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/customfile2.xml deleted file mode 100644 index 6d8987b8c8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/jakartaEE.tokens deleted file mode 100644 index eb5d82c2d3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/jakartaEE.tokens +++ /dev/null @@ -1,15 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server.Twin1HttpSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server.Twin1HttpSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server.TestsImpl1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server.TestsImpl2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server.TestsImpl1 -SERVLETNAME2=com.sun.ts.tests.webservices12.wsdlImport.http.twin1.server.TestsImpl2 -WEBSERVICEDESCRIPTION=Twin1HttpSvc1 -WEBSERVICEDESCRIPTION2=Twin1HttpSvc2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc1/Twin1HttpPTSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc1/Twin1HttpPTSvc1.wsdl deleted file mode 100644 index fa86374f11..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc1/Twin1HttpPTSvc1.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc1/Twin1HttpSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc1/Twin1HttpSvc1.wsdl deleted file mode 100644 index 51db58dda0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc1/Twin1HttpSvc1.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc2/Twin1HttpPTSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc2/Twin1HttpPTSvc2.wsdl deleted file mode 100644 index 6cd51a305b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc2/Twin1HttpPTSvc2.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc2/Twin1HttpSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc2/Twin1HttpSvc2.wsdl deleted file mode 100644 index 4bd9dc872f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin1/server/svc2/Twin1HttpSvc2.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/build.xml deleted file mode 100644 index d8a2a97fcb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/Client.java deleted file mode 100644 index f228f8de0b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/Client.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.twin2.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.Properties; - -import jakarta.xml.ws.Service; -import jakarta.xml.ws.WebServiceRef; - -public class Client extends EETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSTwin2Http1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSTwin2Http2"; - - private Tests1 port1; - - private Tests2 port2; - - @WebServiceRef(name = "service/WSTwin2Http1") - static Twin2HttpSvc1 svc1; - - @WebServiceRef(name = "service/WSTwin2Http2") - static Twin2HttpSvc2 svc2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/WSTwin2HttpClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/WSTwin2HttpClnt_client.jar.sun-application-client.xml deleted file mode 100644 index a0649aa6d4..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/WSTwin2HttpClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - service/WSTwin2Http1 - - com.sun.ts.tests.webservices12.wsdlImport.http.twin2.client.Tests1 - - http://Twin2HttpSvc1.org/wsdl - Tests1Port - - - http://webServerHost.1:webServerPort.1/WSTwin2Http_web/jaxws/Tests1?WSDL - - - service/WSTwin2Http2 - - com.sun.ts.tests.webservices12.wsdlImport.file.twin2.client.Tests2 - - http://Twin2HttpSvc2.org/wsdl - Tests2Port - - - http://webServerHost.1:webServerPort.1/WSTwin2Http_web/jaxws/Tests2?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/build.xml deleted file mode 100644 index c9413af330..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/build.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/customfile.xml deleted file mode 100644 index 68a2781a97..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/customfile2.xml deleted file mode 100644 index 1ff6c99f90..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/TestsImpl1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/TestsImpl1.java deleted file mode 100644 index 2c11a7899f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/TestsImpl1.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Twin2HttpSvc1", targetNamespace = "http://Twin2HttpSvc1.org/wsdl", wsdlLocation = "WEB-INF/wsdl/svc1/Twin2HttpSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server.Tests1") - -public class TestsImpl1 implements Tests1 { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/TestsImpl2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/TestsImpl2.java deleted file mode 100644 index 07ace70748..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/TestsImpl2.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Twin2HttpSvc2", targetNamespace = "http://Twin2HttpSvc2.org/wsdl", wsdlLocation = "WEB-INF/wsdl/svc2/Twin2HttpSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server.Tests2") - -public class TestsImpl2 implements Tests2 { - public String invokeTest2() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/build.xml deleted file mode 100644 index 1961ae93cf..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/build.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/customfile.xml deleted file mode 100644 index acb7dcf772..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/customfile2.xml deleted file mode 100644 index fa6689f1bf..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/jakartaEE.tokens deleted file mode 100644 index b29752cee5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/jakartaEE.tokens +++ /dev/null @@ -1,15 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server.Twin2HttpSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server.Twin2HttpSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server.TestsImpl1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server.TestsImpl2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -SERVLETNAME=com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server.TestsImpl1 -SERVLETNAME2=com.sun.ts.tests.webservices12.wsdlImport.http.twin2.server.TestsImpl2 -WEBSERVICEDESCRIPTION=Twin2HttpSvc1 -WEBSERVICEDESCRIPTION2=Twin2HttpSvc2 - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/jakartaEE.web.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/jakartaEE.web.xml deleted file mode 100644 index 5924c48a76..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/jakartaEE.web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME2@ - @IMPL2@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - @SERVLETNAME2@ - @URLALIAS2@ - - - 54 - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc1/Twin2HttpSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc1/Twin2HttpSvc1.wsdl deleted file mode 100644 index 4bfbbdf46b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc1/Twin2HttpSvc1.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc1/type/Twin2HttpPTSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc1/type/Twin2HttpPTSvc1.wsdl deleted file mode 100644 index d14903f03e..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc1/type/Twin2HttpPTSvc1.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc2/Twin2HttpSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc2/Twin2HttpSvc2.wsdl deleted file mode 100644 index deaffb8a0f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc2/Twin2HttpSvc2.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc2/type/Twin2HttpPTSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc2/type/Twin2HttpPTSvc2.wsdl deleted file mode 100644 index 2bedc9602d..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin2/server/svc2/type/Twin2HttpPTSvc2.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/build.xml deleted file mode 100644 index eb72c181ff..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/Client.java deleted file mode 100644 index 77454524ae..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/Client.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.twin3.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.Properties; - -import jakarta.xml.ws.Service; -import jakarta.xml.ws.WebServiceRef; - -public class Client extends EETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSTwin3Http1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSTwin3Http2"; - - private Tests1 port1; - - private Tests2 port2; - - @WebServiceRef(name = "service/WSTwin3Http1") - static Twin3HttpSvc1 svc1; - - @WebServiceRef(name = "service/WSTwin3Http2") - static Twin3HttpSvc2 svc2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/WSTwin3HttpClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/WSTwin3HttpClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 4983dc1e20..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/WSTwin3HttpClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - service/WSTwin3Http1 - - com.sun.ts.tests.webservices12.wsdlImport.http.twin3.client.Tests1 - - http://Twin3HttpSvc1.org/wsdl - Tests1Port - - - http://webServerHost.1:webServerPort.1/WSTwin3Http/jaxws/Tests1?WSDL - - - service/WSTwin3Http2 - - com.sun.ts.tests.webservices12.wsdlImport.http.twin3.client.Tests2 - - http://Twin3HttpSvc2.org/wsdl - Tests2Port - - - http://webServerHost.1:webServerPort.1/WSTwin3Http/jaxws/Tests2?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/build.xml deleted file mode 100644 index bc76f0d70b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/customfile.xml deleted file mode 100644 index c8588418e1..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/customfile2.xml deleted file mode 100644 index bfe5000649..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/TestsBean1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/TestsBean1.java deleted file mode 100644 index 4bf08366b0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/TestsBean1.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Twin3HttpSvc1", targetNamespace = "http://Twin3HttpSvc1.org/wsdl", wsdlLocation = "META-INF/wsdl/svc1/Twin3HttpSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server.Tests1") - -@Stateless(name = "StatelessTestBean1") -public class TestsBean1 { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/TestsBean2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/TestsBean2.java deleted file mode 100644 index 58befaca2b..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/TestsBean2.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Twin3HttpSvc2", targetNamespace = "http://Twin3HttpSvc2.org/wsdl", wsdlLocation = "META-INF/wsdl/svc2/Twin3HttpSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server.Tests2") - -@Stateless(name = "StatelessTestBean2") -public class TestsBean2 { - public String invokeTest2() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/build.xml deleted file mode 100644 index 435749a606..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/build.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/customfile.xml deleted file mode 100644 index c06312ebe0..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/customfile2.xml deleted file mode 100644 index 2a45fb51eb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/jakartaEE.tokens deleted file mode 100644 index 103adbf13a..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/jakartaEE.tokens +++ /dev/null @@ -1,18 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server.Twin3HttpSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server.Twin3HttpSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server.TestsBean1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.http.twin3.server.TestsBean2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -WEBSERVICEDESCRIPTION=Twin3HttpSvc1 -WEBSERVICEDESCRIPTION2=Twin3HttpSvc2 -BEANWEBSERVICENAME=TestsBean1 -STATELESSNAME=StatelessTestBean1 -BEANWEBSERVICENAME2=TestsBean2 -STATELESSNAME2=StatelessTestBean2 - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc1/Twin3HttpPTSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc1/Twin3HttpPTSvc1.wsdl deleted file mode 100644 index 7cb399a3a3..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc1/Twin3HttpPTSvc1.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc1/Twin3HttpSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc1/Twin3HttpSvc1.wsdl deleted file mode 100644 index c7fbd1bb26..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc1/Twin3HttpSvc1.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc2/Twin3HttpPTSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc2/Twin3HttpPTSvc2.wsdl deleted file mode 100644 index 7f83e897a9..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc2/Twin3HttpPTSvc2.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc2/Twin3HttpSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc2/Twin3HttpSvc2.wsdl deleted file mode 100644 index f22dbf0449..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin3/server/svc2/Twin3HttpSvc2.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/build.xml deleted file mode 100644 index 42f7cdf43c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/Client.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/Client.java deleted file mode 100644 index c9a57e30c6..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/Client.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.twin4.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.javatest.Status; - -import java.util.Properties; - -import jakarta.xml.ws.Service; -import jakarta.xml.ws.WebServiceRef; - -public class Client extends EETest { - private String SERVICE_NAME_WITH_WSDL_1 = "WSTwin4Http1"; - - private String SERVICE_NAME_WITH_WSDL_2 = "WSTwin4Http2"; - - private Tests1 port1; - - private Tests2 port2; - - @WebServiceRef(name = "service/WSTwin4Http1") - static Twin4HttpSvc1 svc1; - - @WebServiceRef(name = "service/WSTwin4Http2") - static Twin4HttpSvc2 svc2; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Exception { - try { - TestUtil.logMsg("Get port from Service"); - port1 = (Tests1) svc1.getPort(Tests1.class); - TestUtil.logMsg("Port obtained"); - - TestUtil.logMsg("Get port from Service"); - port2 = (Tests2) svc2.getPort(Tests2.class); - TestUtil.logMsg("Port obtained"); - } catch (Exception e) { - throw new Exception("setup failed:", e); - } - - logMsg("setup ok"); - } - - public void cleanup() throws Exception { - logMsg("cleanup ok"); - } - - /* - * @testName: InvokeMethod - * - * @assertion_ids: WS4EE:SPEC:214; WS4EE:SPEC:66; - * - * @test_Strategy: Call a method in Tests. - */ - public void InvokeMethod() throws Exception { - TestUtil.logMsg("InvokeMethod"); - try { - TestUtil.logMsg("Invoking method on Service1"); - port1.invokeTest1(); - TestUtil.logMsg("Service1 passed"); - TestUtil.logMsg("Invoking method on Service2"); - port2.invokeTest2(); - TestUtil.logMsg("Service2 passed"); - } catch (Throwable t) { - TestUtil - .logMsg("test InvokeMethod failed: got exception " + t.toString()); - throw new Exception("InvokeMethod failed"); - } - - return; - } -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/WSTwin4HttpClnt_client.jar.sun-application-client.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/WSTwin4HttpClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 26ddd09efb..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/WSTwin4HttpClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - service/WSTwin4Http1 - - com.sun.ts.tests.webservices12.wsdlImport.http.twin4.client.Tests1 - - http://Twin4HttpSvc1.org/wsdl - Tests1Port - - - http://webServerHost.1:webServerPort.1/WSTwin4Http/jaxws/Tests1?WSDL - - - service/WSTwin4Http2 - - com.sun.ts.tests.webservices12.wsdlImport.http.twin4.client.Tests2 - - http://Twin4HttpSvc2.org/wsdl - Tests2Port - - - http://webServerHost.1:webServerPort.1/WSTwin4Http/jaxws/Tests2?WSDL - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/build.xml deleted file mode 100644 index 5a8e481b63..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/customfile.xml deleted file mode 100644 index 4b5c120a30..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/customfile2.xml deleted file mode 100644 index c460de621c..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/client/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/TestsBean1.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/TestsBean1.java deleted file mode 100644 index 0c630f2cb8..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/TestsBean1.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests1Port", serviceName = "Twin4HttpSvc1", targetNamespace = "http://Twin4HttpSvc1.org/wsdl", wsdlLocation = "META-INF/wsdl/svc1/Twin4HttpSvc1.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server.Tests1") - -@Stateless(name = "StatelessTestBean1") -public class TestsBean1 { - public String invokeTest1() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/TestsBean2.java b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/TestsBean2.java deleted file mode 100644 index b75b843983..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/TestsBean2.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server; - -import jakarta.ejb.Stateless; - -import jakarta.jws.WebService; - -@WebService(portName = "Tests2Port", serviceName = "Twin4HttpSvc2", targetNamespace = "http://Twin4HttpSvc2.org/wsdl", wsdlLocation = "META-INF/wsdl/svc2/Twin4HttpSvc2.wsdl", endpointInterface = "com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server.Tests2") - -@Stateless(name = "StatelessTestBean2") -public class TestsBean2 { - public String invokeTest2() { - return "Hello"; - } - -} diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/build.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/build.xml deleted file mode 100644 index adec438455..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/build.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/customfile.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/customfile.xml deleted file mode 100644 index 95b41ac658..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/customfile.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/customfile2.xml b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/customfile2.xml deleted file mode 100644 index 569a2904fc..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/customfile2.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/jakartaEE.tokens b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/jakartaEE.tokens deleted file mode 100644 index 8cbdc58490..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/jakartaEE.tokens +++ /dev/null @@ -1,18 +0,0 @@ -SERVICE=com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server.Twin4HttpSvc1 -SERVICE2=com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server.Twin4HttpSvc2 -SEI=com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server.Tests1 -SEI2=com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server.Tests2 -IMPL=com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server.TestsBean1 -IMPL2=com.sun.ts.tests.webservices12.wsdlImport.http.twin4.server.TestsBean2 -PORT=Tests1Port -PORT2=Tests2Port -URLALIAS=/jaxws/Tests1 -URLALIAS2=/jaxws/Tests2 -WEBSERVICEDESCRIPTION=Twin4HttpSvc1 -WEBSERVICEDESCRIPTION2=Twin4HttpSvc2 -BEANWEBSERVICENAME=TestsBean1 -STATELESSNAME=StatelessTestBean1 -BEANWEBSERVICENAME2=TestsBean2 -STATELESSNAME2=StatelessTestBean2 - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc1/Twin4HttpSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc1/Twin4HttpSvc1.wsdl deleted file mode 100644 index d4a5612e50..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc1/Twin4HttpSvc1.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc1/type/Twin4HttpPTSvc1.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc1/type/Twin4HttpPTSvc1.wsdl deleted file mode 100644 index 7124374780..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc1/type/Twin4HttpPTSvc1.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc2/Twin4HttpSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc2/Twin4HttpSvc2.wsdl deleted file mode 100644 index 7f5fec13a5..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc2/Twin4HttpSvc2.wsdl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc2/type/Twin4HttpPTSvc2.wsdl b/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc2/type/Twin4HttpPTSvc2.wsdl deleted file mode 100644 index 26ae55376f..0000000000 --- a/webservices12/src/main/java/com/sun/ts/tests/webservices12/wsdlImport/http/twin4/server/svc2/type/Twin4HttpPTSvc2.wsdl +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/webservices13/pom.xml b/webservices13/pom.xml deleted file mode 100644 index 604ec6195d..0000000000 --- a/webservices13/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - 4.0.0 - - - jakarta.tck - project - 11.0.0-SNAPSHOT - - - webservices13 - jar - - webservices13 - webservices13 - - - - - - maven-deploy-plugin - - true - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.0.0 - - - generate-sources - - add-source - - - - ./ - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/build.xml deleted file mode 100644 index 0701232f65..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/Client.java deleted file mode 100644 index b64e026f92..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/Client.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbPkgInWarUnderWebInfLibTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private Hello port; - - @WebServiceRef(name = "service/wsejbpkginwarunderwebinflibtest") - static HelloService service; - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get wsejbpkginwarunderwebinflibtest Service via @WebServiceRef annotation"); - TestUtil.logMsg( - "Uses name attribute @WebServiceRef(name=\"service/wsejbpkginwarunderwebinflibtest\")"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHello(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) - getPort(); - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: CallHello - * - * @assertion_ids: WS4EE:SPEC:5012; WS4EE:SPEC:5013; WS4EE:SPEC:5014; - * - * @test_Strategy: Verify packaging an EJB JAR archive that contains an ejb - * webservice endpoint within a WAR archive under WEB-INF/lib. This verifies - * the packaging requirement of an EJB JAR archive within a WAR archive. - * - */ - public void CallHello() throws Fault { - TestUtil.logMsg("CallHello"); - try { - String txt = port.hello("Hi there"); - if (txt.equals("Hi there to you too!")) - TestUtil.logMsg("CallHello passed"); - else - throw new RuntimeException("Msg returned from hello() incorrect"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault("CallHello failed"); - } - return; - } - - /* - * @testName: CallBye - * - * @assertion_ids: WS4EE:SPEC:5012; WS4EE:SPEC:5013; WS4EE:SPEC:5014; - * - * @test_Strategy: Verify packaging an EJB JAR archive that contains an ejb - * webservice endpoint within a WAR archive under WEB-INF/lib. This verifies - * the packaging requirement of an EJB JAR archive within a WAR archive. - */ - public void CallBye() throws Fault { - TestUtil.logMsg("CallBye"); - try { - String txt = port.bye("Bye-bye"); - if (txt.equals("Bye-bye and take care")) - TestUtil.logMsg("CallBye passed"); - else - throw new RuntimeException("Msg returned from bye() incorrect"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault("CallBye failed"); - } - return; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/HelloBean.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/HelloBean.java deleted file mode 100644 index 79d904d95a..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/HelloBean.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbPkgInWarUnderWebInfLibTest; - -import jakarta.ejb.Remote; -import jakarta.ejb.Stateless; -import jakarta.ejb.SessionContext; -import jakarta.jws.WebService; -import jakarta.annotation.Resource; - -@WebService(portName = "Hello", serviceName = "HelloService", targetNamespace = "http://Hello.org", wsdlLocation = "WEB-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.ejb.annotations.WSEjbPkgInWarUnderWebInfLibTest.Hello") -@Stateless(name = "WSEjbPkgInWarUnderWebInfLibTest") -@Remote({ HelloIF.class }) -public class HelloBean implements HelloIF { - - @Resource - private SessionContext sc; - - public String hello(String str) { - return str + " to you too!"; - } - - public String bye(String str) { - return str + " and take care"; - } - - public String extra(String str, int i) { - String tmp = str + i + ", all from yours truly"; - return tmp; - } - - public void extraExtra(long i) { - long ll = i * 2002 + 1999 + 8734895; - System.out.println("Long i=" + i + ", Long ll=" + ll); - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/HelloIF.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/HelloIF.java deleted file mode 100644 index f568e22860..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/HelloIF.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbPkgInWarUnderWebInfLibTest; - -public interface HelloIF { - public String hello(String str); - - public String bye(String str); - - public String extra(String str, int i); - - public void extraExtra(long i); -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/HelloService.wsdl b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/HelloService.wsdl deleted file mode 100644 index 83472ec585..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/HelloService.wsdl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/WSEjbPkgInWarUnderWebInfLibTestClnt_client.jar.sun-application-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/WSEjbPkgInWarUnderWebInfLibTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 2e04b2ced4..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/WSEjbPkgInWarUnderWebInfLibTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbpkginwarunderwebinflibtest - http://webServerHost.1:webServerPort.1/HelloService/HelloBean?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/build.xml deleted file mode 100644 index a62e91c3a3..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/build.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/customfile.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/customfile.xml deleted file mode 100644 index 84a1117357..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/ejb-jar.xml deleted file mode 100644 index ef1e6068df..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfLibTest/ejb-jar.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - WSEjbPkgInWarUnderWebInfLibTest_ejb - - - WSEjbPkgInWarUnderWebInfLibTest - WSEjbPkgInWarUnderWebInfLibTest - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbPkgInWarUnderWebInfLibTest.HelloIF - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbPkgInWarUnderWebInfLibTest.HelloBean - Stateless - Container - - - - - - - - - - - WSEjbPkgInWarUnderWebInfLibTest - hello - - Supports - - - - WSEjbPkgInWarUnderWebInfLibTest - bye - - Supports - - - - WSEjbPkgInWarUnderWebInfLibTest - extra - - Supports - - - - WSEjbPkgInWarUnderWebInfLibTest - extraExtra - - Supports - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/Client.java deleted file mode 100644 index ddb07996ba..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/Client.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbPkgInWarUnderWebInfTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.URL; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private Hello port; - - @WebServiceRef(name = "service/wsejbpkginwarunderwebinftest") - static HelloService service; - - private void getPort() throws Exception { - TestUtil.logMsg( - "Get wsejbpkginwarunderwebinftest Service via @WebServiceRef annotation"); - TestUtil.logMsg( - "Uses name attribute @WebServiceRef(name=\"service/wsejbpkginwarunderwebinftest\")"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHello(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) - getPort(); - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: CallHello - * - * @assertion_ids: WS4EE:SPEC:5012; WS4EE:SPEC:5013; WS4EE:SPEC:5014; - * - * @test_Strategy: Verify packaging the class files of an ejb webservice - * endpoint within a WAR archive under WEB-INF/classes. This verifies the - * packaging requirement of an ejb webservice endpoint within a WAR archive. - */ - public void CallHello() throws Fault { - TestUtil.logMsg("CallHello"); - try { - String txt = port.hello("Hi there"); - if (txt.equals("Hi there to you too!")) - TestUtil.logMsg("CallHello passed"); - else - throw new RuntimeException("Msg returned from hello() incorrect"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault("CallHello failed"); - } - return; - } - - /* - * @testName: CallBye - * - * @assertion_ids: WS4EE:SPEC:5012; WS4EE:SPEC:5013; WS4EE:SPEC:5014; - * - * @test_Strategy: Verify packaging the class files of an ejb webservice - * endpoint within a WAR archive under WEB-INF/classes. This verifies the - * packaging requirement of an ejb webservice endpoint within a WAR archive. - */ - public void CallBye() throws Fault { - TestUtil.logMsg("CallBye"); - try { - String txt = port.bye("Bye-bye"); - if (txt.equals("Bye-bye and take care")) - TestUtil.logMsg("CallBye passed"); - else - throw new RuntimeException("Msg returned from bye() incorrect"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault("CallBye failed"); - } - return; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/HelloBean.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/HelloBean.java deleted file mode 100644 index fdc17a61d5..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/HelloBean.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbPkgInWarUnderWebInfTest; - -import jakarta.ejb.Remote; -import jakarta.ejb.Stateless; -import jakarta.ejb.SessionContext; -import jakarta.jws.WebService; -import jakarta.xml.ws.WebServiceContext; -import jakarta.annotation.Resource; - -@WebService(portName = "Hello", serviceName = "HelloService", targetNamespace = "http://Hello.org", wsdlLocation = "WEB-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.ejb.annotations.WSEjbPkgInWarUnderWebInfTest.Hello") -@Stateless(name = "WSEjbPkgInWarUnderWebInfTest") -@Remote({ HelloIF.class }) -public class HelloBean implements HelloIF { - - @Resource - private WebServiceContext wc; - - public String hello(String str) { - return str + " to you too!"; - } - - public String bye(String str) { - return str + " and take care"; - } - - public String extra(String str, int i) { - String tmp = str + i + ", all from yours truly"; - return tmp; - } - - public void extraExtra(long i) { - long ll = i * 2002 + 1999 + 8734895; - System.out.println("Long i=" + i + ", Long ll=" + ll); - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/HelloIF.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/HelloIF.java deleted file mode 100644 index 85b5773a98..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/HelloIF.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbPkgInWarUnderWebInfTest; - -public interface HelloIF { - public String hello(String str); - - public String bye(String str); - - public String extra(String str, int i); - - public void extraExtra(long i); -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/HelloService.wsdl b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/HelloService.wsdl deleted file mode 100644 index 83472ec585..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/HelloService.wsdl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/WSEjbPkgInWarUnderWebInfTestClnt_client.jar.sun-application-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/WSEjbPkgInWarUnderWebInfTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 1912a9c75f..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/WSEjbPkgInWarUnderWebInfTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbpkginwarunderwebinftest - http://webServerHost.1:webServerPort.1/HelloService/HelloBean?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/build.xml deleted file mode 100644 index a28bf6f1e7..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/build.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/customfile.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/customfile.xml deleted file mode 100644 index 0c796567fc..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/ejb-jar.xml deleted file mode 100644 index ec2628b724..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbPkgInWarUnderWebInfTest/ejb-jar.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - WSEjbPkgInWarUnderWebInfTest_ejb - - - WSEjbPkgInWarUnderWebInfTest - WSEjbPkgInWarUnderWebInfTest - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbPkgInWarUnderWebInfTest.HelloIF - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbPkgInWarUnderWebInfTest.HelloBean - Stateless - Container - - - - - - - - - - - WSEjbPkgInWarUnderWebInfTest - hello - - Supports - - - - WSEjbPkgInWarUnderWebInfTest - bye - - Supports - - - - WSEjbPkgInWarUnderWebInfTest - extra - - Supports - - - - WSEjbPkgInWarUnderWebInfTest - extraExtra - - Supports - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/Client.java deleted file mode 100644 index 2c8ef0a7bf..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/Client.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbSingletonTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.URL; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private Hello port; - - @WebServiceRef(name = "service/wsejbsingletontest") - static WSEjbSingletonTestHelloService service; - - private void getPort() throws Exception { - TestUtil - .logMsg("Get wsejbsingletontest Service via @WebServiceRef annotation"); - TestUtil.logMsg("Uses no attribute @WebServiceRef"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("Get port from service"); - port = (Hello) service.getHelloPort(); - TestUtil.logMsg("port=" + port); - TestUtil.logMsg("Port obtained"); - JAXWS_Util.dumpTargetEndpointAddress(port); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - if (pass) { - getPort(); - } - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - private void printSeperationLine() { - TestUtil.logMsg("---------------------------"); - } - - /* - * @testName: WSEjbSingletonTestCallHello - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; WS4EE:SPEC:3000; - * WS4EE:SPEC:3001; WS4EE:SPEC:3004; WS4EE:SPEC:3005; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The @WebServiceRef uses - * the name attribute field to access the service ref. - */ - public void WSEjbSingletonTestCallHello() throws Fault { - TestUtil.logMsg("WSEjbSingletonTestCallHello"); - try { - String txt = port.hello("Hi there"); - if (txt.equals("Hi there to you too!")) - TestUtil.logMsg("WSEjbSingletonTestCallHello passed"); - else - throw new RuntimeException("Msg returned from hello() incorrect"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault("WSEjbSingletonTestCallHello failed"); - } - return; - } - - /* - * @testName: WSEjbSingletonTestCallBye - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; WS4EE:SPEC:3000; - * WS4EE:SPEC:3001; WS4EE:SPEC:3004; WS4EE:SPEC:3005; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The @WebServiceRef uses - * the name attribute field to access the service ref. - */ - public void WSEjbSingletonTestCallBye() throws Fault { - TestUtil.logMsg("WSEjbSingletonTestCallBye"); - try { - String txt = port.bye("Bye-bye"); - if (txt.equals("Bye-bye and take care")) - TestUtil.logMsg("WSEjbSingletonTestCallBye passed"); - else - throw new RuntimeException("Msg returned from bye() incorrect"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault("WSEjbSingletonTestCallBye failed"); - } - return; - } - - /* - * @testName: WSEjbSingletonTestVerifyTargetEndpointAddress - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4002; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; WS4EE:SPEC:3000; - * WS4EE:SPEC:3001; WS4EE:SPEC:3004; WS4EE:SPEC:3005; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The @WebServiceRef uses - * the name attribute field to access the service ref. The enpoint-address-uri - * is specified in the runtime deployment descriptor. Verify that the target - * endpoint ends with this enpoint-address-uri. - */ - public void WSEjbSingletonTestVerifyTargetEndpointAddress() throws Fault { - TestUtil.logMsg("WSEjbSingletonTestVerifyTargetEndpointAddress"); - try { - String endpointaddr = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg( - "Verify that the target endpoint address ends with [WSEjbSingletonTestHelloService/HelloBean]"); - if (endpointaddr.endsWith("WSEjbSingletonTestHelloService/HelloBean")) - TestUtil.logMsg("WSEjbSingletonTestVerifyTargetEndpointAddress passed"); - else - throw new RuntimeException( - "Target Endpoint Address is incorrect: " + endpointaddr); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault("WSEjbSingletonTestVerifyTargetEndpointAddress failed"); - } - return; - } - - /* - * @testName: WSEjbSingletonTestVerifyJNDILookupOfService - * - * @assertion_ids: WS4EE:SPEC:37; WS4EE:SPEC:39; WS4EE:SPEC:41; WS4EE:SPEC:42; - * WS4EE:SPEC:43; WS4EE:SPEC:44; WS4EE:SPEC:51; WS4EE:SPEC:109; - * WS4EE:SPEC:145; WS4EE:SPEC:148; WS4EE:SPEC:149; WS4EE:SPEC:155; - * WS4EE:SPEC:171; WS4EE:SPEC:184; WS4EE:SPEC:4000; WS4EE:SPEC:4001; - * WS4EE:SPEC:115; WS4EE:SPEC:213; WS4EE:SPEC:187; - * - * @test_Strategy: This is a prebuilt client and prebuilt webservice using EJB - * endpoint. Tests @WebServiceRef and @WebService annotations. The EJBBean - * Implementation class is packaged in the ear file. The @WebServiceRef uses - * the name attribute field to access the service ref. The runtime deployment - * descriptor specifies the service ref. Verify that the container correctly - * publishes the web service implementation under the service ref via the JNDI - * name "java:comp/env/service/wsejbsingletontest". - */ - public void WSEjbSingletonTestVerifyJNDILookupOfService() throws Fault { - TestUtil.logMsg("WSEjbSingletonTestVerifyJNDILookupOfService"); - try { - TestUtil.logMsg("Test JNDI lookup for wsejbsingletontest Service"); - InitialContext ctx = new InitialContext(); - WSEjbSingletonTestHelloService service = (WSEjbSingletonTestHelloService) ctx - .lookup("java:comp/env/service/wsejbsingletontest"); - TestUtil.logMsg("service=" + service); - TestUtil.logMsg("WSEjbSingletonTestVerifyJNDILookupOfService passed"); - } catch (Throwable t) { - TestUtil.printStackTrace(t); - throw new Fault("WSEjbSingletonTestVerifyJNDILookupOfService failed"); - } - return; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/HelloBean.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/HelloBean.java deleted file mode 100644 index 91acc625b5..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/HelloBean.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbSingletonTest; - -import jakarta.ejb.Stateless; -import jakarta.ejb.Singleton; -import jakarta.jws.WebService; - -@WebService(portName = "HelloPort", serviceName = "WSEjbSingletonTestHelloService", targetNamespace = "http://Hello.org", wsdlLocation = "META-INF/wsdl/HelloService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.ejb.annotations.WSEjbSingletonTest.Hello") -@Singleton(name = "WSEjbSingletonTest") -public class HelloBean { - - public String hello(String str) { - return str + " to you too!"; - } - - public String bye(String str) { - return str + " and take care"; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/HelloService.wsdl b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/HelloService.wsdl deleted file mode 100644 index 88e3626173..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/HelloService.wsdl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/WSEjbSingletonTestClnt_client.jar.sun-application-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/WSEjbSingletonTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 67eee7aa91..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/WSEjbSingletonTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wsejbsingletontest - http://webServerHost.1:webServerPort.1/WSEjbSingletonTestHelloService/HelloBean?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/WSEjbSingletonTest_ejb.jar.sun-ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/WSEjbSingletonTest_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index b710b8ff90..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/WSEjbSingletonTest_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbSingletonTest - WSEjbSingletonTest - false - false - -1 - - - HelloBean - WSEjbSingletonTestHelloService/HelloBean - - - - WSEjbSingletonTestHelloService - http://webServerHost.1:webServerPort.1/WSEjbSingletonTestHelloService/HelloBean?WSDL - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/build.xml deleted file mode 100644 index 153c87b6b9..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/build.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/customfile.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/customfile.xml deleted file mode 100644 index 11fe19cbd3..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbSingletonTest/customfile.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/Client.java deleted file mode 100644 index 665ca39f77..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/Client.java +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.javatest.Status; - -import jakarta.ejb.EJB; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.*; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private URL url = null; - - private URLConnection urlConn = null; - - private String SERVLET = "/WSEjbWSRefAndAddressingCombinedTestClnt_web/ServletTest"; - - @Addressing - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestdefaultechoport", type = Echo.class, value = EchoService.class) - static Echo defaultEchoPort = null; - - @Addressing(enabled = true) - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestenabledechoport", type = Echo.class, value = EchoService.class) - static Echo enabledEchoPort = null; - - @Addressing(enabled = true, required = true) - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestrequiredechoport", type = Echo.class, value = EchoService.class) - static Echo requiredEchoPort = null; - - @Addressing(enabled = false) - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestdisabledechoport", type = Echo.class, value = EchoService.class) - static Echo disabledEchoPort = null; - - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestservice") - static EchoService service = null; - - @EJB(name = "ejb/WSEjbWSRefAndAddressingCombinedTestClntBean") - static EjbClientIF ejbclient; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - TestUtil.logMsg("AppClient DEBUG: ejbclient=" + ejbclient); - TestUtil.logMsg("AppClient DEBUG: service=" + service); - TestUtil.logMsg("AppClient DEBUG: defaultEchoPort=" + defaultEchoPort); - TestUtil.logMsg("AppClient DEBUG: enabledEchoPort=" + enabledEchoPort); - TestUtil.logMsg("AppClient DEBUG: requiredEchoPort=" + requiredEchoPort); - TestUtil.logMsg("AppClient DEBUG: disabledEchoPort=" + disabledEchoPort); - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (service == null || ejbclient == null || defaultEchoPort == null - || enabledEchoPort == null || requiredEchoPort == null - || disabledEchoPort == null) { - throw new Fault("setup failed: injection failure"); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - ejbclient.init(p); - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: VerifyAddrHeadersExistForRequiredEchoPort - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4004; WS4EE:SPEC:4015; - * - * @test_Strategy: Verify Addressing Headers MUST exist on SOAP request and - * SOAP response for appclient, servlet, and ejb containers. Addressing - * enabled/required by client/supported by endpoint. - */ - public void VerifyAddrHeadersExistForRequiredEchoPort() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersExistForRequiredEchoPort"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersExistForRequiredEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersExistForRequiredEchoPort"); - String result = requiredEchoPort - .echo("Echo from AppClient on requiredEchoPort", testName); - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "VerifyAddrHeadersExistForRequiredEchoPort"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - } else - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersExistForRequiredEchoPort"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on requiredEchoPort", testName); - if (!passEjb) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } else - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersExistForRequiredEchoPort failed"); - } - - /* - * @testName: VerifyAddrHeadersDoNotExistForDisabledEchoPort - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4004; WS4EE:SPEC:4015; - * - * @test_Strategy: Verify Addressing Headers MUST NOT exist on SOAP request - * and SOAP response for appclient, servlet, and ejb containers. Addressing - * disabled by client/supported by endpoint. - */ - public void VerifyAddrHeadersDoNotExistForDisabledEchoPort() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - String result = disabledEchoPort - .echo("Echo from AppClient on disabledEchoPort", testName); - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - } else - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersDoNotExistForDisabledEchoPort"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on disabledEchoPort", testName); - if (!passEjb) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } else - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersDoNotExistForDisabledEchoPort failed"); - } - - /* - * @testName: VerifyAddrHeadersMayExistForEnabledEchoPort - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4004; WS4EE:SPEC:4015; - * - * @test_Strategy: Verify addressing Headers may exist on SOAP request and - * SOAP response for appclient, servlet, and ejb containers. Addressing - * enabled/notrequired by client/supported by endpoint. - */ - public void VerifyAddrHeadersMayExistForEnabledEchoPort() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEchoPort"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEchoPort"); - String result = enabledEchoPort - .echo("Echo from AppClient on enabledEchoPort", testName); - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "VerifyAddrHeadersMayExistForEnabledEchoPort"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - TestUtil.logErr("Unexpected failure occurred"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersMayExistForEnabledEchoPort"; - boolean passEjb = ejbclient.echo("Echo from EjbClient on enabledEchoPort", - testName); - if (!passEjb) { - TestUtil.logErr("Unexpected failure occurred"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersMayExistForEnabledEchoPort failed"); - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/ClientSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/ClientSOAPHandler.java deleted file mode 100644 index 3ce19112ae..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/ClientSOAPHandler.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientSOAPHandler.java 52501 2009-04-15 02:29:49Z af70133 $ - */ -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsa.common.MapRequiredException; -import com.sun.ts.tests.jaxws.wsa.common.MapException; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.soap.SOAPException; -import java.util.Iterator; -import jakarta.xml.ws.handler.soap.SOAPHandler; -import jakarta.xml.soap.SOAPHeader; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.Text; - -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersExistForRequiredEchoPort")) { - checkAddressingHeadersExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersDoNotExistForDisabledEchoPort")) { - checkAddressingHeadersDoNotExist(context, action); - } - } - - private void verifyAction(String action) { - if (!action.equals(TestConstants.ECHO_OUTPUT_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ECHO_OUTPUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundRelatesToDoesNotExist(context); - } - - private void handleMessageInboundCheckAddressingHeadersDoNotExist( - SOAPMessageContext context) { - String headerValue = null; - String whichHeaders = null; - try { - headerValue = getTo(context); - whichHeaders = whichHeaders + "wsa:To, "; - } catch (Exception e) { - } - try { - headerValue = getReplyTo(context); - whichHeaders = whichHeaders + "wsa:ReplyTo, "; - } catch (Exception e) { - } - try { - headerValue = getMessageId(context); - whichHeaders = whichHeaders + "wsa:MessageId, "; - } catch (Exception e) { - } - try { - headerValue = getRelationship(context); - whichHeaders = whichHeaders + "wsa:Relationship, "; - } catch (Exception e) { - } - try { - headerValue = getAction(context); - whichHeaders = whichHeaders + "wsa:Action"; - } catch (Exception e) { - } - if (whichHeaders != null) { - throw new AddressingPropertyException( - "ERROR: The following addressing headers exist in soap message: [" - + whichHeaders + "]"); - } - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ClientSOAPHandler.getAction(): testName=" + testName); - if (testName == null) - return super.getAction(context); - else if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort")) - return super.getAction(context); - else if (testName - .equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort")) { - return super.getActionDoesNotExist(context); - } else - return null; - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/EchoBean.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/EchoBean.java deleted file mode 100644 index 59ebf8b7e9..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/EchoBean.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Holder; - -@WebService(portName = "EchoPort", serviceName = "EchoService", targetNamespace = "http://Echo.org", wsdlLocation = "META-INF/wsdl/EchoService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo") -@Stateless(name = "WSEjbWSRefAndAddressingCombinedTest") - -public class EchoBean { - - public String echo(String string, Holder testName) { - return string; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/EchoService.wsdl b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/EchoService.wsdl deleted file mode 100644 index 8c0b540558..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/EchoService.wsdl +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/EjbClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/EjbClient.java deleted file mode 100644 index c9c24cfc2a..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/EjbClient.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.ejb.EJBException; -import jakarta.ejb.Remote; -import jakarta.ejb.Stateless; -import jakarta.ejb.SessionContext; -import jakarta.annotation.Resource; -import jakarta.annotation.PostConstruct; - -import com.sun.ts.tests.jaxws.common.*; - -@Stateless(name = "WSEjbWSRefAndAddressingCombinedTestClntBean") -@Remote({ EjbClientIF.class }) -public class EjbClient implements EjbClientIF { - - private static final boolean debug = false; - - @Addressing - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestdefaultechoport", type = Echo.class, value = EchoService.class) - Echo defaultEchoPort = null; - - @Addressing(enabled = true) - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestenabledechoport", type = Echo.class, value = EchoService.class) - Echo enabledEchoPort = null; - - @Addressing(enabled = true, required = true) - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestrequiredechoport", type = Echo.class, value = EchoService.class) - Echo requiredEchoPort = null; - - @Addressing(enabled = false) - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestdisabledechoport", type = Echo.class, value = EchoService.class) - Echo disabledEchoPort = null; - - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestservice") - EchoService service = null; - - @PostConstruct - public void postConstruct() { - System.out.println("EjbClient:postConstruct()"); - System.out.println("EjbClient DEBUG: service=" + service); - System.out.println("EjbClient DEBUG: defaultEchoPort=" + defaultEchoPort); - System.out.println("EjbClient DEBUG: enabledEchoPort=" + enabledEchoPort); - System.out.println("EjbClient DEBUG: requiredEchoPort=" + requiredEchoPort); - System.out.println("EjbClient DEBUG: disabledEchoPort=" + disabledEchoPort); - if (service == null || defaultEchoPort == null || enabledEchoPort == null - || requiredEchoPort == null || disabledEchoPort == null) { - throw new EJBException("postConstruct failed: injection failure"); - } - } - - public void init(Properties p) { - try { - TestUtil.init(p); - } catch (RemoteLoggingInitException e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } - } - - public boolean echo(String string, String testName) { - if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort")) - return VerifyAddrHeadersExistForRequiredEchoPort(); - else if (testName.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort")) - return VerifyAddrHeadersDoNotExistForDisabledEchoPort(); - else - return VerifyAddrHeadersMayExistForEnabledEchoPort(); - } - - private String getTargetEndpointAddress(Object stub) throws Exception { - BindingProvider bindingprovider = (BindingProvider) stub; - java.util.Map context = bindingprovider.getRequestContext(); - String url = (String) context - .get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY); - return url; - } - - private boolean VerifyAddrHeadersExistForRequiredEchoPort() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersExistForRequiredEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersExistForRequiredEchoPort"); - requiredEchoPort.echo("Echo from EjbClient on requiredEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersDoNotExistForDisabledEchoPort() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - disabledEchoPort.echo("Echo from EjbClient on disabledEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersMayExistForEnabledEchoPort() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEchoPort"); - enabledEchoPort.echo("Echo from EjbClient on enabledEchoPort", testName); - return true; - } catch (Exception e) { - return false; - } - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/EjbClientIF.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/EjbClientIF.java deleted file mode 100644 index 607f775044..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/EjbClientIF.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest; - -public interface EjbClientIF { - - public void init(java.util.Properties p); - - public boolean echo(String string, String testName); -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/ServerSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/ServerSOAPHandler.java deleted file mode 100644 index f36010bff9..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/ServerSOAPHandler.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.MapException; -import com.sun.ts.tests.jaxws.wsa.common.MapRequiredException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import jakarta.xml.soap.SOAPException; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersExistForRequiredEchoPort")) { - checkAddressingHeadersExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersDoNotExistForDisabledEchoPort")) { - checkAddressingHeadersDoNotExist(context, action); - } - } - - private void verifyAction(String action) { - if (!action.equals(TestConstants.ECHO_INPUT_ACTION)) { - throw new ActionNotSupportedException( - "Expected:" + TestConstants.ECHO_INPUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundMessageIdDoesNotExist(context); - checkInboundReplyToDoesNotExist(context); - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ServerSOAPHandler.getAction(): testName=" + testName); - System.out.println("ServerSOAPHandler.getAction(): testName=" + testName); - if (testName == null) - return super.getAction(context); - else if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort")) - return super.getAction(context); - else if (testName - .equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort")) { - return super.getActionDoesNotExist(context); - } else - return null; - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/ServletClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/ServletClient.java deleted file mode 100644 index 9f5a76792a..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/ServletClient.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; - -import java.io.*; -import java.sql.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import jakarta.servlet.annotation.WebServlet; -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; - -@WebServlet("/ServletTest") -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - @Addressing - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestdefaultechoport", type = Echo.class, value = EchoService.class) - Echo defaultEchoPort = null; - - @Addressing(enabled = true) - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestenabledechoport", type = Echo.class, value = EchoService.class) - Echo enabledEchoPort = null; - - @Addressing(enabled = true, required = true) - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestrequiredechoport", type = Echo.class, value = EchoService.class) - Echo requiredEchoPort = null; - - @Addressing(enabled = false) - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestdisabledechoport", type = Echo.class, value = EchoService.class) - Echo disabledEchoPort = null; - - @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestservice") - EchoService service = null; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("ServletClient:init()"); - System.out.println("ServletClient DEBUG: service=" + service); - System.out - .println("ServletClient DEBUG: defaultEchoPort=" + defaultEchoPort); - System.out - .println("ServletClient DEBUG: enabledEchoPort=" + enabledEchoPort); - System.out - .println("ServletClient DEBUG: requiredEchoPort=" + requiredEchoPort); - System.out - .println("ServletClient DEBUG: disabledEchoPort=" + disabledEchoPort); - if (service == null || defaultEchoPort == null || enabledEchoPort == null - || requiredEchoPort == null || disabledEchoPort == null) { - throw new ServletException("init() failed: port injection failed"); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - try { - String test = harnessProps.getProperty("TEST"); - System.out.println("doGet: test to execute is: " + test); - if (test.equals("VerifyAddrHeadersExistForRequiredEchoPort")) { - if (VerifyAddrHeadersExistForRequiredEchoPort()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test - .equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort")) { - if (VerifyAddrHeadersDoNotExistForDisabledEchoPort()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else { - if (VerifyAddrHeadersMayExistForEnabledEchoPort()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } - p.list(out); - } catch (Exception e) { - TestUtil.logErr("doGet: Exception: " + e); - e.printStackTrace(out); - System.out.println("doGet: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - if (debug) { - System.out.println("Remote logging intialized for Servlet"); - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - System.out.println("doPost: Exception: " + e); - e.printStackTrace(); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } - - private String getTargetEndpointAddress(Object stub) throws Exception { - BindingProvider bindingprovider = (BindingProvider) stub; - java.util.Map context = bindingprovider.getRequestContext(); - String url = (String) context - .get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY); - return url; - } - - private boolean VerifyAddrHeadersExistForRequiredEchoPort() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersExistForRequiredEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersExistForRequiredEchoPort"); - requiredEchoPort.echo("Echo from ServletClient on requiredEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersDoNotExistForDisabledEchoPort() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPresponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - disabledEchoPort.echo("Echo from ServletClient on disabledEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersMayExistForEnabledEchoPort() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPresponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEchoPort"); - enabledEchoPort.echo("Echo from ServletClient on enabledEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/TestConstants.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/TestConstants.java deleted file mode 100644 index 38677892f6..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/TestConstants.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2009-04-15 02:29:49Z af70133 $ - */ -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest; - -public class TestConstants { - public static final String ECHO_INPUT_ACTION = "EchoInputAction"; - - public static final String ECHO_OUTPUT_ACTION = "EchoOutputAction"; -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/WSEjbWSRefAndAddressingCombinedTestClnt_client.jar.sun-application-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/WSEjbWSRefAndAddressingCombinedTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 0df85b989a..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/WSEjbWSRefAndAddressingCombinedTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - service/wsejbwsrefandaddrcombtestservice - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefandaddrcombtestdefaultechoport - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefandaddrcombtestenabledechoport - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefandaddrcombtestrequiredechoport - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefandaddrcombtestdisabledechoport - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/WSEjbWSRefAndAddressingCombinedTestClnt_ejb.jar.sun-ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/WSEjbWSRefAndAddressingCombinedTestClnt_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 5f01331396..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/WSEjbWSRefAndAddressingCombinedTestClnt_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - 0 - - WSEjbWSRefAndAddressingCombinedTestClntBean - WSEjbWSRefAndAddressingCombinedTestClntBean - - service/wsejbwsrefandaddrcombtestservice - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefandaddrcombtestdefaultechoport - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefandaddrcombtestenabledechoport - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefandaddrcombtestrequiredechoport - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefandaddrcombtestdisabledechoport - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - false - false - -1 - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/WSEjbWSRefAndAddressingCombinedTestClnt_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/WSEjbWSRefAndAddressingCombinedTestClnt_web.war.sun-web.xml deleted file mode 100644 index 26f842566e..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/WSEjbWSRefAndAddressingCombinedTestClnt_web.war.sun-web.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - service/wsejbwsrefandaddrcombtestservice - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefandaddrcombtestdefaultechoport - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefandaddrcombtestenabledechoport - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefandaddrcombtestrequiredechoport - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefandaddrcombtestdisabledechoport - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/WSEjbWSRefAndAddressingCombinedTest_ejb.jar.sun-ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/WSEjbWSRefAndAddressingCombinedTest_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index f07ced23b2..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/WSEjbWSRefAndAddressingCombinedTest_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbWSRefAndAddressingCombinedTest - WSEjbWSRefAndAddressingCombinedTest - false - false - -1 - - - EchoBean - WSEjbWSRefAndAddressingCombinedTest/ejb - - - - EchoService - http://webServerHost.1:webServerPort.1/WSEjbWSRefAndAddressingCombinedTest/ejb?WSDL - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/application.xml.clientear b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/application.xml.clientear deleted file mode 100644 index aaceaa0246..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/application.xml.clientear +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Application description - WSEjbWSRefAndAddressingCombinedTestClnt - - WSEjbWSRefAndAddressingCombinedTestClnt_client.jar - - - - WSEjbWSRefAndAddressingCombinedTestClnt_web.war - WSEjbWSRefAndAddressingCombinedTestClnt_web - - - - WSEjbWSRefAndAddressingCombinedTestClnt_ejb.jar - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/build.xml deleted file mode 100644 index e59a2c1df4..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/build.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/custom-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/custom-client.xml deleted file mode 100644 index 14e514cada..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.ClientSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/custom-server.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/custom-server.xml deleted file mode 100644 index bac7ada399..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefAndAddressingCombinedTest/custom-server.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefAndAddressingCombinedTest.ServerSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/Client.java deleted file mode 100644 index 4d13e67bb3..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/Client.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -import com.sun.javatest.Status; - -import jakarta.ejb.EJB; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.*; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private URL url = null; - - private URLConnection urlConn = null; - - private String SERVLET = "/WSEjbWSRefRespBindAndAddressingCombinedTestClnt_web/ServletTest"; - - @Addressing - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsejbwsrefrespbindandaddrcombtestport1", type = Echo.class, value = EchoService.class) - static Echo port1 = null; - - @Addressing(enabled = true, required = true) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsejbwsrefrespbindandaddrcombtestport2", type = Echo.class, value = EchoService.class) - static Echo port2 = null; - - @Addressing(enabled = false) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsejbwsrefrespbindandaddrcombtestport3", type = Echo.class, value = EchoService.class) - static Echo port3 = null; - - @WebServiceRef(name = "service/wsejbwsrefrespbindandaddrcombtestservice") - static EchoService service = null; - - @EJB(name = "ejb/WSEjbWSRefRespBindAndAddressingCombinedTestClntBean") - static EjbClientIF ejbclient; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Appclient DEBUG: ejbclient=" + ejbclient); - TestUtil.logMsg("Appclient DEBUG: service=" + service); - TestUtil.logMsg("Appclient DEBUG: port1=" + port1); - TestUtil.logMsg("Appclient DEBUG: port2=" + port2); - TestUtil.logMsg("Appclient DEBUG: port3=" + port3); - - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (service == null || port1 == null || port2 == null || port3 == null - || ejbclient == null) { - throw new Fault("setup failed: injection failure"); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - ejbclient.init(p); - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: VerifyAddrHeadersExistForEnabledRequiredPort - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4004; WS4EE:SPEC:4015; - * - * @test_Strategy: Verify Addressing Headers MUST exist on both SOAP request - * and SOAP response for appclient, servlet, and ejb containers. Addressing is - * Enabled/Required on client with RespectBinding equal true and the wsdl - * policy is enabled=true,required=true. - */ - public void VerifyAddrHeadersExistForEnabledRequiredPort() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersExistForEnabledRequiredPort"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg("Addressing headers MUST be present on the SOAPRequest"); - TestUtil.logMsg("VerifyAddrHeadersExistForEnabledRequiredPort"); - Holder testName = new Holder( - "VerifyAddrHeadersExistForEnabledRequiredPort"); - port1.echo("Echo from AppClient on port1", testName); - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - // TestUtil.printStackTrace(e); - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "VerifyAddrHeadersExistForEnabledRequiredPort"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - } else - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - // TestUtil.printStackTrace(e); - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersExistForEnabledRequiredPort"; - boolean passEjb = ejbclient.echo("Echo from EjbClient on port1", - testName); - if (!passEjb) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } else - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - // TestUtil.printStackTrace(e); - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersExistForEnabledRequiredPort failed"); - } - - /* - * @testName: VerifyFaultConditionOnPort - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4004; WS4EE:SPEC:4015; - * - * @test_Strategy: Verify SOAPFaultException case for appclient, servlet, and - * ejb containers. Addressing is Disabled on client with RespectBinding equal - * true and the wsdl policy is enabled=true,required=true. Expect a - * SOAPFaultException with MessageAddressingHeaderRequired fault code. - */ - public void VerifyFaultConditionOnPort() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyFaultConditionOnPort"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil - .logMsg("Addressing headers MUST NOT be present on the SOAPRequest"); - TestUtil.logMsg("VerifyFaultConditionOnPort"); - Holder testName = new Holder("VerifyFaultConditionOnPort"); - port3.echo("Echo from AppClient on port3", testName); - TestUtil.logErr("SOAPFaultException was not thrown back"); - pass = false; - } catch (SOAPFaultException sfe) { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - try { - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "VerifyFaultConditionOnPort"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("VerifyFaultCondition (Unexpected)"); - } else - TestUtil.logMsg("VerifyFaultCondition (Expected)"); - } catch (Exception e) { - // TestUtil.printStackTrace(e); - TestUtil.logErr("Caught Exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyFaultConditionOnPort"; - boolean passEjb = ejbclient.echo("Echo from EjbClient on port3", - testName); - if (!passEjb) { - TestUtil.logErr("VerifyFaultCondition (Unexpected)"); - pass = false; - } else - TestUtil.logMsg("VerifyFaultCondition (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - // TestUtil.printStackTrace(e); - pass = false; - } - if (!pass) - throw new Fault("VerifyFaultConditionOnPort failed"); - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/ClientSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/ClientSOAPHandler.java deleted file mode 100644 index fdf45400f7..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/ClientSOAPHandler.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientSOAPHandler.java 52501 2009-04-15 02:29:49Z af70133 $ - */ -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsa.common.MapRequiredException; -import com.sun.ts.tests.jaxws.wsa.common.MapException; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.soap.SOAPException; -import java.util.Iterator; -import jakarta.xml.ws.handler.soap.SOAPHandler; -import jakarta.xml.soap.SOAPHeader; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.Text; - -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersExistForEnabledRequiredPort")) { - checkAddressingHeadersExist(context, action); - } - } - - private void verifyAction(String action) { - if (!action.equals(TestConstants.ECHO_OUTPUT_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ECHO_OUTPUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundRelatesToDoesNotExist(context); - } - - private void handleMessageInboundCheckAddressingHeadersDoNotExist( - SOAPMessageContext context) { - String headerValue = null; - String whichHeaders = null; - try { - headerValue = getTo(context); - whichHeaders = whichHeaders + "wsa:To, "; - } catch (Exception e) { - } - try { - headerValue = getReplyTo(context); - whichHeaders = whichHeaders + "wsa:ReplyTo, "; - } catch (Exception e) { - } - try { - headerValue = getMessageId(context); - whichHeaders = whichHeaders + "wsa:MessageId, "; - } catch (Exception e) { - } - try { - headerValue = getRelationship(context); - whichHeaders = whichHeaders + "wsa:Relationship, "; - } catch (Exception e) { - } - try { - headerValue = getAction(context); - whichHeaders = whichHeaders + "wsa:Action"; - } catch (Exception e) { - } - if (whichHeaders != null) { - throw new AddressingPropertyException( - "ERROR: The following addressing headers exist in soap message: [" - + whichHeaders + "]"); - } - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ClientSOAPHandler.getAction(): testName=" + testName); - if (testName == null) - return super.getAction(context); - else if (testName.equals("VerifyAddrHeadersExistForEnabledRequiredPort")) - return super.getAction(context); - else - return null; - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/EchoBean.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/EchoBean.java deleted file mode 100644 index c6e1892d79..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/EchoBean.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest; - -import jakarta.ejb.Stateless; -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.RespectBinding; - -@WebService(portName = "EchoPort", serviceName = "EchoService", targetNamespace = "http://Echo.org", wsdlLocation = "META-INF/wsdl/EchoService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest.Echo") - -@Stateless(name = "WSEjbWSRefRespBindAndAddressingCombinedTest") -@RespectBinding(enabled = true) - -public class EchoBean { - - public String echo(String string, Holder testName) { - return string; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/EchoService.wsdl b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/EchoService.wsdl deleted file mode 100644 index 22c302fef8..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/EchoService.wsdl +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/EjbClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/EjbClient.java deleted file mode 100644 index 7b2aba94f7..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/EjbClient.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.ejb.EJBException; -import jakarta.ejb.Remote; -import jakarta.ejb.Stateful; -import jakarta.ejb.SessionContext; -import jakarta.annotation.Resource; -import jakarta.annotation.PostConstruct; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -@Stateful(name = "WSEjbWSRefRespBindAndAddressingCombinedTestClntBean") -@Remote({ EjbClientIF.class }) -public class EjbClient implements EjbClientIF { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - @Addressing - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsejbwsrefrespbindandaddrcombtestport1", type = Echo.class, value = EchoService.class) - Echo port1 = null; - - @Addressing(enabled = true, required = true) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsejbwsrefrespbindandaddrcombtestport2", type = Echo.class, value = EchoService.class) - Echo port2 = null; - - @Addressing(enabled = false) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsejbwsrefrespbindandaddrcombtestport3", type = Echo.class, value = EchoService.class) - Echo port3 = null; - - @WebServiceRef(name = "service/wsejbwsrefrespbindandaddrcombtestservice") - EchoService service = null; - - @PostConstruct - public void postConstruct() { - System.out.println("EjbClient:postConstruct()"); - System.out.println("EjbClient DEBUG: service=" + service); - System.out.println("EjbClient DEBUG: port1=" + port1); - System.out.println("EjbClient DEBUG: port2=" + port2); - System.out.println("EjbClient DEBUG: port3=" + port3); - if (service == null || port2 == null || port1 == null || port3 == null) { - throw new EJBException("postConstruct failed: injection failure"); - } - } - - public void init(Properties p) { - harnessProps = p; - try { - TestUtil.init(p); - } catch (RemoteLoggingInitException e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } - } - - public boolean echo(String string, String testName) { - if (testName.equals("VerifyAddrHeadersExistForEnabledRequiredPort")) - return VerifyAddrHeadersExistForEnabledRequiredPort(); - else - return VerifyFaultConditionOnPort(); - } - - private String getTargetEndpointAddress(Object stub) throws Exception { - BindingProvider bindingprovider = (BindingProvider) stub; - java.util.Map context = bindingprovider.getRequestContext(); - String url = (String) context - .get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY); - return url; - } - - private boolean VerifyAddrHeadersExistForEnabledRequiredPort() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg("Addressing headers MUST be present on the SOAPRequest"); - TestUtil.logMsg("VerifyAddrHeadersExistForEnabledRequiredPort"); - Holder testName = new Holder( - "VerifyAddrHeadersExistForEnabledRequiredPort"); - port2.echo("Echo from EjbClient on port2", testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyFaultConditionOnPort() { - boolean pass = true; - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg("VerifyFaultConditionOnPort"); - Holder testName = new Holder("VerifyFaultConditionOnPort"); - port3.echo("Echo from EjbClient on port3", testName); - TestUtil.logErr("SOAPFaultException was not thrown back"); - pass = false; - } catch (SOAPFaultException sfe) { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - try { - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/EjbClientIF.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/EjbClientIF.java deleted file mode 100644 index 8c433e387f..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/EjbClientIF.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest; - -public interface EjbClientIF { - - public void init(java.util.Properties p); - - public boolean echo(String string, String testName); -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/ServerSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/ServerSOAPHandler.java deleted file mode 100644 index 9479e3b818..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/ServerSOAPHandler.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2009-04-15 02:29:49Z af70133 $ - */ -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.MapException; -import com.sun.ts.tests.jaxws.wsa.common.MapRequiredException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import jakarta.xml.soap.SOAPException; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersExistForEnabledRequiredPort")) { - checkAddressingHeadersExist(context, action); - } - } - - private void verifyAction(String action) { - if (!action.equals(TestConstants.ECHO_INPUT_ACTION)) { - throw new ActionNotSupportedException( - "Expected:" + TestConstants.ECHO_INPUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundMessageIdDoesNotExist(context); - checkInboundReplyToDoesNotExist(context); - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ServerSOAPHandler.getAction(): testName=" + testName); - System.out.println("ServerSOAPHandler.getAction(): testName=" + testName); - if (testName == null) - return super.getAction(context); - else if (testName.equals("VerifyAddrHeadersExistForEnabledRequiredPort")) - return super.getAction(context); - else - return null; - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/ServletClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/ServletClient.java deleted file mode 100644 index cf382299e9..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/ServletClient.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServletClient.java 52684 2009-04-15 04:30:10Z af70133 $ - */ - -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -import java.io.*; -import java.sql.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import jakarta.servlet.annotation.WebServlet; -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; - -@WebServlet("/ServletTest") -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - @Addressing - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsejbwsrefrespbindandaddrcombtestport1", type = Echo.class, value = EchoService.class) - Echo port1 = null; - - @Addressing(enabled = true, required = true) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsejbwsrefrespbindandaddrcombtestport2", type = Echo.class, value = EchoService.class) - Echo port2 = null; - - @Addressing(enabled = false) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsejbwsrefrespbindandaddrcombtestport3", type = Echo.class, value = EchoService.class) - Echo port3 = null; - - @WebServiceRef(name = "service/wsejbwsrefrespbindandaddrcombtestservice") - EchoService service = null; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("DEBUG ServletClient:init()"); - System.out.println("ServletClient DEBUG: service=" + service); - System.out.println("ServletClient DEBUG: port1=" + port1); - System.out.println("ServletClient DEBUG: port2=" + port2); - System.out.println("ServletClient DEBUG: port3=" + port3); - if (service == null || port2 == null || port1 == null || port3 == null) - throw new ServletException("init() failed: port injection failed"); - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - try { - String test = harnessProps.getProperty("TEST"); - System.out.println("doGet: test to execute is: " + test); - if (test.equals("VerifyAddrHeadersExistForEnabledRequiredPort")) { - if (VerifyAddrHeadersExistForEnabledRequiredPort()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else { - if (VerifyFaultConditionOnPort()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } - p.list(out); - } catch (Exception e) { - TestUtil.logErr("doGet: Exception: " + e); - e.printStackTrace(out); - System.out.println("doGet: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - if (debug) { - System.out.println("Remote logging intialized for Servlet"); - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - System.out.println("doPost: Exception: " + e); - e.printStackTrace(); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } - - private String getTargetEndpointAddress(Object stub) throws Exception { - BindingProvider bindingprovider = (BindingProvider) stub; - java.util.Map context = bindingprovider.getRequestContext(); - String url = (String) context - .get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY); - return url; - } - - private boolean VerifyAddrHeadersExistForEnabledRequiredPort() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg("Addressing headers MUST be present on the SOAPRequest"); - TestUtil.logMsg("VerifyAddrHeadersExistForEnabledRequiredPort"); - Holder testName = new Holder( - "VerifyAddrHeadersExistForEnabledRequiredPort"); - port2.echo("Echo from ServletClient on port2", testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyFaultConditionOnPort() { - boolean pass = true; - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg("VerifyFaultConditionOnPort"); - Holder testName = new Holder("VerifyFaultConditionOnPort"); - port3.echo("Echo from ServletClient on port3", testName); - TestUtil.logErr("SOAPFaultException was not thrown back"); - pass = false; - } catch (SOAPFaultException sfe) { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - try { - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/TestConstants.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/TestConstants.java deleted file mode 100644 index 45f6cf5050..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/TestConstants.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2009-04-15 02:29:49Z af70133 $ - */ -package com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest; - -public class TestConstants { - public static final String ECHO_INPUT_ACTION = "EchoInputAction"; - - public static final String ECHO_OUTPUT_ACTION = "EchoOutputAction"; -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/WSEjbWSRefRespBindAndAddressingCombinedTestClnt_client.jar.sun-application-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/WSEjbWSRefRespBindAndAddressingCombinedTestClnt_client.jar.sun-application-client.xml deleted file mode 100644 index b8f4a8fe94..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/WSEjbWSRefRespBindAndAddressingCombinedTestClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - service/wsejbwsrefrespbindandaddrcombtestservice - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefrespbindandaddrcombtestport1 - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefrespbindandaddrcombtestport2 - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefrespbindandaddrcombtestport3 - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/WSEjbWSRefRespBindAndAddressingCombinedTestClnt_ejb.jar.sun-ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/WSEjbWSRefRespBindAndAddressingCombinedTestClnt_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index ba1f4d0d80..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/WSEjbWSRefRespBindAndAddressingCombinedTestClnt_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - 0 - - WSEjbWSRefRespBindAndAddressingCombinedTestClntBean - WSEjbWSRefRespBindAndAddressingCombinedTestClntBean - - service/wsejbwsrefrespbindandaddrcombtestservice - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefrespbindandaddrcombtestport1 - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefrespbindandaddrcombtestport2 - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefrespbindandaddrcombtestport3 - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - false - false - -1 - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/WSEjbWSRefRespBindAndAddressingCombinedTestClnt_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/WSEjbWSRefRespBindAndAddressingCombinedTestClnt_web.war.sun-web.xml deleted file mode 100644 index c216cd3af1..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/WSEjbWSRefRespBindAndAddressingCombinedTestClnt_web.war.sun-web.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - service/wsejbwsrefrespbindandaddrcombtestservice - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefrespbindandaddrcombtestport1 - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefrespbindandaddrcombtestport2 - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - - service/wsejbwsrefrespbindandaddrcombtestport3 - - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/WSEjbWSRefRespBindAndAddressingCombinedTest_ejb.jar.sun-ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/WSEjbWSRefRespBindAndAddressingCombinedTest_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index aa25b3dd0f..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/WSEjbWSRefRespBindAndAddressingCombinedTest_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - 0 - - WSEjbWSRefRespBindAndAddressingCombinedTest - WSEjbWSRefRespBindAndAddressingCombinedTest - false - false - -1 - - - EchoBean - WSEjbWSRefRespBindAndAddressingCombinedTest/ejb - - - - EchoService - http://webServerHost.1:webServerPort.1/WSEjbWSRefRespBindAndAddressingCombinedTest/ejb?WSDL - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/application.xml.clientear b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/application.xml.clientear deleted file mode 100644 index 85d60e4de9..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/application.xml.clientear +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Application description - WSEjbWSRefRespBindAndAddressingCombinedTestClnt - - WSEjbWSRefRespBindAndAddressingCombinedTestClnt_client.jar - - - - WSEjbWSRefRespBindAndAddressingCombinedTestClnt_web.war - WSEjbWSRefRespBindAndAddressingCombinedTestClnt_web - - - - WSEjbWSRefRespBindAndAddressingCombinedTestClnt_ejb.jar - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/build.xml deleted file mode 100644 index 08f320dc93..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/build.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/custom-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/custom-client.xml deleted file mode 100644 index 2fa6e7a731..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest.ClientSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/custom-server.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/custom-server.xml deleted file mode 100644 index 359c8e1992..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/WSEjbWSRefRespBindAndAddressingCombinedTest/custom-server.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.webservices13.ejb.annotations.WSEjbWSRefRespBindAndAddressingCombinedTest.ServerSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/build.xml deleted file mode 100644 index 2e00d7eddc..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/annotations/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/build.xml deleted file mode 100644 index a1e17fe6c3..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/ejb/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/Client.java deleted file mode 100644 index 5bb98a3ebb..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/Client.java +++ /dev/null @@ -1,581 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; -import com.sun.javatest.Status; - -import jakarta.ejb.EJB; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.*; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private URL url = null; - - private URLConnection urlConn = null; - - private String SERVLET = "/WSAddressingFeaturesTestUsingAnnotationsClnt_web/ServletTest"; - - @Addressing - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdefaultechoport", value = EchoService.class) - static Echo defaultEchoPort = null; - - @Addressing(enabled = true) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsenabledechoport", value = EchoService.class) - static Echo enabledEchoPort = null; - - @Addressing(enabled = true, required = true) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsrequiredechoport", value = EchoService.class) - static Echo requiredEchoPort = null; - - @Addressing(enabled = false) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdisabledechoport", value = EchoService.class) - static Echo disabledEchoPort = null; - - @Addressing - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdefaultecho2port", value = EchoService.class) - static Echo2 defaultEcho2Port = null; - - @Addressing(enabled = true) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsenabledecho2port", value = EchoService.class) - static Echo2 enabledEcho2Port = null; - - @Addressing(enabled = true, required = true) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsrequiredecho2port", value = EchoService.class) - static Echo2 requiredEcho2Port = null; - - @Addressing(enabled = false) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdisabledecho2port", value = EchoService.class) - static Echo2 disabledEcho2Port = null; - - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsservice") - static EchoService service = null; - - @EJB(name = "ejb/WSAddressingFeaturesTestUsingAnnotationsClntBean") - static EjbClientIF ejbclient; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - TestUtil.logMsg("AppClient DEBUG: ejbclient=" + ejbclient); - TestUtil.logMsg("AppClient DEBUG: service=" + service); - TestUtil.logMsg("AppClient DEBUG: defaultEchoPort=" + defaultEchoPort); - TestUtil.logMsg("AppClient DEBUG: enabledEchoPort=" + enabledEchoPort); - TestUtil.logMsg("AppClient DEBUG: requiredEchoPort=" + requiredEchoPort); - TestUtil.logMsg("AppClient DEBUG: disabledEchoPort=" + disabledEchoPort); - TestUtil.logMsg("AppClient DEBUG: defaultEcho2Port=" + defaultEcho2Port); - TestUtil.logMsg("AppClient DEBUG: enabledEcho2Port=" + enabledEcho2Port); - TestUtil - .logMsg("AppClient DEBUG: requiredEcho2Port=" + requiredEcho2Port); - TestUtil - .logMsg("AppClient DEBUG: disabledEcho2Port=" + disabledEcho2Port); - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - if (service == null || ejbclient == null || defaultEchoPort == null - || enabledEchoPort == null || requiredEchoPort == null - || disabledEchoPort == null || defaultEcho2Port == null - || enabledEcho2Port == null || requiredEcho2Port == null - || disabledEcho2Port == null) { - throw new Fault("setup failed: injection failure"); - } - ejbclient.init(p); - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: VerifyAddrHeadersExistForRequiredEchoPort - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; - * - * @test_Strategy: Verify Addressing Headers MUST exist on SOAP request and - * SOAP response for appclient, servlet, and ejb containers. Addressing - * enabled/required by client/supported by endpoint. - */ - public void VerifyAddrHeadersExistForRequiredEchoPort() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersExistForRequiredEchoPort"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersExistForRequiredEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersExistForRequiredEchoPort"); - requiredEchoPort.echo("Echo from AppClient on requiredEchoPort", - testName); - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "VerifyAddrHeadersExistForRequiredEchoPort"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - } else - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersExistForRequiredEchoPort"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on requiredEchoPort", testName); - if (!passEjb) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } else - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersExistForRequiredEchoPort failed"); - } - - /* - * @testName: VerifyAddrHeadersDoNotExistForDisabledEchoPort - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; - * - * @test_Strategy: Verify Addressing Headers MUST NOT exist on SOAP request - * and SOAP response for appclient, servlet, and ejb containers. Addressing - * disabled by client/supported by endpoint. - */ - public void VerifyAddrHeadersDoNotExistForDisabledEchoPort() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - disabledEchoPort.echo("Echo from AppClient on disabledEchoPort", - testName); - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - } else - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersDoNotExistForDisabledEchoPort"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on disabledEchoPort", testName); - if (!passEjb) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } else - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersDoNotExistForDisabledEchoPort failed"); - } - - /* - * @testName: VerifyAddrHeadersMayExistForEnabledEchoPort - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; - * - * @test_Strategy: Verify Addressing Headers may exist on SOAP request and - * SOAP response for appclient, servlet, and ejb containers. Addressing - * enabled/notrequired by client/supported by endpoint. - */ - public void VerifyAddrHeadersMayExistForEnabledEchoPort() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEchoPort"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEchoPort"); - enabledEchoPort.echo("Echo from AppClient on enabledEchoPort", testName); - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "VerifyAddrHeadersMayExistForEnabledEchoPort"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - TestUtil.logErr("Unexpected failure occurred"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersMayExistForEnabledEchoPort"; - boolean passEjb = ejbclient.echo("Echo from EjbClient on enabledEchoPort", - testName); - if (!passEjb) { - TestUtil.logErr("Unexpected failure occurred"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersMayExistForEnabledEchoPort failed"); - } - - /* - * @testName: VerifyExceptionThrownForRequiredEcho2Port - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; - * - * @test_Strategy: Negative test case. Verify Exception is thrown back. - * Addressing enabled/required by client/not supported by endpoint. Expect a - * WebServiceException to be thrown. - */ - public void VerifyExceptionThrownForRequiredEcho2Port() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyExceptionThrownForRequiredEcho2Port"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg("Expect a WebServiceException to be thrown back"); - TestUtil.logMsg("VerifyExceptionThrownForRequiredEcho2Port"); - Holder testName = new Holder( - "VerifyExceptionThrownForRequiredEcho2Port"); - requiredEcho2Port.echo("Echo from AppClient on requiredEcho2Port", - testName); - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "VerifyExceptionThrownForRequiredEcho2Port"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("WebServiceException was not thrown back"); - } else - TestUtil.logMsg("Caught expected WebServiceException"); - } catch (Exception e) { - TestUtil.logMsg("Unexpected Exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyExceptionThrownForRequiredEcho2Port"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on requiredEcho2Port", testName); - if (!passEjb) { - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } else - TestUtil.logMsg("Caught expected WebServiceException"); - } catch (Exception e) { - TestUtil.logMsg("Unexpected Exception: " + e.getMessage()); - pass = false; - } - if (!pass) - throw new Fault("VerifyExceptionThrownForRequiredEcho2Port failed"); - } - - /* - * @testName: VerifyAddrHeadersDoNotExistForDisabledEcho2Port - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; - * - * @test_Strategy: Verify Addressing Headers MUST NOT exist on SOAP request - * and SOAP response for appclient, servlet, and ejb containers. Addressing - * disabled by client/not supported by endpoint. - */ - public void VerifyAddrHeadersDoNotExistForDisabledEcho2Port() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - disabledEcho2Port.echo("Echo from AppClient on disabledEcho2Port", - testName); - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - } else - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersDoNotExistForDisabledEcho2Port"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on disabledEcho2Port", testName); - if (!passEjb) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } else - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersDoNotExistForDisabledEcho2Port failed"); - } - - /* - * @testName: VerifyAddrHeadersMayExistForEnabledEcho2Port - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; - * - * @test_Strategy: Verify Addressing Headers may exist on SOAP request and - * SOAP response for appclient, servlet, and ejb containers. Addressing - * enabled/notrequired by client/not supported by endpoint. - */ - public void VerifyAddrHeadersMayExistForEnabledEcho2Port() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEcho2Port"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEcho2Port"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEcho2Port"); - enabledEcho2Port.echo("Echo from AppClient on enabledEcho2Port", - testName); - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "VerifyAddrHeadersMayExistForEnabledEcho2Port"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - TestUtil.logErr("Unexpected failure occurred"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersMayExistForEnabledEcho2Port"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on enabledEcho2Port", testName); - if (!passEjb) { - TestUtil.logErr("Unexpected failure occurred"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersMayExistForEnabledEcho2Port failed"); - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/ClientSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/ClientSOAPHandler.java deleted file mode 100644 index 4960b16d0f..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/ClientSOAPHandler.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsa.common.MapRequiredException; -import com.sun.ts.tests.jaxws.wsa.common.MapException; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.soap.SOAPException; -import java.util.Iterator; -import jakarta.xml.ws.handler.soap.SOAPHandler; -import jakarta.xml.soap.SOAPHeader; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.Text; - -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersExistForRequiredEchoPort")) { - checkAddressingHeadersExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersDoNotExistForDisabledEchoPort")) { - checkAddressingHeadersDoNotExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersDoNotExistForDisabledEcho2Port")) { - checkAddressingHeadersDoNotExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersMayExistForEnabledEchoPort")) { - checkAddressingHeadersMayExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersMayExistForEnabledEcho2Port")) { - checkAddressingHeadersMayExist(context, action); - } - } - - private void verifyAction(String action) { - if (!action.equals(TestConstants.ECHO_OUTPUT_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ECHO_OUTPUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersExist"); - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersDoNotExist"); - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundRelatesToDoesNotExist(context); - } - - private void checkAddressingHeadersMayExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersMayExist"); - // If Addressing headers exist then check them otherwise don't - if (action != null) { - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - } - - private void handleMessageInboundCheckAddressingHeadersDoNotExist( - SOAPMessageContext context) { - String headerValue = null; - String whichHeaders = null; - try { - headerValue = getTo(context); - whichHeaders = whichHeaders + "wsa:To, "; - } catch (Exception e) { - } - try { - headerValue = getReplyTo(context); - whichHeaders = whichHeaders + "wsa:ReplyTo, "; - } catch (Exception e) { - } - try { - headerValue = getMessageId(context); - whichHeaders = whichHeaders + "wsa:MessageId, "; - } catch (Exception e) { - } - try { - headerValue = getRelationship(context); - whichHeaders = whichHeaders + "wsa:Relationship, "; - } catch (Exception e) { - } - try { - headerValue = getAction(context); - whichHeaders = whichHeaders + "wsa:Action"; - } catch (Exception e) { - } - if (whichHeaders != null) { - throw new AddressingPropertyException( - "ERROR: The following addressing headers exist in soap message: [" - + whichHeaders + "]"); - } - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ClientSOAPHandler.getAction(): testName=" + testName); - if (testName == null) { - return super.getAction(context); - } else if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort")) { - return super.getAction(context); - } else if (testName.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort") - || testName.equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port")) { - return super.getActionDoesNotExist(context); - } else if (testName.equals("VerifyAddrHeadersMayExistForEnabledEchoPort") - || testName.equals("VerifyAddrHeadersMayExistForEnabledEcho2Port")) { - try { - return super.getAction(context); - } catch (Exception e) { - return null; - } - } else - return null; - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/Echo2Impl.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/Echo2Impl.java deleted file mode 100644 index b92e519bfb..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/Echo2Impl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Holder; - -@WebService(portName = "Echo2Port", serviceName = "EchoService", targetNamespace = "http://Echo.org", wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2") -@Addressing(enabled = false) -public class Echo2Impl { - - public String echo(String string, Holder testName) { - return string; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/EchoImpl.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/EchoImpl.java deleted file mode 100644 index a04a56a5d2..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/EchoImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Holder; - -@WebService(portName = "EchoPort", serviceName = "EchoService", targetNamespace = "http://Echo.org", wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo") - -public class EchoImpl { - - public String echo(String string, Holder testName) { - return string; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/EchoService.wsdl b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/EchoService.wsdl deleted file mode 100644 index fa609c6bd9..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/EchoService.wsdl +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/EjbClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/EjbClient.java deleted file mode 100644 index 0034997e1f..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/EjbClient.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.ejb.EJBException; -import jakarta.ejb.Remote; -import jakarta.ejb.Stateless; -import jakarta.ejb.SessionContext; -import jakarta.annotation.Resource; -import jakarta.annotation.PostConstruct; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -@Stateless(name = "WSAddressingFeaturesTestUsingAnnotationsClntBean") -@Remote({ EjbClientIF.class }) -public class EjbClient implements EjbClientIF { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - @Addressing - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdefaultechoport", value = EchoService.class) - Echo defaultEchoPort = null; - - @Addressing(enabled = true) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsenabledechoport", value = EchoService.class) - Echo enabledEchoPort = null; - - @Addressing(enabled = true, required = true) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsrequiredechoport", value = EchoService.class) - Echo requiredEchoPort = null; - - @Addressing(enabled = false) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdisabledechoport", value = EchoService.class) - Echo disabledEchoPort = null; - - @Addressing - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdefaultecho2port", value = EchoService.class) - Echo2 defaultEcho2Port = null; - - @Addressing(enabled = true) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsenabledecho2port", value = EchoService.class) - Echo2 enabledEcho2Port = null; - - @Addressing(enabled = true, required = true) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsrequiredecho2port", value = EchoService.class) - Echo2 requiredEcho2Port = null; - - @Addressing(enabled = false) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdisabledecho2port", value = EchoService.class) - Echo2 disabledEcho2Port = null; - - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsservice") - EchoService service = null; - - @PostConstruct - public void postConstruct() { - System.out.println("EjbClient:postConstruct()"); - System.out.println("EjbClient DEBUG: service=" + service); - System.out.println("EjbClient DEBUG: defaultEchoPort=" + defaultEchoPort); - System.out.println("EjbClient DEBUG: enabledEchoPort=" + enabledEchoPort); - System.out.println("EjbClient DEBUG: requiredEchoPort=" + requiredEchoPort); - System.out.println("EjbClient DEBUG: disabledEchoPort=" + disabledEchoPort); - System.out.println("EjbClient DEBUG: defaultEcho2Port=" + defaultEcho2Port); - System.out.println("EjbClient DEBUG: enabledEcho2Port=" + enabledEcho2Port); - System.out - .println("EjbClient DEBUG: requiredEcho2Port=" + requiredEcho2Port); - System.out - .println("EjbClient DEBUG: disabledEcho2Port=" + disabledEcho2Port); - if (service == null || defaultEchoPort == null || enabledEchoPort == null - || requiredEchoPort == null || disabledEchoPort == null - || defaultEcho2Port == null || enabledEcho2Port == null - || requiredEcho2Port == null || disabledEcho2Port == null) { - throw new EJBException("postConstruct failed: injection failure"); - } - } - - public void init(Properties p) { - harnessProps = p; - try { - TestUtil.init(p); - } catch (RemoteLoggingInitException e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } - } - - public boolean echo(String string, String testName) { - if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort")) - return VerifyAddrHeadersExistForRequiredEchoPort(); - else if (testName.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort")) - return VerifyAddrHeadersDoNotExistForDisabledEchoPort(); - else if (testName.equals("VerifyAddrHeadersMayExistForEnabledEchoPort")) - return VerifyAddrHeadersMayExistForEnabledEchoPort(); - else if (testName.equals("VerifyExceptionThrownForRequiredEcho2Port")) - return VerifyExceptionThrownForRequiredEcho2Port(); - else if (testName.equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port")) - return VerifyAddrHeadersDoNotExistForDisabledEcho2Port(); - else - return VerifyAddrHeadersMayExistForEnabledEcho2Port(); - } - - private boolean VerifyAddrHeadersExistForRequiredEchoPort() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersExistForRequiredEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersExistForRequiredEchoPort"); - requiredEchoPort.echo("Echo from EjbClient on requiredEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersDoNotExistForDisabledEchoPort() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - disabledEchoPort.echo("Echo from EjbClient on disabledEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersMayExistForEnabledEchoPort() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEchoPort"); - enabledEchoPort.echo("Echo from EjbClient on enabledEchoPort", testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyExceptionThrownForRequiredEcho2Port() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg("Expect a WebServiceException to be thrown back"); - TestUtil.logMsg("VerifyExceptionThrownForRequiredEcho2Port"); - Holder testName = new Holder( - "VerifyExceptionThrownForRequiredEcho2Port"); - requiredEcho2Port.echo("Echo from EjbClient on requiredEcho2Port", - testName); - TestUtil.logErr("WebServiceException was not thrown back"); - return false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - return true; - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - return false; - } - } - - private boolean VerifyAddrHeadersDoNotExistForDisabledEcho2Port() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - disabledEcho2Port.echo("Echo from EjbClient on disabledEcho2Port", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersMayExistForEnabledEcho2Port() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEcho2Port"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEcho2Port"); - enabledEcho2Port.echo("Echo from EjbClient on enabledEcho2Port", - testName); - return true; - } catch (Exception e) { - return false; - } - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/EjbClientIF.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/EjbClientIF.java deleted file mode 100644 index 771a28e7f4..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/EjbClientIF.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations; - -public interface EjbClientIF { - - public void init(java.util.Properties p); - - public boolean echo(String string, String testName); -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/ServerSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/ServerSOAPHandler.java deleted file mode 100644 index f6a2569034..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/ServerSOAPHandler.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.MapException; -import com.sun.ts.tests.jaxws.wsa.common.MapRequiredException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import jakarta.xml.soap.SOAPException; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersExistForRequiredEchoPort")) { - checkAddressingHeadersExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersDoNotExistForDisabledEchoPort")) { - checkAddressingHeadersDoNotExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersDoNotExistForDisabledEcho2Port")) { - checkAddressingHeadersDoNotExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersMayExistForEnabledEchoPort")) { - checkAddressingHeadersMayExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersMayExistForEnabledEcho2Port")) { - checkAddressingHeadersMayExist(context, action); - } - } - - private void verifyAction(String action) { - if (!action.equals(TestConstants.ECHO_INPUT_ACTION)) { - throw new ActionNotSupportedException( - "Expected:" + TestConstants.ECHO_INPUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersExist"); - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersDoNotExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersDoNotExist"); - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundMessageIdDoesNotExist(context); - checkInboundReplyToDoesNotExist(context); - } - - private void checkAddressingHeadersMayExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersMayExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersMayExist"); - // If Addressing headers exist then check them otherwise don't - if (action != null) { - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ServerSOAPHandler.getAction(): testName=" + testName); - System.out.println("ServerSOAPHandler.getAction(): testName=" + testName); - if (testName == null) { - return super.getAction(context); - } else if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort")) { - return super.getAction(context); - } else if (testName.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort") - || testName.equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port")) { - return super.getActionDoesNotExist(context); - } else if (testName.equals("VerifyAddrHeadersMayExistForEnabledEchoPort") - || testName.equals("VerifyAddrHeadersMayExistForEnabledEcho2Port")) { - try { - return super.getAction(context); - } catch (Exception e) { - return null; - } - } else - return null; - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/ServletClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/ServletClient.java deleted file mode 100644 index 63366dee78..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/ServletClient.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -import java.io.*; -import java.sql.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import jakarta.servlet.annotation.WebServlet; -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; - -@WebServlet("/ServletTest") -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - @Addressing - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdefaultechoport", value = EchoService.class) - Echo defaultEchoPort = null; - - @Addressing(enabled = true) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsenabledechoport", value = EchoService.class) - Echo enabledEchoPort = null; - - @Addressing(enabled = true, required = true) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsrequiredechoport", value = EchoService.class) - Echo requiredEchoPort = null; - - @Addressing(enabled = false) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdisabledechoport", value = EchoService.class) - Echo disabledEchoPort = null; - - @Addressing - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdefaultecho2port", value = EchoService.class) - Echo2 defaultEcho2Port = null; - - @Addressing(enabled = true) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsenabledecho2port", value = EchoService.class) - Echo2 enabledEcho2Port = null; - - @Addressing(enabled = true, required = true) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsrequiredecho2port", value = EchoService.class) - Echo2 requiredEcho2Port = null; - - @Addressing(enabled = false) - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdisabledecho2port", value = EchoService.class) - Echo2 disabledEcho2Port = null; - - @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsservice") - EchoService service = null; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("ServletClient:init()"); - System.out.println("ServletClient DEBUG: service=" + service); - System.out - .println("ServletClient DEBUG: defaultEchoPort=" + defaultEchoPort); - System.out - .println("ServletClient DEBUG: enabledEchoPort=" + enabledEchoPort); - System.out - .println("ServletClient DEBUG: requiredEchoPort=" + requiredEchoPort); - System.out - .println("ServletClient DEBUG: disabledEchoPort=" + disabledEchoPort); - System.out - .println("ServletClient DEBUG: defaultEcho2Port=" + defaultEcho2Port); - System.out - .println("ServletClient DEBUG: enabledEcho2Port=" + enabledEcho2Port); - System.out - .println("ServletClient DEBUG: requiredEcho2Port=" + requiredEcho2Port); - System.out - .println("ServletClient DEBUG: disabledEcho2Port=" + disabledEcho2Port); - if (service == null || defaultEchoPort == null || enabledEchoPort == null - || requiredEchoPort == null || disabledEchoPort == null - || defaultEcho2Port == null || enabledEcho2Port == null - || requiredEcho2Port == null || disabledEcho2Port == null) { - throw new ServletException("init() failed: port injection failed"); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - try { - String test = harnessProps.getProperty("TEST"); - System.out.println("doGet: test to execute is: " + test); - if (test.equals("VerifyAddrHeadersExistForRequiredEchoPort")) { - if (VerifyAddrHeadersExistForRequiredEchoPort()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test - .equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort")) { - if (VerifyAddrHeadersDoNotExistForDisabledEchoPort()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test.equals("VerifyAddrHeadersMayExistForEnabledEchoPort")) { - if (VerifyAddrHeadersMayExistForEnabledEchoPort()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test.equals("VerifyExceptionThrownForRequiredEcho2Port")) { - if (VerifyExceptionThrownForRequiredEcho2Port()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test - .equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port")) { - if (VerifyAddrHeadersDoNotExistForDisabledEcho2Port()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else { - if (VerifyAddrHeadersMayExistForEnabledEcho2Port()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } - p.list(out); - } catch (Exception e) { - TestUtil.logErr("doGet: Exception: " + e); - e.printStackTrace(out); - System.out.println("doGet: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - if (debug) { - System.out.println("Remote logging intialized for Servlet"); - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - System.out.println("doPost: Exception: " + e); - e.printStackTrace(); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } - - private boolean VerifyAddrHeadersExistForRequiredEchoPort() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersExistForRequiredEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersExistForRequiredEchoPort"); - requiredEchoPort.echo("Echo from ServletClient on requiredEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersDoNotExistForDisabledEchoPort() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPresponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - disabledEchoPort.echo("Echo from ServletClient on disabledEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersMayExistForEnabledEchoPort() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPresponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEchoPort"); - enabledEchoPort.echo("Echo from ServletClient on enabledEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyExceptionThrownForRequiredEcho2Port() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg("Expect a WebServiceException to be thrown back"); - TestUtil.logMsg("VerifyExceptionThrownForRequiredEcho2Port"); - Holder testName = new Holder( - "VerifyExceptionThrownForRequiredEcho2Port"); - requiredEcho2Port.echo("Echo from ServletClient on requiredEcho2Port", - testName); - TestUtil.logErr("WebServiceException was not thrown back"); - return false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - return true; - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - return false; - } - } - - private boolean VerifyAddrHeadersDoNotExistForDisabledEcho2Port() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - disabledEcho2Port.echo("Echo from ServletClient on disabledEcho2Port", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersMayExistForEnabledEcho2Port() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPresponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEcho2Port"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEcho2Port"); - enabledEcho2Port.echo("Echo from ServletClient on enabledEcho2Port", - testName); - return true; - } catch (Exception e) { - return false; - } - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/TestConstants.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/TestConstants.java deleted file mode 100644 index 49c76d4bab..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/TestConstants.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations; - -public class TestConstants { - public static final String ECHO_INPUT_ACTION = "EchoInputAction"; - - public static final String ECHO_OUTPUT_ACTION = "EchoOutputAction"; -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotationsClnt_client.jar.sun-application-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotationsClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 683227903e..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotationsClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - service/wsaddrfeaturestestusingannotationsservice - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsdefaultechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsenabledechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsrequiredechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsdisabledechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsdefaultecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsenabledecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsrequiredecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsdisabledecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotationsClnt_ejb.jar.sun-ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotationsClnt_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 2d3d980480..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotationsClnt_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - 0 - - WSAddressingFeaturesTestUsingAnnotationsClntBean - WSAddressingFeaturesTestUsingAnnotationsClntBean - - service/wsaddrfeaturestestusingannotationsservice - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsdefaultechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsenabledechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsrequiredechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsdisabledechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsdefaultecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsenabledecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsrequiredecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsdisabledecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - false - false - -1 - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotationsClnt_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotationsClnt_web.war.sun-web.xml deleted file mode 100644 index 236ae0a32a..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotationsClnt_web.war.sun-web.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - service/wsaddrfeaturestestusingannotationsservice - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsdefaultechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsenabledechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsrequiredechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsdisabledechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsdefaultecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsenabledecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsrequiredecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingannotationsdisabledecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotations_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotations_web.war.sun-web.xml deleted file mode 100644 index cab7fa66e8..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotations_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - EchoService - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotations_web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotations_web.xml deleted file mode 100644 index 9e6eeddafd..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/WSAddressingFeaturesTestUsingAnnotations_web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - WSAddressingFeaturesTestUsingAnnotations - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.EchoImpl - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.EchoImpl - 0 - - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2Impl - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2Impl - 0 - - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.EchoImpl - /jaxws/Echo - - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo2Impl - /jaxws/Echo2 - - - 54 - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/application.xml.clientear b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/application.xml.clientear deleted file mode 100644 index f175be1289..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/application.xml.clientear +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Application description - WSAddressingFeaturesTestUsingAnnotationsClnt - - WSAddressingFeaturesTestUsingAnnotationsClnt_client.jar - - - - WSAddressingFeaturesTestUsingAnnotationsClnt_web.war - WSAddressingFeaturesTestUsingAnnotationsClnt_web - - - - WSAddressingFeaturesTestUsingAnnotationsClnt_ejb.jar - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/build.xml deleted file mode 100644 index dda04025ef..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/build.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/custom-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/custom-client.xml deleted file mode 100644 index 85adcda015..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.ClientSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/custom-server.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/custom-server.xml deleted file mode 100644 index 64b39800c0..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingAnnotations/custom-server.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.ServerSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/Client.java deleted file mode 100644 index 84b93a7d34..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/Client.java +++ /dev/null @@ -1,748 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; -import com.sun.javatest.Status; - -import jakarta.ejb.EJB; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.*; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private URL url = null; - - private URLConnection urlConn = null; - - private String SERVLET = "/WSAddressingFeaturesTestUsingDDsClnt_web/ServletTest"; - - Echo defaultEchoPort = null; - - Echo enabledEchoPort = null; - - Echo requiredEchoPort = null; - - Echo disabledEchoPort = null; - - Echo2 defaultEcho2Port = null; - - Echo2 enabledEcho2Port = null; - - Echo2 requiredEcho2Port = null; - - Echo2 disabledEcho2Port = null; - - Echo3 anonymousEcho3Port = null; - - Echo4 nonanonymousEcho4Port = null; - - @EJB(name = "ejb/WSAddressingFeaturesTestUsingDDsClntBean") - static EjbClientIF ejbclient; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - InitialContext ctx = new InitialContext(); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsdefaultechoport"); - defaultEchoPort = (Echo) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsdefaultechoport"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsenabledechoport"); - enabledEchoPort = (Echo) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsenabledechoport"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsrequiredechoport"); - requiredEchoPort = (Echo) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsrequiredechoport"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsdisabledechoport"); - disabledEchoPort = (Echo) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsdisabledechoport"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsdefaultecho2port"); - defaultEcho2Port = (Echo2) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsdefaultecho2port"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsenabledecho2port"); - enabledEcho2Port = (Echo2) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsenabledecho2port"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsrequiredecho2port"); - requiredEcho2Port = (Echo2) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsrequiredecho2port"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsdisabledecho2port"); - disabledEcho2Port = (Echo2) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsdisabledecho2port"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsanonymousecho3port"); - anonymousEcho3Port = (Echo3) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsanonymousecho3port"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsnonanonymousecho4port"); - nonanonymousEcho4Port = (Echo4) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsnonanonymousecho4port"); - TestUtil.logMsg("AppClient DEBUG: ejbclient=" + ejbclient); - TestUtil.logMsg("AppClient DEBUG: defaultEchoPort=" + defaultEchoPort); - TestUtil.logMsg("AppClient DEBUG: enabledEchoPort=" + enabledEchoPort); - TestUtil.logMsg("AppClient DEBUG: requiredEchoPort=" + requiredEchoPort); - TestUtil.logMsg("AppClient DEBUG: disabledEchoPort=" + disabledEchoPort); - TestUtil.logMsg("AppClient DEBUG: defaultEcho2Port=" + defaultEcho2Port); - TestUtil.logMsg("AppClient DEBUG: enabledEcho2Port=" + enabledEcho2Port); - TestUtil - .logMsg("AppClient DEBUG: requiredEcho2Port=" + requiredEcho2Port); - TestUtil - .logMsg("AppClient DEBUG: disabledEcho2Port=" + disabledEcho2Port); - TestUtil - .logMsg("AppClient DEBUG: anonymousEcho3Port=" + anonymousEcho3Port); - TestUtil.logMsg( - "AppClient DEBUG: nonanonymousEcho4Port=" + nonanonymousEcho4Port); - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (ejbclient == null || defaultEchoPort == null || enabledEchoPort == null - || requiredEchoPort == null || disabledEchoPort == null - || defaultEcho2Port == null || enabledEcho2Port == null - || requiredEcho2Port == null || disabledEcho2Port == null - || anonymousEcho3Port == null || nonanonymousEcho4Port == null) { - throw new Fault("setup failed: injection or JNDI lookup failure"); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - ejbclient.init(p); - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: VerifyAddrHeadersExistForRequiredEchoPort - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; WS4EE:SPEC:4020; - * - * @test_Strategy: Verify Addressing Headers MUST exist on SOAP request and - * SOAP response for appclient, servlet, and ejb containers. Addressing - * enabled/required by client/supported by endpoint. - */ - public void VerifyAddrHeadersExistForRequiredEchoPort() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersExistForRequiredEchoPort"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersExistForRequiredEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersExistForRequiredEchoPort"); - requiredEchoPort.echo("Echo from AppClient on requiredEchoPort", - testName); - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "VerifyAddrHeadersExistForRequiredEchoPort"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - } else - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersExistForRequiredEchoPort"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on requiredEchoPort", testName); - if (!passEjb) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } else - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersExistForRequiredEchoPort failed"); - } - - /* - * @testName: VerifyAddrHeadersDoNotExistForDisabledEchoPort - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; WS4EE:SPEC:4020; - * - * @test_Strategy: Verify Addressing Headers MUST NOT exist on SOAP request - * and SOAP response for appclient, servlet, and ejb containers. Addressing - * disabled by client/supported by endpoint. - */ - public void VerifyAddrHeadersDoNotExistForDisabledEchoPort() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - disabledEchoPort.echo("Echo from AppClient on disabledEchoPort", - testName); - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - } else - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersDoNotExistForDisabledEchoPort"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on disabledEchoPort", testName); - if (!passEjb) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } else - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersDoNotExistForDisabledEchoPort failed"); - } - - /* - * @testName: VerifyAddrHeadersMayExistForEnabledEchoPort - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; WS4EE:SPEC:4020; - * - * @test_Strategy: Verify Addressing Headers may exist on SOAP request and - * SOAP response for appclient, servlet, and ejb containers. Addressing - * enabled/notrequired by client/supported by endpoint. - */ - public void VerifyAddrHeadersMayExistForEnabledEchoPort() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEchoPort"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEchoPort"); - enabledEchoPort.echo("Echo from AppClient on enabledEchoPort", testName); - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "VerifyAddrHeadersMayExistForEnabledEchoPort"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - TestUtil.logErr("Unexpected failure occurred"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersMayExistForEnabledEchoPort"; - boolean passEjb = ejbclient.echo("Echo from EjbClient on enabledEchoPort", - testName); - if (!passEjb) { - TestUtil.logErr("Unexpected failure occurred"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersMayExistForEnabledEchoPort failed"); - } - - /* - * @testName: VerifyExceptionThrownForRequiredEcho2Port - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; WS4EE:SPEC:4020; - * - * @test_Strategy: Negative test case. Verify Exception is thrown back. - * Addressing enabled/required by client/not supported by endpoint. Expect a - * WebServiceException. - */ - public void VerifyExceptionThrownForRequiredEcho2Port() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyExceptionThrownForRequiredEcho2Port"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg("Expect a WebServiceException to be thrown back"); - TestUtil.logMsg("VerifyExceptionThrownForRequiredEcho2Port"); - Holder testName = new Holder( - "VerifyExceptionThrownForRequiredEcho2Port"); - requiredEcho2Port.echo("Echo from AppClient on requiredEcho2Port", - testName); - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logMsg("Caught expected Exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "VerifyExceptionThrownForRequiredEcho2Port"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("WebServiceException was not thrown back"); - } else - TestUtil.logMsg("Caught expected WebServiceException"); - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyExceptionThrownForRequiredEcho2Port"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on requiredEcho2Port", testName); - if (!passEjb) { - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } else - TestUtil.logMsg("Caught expected WebServiceException"); - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - if (!pass) - throw new Fault("VerifyExceptionThrownForRequiredEcho2Port failed"); - } - - /* - * @testName: VerifyAddrHeadersDoNotExistForDisabledEcho2Port - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; WS4EE:SPEC:4020; - * - * @test_Strategy: Verify Addressing Headers MUST NOT exist on SOAP request - * and SOAP response for appclient, servlet, and ejb containers. Addressing - * disabled by client/not supported by endpoint. - */ - public void VerifyAddrHeadersDoNotExistForDisabledEcho2Port() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - disabledEcho2Port.echo("Echo from AppClient on disabledEcho2Port", - testName); - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - } else - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersDoNotExistForDisabledEcho2Port"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on disabledEcho2Port", testName); - if (!passEjb) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } else - TestUtil.logMsg("Addressing Headers DO NOT Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers Exist (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersDoNotExistForDisabledEcho2Port failed"); - } - - /* - * @testName: VerifyAddrHeadersMayExistForEnabledEcho2Port - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; WS4EE:SPEC:4020; - * - * @test_Strategy: Verify Addressing Headers may exist on SOAP request and - * SOAP response for appclient, servlet, and ejb containers. Addressing - * enabled/notrequired by client/not supported by endpoint. - */ - public void VerifyAddrHeadersMayExistForEnabledEcho2Port() throws Fault { - boolean pass = true; - - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEcho2Port"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEcho2Port"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEcho2Port"); - enabledEcho2Port.echo("Echo from AppClient on enabledEcho2Port", - testName); - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "VerifyAddrHeadersMayExistForEnabledEcho2Port"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - TestUtil.logErr("Unexpected failure occurred"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "VerifyAddrHeadersMayExistForEnabledEcho2Port"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on enabledEcho2Port", testName); - if (!passEjb) { - TestUtil.logErr("Unexpected failure occurred"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Unexpected exception: " + e.getMessage()); - pass = false; - } - if (!pass) - throw new Fault("VerifyAddrHeadersMayExistForEnabledEcho2Port failed"); - } - - /* - * @testName: testAnonymousResponsesAssertion - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; WS4EE:SPEC:4020; - * - * @test_Strategy: Invocation on port marked with AnonymousResponses assertion - * Verify that wsa:ReplyTo in the SOAPRequest is the anonymous URI. Verify - * that wsa:To in the SOAPResponse is the anonymous URI. - */ - public void testAnonymousResponsesAssertion() throws Fault { - TestUtil.logMsg("testAnonymousResponsesAssertion"); - boolean pass = true; - - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - Holder testName = new Holder("testAnonymousResponsesAssertion"); - anonymousEcho3Port.echo("Echo from AppClient on anonymousEcho3Port", - testName); - TestUtil.logMsg("testAnonymousResponsesAssertion passed"); - } catch (Exception e) { - TestUtil.logErr("testAnonymousResponsesAssertion failed"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "testAnonymousResponsesAssertion"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("testAnonymousResponsesAssertion failed"); - } else - TestUtil.logMsg("testAnonymousResponsesAssertion passed"); - } catch (Exception e) { - TestUtil.logErr("testAnonymousResponsesAssertion failed"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "testAnonymousResponsesAssertion"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on anonymousEcho3Port", testName); - if (!passEjb) { - TestUtil.logErr("testAnonymousResponsesAssertion failed"); - pass = false; - } else - TestUtil.logMsg("testAnonymousResponsesAssertion passed"); - } catch (Exception e) { - TestUtil.logErr("testAnonymousResponsesAssertion failed"); - pass = false; - } - - if (!pass) - throw new Fault("testAnonymousResponsesAssertion failed"); - } - - /* - * @testName: testNonAnonymousResponsesAssertion - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; WS4EE:SPEC:4020; - * - * @test_Strategy: Invocation on port marked with NonAnonymousResponses - * assertion. The header may or may not be set by default depending - * on the implementation. The test has to account for this. - */ - public void testNonAnonymousResponsesAssertion() throws Fault { - TestUtil.logMsg("testNonAnonymousResponsesAssertion"); - boolean pass = true; - - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - Holder testName = new Holder( - "testNonAnonymousResponsesAssertion"); - nonanonymousEcho4Port.echo("Echo from AppClient on nonanonymousEcho4Port", - testName); - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - TestUtil.logMsg("testNonAnonymousResponsesAssertion passed"); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.logErr("testNonAnonymousResponsesAssertion failed"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "testNonAnonymousResponsesAssertion"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("testNonAnonymousResponsesAssertion failed"); - } else - TestUtil.logMsg("testNonAnonymousResponsesAssertion passed"); - } catch (Exception e) { - TestUtil.logErr("testNonAnonymousResponsesAssertion failed"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "testNonAnonymousResponsesAssertion"; - boolean passEjb = ejbclient - .echo("Echo from EjbClient on nonanonymousEcho4Port", testName); - if (!passEjb) { - TestUtil.logErr("testNonAnonymousResponsesAssertion failed"); - pass = false; - } else - TestUtil.logMsg("testNonAnonymousResponsesAssertion passed"); - } catch (Exception e) { - TestUtil.logErr("testNonAnonymousResponsesAssertion failed"); - pass = false; - } - - if (!pass) - throw new Fault("testNonAnonymousResponsesAssertion failed"); - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/ClientSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/ClientSOAPHandler.java deleted file mode 100644 index ffa9b9b896..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/ClientSOAPHandler.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsa.common.MapRequiredException; -import com.sun.ts.tests.jaxws.wsa.common.MapException; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.soap.SOAPException; -import java.util.Iterator; -import jakarta.xml.ws.handler.soap.SOAPHandler; -import jakarta.xml.soap.SOAPHeader; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.Text; - -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersExistForRequiredEchoPort")) { - checkAddressingHeadersExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersDoNotExistForDisabledEchoPort")) { - checkAddressingHeadersDoNotExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersDoNotExistForDisabledEcho2Port")) { - checkAddressingHeadersDoNotExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersMayExistForEnabledEchoPort")) { - checkAddressingHeadersMayExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersMayExistForEnabledEcho2Port")) { - checkAddressingHeadersMayExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "testAnonymousResponsesAssertion")) { - VerifyAddressingHeadersForAnonymousResponsesAssertion(context, action); - } else if (Handler_Util.checkForMsg(context, - "testNonAnonymousResponsesAssertion")) { - VerifyAddressingHeadersForNonAnonymousResponsesAssertion(context, action); - } - } - - private void verifyAction(String action) { - if (!action.equals(TestConstants.ECHO_OUTPUT_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ECHO_OUTPUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersExist"); - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersDoNotExist"); - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundRelatesToDoesNotExist(context); - } - - private void checkAddressingHeadersMayExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkAddressingHeadersMayExist"); - // If Addressing headers exist then check them otherwise don't - if (action != null) { - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - } - - private void handleMessageInboundCheckAddressingHeadersDoNotExist( - SOAPMessageContext context) { - String headerValue = null; - String whichHeaders = null; - try { - headerValue = getTo(context); - whichHeaders = whichHeaders + "wsa:To, "; - } catch (Exception e) { - } - try { - headerValue = getReplyTo(context); - whichHeaders = whichHeaders + "wsa:ReplyTo, "; - } catch (Exception e) { - } - try { - headerValue = getMessageId(context); - whichHeaders = whichHeaders + "wsa:MessageId, "; - } catch (Exception e) { - } - try { - headerValue = getRelationship(context); - whichHeaders = whichHeaders + "wsa:Relationship, "; - } catch (Exception e) { - } - try { - headerValue = getAction(context); - whichHeaders = whichHeaders + "wsa:Action"; - } catch (Exception e) { - } - if (whichHeaders != null) { - throw new AddressingPropertyException( - "ERROR: The following addressing headers exist in soap message: [" - + whichHeaders + "]"); - } - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ClientSOAPHandler.getAction(): testName=" + testName); - if (testName == null) { - return super.getAction(context); - } else if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort")) { - return super.getAction(context); - } else if (testName.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort") - || testName.equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port")) { - return super.getActionDoesNotExist(context); - } else if (testName.equals("VerifyAddrHeadersMayExistForEnabledEchoPort") - || testName.equals("VerifyAddrHeadersMayExistForEnabledEcho2Port")) { - try { - return super.getAction(context); - } catch (Exception e) { - return null; - } - } else if (testName.equals("testAnonymousResponsesAssertion")) { - return super.getAction(context); - } else if (testName.equals("testNonAnonymousResponsesAssertion")) { - return super.getAction(context); - } else - return null; - } - - private void VerifyAddressingHeadersForAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ClientSOAPHandler.VerifyAddressingHeadersForAnonymousResponsesAssertion"); - if (!TestConstants.ECHO_OUTPUT_ACTION.equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ECHO_OUTPUT_ACTION + ", Actual:" + action); - } - String to = null; - try { - to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - } catch (Exception e) { - } - if (to != null) { - if (!to.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI) - && !to.equals(W3CAddressingConstants.WSA_NONE_ADDRESS)) { - throw new AddressingPropertyException("Expected: wsa:To=" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI + " or " - + W3CAddressingConstants.WSA_NONE_ADDRESS + ", Actual: wsa:To=" - + to); - } - } - try { - String relatesTo = getRelatesTo(context); - TestUtil.logMsg("[RelatesTo=" + relatesTo + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:RelatesTo was not set (unexpected)"); - } - } - - private void VerifyAddressingHeadersForNonAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ClientSOAPHandler.VerifyAddressingHeadersForNonAnonymousResponsesAssertion"); - if (!TestConstants.ECHO_OUTPUT_ACTION.equals(action)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ECHO_OUTPUT_ACTION + ", Actual:" + action); - } - String to = null; - try { - to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - } catch (Exception e) { - } - if (to != null - && to.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI)) { - throw new AddressingPropertyException("Expected: wsa:To=!" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI - + ", Actual: wsa:To=" + to); - } - - try { - String relatesTo = getRelatesTo(context); - TestUtil.logMsg("[RelatesTo=" + relatesTo + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:RelatesTo was not set (unexpected)"); - } - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/Echo2Impl.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/Echo2Impl.java deleted file mode 100644 index 6665372e46..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/Echo2Impl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Holder; - -@WebService(portName = "Echo2Port", serviceName = "EchoService", targetNamespace = "http://Echo.org", wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2") -@Addressing(enabled = false) -public class Echo2Impl { - - public String echo(String string, Holder testName) { - return string; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/Echo3Impl.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/Echo3Impl.java deleted file mode 100644 index aefcbd6d99..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/Echo3Impl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Holder; - -@WebService(portName = "Echo3Port", serviceName = "EchoService", targetNamespace = "http://Echo.org", wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo3") - -public class Echo3Impl { - - public String echo(String string, Holder testName) { - return string; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/Echo4Impl.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/Echo4Impl.java deleted file mode 100644 index 15edd5f6c5..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/Echo4Impl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Holder; - -@WebService(portName = "Echo4Port", serviceName = "EchoService", targetNamespace = "http://Echo.org", wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo4") - -public class Echo4Impl { - - public String echo(String string, Holder testName) { - return string; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/EchoImpl.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/EchoImpl.java deleted file mode 100644 index e103dc074a..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/EchoImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Holder; - -@WebService(portName = "EchoPort", serviceName = "EchoService", targetNamespace = "http://Echo.org", wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo") - -public class EchoImpl { - - public String echo(String string, Holder testName) { - return string; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/EchoService.wsdl b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/EchoService.wsdl deleted file mode 100644 index 0acb5dad54..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/EchoService.wsdl +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/EjbClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/EjbClient.java deleted file mode 100644 index f9f95b3619..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/EjbClient.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.ejb.EJBException; -import jakarta.ejb.Remote; -import jakarta.ejb.Stateless; -import jakarta.ejb.SessionContext; -import jakarta.annotation.Resource; -import jakarta.annotation.PostConstruct; -import javax.naming.InitialContext; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -@Stateless(name = "WSAddressingFeaturesTestUsingDDsClntBean") -@Remote({ EjbClientIF.class }) -public class EjbClient implements EjbClientIF { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - Echo defaultEchoPort = null; - - Echo enabledEchoPort = null; - - Echo requiredEchoPort = null; - - Echo disabledEchoPort = null; - - Echo2 defaultEcho2Port = null; - - Echo2 enabledEcho2Port = null; - - Echo2 requiredEcho2Port = null; - - Echo2 disabledEcho2Port = null; - - Echo3 anonymousEcho3Port = null; - - Echo4 nonanonymousEcho4Port = null; - - @PostConstruct - public void postConstruct() { - try { - System.out.println("EjbClient:postConstruct()"); - InitialContext ctx = new InitialContext(); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsdefaultechoport"); - defaultEchoPort = (Echo) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsdefaultechoport"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsenabledechoport"); - enabledEchoPort = (Echo) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsenabledechoport"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsrequiredechoport"); - requiredEchoPort = (Echo) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsrequiredechoport"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsdisabledechoport"); - disabledEchoPort = (Echo) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsdisabledechoport"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsdefaultecho2port"); - defaultEcho2Port = (Echo2) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsdefaultecho2port"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsenabledecho2port"); - enabledEcho2Port = (Echo2) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsenabledecho2port"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsrequiredecho2port"); - requiredEcho2Port = (Echo2) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsrequiredecho2port"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsdisabledecho2port"); - disabledEcho2Port = (Echo2) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsdisabledecho2port"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsanonymousecho3port"); - anonymousEcho3Port = (Echo3) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsanonymousecho3port"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsnonanonymousecho4port"); - nonanonymousEcho4Port = (Echo4) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsnonanonymousecho4port"); - System.out.println("EjbClient DEBUG: defaultEchoPort=" + defaultEchoPort); - System.out.println("EjbClient DEBUG: enabledEchoPort=" + enabledEchoPort); - System.out - .println("EjbClient DEBUG: requiredEchoPort=" + requiredEchoPort); - System.out - .println("EjbClient DEBUG: disabledEchoPort=" + disabledEchoPort); - System.out - .println("EjbClient DEBUG: defaultEcho2Port=" + defaultEcho2Port); - System.out - .println("EjbClient DEBUG: enabledEcho2Port=" + enabledEcho2Port); - System.out - .println("EjbClient DEBUG: requiredEcho2Port=" + requiredEcho2Port); - System.out - .println("EjbClient DEBUG: disabledEcho2Port=" + disabledEcho2Port); - System.out - .println("EjbClient DEBUG: anonymousEcho3Port=" + anonymousEcho3Port); - System.out.println( - "EjbClient DEBUG: nonanonymousEcho4Port=" + nonanonymousEcho4Port); - } catch (Exception e) { - System.err.println("EjbClient:postConstruct() Exception: " + e); - e.printStackTrace(); - } - if (defaultEchoPort == null || enabledEchoPort == null - || requiredEchoPort == null || disabledEchoPort == null - || defaultEcho2Port == null || enabledEcho2Port == null - || requiredEcho2Port == null || disabledEcho2Port == null - || anonymousEcho3Port == null || nonanonymousEcho4Port == null) { - throw new EJBException( - "postConstruct failed: injection or JNDI lookup failure"); - } - } - - public void init(Properties p) { - harnessProps = p; - try { - TestUtil.init(p); - } catch (RemoteLoggingInitException e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } - } - - public boolean echo(String string, String testName) { - if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort")) - return VerifyAddrHeadersExistForRequiredEchoPort(); - else if (testName.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort")) - return VerifyAddrHeadersDoNotExistForDisabledEchoPort(); - else if (testName.equals("VerifyAddrHeadersMayExistForEnabledEchoPort")) - return VerifyAddrHeadersMayExistForEnabledEchoPort(); - else if (testName.equals("VerifyExceptionThrownForRequiredEcho2Port")) - return VerifyExceptionThrownForRequiredEcho2Port(); - else if (testName.equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port")) - return VerifyAddrHeadersDoNotExistForDisabledEcho2Port(); - else if (testName.equals("VerifyAddrHeadersMayExistForEnabledEcho2Port")) - return VerifyAddrHeadersMayExistForEnabledEcho2Port(); - else if (testName.equals("testAnonymousResponsesAssertion")) - return testAnonymousResponsesAssertion(); - else if (testName.equals("testNonAnonymousResponsesAssertion")) - return testNonAnonymousResponsesAssertion(); - else - return false; - } - - private boolean VerifyAddrHeadersExistForRequiredEchoPort() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersExistForRequiredEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersExistForRequiredEchoPort"); - requiredEchoPort.echo("Echo from EjbClient on requiredEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersDoNotExistForDisabledEchoPort() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - disabledEchoPort.echo("Echo from EjbClient on disabledEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersMayExistForEnabledEchoPort() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEchoPort"); - enabledEchoPort.echo("Echo from EjbClient on enabledEchoPort", testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyExceptionThrownForRequiredEcho2Port() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg("Expect a WebServiceException to be thrown back"); - TestUtil.logMsg("VerifyExceptionThrownForRequiredEcho2Port"); - Holder testName = new Holder( - "VerifyExceptionThrownForRequiredEcho2Port"); - requiredEcho2Port.echo("Echo from EjbClient on requiredEcho2Port", - testName); - TestUtil.logErr("WebServiceException was not thrown back"); - return false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - return true; - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - return false; - } - } - - private boolean VerifyAddrHeadersDoNotExistForDisabledEcho2Port() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - disabledEcho2Port.echo("Echo from EjbClient on disabledEcho2Port", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersMayExistForEnabledEcho2Port() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEcho2Port"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEcho2Port"); - enabledEcho2Port.echo("Echo from EjbClient on enabledEcho2Port", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean testAnonymousResponsesAssertion() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg("testAnonymousResponsesAssertion"); - Holder testName = new Holder("testAnonymousResponsesAssertion"); - anonymousEcho3Port.echo("Echo from EjbClient on anonymousEcho3Port", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean testNonAnonymousResponsesAssertion() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg("testNonAnonymousResponsesAssertion"); - Holder testName = new Holder( - "testNonAnonymousResponsesAssertion"); - nonanonymousEcho4Port.echo("Echo from EjbClient on nonanonymousEcho4Port", - testName); - return true; - } catch (Exception e) { - return true; - } - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/EjbClientIF.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/EjbClientIF.java deleted file mode 100644 index 5f12e3d347..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/EjbClientIF.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs; - -public interface EjbClientIF { - - public void init(java.util.Properties p); - - public boolean echo(String string, String testName); -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/ServerSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/ServerSOAPHandler.java deleted file mode 100644 index 3d2774360a..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/ServerSOAPHandler.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.MapException; -import com.sun.ts.tests.jaxws.wsa.common.MapRequiredException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPHeader; -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.soap.SOAPEnvelope; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.SOAPException; -import jakarta.xml.soap.Text; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; -import java.util.Iterator; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersExistForRequiredEchoPort")) { - checkAddressingHeadersExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersDoNotExistForDisabledEchoPort")) { - checkAddressingHeadersDoNotExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersDoNotExistForDisabledEcho2Port")) { - checkAddressingHeadersDoNotExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersMayExistForEnabledEchoPort")) { - checkAddressingHeadersMayExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "VerifyAddrHeadersMayExistForEnabledEcho2Port")) { - checkAddressingHeadersMayExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "testAnonymousResponsesAssertion")) { - VerifyAddressingHeadersForAnonymousResponsesAssertion(context, action); - } else if (Handler_Util.checkForMsg(context, - "testNonAnonymousResponsesAssertion")) { - VerifyAddressingHeadersForNonAnonymousResponsesAssertion(context, action); - } - } - - private void verifyAction(String action) { - if (!action.equals(TestConstants.ECHO_INPUT_ACTION)) { - throw new ActionNotSupportedException( - "Expected:" + TestConstants.ECHO_INPUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersExist"); - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersDoNotExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersDoNotExist"); - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundMessageIdDoesNotExist(context); - checkInboundReplyToDoesNotExist(context); - } - - private void checkAddressingHeadersMayExist(SOAPMessageContext context, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkAddressingHeadersMayExist"); - System.out.println("ServerSOAPHandler.checkAddressingHeadersMayExist"); - // If Addressing headers exist then check them otherwise don't - if (action != null) { - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ServerSOAPHandler.getAction(): testName=" + testName); - System.out.println("ServerSOAPHandler.getAction(): testName=" + testName); - if (testName == null) { - return super.getAction(context); - } else if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort")) { - return super.getAction(context); - } else if (testName.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort") - || testName.equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port")) { - return super.getActionDoesNotExist(context); - } else if (testName.equals("VerifyAddrHeadersMayExistForEnabledEchoPort") - || testName.equals("VerifyAddrHeadersMayExistForEnabledEcho2Port")) { - try { - return super.getAction(context); - } catch (Exception e) { - return null; - } - } else if (testName.equals("testAnonymousResponsesAssertion")) { - return super.getAction(context); - } else if (testName.equals("testNonAnonymousResponsesAssertion")) { - return super.getAction(context); - } else - return null; - } - - private void VerifyAddressingHeadersForAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ServerSOAPHandler.VerifyAddressingHeadersForAnonymousResponsesAssertion"); - System.out.println( - "ServerSOAPHandler.VerifyAddressingHeadersForAnonymousResponsesAssertion"); - if (!TestConstants.ECHO_INPUT_ACTION.equals(action)) { - throw new ActionNotSupportedException( - "Expected:" + TestConstants.ECHO_INPUT_ACTION + ", Actual:" + action); - } - try { - String to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - System.out.println("[To=" + to + "]"); - } catch (Exception e) { - } - String replyTo = null; - try { - replyTo = getReplyTo(context); - TestUtil.logMsg("[ReplyTo=" + replyTo + "]"); - System.out.println("[ReplyTo=" + replyTo + "]"); - } catch (Exception e) { - } - if (replyTo != null) { - if (!replyTo.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI) - && !replyTo.equals(W3CAddressingConstants.WSA_NONE_ADDRESS)) { - throw new AddressingPropertyException("Expected: wsa:ReplyTo=" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI + " or " - + W3CAddressingConstants.WSA_NONE_ADDRESS + ", Actual: wsa:ReplyTo=" - + replyTo); - } - } - try { - String messageID = getMessageId(context); - TestUtil.logMsg("[MessageID=" + messageID + "]"); - System.out.println("[MessageID=" + messageID + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:MessageID was not set (unexpected)"); - } - } - - private void VerifyAddressingHeadersForNonAnonymousResponsesAssertion( - SOAPMessageContext context, String action) { - TestUtil.logMsg( - "ServerSOAPHandler.VerifyAddressingHeadersForNonAnonymousResponsesAssertion"); - System.out.println( - "ServerSOAPHandler.VerifyAddressingHeadersForNonAnonymousResponsesAssertion"); - if (!TestConstants.ECHO_INPUT_ACTION.equals(action)) { - throw new ActionNotSupportedException( - "Expected:" + TestConstants.ECHO_INPUT_ACTION + ", Actual:" + action); - } - try { - String to = getTo(context); - TestUtil.logMsg("[To=" + to + "]"); - System.out.println("[To=" + to + "]"); - } catch (Exception e) { - } - String replyTo; - try { - replyTo = getReplyTo(context); - TestUtil.logMsg("[ReplyTo=" + replyTo + "]"); - System.out.println("[ReplyTo=" + replyTo + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:ReplyTo was not set (unexpected)"); - } - if (replyTo.equals(W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI)) { - throw new AddressingPropertyException("Expected: wsa:ReplyTo=!" - + W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS_URI - + ", Actual: wsa:ReplyTo=" + replyTo); - } - try { - String messageID = getMessageId(context); - TestUtil.logMsg("[MessageID=" + messageID + "]"); - System.out.println("[MessageID=" + messageID + "]"); - } catch (Exception e) { - throw new AddressingPropertyException( - "wsa:MessageID was not set (unexpected)"); - } - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/ServletClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/ServletClient.java deleted file mode 100644 index 5e29ca84fe..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/ServletClient.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -import java.io.*; -import java.sql.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.naming.InitialContext; - -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - Echo defaultEchoPort = null; - - Echo enabledEchoPort = null; - - Echo requiredEchoPort = null; - - Echo disabledEchoPort = null; - - Echo2 defaultEcho2Port = null; - - Echo2 enabledEcho2Port = null; - - Echo2 requiredEcho2Port = null; - - Echo2 disabledEcho2Port = null; - - Echo3 anonymousEcho3Port = null; - - Echo4 nonanonymousEcho4Port = null; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - try { - System.out.println("ServletClient:init()"); - InitialContext ctx = new InitialContext(); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsdefaultechoport"); - defaultEchoPort = (Echo) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsdefaultechoport"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsenabledechoport"); - enabledEchoPort = (Echo) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsenabledechoport"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsrequiredechoport"); - requiredEchoPort = (Echo) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsrequiredechoport"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsdisabledechoport"); - disabledEchoPort = (Echo) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsdisabledechoport"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsdefaultecho2port"); - defaultEcho2Port = (Echo2) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsdefaultecho2port"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsenabledecho2port"); - enabledEcho2Port = (Echo2) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsenabledecho2port"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsrequiredecho2port"); - requiredEcho2Port = (Echo2) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsrequiredecho2port"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsdisabledecho2port"); - disabledEcho2Port = (Echo2) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsdisabledecho2port"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsanonymousecho3port"); - anonymousEcho3Port = (Echo3) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsanonymousecho3port"); - System.out.println( - "JNDI lookup java:comp/env/service/wsaddrfeaturestestusingddsnonanonymousecho4port"); - nonanonymousEcho4Port = (Echo4) ctx.lookup( - "java:comp/env/service/wsaddrfeaturestestusingddsnonanonymousecho4port"); - System.out - .println("ServletClient DEBUG: defaultEchoPort=" + defaultEchoPort); - System.out - .println("ServletClient DEBUG: enabledEchoPort=" + enabledEchoPort); - System.out - .println("ServletClient DEBUG: requiredEchoPort=" + requiredEchoPort); - System.out - .println("ServletClient DEBUG: disabledEchoPort=" + disabledEchoPort); - System.out - .println("ServletClient DEBUG: defaultEcho2Port=" + defaultEcho2Port); - System.out - .println("ServletClient DEBUG: enabledEcho2Port=" + enabledEcho2Port); - System.out.println( - "ServletClient DEBUG: requiredEcho2Port=" + requiredEcho2Port); - System.out.println( - "ServletClient DEBUG: disabledEcho2Port=" + disabledEcho2Port); - System.out.println( - "ServletClient DEBUG: anonymousEcho3Port=" + anonymousEcho3Port); - System.out.println("ServletClient DEBUG: nonanonymousEcho4Port=" - + nonanonymousEcho4Port); - } catch (Exception e) { - System.err.println("ServletClient:init() Exception: " + e); - e.printStackTrace(); - } - if (defaultEchoPort == null || enabledEchoPort == null - || requiredEchoPort == null || disabledEchoPort == null - || defaultEcho2Port == null || enabledEcho2Port == null - || requiredEcho2Port == null || disabledEcho2Port == null - || anonymousEcho3Port == null || nonanonymousEcho4Port == null) { - throw new ServletException( - "init() failed: injection or JNDI lookup failure"); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - try { - String test = harnessProps.getProperty("TEST"); - System.out.println("doGet: test to execute is: " + test); - if (test.equals("VerifyAddrHeadersExistForRequiredEchoPort")) { - if (VerifyAddrHeadersExistForRequiredEchoPort()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test - .equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort")) { - if (VerifyAddrHeadersDoNotExistForDisabledEchoPort()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test.equals("VerifyAddrHeadersMayExistForEnabledEchoPort")) { - if (VerifyAddrHeadersMayExistForEnabledEchoPort()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test.equals("VerifyExceptionThrownForRequiredEcho2Port")) { - if (VerifyExceptionThrownForRequiredEcho2Port()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test - .equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port")) { - if (VerifyAddrHeadersDoNotExistForDisabledEcho2Port()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test.equals("VerifyAddrHeadersMayExistForEnabledEcho2Port")) { - if (VerifyAddrHeadersMayExistForEnabledEcho2Port()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test.equals("testAnonymousResponsesAssertion")) { - if (testAnonymousResponsesAssertion()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test.equals("testNonAnonymousResponsesAssertion")) { - if (testNonAnonymousResponsesAssertion()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } catch (Exception e) { - TestUtil.logErr("doGet: Exception: " + e); - e.printStackTrace(out); - System.out.println("doGet: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - if (debug) { - System.out.println("Remote logging intialized for Servlet"); - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - System.out.println("doPost: Exception: " + e); - e.printStackTrace(); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } - - private boolean VerifyAddrHeadersExistForRequiredEchoPort() { - try { - System.out.println("ServletClient invoking EchoService echo() method"); - System.out.println( - "Addressing headers MUST be present on the SOAPRequest/SOAPResponse"); - System.out.println("VerifyAddrHeadersExistForRequiredEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersExistForRequiredEchoPort"); - requiredEchoPort.echo("Echo from ServletClient on requiredEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersDoNotExistForDisabledEchoPort() { - try { - System.out.println("ServletClient invoking EchoService echo() method"); - System.out.println( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPresponse"); - System.out.println("VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEchoPort"); - disabledEchoPort.echo("Echo from ServletClient on disabledEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersMayExistForEnabledEchoPort() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPresponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEchoPort"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEchoPort"); - enabledEchoPort.echo("Echo from ServletClient on enabledEchoPort", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyExceptionThrownForRequiredEcho2Port() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg("Expect a WebServiceException to be thrown back"); - TestUtil.logMsg("VerifyExceptionThrownForRequiredEcho2Port"); - Holder testName = new Holder( - "VerifyExceptionThrownForRequiredEcho2Port"); - requiredEcho2Port.echo("Echo from ServletClient on requiredEcho2Port", - testName); - TestUtil.logErr("WebServiceException was not thrown back"); - return false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - return true; - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - return false; - } - } - - private boolean VerifyAddrHeadersDoNotExistForDisabledEcho2Port() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse"); - TestUtil.logMsg("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - Holder testName = new Holder( - "VerifyAddrHeadersDoNotExistForDisabledEcho2Port"); - disabledEcho2Port.echo("Echo from ServletClient on disabledEcho2Port", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean VerifyAddrHeadersMayExistForEnabledEcho2Port() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest/SOAPresponse"); - TestUtil.logMsg("VerifyAddrHeadersMayExistForEnabledEcho2Port"); - Holder testName = new Holder( - "VerifyAddrHeadersMayExistForEnabledEcho2Port"); - enabledEcho2Port.echo("Echo from ServletClient on enabledEcho2Port", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean testAnonymousResponsesAssertion() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg("testAnonymousResponsesAssertion"); - Holder testName = new Holder("testAnonymousResponsesAssertion"); - anonymousEcho3Port.echo("Echo from ServletClient on anonymousEcho3Port", - testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean testNonAnonymousResponsesAssertion() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg("testNonAnonymousResponsesAssertion"); - Holder testName = new Holder( - "testNonAnonymousResponsesAssertion"); - nonanonymousEcho4Port - .echo("Echo from ServletClient on nonanonymousEcho4Port", testName); - return true; - } catch (Exception e) { - return true; - } - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/TestConstants.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/TestConstants.java deleted file mode 100644 index e48e7959f6..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/TestConstants.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs; - -public class TestConstants { - public static final String ECHO_INPUT_ACTION = "EchoInputAction"; - - public static final String ECHO_OUTPUT_ACTION = "EchoOutputAction"; -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_client.jar.sun-application-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 0d2cf2e4b0..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - service/wsaddrfeaturestestusingddsdefaultechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsenabledechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsrequiredechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsdisabledechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsdefaultecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsenabledecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsrequiredecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsdisabledecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsanonymousecho3port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo3 - - http://Echo.org - Echo3Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsnonanonymousecho4port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo4 - - http://Echo.org - Echo4Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_client.xml deleted file mode 100644 index c60f3bde20..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_client.xml +++ /dev/null @@ -1,248 +0,0 @@ - - - - - AppClient - WSAddressingFeaturesTestUsingDDsClnt_client - - service/wsaddrfeaturestestusingddsdefaultechoport - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsenabledechoport - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsrequiredechoport - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - true - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsdisabledechoport - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - false - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsdefaultecho2port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - true - false - ALL - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsenabledecho2port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsrequiredecho2port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - true - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsdisabledecho2port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - false - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsanonymousecho3port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo3 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo3 - - true - true - ANONYMOUS - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsnonanonymousecho4port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo4 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo4 - - true - true - NON_ANONYMOUS - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_ejb.jar.sun-ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index b78017cc7f..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - 0 - - WSAddressingFeaturesTestUsingDDsClntBean - WSAddressingFeaturesTestUsingDDsClntBean - - service/wsaddrfeaturestestusingddsdefaultechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsenabledechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsrequiredechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsdisabledechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsdefaultecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsenabledecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsrequiredecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsdisabledecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsanonymousecho3port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo3 - - http://Echo.org - Echo3Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsnonanonymousecho4port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo4 - - http://Echo.org - Echo4Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - false - false - -1 - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_ejb.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_ejb.xml deleted file mode 100644 index 67815d8b95..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_ejb.xml +++ /dev/null @@ -1,276 +0,0 @@ - - - - - EjbClient - - - WSAddressingFeaturesTestUsingDDsClntBean - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EjbClient - Stateless - Container - - service/wsaddrfeaturestestusingddsdefaultechoport - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsenabledechoport - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsrequiredechoport - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - true - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsdisabledechoport - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - false - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsdefaultecho2port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - true - false - ALL - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsenabledecho2port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsrequiredecho2port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - true - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsdisabledecho2port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - false - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsanonymousecho3port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo3 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo3 - - true - true - ANONYMOUS - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsnonanonymousecho4port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo4 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo4 - - true - true - NON_ANONYMOUS - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - - - - - - - WSAddressingFeaturesTestUsingDDsClntBean - Remote - init - - Supports - - - - WSAddressingFeaturesTestUsingDDsClntBean - Remote - echo - - Supports - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_web.war.sun-web.xml deleted file mode 100644 index 6eee4947ad..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_web.war.sun-web.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - service/wsaddrfeaturestestusingddsdefaultechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsenabledechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsrequiredechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsdisabledechoport - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsdefaultecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsenabledecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsrequiredecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsdisabledecho2port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsanonymousecho3port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo3 - - http://Echo.org - Echo3Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsaddrfeaturestestusingddsnonanonymousecho4port - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo4 - - http://Echo.org - Echo4Port - - - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_web.xml deleted file mode 100644 index 411de0dc83..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDsClnt_web.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - - ServletClient - - ServletClient - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ServletClient - - - ServletClient - /ServletTest - - - 54 - - - - service/wsaddrfeaturestestusingddsdefaultechoport - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsenabledechoport - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsrequiredechoport - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - true - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsdisabledechoport - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - false - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsdefaultecho2port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - true - false - ALL - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsenabledecho2port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsrequiredecho2port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - true - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsdisabledecho2port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - false - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsanonymousecho3port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo3 - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo3 - - true - true - ANONYMOUS - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsaddrfeaturestestusingddsnonanonymousecho4port - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo4 - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo4 - - true - true - NON_ANONYMOUS - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDs_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDs_web.war.sun-web.xml deleted file mode 100644 index 7ce02de307..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDs_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - EchoService - http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingDDs_web/jaxws/Echo?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDs_web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDs_web.xml deleted file mode 100644 index 66c378f266..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/WSAddressingFeaturesTestUsingDDs_web.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - WSAddressingFeaturesTestUsingDDs - - EchoImpl - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.EchoImpl - 0 - - - Echo2Impl - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2Impl - 0 - - - Echo3Impl - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo3Impl - 0 - - - Echo4Impl - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo4Impl - 0 - - - EchoImpl - /jaxws/Echo - - - Echo2Impl - /jaxws/Echo2 - - - Echo3Impl - /jaxws/Echo3 - - - Echo4Impl - /jaxws/Echo4 - - - 54 - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/application.xml.clientear b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/application.xml.clientear deleted file mode 100644 index 7bd36bebb2..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/application.xml.clientear +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Application description - WSAddressingFeaturesTestUsingDDsClnt - - WSAddressingFeaturesTestUsingDDsClnt_client.jar - - - - WSAddressingFeaturesTestUsingDDsClnt_web.war - WSAddressingFeaturesTestUsingDDsClnt_web - - - - WSAddressingFeaturesTestUsingDDsClnt_ejb.jar - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/build.xml deleted file mode 100644 index e31a75b1d7..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/build.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/custom-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/custom-client.xml deleted file mode 100644 index 110a897626..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ClientSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/custom-server.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/custom-server.xml deleted file mode 100644 index d59c82a034..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/custom-server.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.ServerSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/webservices.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/webservices.xml deleted file mode 100644 index 965f233985..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSAddressingFeaturesTestUsingDDs/webservices.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - EchoService - WEB-INF/wsdl/EchoService.wsdl - - EchoImpl - wsdl:EchoPort - - true - false - ALL - - ##SOAP11_HTTP - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo - - EchoImpl - - - - Echo2Impl - wsdl:Echo2Port - - false - false - - ##SOAP11_HTTP - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo2 - - Echo2Impl - - - - Echo3Impl - wsdl:Echo3Port - - true - true - ANONYMOUS - - ##SOAP11_HTTP - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo3 - - Echo3Impl - - - - Echo4Impl - wsdl:Echo4Port - - true - true - NON_ANONYMOUS - - ##SOAP11_HTTP - com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingDDs.Echo4 - - Echo4Impl - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/Client.java deleted file mode 100644 index 00fae3e819..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/Client.java +++ /dev/null @@ -1,676 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.io.*; -import java.net.*; -import java.rmi.*; -import java.util.*; - -import java.awt.Image; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; - -import javax.xml.transform.stream.StreamSource; - -import jakarta.ejb.EJB; - -import com.sun.javatest.Status; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String CTXROOT = "/WSMTOMFeaturesTestUsingAnnotations_web"; - - private String SERVLET_CLIENT = "/WSMTOMFeaturesTestUsingAnnotationsClnt_web/ServletTest"; - - private TSURL ctsurl = new TSURL(); - - private URL url = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private URLConnection urlConn = null; - - private Properties props = null; - - private URL docURL1 = null; - - private URL docURL2 = null; - - private URL docURL3 = null; - - private String sdocURL1 = null; - - private String sdocURL2 = null; - - private String sdocURL3 = null; - - String SDOC1 = "text.xml"; - - String SDOC2 = "big.jpg"; - - String SDOC3 = "small.jpg"; - - private String ctxroot = null; - - // MTOM(true) on client/MTOM(true) on endpoint - @MTOM(enabled = true) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport1_1", value = MTOMTestService.class) - static MTOMTest1 port1_1 = null; - - // MTOM() on client/MTOM(true) on endpoint - @MTOM() - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport1_2", value = MTOMTestService.class) - static MTOMTest1 port1_2 = null; - - // MTOM(true) on client/MTOM(false) on endpoint - @MTOM(enabled = true) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport2", value = MTOMTestService.class) - static MTOMTest2 port2 = null; - - // MTOM(true, 2000) on client/MTOM(true,2000) on endpoint - @MTOM(enabled = true, threshold = 2000) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport3_1", value = MTOMTestService.class) - static MTOMTest3 port3_1 = null; - - // MTOM(false, 2000) on client/MTOM(true,2000) on endpoint - @MTOM(enabled = false, threshold = 2000) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport3_2", value = MTOMTestService.class) - static MTOMTest3 port3_2 = null; - - // MTOM() on client/MTOM(true,2000) on endpoint - @MTOM() - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport3_3", value = MTOMTestService.class) - static MTOMTest3 port3_3 = null; - - // MTOM(true, 2000) on client/MTOM(false,2000) on endpoint - @MTOM(enabled = true, threshold = 2000) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport4", value = MTOMTestService.class) - static MTOMTest4 port4 = null; - - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsservice") - static MTOMTestService service = null; - - @EJB(name = "ejb/WSMTOMFeaturesTestUsingAnnotationsClntBean") - static EjbClientIF ejbclient; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - props = p; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - TestUtil.logMsg("AppClient DEBUG: ejbclient=" + ejbclient); - TestUtil.logMsg("AppClient DEBUG: service=" + service); - TestUtil.logMsg("AppClient DEBUG: port1_1=" + port1_1); - TestUtil.logMsg("AppClient DEBUG: port1_2=" + port1_2); - TestUtil.logMsg("AppClient DEBUG: port2=" + port2); - TestUtil.logMsg("AppClient DEBUG: port3_1=" + port3_1); - TestUtil.logMsg("AppClient DEBUG: port3_2=" + port3_2); - TestUtil.logMsg("AppClient DEBUG: port3_3=" + port3_3); - TestUtil.logMsg("AppClient DEBUG: port4=" + port4); - - TestUtil.logMsg("Endpoint Context Root: " + CTXROOT); - - docURL1 = ctsurl.getURL(PROTOCOL, hostname, portnum, - CTXROOT + "/" + SDOC1); - docURL2 = ctsurl.getURL(PROTOCOL, hostname, portnum, - CTXROOT + "/" + SDOC2); - docURL3 = ctsurl.getURL(PROTOCOL, hostname, portnum, - CTXROOT + "/" + SDOC3); - sdocURL1 = docURL1.toString(); - sdocURL2 = docURL2.toString(); - sdocURL3 = docURL3.toString(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (service == null || ejbclient == null || port1_1 == null - || port1_2 == null || port2 == null || port3_1 == null - || port3_2 == null || port3_3 == null || port4 == null) { - throw new Fault("setup failed: injection failure"); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: ClientEnabledServerEnabledMTOMInTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * - * @test_Strategy: Test MTOM attachments on input where mtom is enabled in the - * endpoint and the client. - */ - public void ClientEnabledServerEnabledMTOMInTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledMTOMInTest"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC1); - data.setDocUrl(docURL1.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL1); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC1 + "]"); - String result = port1_1.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!execute_servlet_client("ClientEnabledServerEnabledMTOMInTest", SDOC1, - sdocURL1)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerEnabledMTOMInTest", SDOC1, - sdocURL1)) { - pass = false; - } - - if (!pass) - throw new Fault("ClientEnabledServerEnabledMTOMInTest failed"); - } - - /* - * @testName: ClientEnabledServerDisabledMTOMInTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * - * @test_Strategy: Test MTOM attachments on input where mtom is disabled in - * the endpoint but enabled on the client. - */ - public void ClientEnabledServerDisabledMTOMInTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerDisabledMTOMInTest"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC1); - data.setDocUrl(docURL1.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL1); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC1 + "]"); - String result = port2.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil - .logErr("An error occurred with one or more of the attachments"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!execute_servlet_client("ClientEnabledServerDisabledMTOMInTest", SDOC1, - sdocURL1)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerDisabledMTOMInTest", SDOC1, - sdocURL1)) { - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerDisabledMTOMInTest failed"); - } - - /* - * @testName: ClientEnabledServerEnabledMTOMInDefaultTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * - * @test_Strategy: Test MTOM attachments on input where mtom is enabled in the - * endpoint and the client. - */ - public void ClientEnabledServerEnabledMTOMInDefaultTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledMTOMInDefaultTest"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC1); - data.setDocUrl(docURL1.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL1); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC1 + "]"); - String result = port1_2.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!execute_servlet_client("ClientEnabledServerEnabledMTOMInDefaultTest", - SDOC1, sdocURL1)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerEnabledMTOMInDefaultTest", - SDOC1, sdocURL1)) { - pass = false; - } - - if (!pass) - throw new Fault("ClientEnabledServerEnabledMTOMInTest failed"); - } - - /* - * @testName: ClientEnabledServerEnabledGT2000Test - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * greater than 2000 bytes. The client and endpoint have mtom enabled with the - * threshold set to 2000 - */ - public void ClientEnabledServerEnabledGT2000Test() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledGT2000Test"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC2); - data.setDocUrl(docURL2.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL2); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC2 + "]"); - String result = port3_1.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!execute_servlet_client("ClientEnabledServerEnabledGT2000Test", SDOC2, - sdocURL2)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerEnabledGT2000Test", SDOC2, - sdocURL2)) { - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerEnabledGT2000Test failed"); - } - - /* - * @testName: ClientEnabledServerEnabledGT2000DefaultTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * greater than 0 bytes. The endpoint has mtom enabled with the threshold set - * to 2000 - */ - public void ClientEnabledServerEnabledGT2000DefaultTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledGT2000DefaultTest"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC2); - data.setDocUrl(docURL2.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL2); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC2 + "]"); - String result = port3_3.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!execute_servlet_client("ClientEnabledServerEnabledGT2000DefaultTest", - SDOC2, sdocURL2)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerEnabledGT2000DefaultTest", - SDOC2, sdocURL2)) { - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerEnabledGT2000DefaultTest failed"); - } - - /* - * @testName: ClientDisabledServerEnabledGT2000Test - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * - * @test_Strategy: Test that XOP is disabled when sending an attachment that - * is greater than 2000 bytes. The client has mtom disabled and the endpoint - * has mtom enabled with the threshold set to 2000 - */ - public void ClientDisabledServerEnabledGT2000Test() throws Fault { - TestUtil.logMsg("ClientDisabledServerEnabledGT2000Test"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC2); - data.setDocUrl(docURL2.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL2); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC2 + "]"); - String result = port3_2.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!execute_servlet_client("ClientDisabledServerEnabledGT2000Test", SDOC2, - sdocURL2)) { - pass = false; - } - if (!execute_ejb_client("ClientDisabledServerEnabledGT2000Test", SDOC2, - sdocURL2)) { - pass = false; - } - if (!pass) - throw new Fault("ClientDisabledServerEnabledGT2000Test failed"); - } - - /* - * @testName: ClientEnabledServerDisabledGT2000Test - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * greater than 2000 bytes. The client has mtom enabled and the endpoint has - * mtom disbled with the threshold set to 2000 - */ - public void ClientEnabledServerDisabledGT2000Test() throws Fault { - TestUtil.logMsg("ClientEnabledServerDisabledGT2000Test"); - boolean pass = true; - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC2); - data.setDocUrl(docURL2.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL2); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC2 + "]"); - String result = port4.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!execute_servlet_client("ClientEnabledServerDisabledGT2000Test", SDOC2, - sdocURL2)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerDisabledGT2000Test", SDOC2, - sdocURL2)) { - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerDisabledGT2000Test failed"); - } - - /* - * @testName: ClientEnabledServerEnabledLT2000Test - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * greater than 2000 bytes. The client and endpoint have mtom enabled with the - * threshold set to 2000 - */ - public void ClientEnabledServerEnabledLT2000Test() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledLT2000Test"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC3); - data.setDocUrl(docURL3.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL3); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC3 + "]"); - String result = port3_1.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!execute_servlet_client("ClientEnabledServerEnabledLT2000Test", SDOC3, - sdocURL3)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerEnabledLT2000Test", SDOC3, - sdocURL3)) { - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerEnabledLT2000Test failed"); - } - - private boolean execute_servlet_client(String testname, String SDOC, - String sdocURL) { - boolean pass = true; - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing servlet client"); - TestUtil.logMsg("----------------------------------"); - try { - url = ctsurl.getURL("http", hostname, portnum, SERVLET_CLIENT); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", testname); - props.setProperty("SDOC", SDOC); - props.setProperty("sdocURL", sdocURL); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String result = p.getProperty("TESTRESULT"); - if (!result.equals("")) { - TestUtil.logErr("Servlet failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Servlet passed"); - } - } catch (Exception e) { - TestUtil.logErr("Servlet failed"); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean execute_ejb_client(String testname, String SDOC, - String sdocURL) { - boolean pass = true; - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing ejb client"); - TestUtil.logMsg("----------------------------------"); - try { - props.setProperty("TEST", testname); - props.setProperty("SDOC", SDOC); - props.setProperty("sdocURL", sdocURL); - Properties p = ejbclient.execute(props); - String result = p.getProperty("TESTRESULT"); - if (!result.equals("")) { - TestUtil.logErr("EJB failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("EJB passed"); - } - } catch (Exception e) { - TestUtil.logErr("EJB failed"); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/EjbClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/EjbClient.java deleted file mode 100644 index fc00f88886..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/EjbClient.java +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.net.*; -import java.util.*; -import java.awt.Image; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.transform.stream.StreamSource; -import jakarta.ejb.EJBException; -import jakarta.ejb.Remote; -import jakarta.ejb.Stateless; -import jakarta.ejb.SessionContext; -import jakarta.annotation.PostConstruct; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -@Stateless(name = "WSMTOMFeaturesTestUsingAnnotationsClntBean") -@Remote({ EjbClientIF.class }) - -public class EjbClient implements EjbClientIF { - - private static final boolean debug = true; - - private URL docURL = null; - - private String SDOC = null; - - // MTOM(true) on client/MTOM(true) on endpoint - @MTOM(enabled = true) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport1_1", value = MTOMTestService.class) - MTOMTest1 port1_1 = null; - - // MTOM() on client/MTOM(true) on endpoint - @MTOM() - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport1_2", value = MTOMTestService.class) - MTOMTest1 port1_2 = null; - - // MTOM(true) on client/MTOM(false) on endpoint - @MTOM(enabled = true) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport2", value = MTOMTestService.class) - MTOMTest2 port2 = null; - - // MTOM(true, 2000) on client/MTOM(true,2000) on endpoint - @MTOM(enabled = true, threshold = 2000) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport3_1", value = MTOMTestService.class) - MTOMTest3 port3_1 = null; - - // MTOM(false, 2000) on client/MTOM(true,2000) on endpoint - @MTOM(enabled = false, threshold = 2000) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport3_2", value = MTOMTestService.class) - MTOMTest3 port3_2 = null; - - // MTOM() on client/MTOM(true,2000) on endpoint - @MTOM() - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport3_3", value = MTOMTestService.class) - MTOMTest3 port3_3 = null; - - // MTOM(true, 2000) on client/MTOM(false,2000) on endpoint - @MTOM(enabled = true, threshold = 2000) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport4", value = MTOMTestService.class) - MTOMTest4 port4 = null; - - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsservice") - MTOMTestService service = null; - - @PostConstruct - public void postConstruct() { - System.out.println("EjbClient:postConstruct()"); - System.out.println("EjbClient:service=" + service); - System.out.println("EjbClient DEBUG: service=" + service); - System.out.println("EjbClient DEBUG: port1_1=" + port1_1); - System.out.println("EjbClient DEBUG: port1_2=" + port1_2); - System.out.println("EjbClient DEBUG: port2=" + port2); - System.out.println("EjbClient DEBUG: port3_1=" + port3_1); - System.out.println("EjbClient DEBUG: port3_2=" + port3_2); - System.out.println("EjbClient DEBUG: port3_3=" + port3_3); - System.out.println("EjbClient DEBUG: port4=" + port4); - if (service == null || port1_1 == null || port1_2 == null || port2 == null - || port3_1 == null || port3_2 == null || port3_3 == null - || port4 == null) { - throw new EJBException("postConstruct failed: injection failure"); - } - } - - public Properties execute(Properties p) { - - boolean pass = true; - try { - TestUtil.init(p); - if (debug) { - System.out.println("Remote logging intialized for Ejb"); - System.out.println("Here are the harness props"); - p.list(System.out); - } - } catch (Exception e) { - System.out.println("execute: Exception: " + e); - e.printStackTrace(); - throw new EJBException("unable to initialize remote logging"); - } - - try { - String test = p.getProperty("TEST"); - System.out.println("EjbClient:execute: test to execute is: " + test); - - if (test.equals("ClientEnabledServerEnabledMTOMInTest")) { - p.setProperty("TESTRESULT", ClientEnabledServerEnabledMTOMInTest(p)); - } else if (test.equals("ClientEnabledServerDisabledMTOMInTest")) { - p.setProperty("TESTRESULT", ClientEnabledServerDisabledMTOMInTest(p)); - } else if (test.equals("ClientEnabledServerEnabledMTOMInDefaultTest")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledMTOMInDefaultTest(p)); - } else if (test.equals("ClientEnabledServerEnabledGT2000Test")) { - p.setProperty("TESTRESULT", ClientEnabledServerEnabledGT2000Test(p)); - } else if (test.equals("ClientEnabledServerEnabledGT2000DefaultTest")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledGT2000DefaultTest(p)); - } else if (test.equals("ClientDisabledServerEnabledGT2000Test")) { - p.setProperty("TESTRESULT", ClientDisabledServerEnabledGT2000Test(p)); - } else if (test.equals("ClientEnabledServerDisabledGT2000Test")) { - p.setProperty("TESTRESULT", ClientEnabledServerDisabledGT2000Test(p)); - } else if (test.equals("ClientEnabledServerEnabledLT2000Test")) { - p.setProperty("TESTRESULT", ClientEnabledServerEnabledLT2000Test(p)); - } else { - p.setProperty("TESTRESULT", "TESTNAME NOT FOUND"); - } - } catch (Exception e) { - TestUtil.logErr("execute: Exception: " + e); - System.out.println("execute: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", e.toString()); - } - return (p); - } - - private String ClientEnabledServerEnabledMTOMInTest(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerEnabledMTOMInTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port1_1.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerDisabledMTOMInTest(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerDisabledMTOMInTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port2.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledMTOMInDefaultTest(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerEnabledMTOMInDefaultTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port1_2.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledGT2000Test(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerEnabledGT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_1.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledGT2000DefaultTest(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerEnabledGT2000DefaultTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_3.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientDisabledServerEnabledGT2000Test(Properties p) { - TestUtil.logMsg("EjbClient:ClientDisabledServerEnabledGT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_2.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerDisabledGT2000Test(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerDisabledGT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port4.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledLT2000Test(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerEnabledLT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_1.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/EjbClientIF.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/EjbClientIF.java deleted file mode 100644 index a3670f6619..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/EjbClientIF.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations; - -import java.util.Properties; - -public interface EjbClientIF { - - public Properties execute(Properties p); - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestImpl1.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestImpl1.java deleted file mode 100644 index 4bdbb2aba0..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestImpl1.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOM; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; -import javax.xml.transform.Source; - -@WebService(portName = "MTOMTest1Port", serviceName = "MTOMTestService", targetNamespace = "http://mtomservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest1") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@MTOM(enabled = true) - -public class MTOMTestImpl1 implements MTOMTest1 { - - public String mtomIn( - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.DataType data) { - System.out.println("--------------------------"); - System.out.println("In MTOMTestImpl1:mtomIn"); - - String result = ""; - - try { - - String docName = data.getDocName(); - System.out.println("docName=" + docName); - - URL docURL = new URL(data.getDocUrl()); - System.out.println("docURL=" + docURL.toString()); - - Source doc = AttachmentHelper.getSourceDoc(docURL); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc(), docName); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestImpl2.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestImpl2.java deleted file mode 100644 index 5c49af03ca..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestImpl2.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOM; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; -import javax.xml.transform.Source; - -@WebService(portName = "MTOMTest2Port", serviceName = "MTOMTestService", targetNamespace = "http://mtomservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest2") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@MTOM(enabled = false) - -public class MTOMTestImpl2 implements MTOMTest2 { - - public String mtomIn( - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.DataType data) { - - System.out.println("--------------------------"); - System.out.println("In MTOMTestImpl2:mtomIn"); - - String result = ""; - - try { - - String docName = data.getDocName(); - System.out.println("docName=" + docName); - - URL docURL = new URL(data.getDocUrl()); - System.out.println("docURL=" + docURL.toString()); - - Source doc = AttachmentHelper.getSourceDoc(docURL); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc(), docName); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestImpl3.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestImpl3.java deleted file mode 100644 index 633e2b9d05..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestImpl3.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOM; - -import java.awt.Image; -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; - -@WebService(portName = "MTOMTest3Port", serviceName = "MTOMTestService", targetNamespace = "http://mtomservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest3") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@MTOM(enabled = true, threshold = 2000) - -public class MTOMTestImpl3 implements MTOMTest3 { - - public String mtomIn2000( - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.DataType data) { - - System.out.println("--------------------------"); - System.out.println("In MTOMTestImpl3:mtomIn2000"); - - String result = ""; - - try { - - String docName = data.getDocName(); - System.out.println("docName=" + docName); - - URL docURL = new URL(data.getDocUrl()); - System.out.println("docURL=" + docURL.toString()); - - Image doc = AttachmentHelper.getImageDoc(docURL); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc2(), docName); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestImpl4.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestImpl4.java deleted file mode 100644 index b1dbbc8b33..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestImpl4.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOM; - -import java.awt.Image; -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; - -@WebService(portName = "MTOMTest4Port", serviceName = "MTOMTestService", targetNamespace = "http://mtomservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest4") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@MTOM(enabled = false, threshold = 2000) - -public class MTOMTestImpl4 implements MTOMTest4 { - - public String mtomIn2000( - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.DataType data) { - - System.out.println("--------------------------"); - System.out.println("In MTOMTestImpl4:mtomIn2000"); - - String result = ""; - - try { - - String docName = data.getDocName(); - System.out.println("docName=" + docName); - - URL docURL = new URL(data.getDocUrl()); - System.out.println("docURL=" + docURL.toString()); - - Image doc = AttachmentHelper.getImageDoc(docURL); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc2(), docName); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestService.wsdl b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestService.wsdl deleted file mode 100644 index ce46480fe7..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/MTOMTestService.wsdl +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/ServerSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/ServerSOAPHandler.java deleted file mode 100644 index 1762abab0d..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/ServerSOAPHandler.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.ws.WebServiceException; - -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - final String PASSED = "PASSED"; - - final String FAILED = "FAILED"; - - protected void processInboundMessage(SOAPMessageContext context) { - TestUtil.logMsg("ServerSOAPHandler.processInboundMessage"); - System.out.println("ServerSOAPHandler.processInboundMessage"); - JAXWS_Util.dumpHTTPHeaders(context, true); - JAXWS_Util.dumpHTTPHeaders(context, false); - - String result = FAILED; - Map> map = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - if (Handler_Util.checkForMsg(context, "ClientEnabled")) { - // boolean isAboveThreshold = Handler_Util.checkForMsg(context,"GT2000"); - // result = - // verifyMTOMEnabledThresholdContentTypeHttpHeader(map,isAboveThreshold); - result = verifyMTOMEnabledContentTypeHttpHeader(map); - } else { - result = verifyMTOMDisabledContentTypeHttpHeader(map); - } - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: " + result); - } - } - - protected String verifyMTOMDisabledContentTypeHttpHeader( - Map> m) { - TestUtil - .logMsg("ServerSOAPHandler.verifyMTOMDisabledContentTypeHttpHeader"); - System.out - .println("ServerSOAPHandler.verifyMTOMDisabledContentTypeHttpHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("DEBUG: HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if (sValues.indexOf("text/xml") >= 0) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected = text/xml"; - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - TestUtil.logMsg("result=" + result); - System.out.println("result=" + result); - return result; - } - - protected String verifyMTOMEnabledContentTypeHttpHeader( - Map> m) { - TestUtil.logMsg("ServerSOAPHandler.verifyMTOMEnabledContentTypeHttpHeader"); - System.out - .println("ServerSOAPHandler.verifyMTOMEnabledContentTypeHttpHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("DEBUG: HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if ((sValues.indexOf("multipart/related") >= 0) - && (sValues.indexOf("application/xop+xml") >= 0)) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected=multipart/related,application/xop+xml"; - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - TestUtil.logMsg("result=" + result); - System.out.println("result=" + result); - return result; - } - - protected String verifyMTOMEnabledThresholdContentTypeHttpHeader( - Map> m, boolean isAboveThreshold) { - TestUtil.logMsg("ServerSOAPHandler.verifyXOPContentTypeHttpHeader"); - System.out.println("ServerSOAPHandler.verifyXOPContentTypeHttpHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("DEBUG: HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if (isAboveThreshold) { - if ((sValues.indexOf("multipart/related") >= 0) - && (sValues.indexOf("application/xop+xml") >= 0)) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected=multipart/related,application/xop+xml"; - } - } else { - if (sValues.indexOf("text/xml") >= 0) { - if ((sValues.indexOf("application/xop+xml") < 0) - && (sValues.indexOf("multipart/related") < 0)) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], did not expect: multipart/related,application/xop+xml"; - } - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected=text/xml"; - } - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - TestUtil.logMsg("result=" + result); - System.out.println("result=" + result); - return result; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/ServletClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/ServletClient.java deleted file mode 100644 index 20aa7e0b7b..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/ServletClient.java +++ /dev/null @@ -1,431 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import java.io.*; -import java.net.*; -import java.rmi.*; -import java.util.*; -import java.awt.Image; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import jakarta.servlet.annotation.WebServlet; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.transform.stream.StreamSource; -import java.util.Properties; -import com.sun.javatest.Status; - -@WebServlet("/ServletTest") -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = true; - - private URL docURL = null; - - private String SDOC = null; - - // MTOM(true) on client/MTOM(true) on endpoint - @MTOM(enabled = true) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport1_1", value = MTOMTestService.class) - MTOMTest1 port1_1 = null; - - // MTOM() on client/MTOM(true) on endpoint - @MTOM() - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport1_2", value = MTOMTestService.class) - MTOMTest1 port1_2 = null; - - // MTOM(true) on client/MTOM(false) on endpoint - @MTOM(enabled = true) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport2", value = MTOMTestService.class) - MTOMTest2 port2 = null; - - // MTOM(true, 2000) on client/MTOM(true,2000) on endpoint - @MTOM(enabled = true, threshold = 2000) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport3_1", value = MTOMTestService.class) - MTOMTest3 port3_1 = null; - - // MTOM(false, 2000) on client/MTOM(true,2000) on endpoint - @MTOM(enabled = false, threshold = 2000) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport3_2", value = MTOMTestService.class) - MTOMTest3 port3_2 = null; - - // MTOM() on client/MTOM(true,2000) on endpoint - @MTOM() - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport3_3", value = MTOMTestService.class) - MTOMTest3 port3_3 = null; - - // MTOM(true, 2000) on client/MTOM(false,2000) on endpoint - @MTOM(enabled = true, threshold = 2000) - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsport4", value = MTOMTestService.class) - MTOMTest4 port4 = null; - - @WebServiceRef(name = "service/wsmtomfeaturestestusingannotationsservice") - MTOMTestService service = null; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("ServletClient:init()"); - System.out.println("ServletClient:service=" + service); - System.out.println("ServletClient DEBUG: service=" + service); - System.out.println("ServletClient DEBUG: port1_1=" + port1_1); - System.out.println("ServletClient DEBUG: port1_2=" + port1_2); - System.out.println("ServletClient DEBUG: port2=" + port2); - System.out.println("ServletClient DEBUG: port3_1=" + port3_1); - System.out.println("ServletClient DEBUG: port3_2=" + port3_2); - System.out.println("ServletClient DEBUG: port3_3=" + port3_3); - System.out.println("ServletClient DEBUG: port4=" + port4); - if (service == null || port1_1 == null || port1_2 == null || port2 == null - || port3_1 == null || port3_2 == null || port3_3 == null - || port4 == null) { - throw new ServletException("init() failed: port injection failed"); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - try { - String test = harnessProps.getProperty("TEST"); - System.out.println("doGet: test to execute is: " + test); - - if (test.equals("ClientEnabledServerEnabledMTOMInTest")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledMTOMInTest(harnessProps)); - } else if (test.equals("ClientEnabledServerDisabledMTOMInTest")) { - p.setProperty("TESTRESULT", - ClientEnabledServerDisabledMTOMInTest(harnessProps)); - } else if (test.equals("ClientEnabledServerEnabledMTOMInDefaultTest")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledMTOMInDefaultTest(harnessProps)); - } else if (test.equals("ClientEnabledServerEnabledGT2000Test")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledGT2000Test(harnessProps)); - } else if (test.equals("ClientEnabledServerEnabledGT2000DefaultTest")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledGT2000DefaultTest(harnessProps)); - } else if (test.equals("ClientDisabledServerEnabledGT2000Test")) { - p.setProperty("TESTRESULT", - ClientDisabledServerEnabledGT2000Test(harnessProps)); - } else if (test.equals("ClientEnabledServerDisabledGT2000Test")) { - p.setProperty("TESTRESULT", - ClientEnabledServerDisabledGT2000Test(harnessProps)); - } else if (test.equals("ClientEnabledServerEnabledLT2000Test")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledLT2000Test(harnessProps)); - } else { - p.setProperty("TESTRESULT", "TESTNAME NOT FOUND"); - } - p.list(out); - } catch (Exception e) { - TestUtil.logErr("doGet: Exception: " + e); - e.printStackTrace(out); - System.out.println("doGet: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", e.toString()); - p.list(out); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - if (debug) { - System.out.println("Remote logging intialized for Servlet"); - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - System.out.println("doPost: Exception: " + e); - e.printStackTrace(); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } - - private String ClientEnabledServerEnabledMTOMInTest(Properties p) { - TestUtil.logMsg("ServletClient:ClientEnabledServerEnabledMTOMInTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port1_1.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerDisabledMTOMInTest(Properties p) { - TestUtil.logMsg("ServletClient:ClientEnabledServerDisabledMTOMInTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port2.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledMTOMInDefaultTest(Properties p) { - TestUtil - .logMsg("ServletClient:ClientEnabledServerEnabledMTOMInDefaultTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port1_2.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledGT2000Test(Properties p) { - TestUtil.logMsg("ServletClient:ClientEnabledServerEnabledGT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_1.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledGT2000DefaultTest(Properties p) { - TestUtil - .logMsg("ServletClient:ClientEnabledServerEnabledGT2000DefaultTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_3.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientDisabledServerEnabledGT2000Test(Properties p) { - TestUtil.logMsg("ServletClient:ClientDisabledServerEnabledGT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_2.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerDisabledGT2000Test(Properties p) { - TestUtil.logMsg("ServletClient:ClientEnabledServerDisabledGT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port4.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledLT2000Test(Properties p) { - TestUtil.logMsg("ServletClient:ClientEnabledServerEnabledLT2000Test"); - String result = ""; - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_1.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotationsClnt_client.jar.sun-application-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotationsClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 360e54d052..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotationsClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - service/wsmtomfeaturestestusingannotationsservice - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport1_1 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest1 - - http://mtomservice.org/wsdl - MTOMTest1Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport1_2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest1 - - http://mtomservice.org/wsdl - MTOMTest1Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest2 - - http://mtomservice.org/wsdl - MTOMTest2Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport3_1 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport3_2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport3_3 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport4 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest4 - - http://mtomservice.org/wsdl - MTOMTest4Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotationsClnt_ejb.jar.sun-ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotationsClnt_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 69195dd679..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotationsClnt_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - 0 - - WSMTOMFeaturesTestUsingAnnotationsClntBean - WSMTOMFeaturesTestUsingAnnotationsClntBean - - service/wsmtomfeaturestestusingannotationsservice - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport1_1 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest1 - - http://mtomservice.org/wsdl - MTOMTest1Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport1_2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest1 - - http://mtomservice.org/wsdl - MTOMTest1Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest2 - - http://mtomservice.org/wsdl - MTOMTest2Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport3_1 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport3_2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport3_3 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport4 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest4 - - http://mtomservice.org/wsdl - MTOMTest4Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - false - false - -1 - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotationsClnt_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotationsClnt_web.war.sun-web.xml deleted file mode 100644 index cb98c29166..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotationsClnt_web.war.sun-web.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - service/wsmtomfeaturestestusingannotationsservice - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport1_1 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest1 - - http://mtomservice.org/wsdl - MTOMTest1Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport1_2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest1 - - http://mtomservice.org/wsdl - MTOMTest1Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest2 - - http://mtomservice.org/wsdl - MTOMTest2Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport3_1 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport3_2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport3_3 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingannotationsport4 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTest4 - - http://mtomservice.org/wsdl - MTOMTest4Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotations_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotations_web.war.sun-web.xml deleted file mode 100644 index 855a65dc75..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotations_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - MTOMTestService - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingAnnotations_web/jaxws/MTOMTest1?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotations_web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotations_web.xml deleted file mode 100644 index 2dbb726ad7..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/WSMTOMFeaturesTestUsingAnnotations_web.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - WSMTOMFeaturesTestUsingAnnotations - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTestImpl1 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTestImpl1 - 0 - - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTestImpl2 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTestImpl2 - 0 - - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTestImpl3 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTestImpl3 - 0 - - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTestImpl4 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTestImpl4 - 0 - - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTestImpl1 - /jaxws/MTOMTest1 - - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTestImpl2 - /jaxws/MTOMTest2 - - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTestImpl3 - /jaxws/MTOMTest3 - - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.MTOMTestImpl4 - /jaxws/MTOMTest4 - - - 54 - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/application.xml.clientear b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/application.xml.clientear deleted file mode 100644 index d5da521454..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/application.xml.clientear +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Application description - WSMTOMFeaturesTestUsingAnnotationsClnt - - WSMTOMFeaturesTestUsingAnnotationsClnt_client.jar - - - - WSMTOMFeaturesTestUsingAnnotationsClnt_web.war - WSMTOMFeaturesTestUsingAnnotationsClnt_web - - - - WSMTOMFeaturesTestUsingAnnotationsClnt_ejb.jar - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/build.xml deleted file mode 100644 index dd9cd8ace4..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/build.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/contentRoot/big.jpg b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/contentRoot/big.jpg deleted file mode 100644 index c6988d3efa..0000000000 Binary files a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/contentRoot/big.jpg and /dev/null differ diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/contentRoot/small.jpg b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/contentRoot/small.jpg deleted file mode 100644 index 02d864db47..0000000000 Binary files a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/contentRoot/small.jpg and /dev/null differ diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/contentRoot/text.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/contentRoot/text.xml deleted file mode 100644 index a9fcc9a1e1..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/contentRoot/text.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - http - - - - - http://www.wombats.com/remote/sender - - - http://127.0.0.1:8081/jaxm-provider/receiver/ebxml - - - - - - - 5 - - - 2000 - - - - - - - ebxml/ - - - 10 - - - - - - - https - - - - - jaxm.dummy.uri - - - https://127.0.0.1:8443/jaxm/dummy/ - - - - - - ebxml-https/ - - - 10 - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/custom-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/custom-client.xml deleted file mode 100644 index 5f1f9615d0..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/custom-client.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/custom-server.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/custom-server.xml deleted file mode 100644 index a8a1f5ee05..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingAnnotations/custom-server.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - ns2:MTOMTest* - - ServerSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingAnnotations.ServerSOAPHandler - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/Client.java deleted file mode 100644 index e9ab3f0c83..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/Client.java +++ /dev/null @@ -1,696 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.io.*; -import java.net.*; -import java.rmi.*; -import java.util.*; - -import java.awt.Image; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOMFeature; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; - -import javax.xml.transform.stream.StreamSource; - -import jakarta.ejb.EJB; - -import com.sun.javatest.Status; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String CTXROOT = "/WSMTOMFeaturesTestUsingDDs_web"; - - private String SERVLET_CLIENT = "/WSMTOMFeaturesTestUsingDDsClnt_web/ServletTest"; - - private TSURL ctsurl = new TSURL(); - - private URL url = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - private URLConnection urlConn = null; - - private Properties props = null; - - private URL docURL1 = null; - - private URL docURL2 = null; - - private URL docURL3 = null; - - private String sdocURL1 = null; - - private String sdocURL2 = null; - - private String sdocURL3 = null; - - String SDOC1 = "text.xml"; - - String SDOC2 = "big.jpg"; - - String SDOC3 = "small.jpg"; - - private String ctxroot = null; - - // MTOM(true) on client/MTOM(true) on endpoint - MTOMTest1 port1_1 = null; - - // MTOM() on client/MTOM(true) on endpoint - MTOMTest1 port1_2 = null; - - // MTOM(true) on client/MTOM(false) on endpoint - MTOMTest2 port2 = null; - - // MTOM(true, 2000) on client/MTOM(true, 2000) on endpoint - MTOMTest3 port3_1 = null; - - // MTOM(false, 2000) on client/MTOM(true, 2000) on endpoint - MTOMTest3 port3_2 = null; - - // MTOM() on client/MTOM(true, 2000) on endpoint - MTOMTest3 port3_3 = null; - - // MTOM(true, 2000) on client/MTOM(false, 2000) on endpoint - MTOMTest4 port4 = null; - - @EJB(name = "ejb/WSMTOMFeaturesTestUsingDDsClntBean") - static EjbClientIF ejbclient; - - private void getPortJavaEE() throws Exception { - InitialContext ctx = new InitialContext(); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport1_1"); - port1_1 = (MTOMTest1) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport1_1"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport1_2"); - port1_2 = (MTOMTest1) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport1_2"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport2"); - port2 = (MTOMTest2) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport2"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport3_1"); - port3_1 = (MTOMTest3) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport3_1"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport3_2"); - port3_2 = (MTOMTest3) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport3_2"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport3_3"); - port3_3 = (MTOMTest3) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport3_3"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport4"); - port4 = (MTOMTest4) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport4"); - TestUtil.logMsg("AppClient DEBUG: ejbclient=" + ejbclient); - TestUtil.logMsg("AppClient DEBUG: port1_1=" + port1_1); - TestUtil.logMsg("AppClient DEBUG: port1_2=" + port1_2); - TestUtil.logMsg("AppClient DEBUG: port2=" + port2); - TestUtil.logMsg("AppClient DEBUG: port3_1=" + port3_1); - TestUtil.logMsg("AppClient DEBUG: port3_2=" + port3_2); - TestUtil.logMsg("AppClient DEBUG: port3_3=" + port3_3); - TestUtil.logMsg("AppClient DEBUG: port4=" + port4); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - props = p; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - getPortJavaEE(); - - TestUtil.logMsg("Endpoint Context Root: " + CTXROOT); - - docURL1 = ctsurl.getURL(PROTOCOL, hostname, portnum, - CTXROOT + "/" + SDOC1); - docURL2 = ctsurl.getURL(PROTOCOL, hostname, portnum, - CTXROOT + "/" + SDOC2); - docURL3 = ctsurl.getURL(PROTOCOL, hostname, portnum, - CTXROOT + "/" + SDOC3); - sdocURL1 = docURL1.toString(); - sdocURL2 = docURL2.toString(); - sdocURL3 = docURL3.toString(); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: ClientEnabledServerEnabledMTOMInTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * WS4EE:SPEC:4019; - * - * @test_Strategy: Test MTOM attachments on input where mtom is enabled in the - * endpoint and the client. - */ - public void ClientEnabledServerEnabledMTOMInTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledMTOMInTest"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC1); - data.setDocUrl(docURL1.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL1); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC1 + "]"); - String result = port1_1.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!execute_servlet_client("ClientEnabledServerEnabledMTOMInTest", SDOC1, - sdocURL1)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerEnabledMTOMInTest", SDOC1, - sdocURL1)) { - pass = false; - } - - if (!pass) - throw new Fault("ClientEnabledServerEnabledMTOMInTest failed"); - } - - /* - * @testName: ClientEnabledServerDisabledMTOMInTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * WS4EE:SPEC:4019; - * - * @test_Strategy: Test MTOM attachments on input where mtom is disabled in - * the endpoint but enabled on the client. - */ - public void ClientEnabledServerDisabledMTOMInTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerDisabledMTOMInTest"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC1); - data.setDocUrl(docURL1.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL1); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC1 + "]"); - String result = port2.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil - .logErr("An error occurred with one or more of the attachments"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!execute_servlet_client("ClientEnabledServerDisabledMTOMInTest", SDOC1, - sdocURL1)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerDisabledMTOMInTest", SDOC1, - sdocURL1)) { - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerDisabledMTOMInTest failed"); - } - - /* - * @testName: ClientEnabledServerEnabledMTOMInDefaultTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * WS4EE:SPEC:4019; - * - * @test_Strategy: Test MTOM attachments on input where mtom is enabled in the - * endpoint and the client. - */ - public void ClientEnabledServerEnabledMTOMInDefaultTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledMTOMInDefaultTest"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC1); - data.setDocUrl(docURL1.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL1); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC1 + "]"); - String result = port1_2.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!execute_servlet_client("ClientEnabledServerEnabledMTOMInDefaultTest", - SDOC1, sdocURL1)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerEnabledMTOMInDefaultTest", - SDOC1, sdocURL1)) { - pass = false; - } - - if (!pass) - throw new Fault("ClientEnabledServerEnabledMTOMInTest failed"); - } - - /* - * @testName: ClientEnabledServerEnabledGT2000Test - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * WS4EE:SPEC:4019; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * greater than 2000 bytes. The client and endpoint have mtom enabled with the - * threshold set to 2000 - */ - public void ClientEnabledServerEnabledGT2000Test() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledGT2000Test"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC2); - data.setDocUrl(docURL2.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL2); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC2 + "]"); - String result = port3_1.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!execute_servlet_client("ClientEnabledServerEnabledGT2000Test", SDOC2, - sdocURL2)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerEnabledGT2000Test", SDOC2, - sdocURL2)) { - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerEnabledGT2000Test failed"); - } - - /* - * @testName: ClientEnabledServerEnabledGT2000DefaultTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * WS4EE:SPEC:4019; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * greater than 0 bytes. The endpoint has mtom enabled with the threshold set - * to 2000 - */ - public void ClientEnabledServerEnabledGT2000DefaultTest() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledGT2000DefaultTest"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC2); - data.setDocUrl(docURL2.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL2); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC2 + "]"); - String result = port3_3.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - - if (!execute_servlet_client("ClientEnabledServerEnabledGT2000DefaultTest", - SDOC2, sdocURL2)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerEnabledGT2000DefaultTest", - SDOC2, sdocURL2)) { - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerEnabledGT2000DefaultTest failed"); - } - - /* - * @testName: ClientDisabledServerEnabledGT2000Test - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * WS4EE:SPEC:4019; - * - * @test_Strategy: Test that XOP is disabled when sending an attachment that - * is greater than 2000 bytes. The client has mtom disabled and the endpoint - * has mtom enabled with the threshold set to 2000 - */ - public void ClientDisabledServerEnabledGT2000Test() throws Fault { - TestUtil.logMsg("ClientDisabledServerEnabledGT2000Test"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC2); - data.setDocUrl(docURL2.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL2); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC2 + "]"); - String result = port3_2.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!execute_servlet_client("ClientDisabledServerEnabledGT2000Test", SDOC2, - sdocURL2)) { - pass = false; - } - if (!execute_ejb_client("ClientDisabledServerEnabledGT2000Test", SDOC2, - sdocURL2)) { - pass = false; - } - if (!pass) - throw new Fault("ClientDisabledServerEnabledGT2000Test failed"); - } - - /* - * @testName: ClientEnabledServerDisabledGT2000Test - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * WS4EE:SPEC:4019; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * greater than 2000 bytes. The client has mtom enabled and the endpoint has - * mtom disbled with the threshold set to 2000 - */ - public void ClientEnabledServerDisabledGT2000Test() throws Fault { - TestUtil.logMsg("ClientEnabledServerDisabledGT2000Test"); - boolean pass = true; - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC2); - data.setDocUrl(docURL2.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL2); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC2 + "]"); - String result = port4.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!execute_servlet_client("ClientEnabledServerDisabledGT2000Test", SDOC2, - sdocURL2)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerDisabledGT2000Test", SDOC2, - sdocURL2)) { - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerDisabledGT2000Test failed"); - } - - /* - * @testName: ClientEnabledServerEnabledLT2000Test - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4013; WS4EE:SPEC:4015; - * WS4EE:SPEC:4019; - * - * @test_Strategy: Test that XOP is enabled when sending an attachment that is - * greater than 2000 bytes. The client and endpoint have mtom enabled with the - * threshold set to 2000 - */ - public void ClientEnabledServerEnabledLT2000Test() throws Fault { - TestUtil.logMsg("ClientEnabledServerEnabledLT2000Test"); - boolean pass = true; - - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing appclient client"); - TestUtil.logMsg("----------------------------------"); - try { - DataType data = new DataType(); - data.setDocName(SDOC3); - data.setDocUrl(docURL3.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL3); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC3 + "]"); - String result = port3_1.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("Appclient failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Appclient passed"); - } - } catch (Exception e) { - TestUtil.logErr("Appclient failed"); - TestUtil.printStackTrace(e); - pass = false; - } - if (!execute_servlet_client("ClientEnabledServerEnabledLT2000Test", SDOC3, - sdocURL3)) { - pass = false; - } - if (!execute_ejb_client("ClientEnabledServerEnabledLT2000Test", SDOC3, - sdocURL3)) { - pass = false; - } - if (!pass) - throw new Fault("ClientEnabledServerEnabledLT2000Test failed"); - } - - private boolean execute_servlet_client(String testname, String SDOC, - String sdocURL) { - boolean pass = true; - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing servlet client"); - TestUtil.logMsg("----------------------------------"); - try { - url = ctsurl.getURL("http", hostname, portnum, SERVLET_CLIENT); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", testname); - props.setProperty("SDOC", SDOC); - props.setProperty("sdocURL", sdocURL); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String result = p.getProperty("TESTRESULT"); - if (!result.equals("")) { - TestUtil.logErr("Servlet failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("Servlet passed"); - } - } catch (Exception e) { - TestUtil.logErr("Servlet failed"); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean execute_ejb_client(String testname, String SDOC, - String sdocURL) { - boolean pass = true; - TestUtil.logMsg("----------------------------------"); - TestUtil.logMsg("Testing ejb client"); - TestUtil.logMsg("----------------------------------"); - try { - props.setProperty("TEST", testname); - props.setProperty("SDOC", SDOC); - props.setProperty("sdocURL", sdocURL); - Properties p = ejbclient.execute(props); - String result = p.getProperty("TESTRESULT"); - if (!result.equals("")) { - TestUtil.logErr("EJB failed"); - TestUtil.logErr("result=" + result); - pass = false; - } else { - TestUtil.logMsg("EJB passed"); - } - } catch (Exception e) { - TestUtil.logErr("EJB failed"); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/EjbClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/EjbClient.java deleted file mode 100644 index a2ac8a9c70..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/EjbClient.java +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.net.*; -import java.util.*; -import java.awt.Image; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.MTOMFeature; -import javax.xml.transform.stream.StreamSource; -import jakarta.ejb.EJBException; -import jakarta.ejb.Remote; -import jakarta.ejb.Stateless; -import jakarta.ejb.SessionContext; -import jakarta.annotation.PostConstruct; -import javax.naming.InitialContext; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -@Stateless(name = "WSMTOMFeaturesTestUsingDDsClntBean") -@Remote({ EjbClientIF.class }) - -public class EjbClient implements EjbClientIF { - - private static final boolean debug = true; - - private URL docURL = null; - - private String SDOC = null; - - // MTOM(true) on client/MTOM(true) on endpoint - MTOMTest1 port1_1 = null; - - // MTOM() on client/MTOM(true) on endpoint - MTOMTest1 port1_2 = null; - - // MTOM(true) on client/MTOM(false) on endpoint - MTOMTest2 port2 = null; - - // MTOM(true, 2000) on client/MTOM(true, 2000) on endpoint - MTOMTest3 port3_1 = null; - - // MTOM(false, 2000) on client/MTOM(true, 2000) on endpoint - MTOMTest3 port3_2 = null; - - // MTOM() on client/MTOM(true, 2000) on endpoint - MTOMTest3 port3_3 = null; - - // MTOM(true, 2000) on client/MTOM(false, 2000) on endpoint - MTOMTest4 port4 = null; - - @PostConstruct - public void postConstruct() { - try { - System.out.println("EjbClient:postConstruct()"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport1_1"); - port1_1 = (MTOMTest1) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport1_1"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport1_2"); - port1_2 = (MTOMTest1) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport1_2"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport2"); - port2 = (MTOMTest2) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport2"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport3_1"); - port3_1 = (MTOMTest3) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport3_1"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport3_2"); - port3_2 = (MTOMTest3) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport3_2"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport3_3"); - port3_3 = (MTOMTest3) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport3_3"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport4"); - port4 = (MTOMTest4) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport4"); - System.out.println("EjbClient DEBUG: port1_1=" + port1_1); - System.out.println("EjbClient DEBUG: port1_2=" + port1_2); - System.out.println("EjbClient DEBUG: port2=" + port2); - System.out.println("EjbClient DEBUG: port3_1=" + port3_1); - System.out.println("EjbClient DEBUG: port3_2=" + port3_2); - System.out.println("EjbClient DEBUG: port3_3=" + port3_3); - System.out.println("EjbClient DEBUG: port4=" + port4); - } catch (Exception e) { - System.err.println("EjbClient:postConstruct() Exception: " + e); - e.printStackTrace(); - } - } - - public Properties execute(Properties p) { - - boolean pass = true; - try { - TestUtil.init(p); - if (debug) { - System.out.println("Remote logging intialized for Ejb"); - System.out.println("Here are the harness props"); - p.list(System.out); - } - } catch (Exception e) { - System.out.println("execute: Exception: " + e); - e.printStackTrace(); - throw new EJBException("unable to initialize remote logging"); - } - - try { - String test = p.getProperty("TEST"); - System.out.println("EjbClient:execute: test to execute is: " + test); - - if (test.equals("ClientEnabledServerEnabledMTOMInTest")) { - p.setProperty("TESTRESULT", ClientEnabledServerEnabledMTOMInTest(p)); - } else if (test.equals("ClientEnabledServerDisabledMTOMInTest")) { - p.setProperty("TESTRESULT", ClientEnabledServerDisabledMTOMInTest(p)); - } else if (test.equals("ClientEnabledServerEnabledMTOMInDefaultTest")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledMTOMInDefaultTest(p)); - } else if (test.equals("ClientEnabledServerEnabledGT2000Test")) { - p.setProperty("TESTRESULT", ClientEnabledServerEnabledGT2000Test(p)); - } else if (test.equals("ClientEnabledServerEnabledGT2000DefaultTest")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledGT2000DefaultTest(p)); - } else if (test.equals("ClientDisabledServerEnabledGT2000Test")) { - p.setProperty("TESTRESULT", ClientDisabledServerEnabledGT2000Test(p)); - } else if (test.equals("ClientEnabledServerDisabledGT2000Test")) { - p.setProperty("TESTRESULT", ClientEnabledServerDisabledGT2000Test(p)); - } else if (test.equals("ClientEnabledServerEnabledLT2000Test")) { - p.setProperty("TESTRESULT", ClientEnabledServerEnabledLT2000Test(p)); - } else { - p.setProperty("TESTRESULT", "TESTNAME NOT FOUND"); - } - } catch (Exception e) { - TestUtil.logErr("execute: Exception: " + e); - System.out.println("execute: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", e.toString()); - } - return (p); - } - - private String ClientEnabledServerEnabledMTOMInTest(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerEnabledMTOMInTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port1_1.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerDisabledMTOMInTest(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerDisabledMTOMInTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port2.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledMTOMInDefaultTest(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerEnabledMTOMInDefaultTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port1_2.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledGT2000Test(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerEnabledGT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_1.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledGT2000DefaultTest(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerEnabledGT2000DefaultTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_3.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientDisabledServerEnabledGT2000Test(Properties p) { - TestUtil.logMsg("EjbClient:ClientDisabledServerEnabledGT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_2.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerDisabledGT2000Test(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerDisabledGT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port4.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledLT2000Test(Properties p) { - TestUtil.logMsg("EjbClient:ClientEnabledServerEnabledLT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_1.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("EjbClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("EjbClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/EjbClientIF.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/EjbClientIF.java deleted file mode 100644 index 8f09e9c614..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/EjbClientIF.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs; - -import java.util.Properties; - -public interface EjbClientIF { - - public Properties execute(Properties p); - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestImpl1.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestImpl1.java deleted file mode 100644 index 682cd578d9..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestImpl1.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOM; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; -import javax.xml.transform.Source; - -@WebService(portName = "MTOMTest1Port", serviceName = "MTOMTestService", targetNamespace = "http://mtomservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@MTOM(enabled = true) - -public class MTOMTestImpl1 implements MTOMTest1 { - - public String mtomIn( - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.DataType data) { - System.out.println("--------------------------"); - System.out.println("In MTOMTestImpl1:mtomIn"); - - String result = ""; - - try { - - String docName = data.getDocName(); - System.out.println("docName=" + docName); - - URL docURL = new URL(data.getDocUrl()); - System.out.println("docURL=" + docURL.toString()); - - Source doc = AttachmentHelper.getSourceDoc(docURL); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc(), docName); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestImpl2.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestImpl2.java deleted file mode 100644 index e8da1c2d55..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestImpl2.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOM; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; -import javax.xml.transform.Source; - -@WebService(portName = "MTOMTest2Port", serviceName = "MTOMTestService", targetNamespace = "http://mtomservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest2") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@MTOM(enabled = false) - -public class MTOMTestImpl2 implements MTOMTest2 { - - public String mtomIn( - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.DataType data) { - - System.out.println("--------------------------"); - System.out.println("In MTOMTestImpl2:mtomIn"); - - String result = ""; - - try { - - String docName = data.getDocName(); - System.out.println("docName=" + docName); - - URL docURL = new URL(data.getDocUrl()); - System.out.println("docURL=" + docURL.toString()); - - Source doc = AttachmentHelper.getSourceDoc(docURL); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc(), docName); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestImpl3.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestImpl3.java deleted file mode 100644 index a776a08fd8..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestImpl3.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOM; - -import java.awt.Image; -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; - -@WebService(portName = "MTOMTest3Port", serviceName = "MTOMTestService", targetNamespace = "http://mtomservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@MTOM(enabled = true, threshold = 2000) - -public class MTOMTestImpl3 implements MTOMTest3 { - - public String mtomIn2000( - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.DataType data) { - - System.out.println("--------------------------"); - System.out.println("In MTOMTestImpl3:mtomIn2000"); - - String result = ""; - - try { - - String docName = data.getDocName(); - System.out.println("docName=" + docName); - - URL docURL = new URL(data.getDocUrl()); - System.out.println("docURL=" + docURL.toString()); - - Image doc = AttachmentHelper.getImageDoc(docURL); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc2(), docName); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestImpl4.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestImpl4.java deleted file mode 100644 index 432739e414..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestImpl4.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import jakarta.jws.WebService; -import jakarta.xml.ws.BindingType; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.soap.SOAPBinding; -import jakarta.xml.ws.soap.MTOM; - -import java.awt.Image; -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import java.net.URL; - -@WebService(portName = "MTOMTest4Port", serviceName = "MTOMTestService", targetNamespace = "http://mtomservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/MTOMTestService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest4") -@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING) -@MTOM(enabled = false, threshold = 2000) - -public class MTOMTestImpl4 implements MTOMTest4 { - - public String mtomIn2000( - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.DataType data) { - - System.out.println("--------------------------"); - System.out.println("In MTOMTestImpl4:mtomIn2000"); - - String result = ""; - - try { - - String docName = data.getDocName(); - System.out.println("docName=" + docName); - - URL docURL = new URL(data.getDocUrl()); - System.out.println("docURL=" + docURL.toString()); - - Image doc = AttachmentHelper.getImageDoc(docURL); - String tmpRes = AttachmentHelper.validateAttachmentData(doc, - data.getDoc2(), docName); - if (tmpRes != null) { - result = result + tmpRes; - } - } catch (Exception e) { - throw new WebServiceException(e.toString()); - } - return result; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestService.wsdl b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestService.wsdl deleted file mode 100644 index ce46480fe7..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/MTOMTestService.wsdl +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/ServerSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/ServerSOAPHandler.java deleted file mode 100644 index e4713009fb..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/ServerSOAPHandler.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.HTTPSOAPHandler; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; -import com.sun.ts.tests.jaxws.common.Handler_Util; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.ws.WebServiceException; - -import java.util.Map; -import java.util.List; -import java.util.Iterator; - -public class ServerSOAPHandler extends HTTPSOAPHandler { - - final String PASSED = "PASSED"; - - final String FAILED = "FAILED"; - - protected void processInboundMessage(SOAPMessageContext context) { - TestUtil.logMsg("in ServerSOAPHandler:processInboundMessage"); - System.out.println("in ServerSOAPHandler:processInboundMessage"); - JAXWS_Util.dumpHTTPHeaders(context, true); - JAXWS_Util.dumpHTTPHeaders(context, false); - - String result = FAILED; - Map> map = (Map>) context - .get(MessageContext.HTTP_REQUEST_HEADERS); - if (Handler_Util.checkForMsg(context, "ClientEnabled")) { - // boolean isAboveThreshold = Handler_Util.checkForMsg(context,"GT2000"); - // result = - // verifyMTOMEnabledThresholdContentTypeHttpHeader(map,isAboveThreshold); - result = verifyMTOMEnabledContentTypeHttpHeader(map); - } else { - result = verifyMTOMDisabledContentTypeHttpHeader(map); - } - if (!result.equals(PASSED)) { - throw new RuntimeException( - "In ServerSOAPHandler:processInboundMessage: " + result); - } - } - - protected String verifyMTOMDisabledContentTypeHttpHeader( - Map> m) { - TestUtil - .logMsg("in ServerSOAPHandler:verifyMTOMDisabledContentTypeHttpHeader"); - System.out.println( - "in ServerSOAPHandler:verifyMTOMDisabledContentTypeHttpHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("DEBUG: HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if (sValues.indexOf("text/xml") >= 0) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected = text/xml"; - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - TestUtil.logMsg("result=" + result); - System.out.println("result=" + result); - return result; - } - - protected String verifyMTOMEnabledContentTypeHttpHeader( - Map> m) { - TestUtil - .logMsg("in ServerSOAPHandler:verifyMTOMEnabledContentTypeHttpHeader"); - System.out - .println("in ServerSOAPHandler:verifyMTOMEnabledContentTypeHttpHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("DEBUG: HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if ((sValues.indexOf("multipart/related") >= 0) - && (sValues.indexOf("application/xop+xml") >= 0)) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected=multipart/related,application/xop+xml"; - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - TestUtil.logMsg("result=" + result); - System.out.println("result=" + result); - return result; - } - - protected String verifyMTOMEnabledThresholdContentTypeHttpHeader( - Map> m, boolean isAboveThreshold) { - TestUtil.logMsg("in ServerSOAPHandler:verifyXOPContentTypeHttpHeader"); - System.out.println("in ServerSOAPHandler:verifyXOPContentTypeHttpHeader"); - String result = FAILED; - Map> map = JAXWS_Util.convertKeysToLowerCase(m); - List values = map.get("content-type"); - System.out.println("DEBUG: HTTP header Content-Type=" + values); - String sValues = values.toString().toLowerCase(); - if (sValues != null) { - if (isAboveThreshold) { - if ((sValues.indexOf("multipart/related") >= 0) - && (sValues.indexOf("application/xop+xml") >= 0)) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected=multipart/related,application/xop+xml"; - } - } else { - if (sValues.indexOf("text/xml") >= 0) { - if ((sValues.indexOf("application/xop+xml") < 0) - && (sValues.indexOf("multipart/related") < 0)) { - result = PASSED; - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], did not expect: multipart/related,application/xop+xml"; - } - } else { - result = FAILED + ": INVALID HTTP Content-type [" + sValues - + "], expected=text/xml"; - } - } - } else { - result = FAILED + ": the HTTP header Content-Type was not found"; - } - TestUtil.logMsg("result=" + result); - System.out.println("result=" + result); - return result; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/ServletClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/ServletClient.java deleted file mode 100644 index e9cf2a6fc5..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/ServletClient.java +++ /dev/null @@ -1,446 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import com.sun.ts.tests.jaxws.common.AttachmentHelper; -import com.sun.ts.tests.jaxws.common.JAXWS_Util; - -import java.io.*; -import java.net.*; -import java.rmi.*; -import java.util.*; -import java.awt.Image; - -import jakarta.servlet.*; -import jakarta.servlet.http.*; - -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.MTOMFeature; -import javax.naming.InitialContext; - -import javax.xml.transform.stream.StreamSource; - -import java.util.Properties; -import com.sun.javatest.Status; - -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = true; - - private URL docURL = null; - - private String SDOC = null; - - // MTOM(true) on client/MTOM(true) on endpoint - MTOMTest1 port1_1 = null; - - // MTOM() on client/MTOM(true) on endpoint - MTOMTest1 port1_2 = null; - - // MTOM(true) on client/MTOM(false) on endpoint - MTOMTest2 port2 = null; - - // MTOM(true, 2000) on client/MTOM(true, 2000) on endpoint - MTOMTest3 port3_1 = null; - - // MTOM(false, 2000) on client/MTOM(true, 2000) on endpoint - MTOMTest3 port3_2 = null; - - // MTOM() on client/MTOM(true, 2000) on endpoint - MTOMTest3 port3_3 = null; - - // MTOM(true, 2000) on client/MTOM(false, 2000) on endpoint - MTOMTest4 port4 = null; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - try { - TestUtil.logMsg("ServletClient:init"); - InitialContext ctx = new InitialContext(); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport1_1"); - port1_1 = (MTOMTest1) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport1_1"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport1_2"); - port1_2 = (MTOMTest1) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport1_2"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport2"); - port2 = (MTOMTest2) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport2"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport3_1"); - port3_1 = (MTOMTest3) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport3_1"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport3_2"); - port3_2 = (MTOMTest3) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport3_2"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport3_3"); - port3_3 = (MTOMTest3) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport3_3"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsmtomfeaturestestusingddsport4"); - port4 = (MTOMTest4) ctx - .lookup("java:comp/env/service/wsmtomfeaturestestusingddsport4"); - System.out.println("ServletClient DEBUG: port1_1=" + port1_1); - System.out.println("ServletClient DEBUG: port1_2=" + port1_2); - System.out.println("ServletClient DEBUG: port2=" + port2); - System.out.println("ServletClient DEBUG: port3_1=" + port3_1); - System.out.println("ServletClient DEBUG: port3_2=" + port3_2); - System.out.println("ServletClient DEBUG: port3_3=" + port3_3); - System.out.println("ServletClient DEBUG: port4=" + port4); - } catch (Exception e) { - System.err.println("ServletClient:init() Exception: " + e); - e.printStackTrace(); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - try { - String test = harnessProps.getProperty("TEST"); - System.out.println("doGet: test to execute is: " + test); - - if (test.equals("ClientEnabledServerEnabledMTOMInTest")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledMTOMInTest(harnessProps)); - } else if (test.equals("ClientEnabledServerDisabledMTOMInTest")) { - p.setProperty("TESTRESULT", - ClientEnabledServerDisabledMTOMInTest(harnessProps)); - } else if (test.equals("ClientEnabledServerEnabledMTOMInDefaultTest")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledMTOMInDefaultTest(harnessProps)); - } else if (test.equals("ClientEnabledServerEnabledGT2000Test")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledGT2000Test(harnessProps)); - } else if (test.equals("ClientEnabledServerEnabledGT2000DefaultTest")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledGT2000DefaultTest(harnessProps)); - } else if (test.equals("ClientDisabledServerEnabledGT2000Test")) { - p.setProperty("TESTRESULT", - ClientDisabledServerEnabledGT2000Test(harnessProps)); - } else if (test.equals("ClientEnabledServerDisabledGT2000Test")) { - p.setProperty("TESTRESULT", - ClientEnabledServerDisabledGT2000Test(harnessProps)); - } else if (test.equals("ClientEnabledServerEnabledLT2000Test")) { - p.setProperty("TESTRESULT", - ClientEnabledServerEnabledLT2000Test(harnessProps)); - } else { - p.setProperty("TESTRESULT", "TESTNAME NOT FOUND"); - } - p.list(out); - } catch (Exception e) { - TestUtil.logErr("doGet: Exception: " + e); - e.printStackTrace(out); - System.out.println("doGet: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", e.toString()); - p.list(out); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - if (debug) { - System.out.println("Remote logging intialized for Servlet"); - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - System.out.println("doPost: Exception: " + e); - e.printStackTrace(); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } - - private String ClientEnabledServerEnabledMTOMInTest(Properties p) { - TestUtil.logMsg("ServletClient:ClientEnabledServerEnabledMTOMInTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port1_1.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerDisabledMTOMInTest(Properties p) { - TestUtil.logMsg("ServletClient:ClientEnabledServerDisabledMTOMInTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port2.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledMTOMInDefaultTest(Properties p) { - TestUtil - .logMsg("ServletClient:ClientEnabledServerEnabledMTOMInDefaultTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - StreamSource doc = AttachmentHelper.getSourceDoc(docURL); - data.setDoc(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port1_2.mtomIn(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledGT2000Test(Properties p) { - TestUtil.logMsg("ServletClient:ClientEnabledServerEnabledGT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_1.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledGT2000DefaultTest(Properties p) { - TestUtil - .logMsg("ServletClient:ClientEnabledServerEnabledGT2000DefaultTest"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_3.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientDisabledServerEnabledGT2000Test(Properties p) { - TestUtil.logMsg("ServletClient:ClientDisabledServerEnabledGT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_2.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerDisabledGT2000Test(Properties p) { - TestUtil.logMsg("ServletClient:ClientEnabledServerDisabledGT2000Test"); - String result = ""; - - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port4.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - - private String ClientEnabledServerEnabledLT2000Test(Properties p) { - TestUtil.logMsg("ServletClient:ClientEnabledServerEnabledLT2000Test"); - String result = ""; - try { - SDOC = p.getProperty("SDOC"); - TestUtil.logMsg("SDOC =" + SDOC); - docURL = new URL(p.getProperty("sdocURL")); - TestUtil.logMsg("docURL =" + docURL); - - DataType data = new DataType(); - data.setDocName(SDOC); - data.setDocUrl(docURL.toString()); - Image doc = AttachmentHelper.getImageDoc(docURL); - data.setDoc2(doc); - TestUtil - .logMsg("Send 1 document using MTOM via webservice method mtomIn()"); - TestUtil.logMsg("Document to send: [" + SDOC + "]"); - result = port3_1.mtomIn2000(data); - if (!result.equals("")) { - TestUtil.logErr("ServletClient:An error occurred with the attachment"); - TestUtil.logErr("result=" + result); - } - } catch (Exception e) { - TestUtil.logErr("ServletClient:Exception occurred"); - TestUtil.printStackTrace(e); - result = e.toString(); - } - return result; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_client.jar.sun-application-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_client.jar.sun-application-client.xml deleted file mode 100644 index dbb9d44f22..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - service/wsmtomfeaturestestusingddsport1_1 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - - http://mtomservice.org/wsdl - MTOMTest1Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport1_2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - - http://mtomservice.org/wsdl - MTOMTest1Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest2 - - http://mtomservice.org/wsdl - MTOMTest2Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport3_1 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport3_2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport3_3 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport4 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest4 - - http://mtomservice.org/wsdl - MTOMTest4Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_client.xml deleted file mode 100644 index 38ba9f1fb4..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_client.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - AppClient - WSMTOMFeaturesTestUsingDDsClnt_client - - service/wsmtomfeaturestestusingddsport1_1 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - true - - - - - service/wsmtomfeaturestestusingddsport1_2 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - true - - - - - service/wsmtomfeaturestestusingddsport2 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest2 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest2 - true - - - - - service/wsmtomfeaturestestusingddsport3_1 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - true - 2000 - - - - - service/wsmtomfeaturestestusingddsport3_2 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - false - 2000 - - - - - service/wsmtomfeaturestestusingddsport3_3 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - true - - - - - service/wsmtomfeaturestestusingddsport4 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest4 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest4 - true - 2000 - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_ejb.jar.sun-ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 190f94b68c..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - 0 - - WSMTOMFeaturesTestUsingDDsClntBean - WSMTOMFeaturesTestUsingDDsClntBean - false - - service/wsmtomfeaturestestusingddsport1_1 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - - http://mtomservice.org/wsdl - MTOMTest1Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport1_2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - - http://mtomservice.org/wsdl - MTOMTest1Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest2 - - http://mtomservice.org/wsdl - MTOMTest2Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport3_1 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport3_2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport3_3 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport4 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest4 - - http://mtomservice.org/wsdl - MTOMTest4Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - false - -1 - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_ejb.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_ejb.xml deleted file mode 100644 index 60fef5f416..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_ejb.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - EjbClient - - - WSMTOMFeaturesTestUsingDDsClntBean - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.EjbClient - Stateless - Container - - service/wsmtomfeaturestestusingddsport1_1 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - true - - - - - service/wsmtomfeaturestestusingddsport1_2 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - true - - - - - service/wsmtomfeaturestestusingddsport2 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest2 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest2 - true - - - - - service/wsmtomfeaturestestusingddsport3_1 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - true - 2000 - - - - - service/wsmtomfeaturestestusingddsport3_2 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - false - 2000 - - - - - service/wsmtomfeaturestestusingddsport3_3 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - true - - - - - service/wsmtomfeaturestestusingddsport4 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest4 - META-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest4 - true - 2000 - - - - - - - - - - - WSMTOMFeaturesTestUsingDDsClntBean - Remote - execute - - Supports - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_web.war.sun-web.xml deleted file mode 100644 index 604ea2bb55..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_web.war.sun-web.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - service/wsmtomfeaturestestusingddsport1_1 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - - http://mtomservice.org/wsdl - MTOMTest1Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport1_2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - - http://mtomservice.org/wsdl - MTOMTest1Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest2 - - http://mtomservice.org/wsdl - MTOMTest2Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport3_1 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport3_2 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport3_3 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - - http://mtomservice.org/wsdl - MTOMTest3Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - - - service/wsmtomfeaturestestusingddsport4 - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest4 - - http://mtomservice.org/wsdl - MTOMTest4Port - - - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_web.xml deleted file mode 100644 index 2e8b15d0d1..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDsClnt_web.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - ServletClient - - ServletClient - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.ServletClient - - - ServletClient - /ServletTest - - - 54 - - - - service/wsmtomfeaturestestusingddsport1_1 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - WEB-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - true - - - - - service/wsmtomfeaturestestusingddsport1_2 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - WEB-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - true - - - - - service/wsmtomfeaturestestusingddsport2 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest2 - WEB-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest2 - true - - - - - service/wsmtomfeaturestestusingddsport3_1 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - WEB-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - true - 2000 - - - - - service/wsmtomfeaturestestusingddsport3_2 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - WEB-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - false - 2000 - - - - - service/wsmtomfeaturestestusingddsport3_3 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - WEB-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - true - - - - - service/wsmtomfeaturestestusingddsport4 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestService - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest4 - WEB-INF/wsdl/MTOMTestService.wsdl - servicens:MTOMTestService - - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest4 - true - 2000 - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDs_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDs_web.war.sun-web.xml deleted file mode 100644 index dea441dbc6..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDs_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - MTOMTestService - http://webServerHost.1:webServerPort.1/WSMTOMFeaturesTestUsingDDs_web/jaxws/MTOMTest1?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDs_web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDs_web.xml deleted file mode 100644 index d519ac7463..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/WSMTOMFeaturesTestUsingDDs_web.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - WSMTOMFeaturesTestUsingDDs - - MTOMTestImpl1 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestImpl1 - 0 - - - MTOMTestImpl2 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestImpl2 - 0 - - - MTOMTestImpl3 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestImpl3 - 0 - - - MTOMTestImpl4 - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTestImpl4 - 0 - - - MTOMTestImpl1 - /jaxws/MTOMTest1 - - - MTOMTestImpl2 - /jaxws/MTOMTest2 - - - MTOMTestImpl3 - /jaxws/MTOMTest3 - - - MTOMTestImpl4 - /jaxws/MTOMTest4 - - - 54 - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/application.xml.clientear b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/application.xml.clientear deleted file mode 100644 index fbe8c3c31e..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/application.xml.clientear +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Application description - WSMTOMFeaturesTestUsingDDsClnt - - WSMTOMFeaturesTestUsingDDsClnt_client.jar - - - - WSMTOMFeaturesTestUsingDDsClnt_web.war - WSMTOMFeaturesTestUsingDDsClnt_web - - - - WSMTOMFeaturesTestUsingDDsClnt_ejb.jar - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/build.xml deleted file mode 100644 index 3e74d7ca5e..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/build.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/contentRoot/big.jpg b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/contentRoot/big.jpg deleted file mode 100644 index c6988d3efa..0000000000 Binary files a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/contentRoot/big.jpg and /dev/null differ diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/contentRoot/small.jpg b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/contentRoot/small.jpg deleted file mode 100644 index 02d864db47..0000000000 Binary files a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/contentRoot/small.jpg and /dev/null differ diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/contentRoot/text.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/contentRoot/text.xml deleted file mode 100644 index a9fcc9a1e1..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/contentRoot/text.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - http - - - - - http://www.wombats.com/remote/sender - - - http://127.0.0.1:8081/jaxm-provider/receiver/ebxml - - - - - - - 5 - - - 2000 - - - - - - - ebxml/ - - - 10 - - - - - - - https - - - - - jaxm.dummy.uri - - - https://127.0.0.1:8443/jaxm/dummy/ - - - - - - ebxml-https/ - - - 10 - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/custom-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/custom-client.xml deleted file mode 100644 index 58fff43392..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/custom-client.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/custom-server.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/custom-server.xml deleted file mode 100644 index 883e1d4aa6..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/custom-server.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - ns2:MTOMTest* - - ServerSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.ServerSOAPHandler - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/webservices.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/webservices.xml deleted file mode 100644 index 0413f142bf..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSMTOMFeaturesTestUsingDDs/webservices.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - MTOMTestService - WEB-INF/wsdl/MTOMTestService.wsdl - - MTOMTestImpl1 - wsdl:MTOMTest1Port - true - ##SOAP11_HTTP - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest1 - - MTOMTestImpl1 - - - - MTOMTestImpl2 - wsdl:MTOMTest2Port - false - ##SOAP11_HTTP - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest2 - - MTOMTestImpl2 - - - - MTOMTestImpl3 - wsdl:MTOMTest3Port - true - 2000 - ##SOAP11_HTTP - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest3 - - MTOMTestImpl3 - - - - MTOMTestImpl4 - wsdl:MTOMTest4Port - false - 2000 - ##SOAP11_HTTP - com.sun.ts.tests.webservices13.servlet.WSMTOMFeaturesTestUsingDDs.MTOMTest4 - - MTOMTestImpl4 - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/Client.java deleted file mode 100644 index 74284baa7c..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/Client.java +++ /dev/null @@ -1,555 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -import com.sun.javatest.Status; - -import jakarta.ejb.EJB; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.*; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private URL url = null; - - private URLConnection urlConn = null; - - private String SERVLET = "/WSRespBindAndAddressingTestUsingAnnotationsClnt_web/ServletTest"; - - /************************************************************************************************* - * Table to cover Addressing/RespectBinding annotation combinations. - * - * These test scenarios exist for covering the various combinations of - * Addressing/RespectBinding annotations in JSR 109. This test case is - * borrowed from the jaxws respectbindingfeature test case which uses JAXWS - * API's to control these same combinations. This test case demonstrates that - * these combinations can now be all annotation driven via JSR 109. - * - * There exist the following 20+ scenarios for Addressing/RespectBinding - * combinations (only 5 test cases are valid): - * - * ------------------- ------------------- --------------------- - * --------------- Client (Addressing) Server (Addressing) - * RespectBindingFeature Expected Result ------------------- - * ------------------- --------------------- --------------- 1). - * Enabled/NotRequired Enabled/NotRequired N/A N/A-not TCK test 2). - * Enabled/Required Enabled/NotRequired N/A N/A-not TCK test 3). NotEnabled - * Enabled/NotRequired N/A N/A-not TCK test 4a) Enabled/NotRequired - * Enabled/Required S-Enabled/C-Enabled Expect No Error 4b) - * Enabled/NotRequired Enabled/Required S-Enabled/C-Disabled N/A-not TCK test - * 4c) Enabled/NotRequired Enabled/Required S-Disabled/C-Enabled N/A-not TCK - * test 4d) Enabled/NotRequired Enabled/Required S-Disabled/C-Disabled N/A-not - * TCK test 5a) Enabled/Required Enabled/Required S-Enabled/C-Enabled Expect - * No Error 5b) Enabled/Required Enabled/Required S-Enabled/C-Disabled N/A-not - * TCK test 5c) Enabled/Required Enabled/Required S-Disabled/C-Enabled N/A-not - * TCK test 5d) Enabled/Required Enabled/Required S-Disabled/C-Disabled - * N/A-not TCK test 6a) NotEnabled Enabled/Required S-Enabled/C-Enabled Expect - * Exception 6b) NotEnabled Enabled/Required S-Enabled/C-Disabled N/A-not TCK - * test 6c) NotEnabled Enabled/Required S-Disabled/C-Enabled N/A-not TCK test - * 6d) NotEnabled Enabled/Required S-Disabled/C-Disabled N/A-not TCK test 7a) - * Enabled/NotRequired NotEnabled S-Enabled/C-Enabled Expect No Error 7b) - * Enabled/NotRequired NotEnabled S-Enabled/C-Disabled N/A-not TCK test 7c) - * Enabled/NotRequired NotEnabled S-Disabled/C-Enabled N/A-not TCK test 7d) - * Enabled/NotRequired NotEnabled S-Disabled/C-Disabled N/A-not TCK test 8a) - * Enabled/Required NotEnabled S-Enabled/C-Enabled Expect Exception 8b) - * Enabled/Required NotEnabled S-Enabled/C-Disabled N/A-not TCK test 8c) - * Enabled/Required NotEnabled S-Disabled/C-Enabled N/A-not TCK test 8d) - * Enabled/Required NotEnabled S-Disabled/C-Disabled N/A-not TCK test - * - * From the last column you can see that the only valid test cases are: - * 4a,5a,6a,7a,8a. According to the JAXWS Javadoc API the behavior of - * RespectBinding(enabled=false) is implementation specific, so we cannot test - * for any combo where RespectBinding is not enabled. - * - * test scenarios 4a, 5a, 6a use Echo port test scenarios 7a, 8a use Echo2 - * port - * - * where Echo port is configured via- WSDL: // Addressing - * enabled/required in WSDL - * EchoImpl.java: @BindingType(value=SOAPBinding.SOAP11HTTP_BINDING) @RespectBinding(enabled=true) - * // Impl enables RespectBinding - * - * where Echo2 port is configured via- WSDL: // Addressing - * enabled/required in WSDL Echo2Impl.java: @Addressing(enabled=false) // Impl - * turns off Addressing @RespectBinding(enabled=true) // Impl enables - * RespectBinding - * - *************************************************************************************************/ - - @Addressing(enabled = true, required = false) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport4a", value = EchoService.class) - static Echo port4a = null; - - @Addressing(enabled = true, required = true) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport5a", value = EchoService.class) - static Echo port5a = null; - - @Addressing(enabled = false) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport6a", value = EchoService.class) - static Echo port6a = null; - - @Addressing(enabled = true, required = false) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport7a", value = EchoService.class) - static Echo2 port7a = null; - - @Addressing(enabled = true, required = true) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport8a", value = EchoService.class) - static Echo2 port8a = null; - - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsservice") - static EchoService service = null; - - @EJB(name = "ejb/WSRespBindAndAddressingTestUsingAnnotationsClntBean") - static EjbClientIF ejbclient; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - TestUtil.logMsg("Appclient DEBUG: ejbclient=" + ejbclient); - TestUtil.logMsg("Appclient DEBUG: service=" + service); - TestUtil.logMsg("Appclient DEBUG: port4a=" + port4a); - TestUtil.logMsg("Appclient DEBUG: port5a=" + port5a); - TestUtil.logMsg("Appclient DEBUG: port6a=" + port6a); - TestUtil.logMsg("Appclient DEBUG: port7a=" + port7a); - TestUtil.logMsg("Appclient DEBUG: port8a=" + port8a); - - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - if (service == null || port4a == null || port5a == null || port6a == null - || port7a == null || port8a == null || ejbclient == null) { - throw new Fault("setup failed: injection failure"); - } - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - ejbclient.init(p); - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client - * Enabled/Required, Server Enabled/Required; RespectBinding Server Enabled, - * Client Enabled. Addressing headers MUST be present on SOAPRequest and - * SOAPResponse. - */ - public void afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest() - throws Fault { - boolean pass = true; - - TestUtil.logMsg("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg("Addressing headers MUST be present on the SOAPRequest"); - TestUtil - .logMsg("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - port5a.echo("Echo from AppClient on port5a", testName); - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - } else - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"; - boolean passEjb = ejbclient.echo("Echo from EjbClient on port5a", - testName); - if (!passEjb) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } else - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault( - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest failed"); - } - - /* - * @testName: afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client NotEnabled, - * Server Enabled/Required; RespectBinding Server Enabled, Client Enabled. - * This scenario MUST throw back a SOAP Fault. Make sure the SOAP Fault has - * the correct information in it. The SOAP Fault faultcode must be: - * MessageAddressingHeaderRequired. - */ - public void afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest() - throws Fault { - boolean pass = true; - - TestUtil.logMsg("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg("Expect a SOAPFaultException to be thrown back"); - TestUtil - .logMsg("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - port6a.echo("Echo from AppClient on port6a", testName); - TestUtil.logErr("SOAPFaultException was not thrown back"); - pass = false; - } catch (SOAPFaultException sfe) { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - try { - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest (Unexpected)"); - } else - TestUtil.logMsg( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest"; - boolean passEjb = ejbclient.echo("Echo from EjbClient on port6a", - testName); - if (!passEjb) { - TestUtil.logErr( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest (Unexpected)"); - pass = false; - } else - TestUtil.logMsg( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - pass = false; - } - if (!pass) - throw new Fault( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest failed"); - } - - /* - * @testName: afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client - * Enabled/NotRequired, Server NotEnabled; RespectBinding Server Enabled, - * Client Enabled. Addressing headers MAY be present on SOAPRequest but MUST - * NOT be present on SOAPResponse. - */ - public void afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() - throws Fault { - boolean pass = true; - - TestUtil - .logMsg("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest but MUST NOT be present on SOAPResponse"); - TestUtil - .logMsg("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - port7a.echo("Echo from AppClient on port7a", testName); - TestUtil - .logMsg("Addressing Headers DO NOT Exist in SOAPResponse (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - TestUtil.logErr("Addressing Headers EXIST in SOAPResponse (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil - .logErr("Addressing Headers EXIST in SOAPResponse (Unexpected)"); - } else - TestUtil.logMsg( - "Addressing Headers DO NOT Exist in SOAPResponse (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - TestUtil.logErr("Addressing Headers EXIST in SOAPResponse (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"; - boolean passEjb = ejbclient.echo("Echo from EjbClient on port7a", - testName); - if (!passEjb) { - pass = false; - TestUtil - .logErr("Addressing Headers EXIST in SOAPResponse (Unexpected)"); - } else - TestUtil.logMsg( - "Addressing Headers DO NOT Exist in SOAPResponse (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - TestUtil.logErr("Addressing Headers EXIST in SOAPResponse (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest failed"); - } - - /* - * @testName: afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client - * Enabled/Required, Server NotEnabled; RespectBinding Server Enabled, Client - * Enabled. This scenario MUST throw back a WebServiceException. - */ - public void afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() - throws Fault { - boolean pass = true; - - TestUtil.logMsg("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg("Expect a WebServiceException to be thrown back"); - TestUtil - .logMsg("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - port8a.echo("Echo from AppClient on port8a", testName); - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest (Unexpected)"); - } else - TestUtil.logMsg( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"; - boolean passEjb = ejbclient.echo("Echo from EjbClient on port8a", - testName); - if (!passEjb) { - TestUtil.logErr( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest (Unexpected)"); - pass = false; - } else - TestUtil.logMsg( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - pass = false; - } - if (!pass) - throw new Fault( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest failed"); - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/ClientSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/ClientSOAPHandler.java deleted file mode 100644 index abb1299817..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/ClientSOAPHandler.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientSOAPHandler.java 52501 2009-04-15 02:29:49Z adf $ - */ -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsa.common.MapRequiredException; -import com.sun.ts.tests.jaxws.wsa.common.MapException; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.soap.SOAPException; -import java.util.Iterator; -import jakarta.xml.ws.handler.soap.SOAPHandler; -import jakarta.xml.soap.SOAPHeader; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.Text; - -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - checkAddressingHeadersExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) { - checkAddressingHeadersDoNotExist(context, action); - } - } - - private void verifyAction(String action) { - if (!action.equals(TestConstants.ECHO_OUTPUT_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ECHO_OUTPUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundRelatesToDoesNotExist(context); - } - - private void handleMessageInboundCheckAddressingHeadersDoNotExist( - SOAPMessageContext context) { - String headerValue = null; - String whichHeaders = null; - try { - headerValue = getTo(context); - whichHeaders = whichHeaders + "wsa:To, "; - } catch (Exception e) { - } - try { - headerValue = getReplyTo(context); - whichHeaders = whichHeaders + "wsa:ReplyTo, "; - } catch (Exception e) { - } - try { - headerValue = getMessageId(context); - whichHeaders = whichHeaders + "wsa:MessageId, "; - } catch (Exception e) { - } - try { - headerValue = getRelationship(context); - whichHeaders = whichHeaders + "wsa:Relationship, "; - } catch (Exception e) { - } - try { - headerValue = getAction(context); - whichHeaders = whichHeaders + "wsa:Action"; - } catch (Exception e) { - } - if (whichHeaders != null) { - throw new AddressingPropertyException( - "ERROR: The following addressing headers exist in soap message: [" - + whichHeaders + "]"); - } - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ClientSOAPHandler.getAction(): testName=" + testName); - if (testName == null) - return super.getAction(context); - else if (testName - .equals("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) - return super.getAction(context); - else if (testName - .equals("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) - return super.getActionDoesNotExist(context); - else - return null; - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/Echo2Impl.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/Echo2Impl.java deleted file mode 100644 index ec9e9caccd..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/Echo2Impl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.RespectBinding; - -@WebService(portName = "Echo2Port", serviceName = "EchoService", targetNamespace = "http://Echo.org", wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo2") - -// Impl overrides WSDL to turn addressing off -@Addressing(enabled = false) -@RespectBinding(enabled = true) - -public class Echo2Impl { - - public String echo(String string, Holder testName) { - return string; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/EchoImpl.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/EchoImpl.java deleted file mode 100644 index d9039e9479..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/EchoImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.RespectBinding; - -@WebService(portName = "EchoPort", serviceName = "EchoService", targetNamespace = "http://Echo.org", wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo") - -@RespectBinding(enabled = true) - -public class EchoImpl { - - public String echo(String string, Holder testName) { - return string; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/EchoService.wsdl b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/EchoService.wsdl deleted file mode 100644 index 06f745f2fb..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/EchoService.wsdl +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/EjbClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/EjbClient.java deleted file mode 100644 index 5df35fc64c..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/EjbClient.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.ejb.EJBException; -import jakarta.ejb.Remote; -import jakarta.ejb.Stateful; -import jakarta.ejb.SessionContext; -import jakarta.annotation.Resource; -import jakarta.annotation.PostConstruct; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -@Stateful(name = "WSRespBindAndAddressingTestUsingAnnotationsClntBean") -@Remote({ EjbClientIF.class }) -public class EjbClient implements EjbClientIF { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - @Addressing(enabled = true, required = false) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport4a", value = EchoService.class) - Echo port4a = null; - - @Addressing(enabled = true, required = true) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport5a", value = EchoService.class) - Echo port5a = null; - - @Addressing(enabled = false) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport6a", value = EchoService.class) - Echo port6a = null; - - @Addressing(enabled = true, required = false) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport7a", value = EchoService.class) - Echo2 port7a = null; - - @Addressing(enabled = true, required = true) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport8a", value = EchoService.class) - Echo2 port8a = null; - - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsservice") - EchoService service = null; - - @PostConstruct - public void postConstruct() { - System.out.println("EjbClient:postConstruct()"); - System.out.println("Ejbclient DEBUG: service=" + service); - System.out.println("Ejbclient DEBUG: port4a=" + port4a); - System.out.println("Ejbclient DEBUG: port5a=" + port5a); - System.out.println("Ejbclient DEBUG: port6a=" + port6a); - System.out.println("Ejbclient DEBUG: port7a=" + port7a); - System.out.println("Ejbclient DEBUG: port8a=" + port8a); - if (service == null || port4a == null || port5a == null || port6a == null - || port7a == null || port8a == null) { - throw new EJBException("postConstruct failed: injection failure"); - } - } - - public void init(Properties p) { - harnessProps = p; - try { - TestUtil.init(p); - } catch (RemoteLoggingInitException e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } - } - - public boolean echo(String string, String testName) { - if (testName - .equals("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) - return afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest(); - else if (testName - .equals("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest")) - return afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest(); - else if (testName - .equals("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) - return afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest(); - else if (testName - .equals("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) - return afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest(); - else - return false; - } - - private boolean afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST be present on the SOAPRequest and SOAPResponse"); - TestUtil - .logMsg("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - port5a.echo("Echo from EjbClient on port5a", testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest() { - boolean pass = true; - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg("This scenario MUST throw back a SOAPFault"); - TestUtil - .logMsg("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest()"); - Holder testName = new Holder( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest()"); - port6a.echo("Echo from EjbClient on port6a", testName); - TestUtil.logErr("SOAPFaultException was not thrown back"); - pass = false; - } catch (SOAPFaultException sfe) { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - try { - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest but MUST NOT be present on SOAPResponse"); - TestUtil - .logMsg("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - port7a.echo("Echo from EjbClient on port7a", testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() { - boolean pass = true; - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg("This scenario MUST throw back a WebServiceException"); - TestUtil - .logMsg("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest()"); - Holder testName = new Holder( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest()"); - port8a.echo("Echo from EjbClient on port8a", testName); - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/EjbClientIF.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/EjbClientIF.java deleted file mode 100644 index 4bc3bec34c..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/EjbClientIF.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations; - -public interface EjbClientIF { - - public void init(java.util.Properties p); - - public boolean echo(String string, String testName); -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/ServerSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/ServerSOAPHandler.java deleted file mode 100644 index cb70e4d591..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/ServerSOAPHandler.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2009-04-15 02:29:49Z adf $ - */ -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.MapException; -import com.sun.ts.tests.jaxws.wsa.common.MapRequiredException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import jakarta.xml.soap.SOAPException; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - checkAddressingHeadersExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) { - // checkAddressingHeadersExist(context, action); Don't check wsa headers - // for addressing optional - } - } - - private void verifyAction(String action) { - if (!action.equals(TestConstants.ECHO_INPUT_ACTION)) { - throw new ActionNotSupportedException( - "Expected:" + TestConstants.ECHO_INPUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundMessageIdDoesNotExist(context); - checkInboundReplyToDoesNotExist(context); - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ServerSOAPHandler.getAction(): testName=" + testName); - System.out.println("ServerSOAPHandler.getAction(): testName=" + testName); - if (testName == null) - return super.getAction(context); - else if (testName - .equals("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest") - || testName.equals( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) - return super.getAction(context); - else - return null; - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/ServletClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/ServletClient.java deleted file mode 100644 index 3313518745..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/ServletClient.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServletClient.java 52684 2009-04-15 04:30:10Z adf $ - */ - -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -import java.io.*; -import java.sql.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import jakarta.servlet.annotation.WebServlet; -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; - -@WebServlet("/ServletTest") -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - @Addressing(enabled = true, required = false) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport4a", value = EchoService.class) - Echo port4a = null; - - @Addressing(enabled = true, required = true) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport5a", value = EchoService.class) - Echo port5a = null; - - @Addressing(enabled = false) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport6a", value = EchoService.class) - Echo port6a = null; - - @Addressing(enabled = true, required = false) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport7a", value = EchoService.class) - Echo2 port7a = null; - - @Addressing(enabled = true, required = true) - @RespectBinding(enabled = true) - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsport8a", value = EchoService.class) - Echo2 port8a = null; - - @WebServiceRef(name = "service/wsrespbindandaddrtestusingannotationsservice") - EchoService service = null; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("DEBUG ServletClient:init()"); - System.out.println("ServletClient DEBUG: service=" + service); - System.out.println("ServletClient DEBUG: port4a=" + port4a); - System.out.println("ServletClient DEBUG: port5a=" + port5a); - System.out.println("ServletClient DEBUG: port6a=" + port6a); - System.out.println("ServletClient DEBUG: port7a=" + port7a); - System.out.println("ServletClient DEBUG: port8a=" + port8a); - if (service == null || port4a == null || port5a == null || port6a == null - || port7a == null || port8a == null) { - throw new ServletException("init() failed: port injection failed"); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - try { - String test = harnessProps.getProperty("TEST"); - System.out.println("doGet: test to execute is: " + test); - if (test - .equals("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - if (afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test - .equals("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - if (afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test.equals( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) { - if (afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test - .equals("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) { - if (afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } - p.list(out); - } catch (Exception e) { - TestUtil.logErr("doGet: Exception: " + e); - e.printStackTrace(out); - System.out.println("doGet: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - if (debug) { - System.out.println("Remote logging intialized for Servlet"); - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - System.out.println("doPost: Exception: " + e); - e.printStackTrace(); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } - - private boolean afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST be present on the SOAPRequest and SOAPResponse"); - TestUtil - .logMsg("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - port5a.echo("Echo from ServletClient on port5a", testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest() { - boolean pass = true; - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg("This scenario MUST throw back a SOAPFault"); - TestUtil - .logMsg("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest()"); - Holder testName = new Holder( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest()"); - port6a.echo("Echo from ServletClient on port6a", testName); - TestUtil.logErr("SOAPFaultException was not thrown back"); - pass = false; - } catch (SOAPFaultException sfe) { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - try { - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest and MUST NOT be present on SOAPResponse"); - TestUtil - .logMsg("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - port7a.echo("Echo from ServletClient on port7a", testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() { - boolean pass = true; - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg("This scenario MUST throw back a WebServiceException"); - TestUtil - .logMsg("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest()"); - Holder testName = new Holder( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest()"); - port8a.echo("Echo from ServletClient on port8a", testName); - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/TestConstants.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/TestConstants.java deleted file mode 100644 index f6743e0799..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/TestConstants.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2009-04-15 02:29:49Z adf $ - */ -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations; - -public class TestConstants { - public static final String ECHO_INPUT_ACTION = "EchoInputAction"; - - public static final String ECHO_OUTPUT_ACTION = "EchoOutputAction"; -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotationsClnt_client.jar.sun-application-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotationsClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 3b3edd4243..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotationsClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - service/wsrespbindandaddrtestusingannotationsservice - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport4a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport5a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport6a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport7a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo2?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport8a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo2?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotationsClnt_ejb.jar.sun-ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotationsClnt_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index ead3e86d70..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotationsClnt_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - 0 - - WSRespBindAndAddressingTestUsingAnnotationsClntBean - WSRespBindAndAddressingTestUsingAnnotationsClntBean - - service/wsrespbindandaddrtestusingannotationsservice - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport4a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport5a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport6a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport7a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo2?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport8a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo2?WSDL - - - false - false - -1 - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotationsClnt_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotationsClnt_web.war.sun-web.xml deleted file mode 100644 index 4bc6a23ace..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotationsClnt_web.war.sun-web.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - service/wsrespbindandaddrtestusingannotationsservice - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport4a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport5a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport6a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport7a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo2?WSDL - - - - service/wsrespbindandaddrtestusingannotationsport8a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo2?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotations_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotations_web.war.sun-web.xml deleted file mode 100644 index 00685c2cc9..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotations_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - EchoService - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingAnnotations_web/jaxws/Echo?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotations_web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotations_web.xml deleted file mode 100644 index 604ab059c3..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/WSRespBindAndAddressingTestUsingAnnotations_web.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - WSRespBindAndAddressingTestUsingAnnotations - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.EchoImpl - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.EchoImpl - 0 - - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo2Impl - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo2Impl - 0 - - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.EchoImpl - /jaxws/Echo - - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.Echo2Impl - /jaxws/Echo2 - - - 54 - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/application.xml.clientear b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/application.xml.clientear deleted file mode 100644 index e510355418..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/application.xml.clientear +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Application description - WSRespBindAndAddressingTestUsingAnnotationsClnt - - WSRespBindAndAddressingTestUsingAnnotationsClnt_client.jar - - - - WSRespBindAndAddressingTestUsingAnnotationsClnt_web.war - WSRespBindAndAddressingTestUsingAnnotationsClnt_web - - - - WSRespBindAndAddressingTestUsingAnnotationsClnt_ejb.jar - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/build.xml deleted file mode 100644 index 9398f07f2e..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/build.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/custom-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/custom-client.xml deleted file mode 100644 index ee2f0c9b62..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.ClientSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/custom-server.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/custom-server.xml deleted file mode 100644 index c28b59abc2..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingAnnotations/custom-server.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingAnnotations.ServerSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/Client.java deleted file mode 100644 index 851f6f77cc..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/Client.java +++ /dev/null @@ -1,558 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -import com.sun.javatest.Status; - -import jakarta.ejb.EJB; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.xml.namespace.QName; -import javax.naming.InitialContext; -import java.net.*; -import java.util.Properties; -import java.util.Iterator; - -public class Client extends EETest { - - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private TSURL ctsurl = new TSURL(); - - private Properties props = null; - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private URL url = null; - - private URLConnection urlConn = null; - - private String SERVLET = "/WSRespBindAndAddressingTestUsingDDsClnt_web/ServletTest"; - - /************************************************************************************************* - * Table to cover Addressing/RespectBinding annotation combinations. - * - * These test scenarios exist for covering the various combinations of - * Addressing/RespectBinding annotations in JSR 109. This test case is - * borrowed from the jaxws respectbindingfeature test case which uses JAXWS - * API's to control these same combinations. This test case demonstrates that - * these combinations can now be all annotation driven via JSR 109. - * - * There exist the following 20+ scenarios for Addressing/RespectBinding - * combinations (only 5 test cases are valid): - * - * ------------------- ------------------- --------------------- - * --------------- Client (Addressing) Server (Addressing) - * RespectBindingFeature Expected Result ------------------- - * ------------------- --------------------- --------------- 1). - * Enabled/NotRequired Enabled/NotRequired N/A N/A-not TCK test 2). - * Enabled/Required Enabled/NotRequired N/A N/A-not TCK test 3). NotEnabled - * Enabled/NotRequired N/A N/A-not TCK test 4a) Enabled/NotRequired - * Enabled/Required S-Enabled/C-Enabled Expect No Error 4b) - * Enabled/NotRequired Enabled/Required S-Enabled/C-Disabled N/A-not TCK test - * 4c) Enabled/NotRequired Enabled/Required S-Disabled/C-Enabled N/A-not TCK - * test 4d) Enabled/NotRequired Enabled/Required S-Disabled/C-Disabled N/A-not - * TCK test 5a) Enabled/Required Enabled/Required S-Enabled/C-Enabled Expect - * No Error 5b) Enabled/Required Enabled/Required S-Enabled/C-Disabled N/A-not - * TCK test 5c) Enabled/Required Enabled/Required S-Disabled/C-Enabled N/A-not - * TCK test 5d) Enabled/Required Enabled/Required S-Disabled/C-Disabled - * N/A-not TCK test 6a) NotEnabled Enabled/Required S-Enabled/C-Enabled Expect - * Exception 6b) NotEnabled Enabled/Required S-Enabled/C-Disabled N/A-not TCK - * test 6c) NotEnabled Enabled/Required S-Disabled/C-Enabled N/A-not TCK test - * 6d) NotEnabled Enabled/Required S-Disabled/C-Disabled N/A-not TCK test 7a) - * Enabled/NotRequired NotEnabled S-Enabled/C-Enabled Expect No Error 7b) - * Enabled/NotRequired NotEnabled S-Enabled/C-Disabled N/A-not TCK test 7c) - * Enabled/NotRequired NotEnabled S-Disabled/C-Enabled N/A-not TCK test 7d) - * Enabled/NotRequired NotEnabled S-Disabled/C-Disabled N/A-not TCK test 8a) - * Enabled/Required NotEnabled S-Enabled/C-Enabled Expect Exception 8b) - * Enabled/Required NotEnabled S-Enabled/C-Disabled N/A-not TCK test 8c) - * Enabled/Required NotEnabled S-Disabled/C-Enabled N/A-not TCK test 8d) - * Enabled/Required NotEnabled S-Disabled/C-Disabled N/A-not TCK test - * - * From the last column you can see that the only valid test cases are: - * 4a,5a,6a,7a,8a. According to the JAXWS Javadoc API the behavior of - * RespectBinding(enabled=false) is implementation specific, so we cannot test - * for any combo where RespectBinding is not enabled. - * - * test scenarios 4a, 5a, 6a use Echo port test scenarios 7a, 8a use Echo2 - * port - * - * where Echo port is configured via- WSDL: // Addressing - * enabled/required in WSDL - * EchoImpl.java: @BindingType(value=SOAPBinding.SOAP11HTTP_BINDING) @RespectBinding(enabled=true) - * // Impl enables RespectBinding - * - * where Echo2 port is configured via- WSDL: // Addressing - * enabled/required in WSDL Echo2Impl.java: @Addressing(enabled=false) // Impl - * turns off Addressing @RespectBinding(enabled=true) // Impl enables - * RespectBinding - * - *************************************************************************************************/ - - // Port variables used by test - Echo port4a = null; - - Echo port5a = null; - - Echo port6a = null; - - Echo2 port7a = null; - - Echo2 port8a = null; - - @EJB(name = "ejb/WSRespBindAndAddressingTestUsingDDsClntBean") - static EjbClientIF ejbclient; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.setup_props: webServerHost; webServerPort; - */ - public void setup(String[] args, Properties p) throws Fault { - props = p; - boolean pass = true; - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - InitialContext ctx = new InitialContext(); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport4a"); - port4a = (Echo) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport4a"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport5a"); - port5a = (Echo) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport5a"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport6a"); - port6a = (Echo) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport6a"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport7a"); - port7a = (Echo2) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport7a"); - TestUtil.logMsg( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport8a"); - port8a = (Echo2) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport8a"); - - } catch (Exception e) { - throw new Fault("setup failed:", e); - } - - TestUtil.logMsg("Appclient DEBUG: ejbclient=" + ejbclient); - TestUtil.logMsg("Appclient DEBUG: port4a=" + port4a); - TestUtil.logMsg("Appclient DEBUG: port5a=" + port5a); - TestUtil.logMsg("Appclient DEBUG: port6a=" + port6a); - TestUtil.logMsg("Appclient DEBUG: port7a=" + port7a); - TestUtil.logMsg("Appclient DEBUG: port8a=" + port8a); - - if (port4a == null || port5a == null || port6a == null || port7a == null - || port8a == null || ejbclient == null) { - throw new Fault("setup failed: injection or JNDI lookup failure"); - } - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - ejbclient.init(p); - TestUtil.logMsg("setup ok"); - } - - public void cleanup() throws Fault { - TestUtil.logMsg("cleanup ok"); - } - - /* - * @testName: afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; WS4EE:SPEC:4020; - * WS4EE:SPEC:4021; - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client - * Enabled/Required, Server Enabled/Required; RespectBinding Server Enabled, - * Client Enabled. Addressing headers MUST be present on SOAPRequest and - * SOAPResponse. - */ - public void afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest() - throws Fault { - boolean pass = true; - - TestUtil.logMsg("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg("Addressing headers MUST be present on the SOAPRequest"); - TestUtil - .logMsg("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - port5a.echo("Echo from AppClient on port5a", testName); - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - } else - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"; - pass = ejbclient.echo("Echo from EjbClient on port5a", testName); - if (!pass) - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - else - TestUtil.logMsg("Addressing Headers Exist (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Addressing Headers DO NOT Exist (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault( - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest failed"); - } - - /* - * @testName: afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; WS4EE:SPEC:4020; - * WS4EE:SPEC:4021; - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client NotEnabled, - * Server Enabled/Required; RespectBinding Server Enabled, Client Enabled. - * This scenario MUST throw back a SOAP Fault. Make sure the SOAP Fault has - * the correct information in it. The SOAP Fault faultcode must be: - * MessageAddressingHeaderRequired. - */ - public void afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest() - throws Fault { - boolean pass = true; - - TestUtil.logMsg("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg("Expect a SOAPFaultException to be thrown back"); - TestUtil - .logMsg("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - port6a.echo("Echo from AppClient on port6a", testName); - TestUtil.logErr("SOAPFaultException was not thrown back"); - pass = false; - } catch (SOAPFaultException sfe) { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - try { - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest (Unexpected)"); - } else - TestUtil.logMsg( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest"; - pass = ejbclient.echo("Echo from EjbClient on port6a", testName); - if (!pass) - TestUtil.logErr( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest (Unexpected)"); - else - TestUtil.logMsg( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - pass = false; - } - if (!pass) - throw new Fault( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest failed"); - } - - /* - * @testName: afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; WS4EE:SPEC:4020; - * WS4EE:SPEC:4021; - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client - * Enabled/NotRequired, Server NotEnabled; RespectBinding Server Enabled, - * Client Enabled. Addressing headers MAY be present on SOAPRequest but MUST - * NOT be present on SOAPResponse. - */ - public void afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() - throws Fault { - boolean pass = true; - - TestUtil - .logMsg("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest but MUST NOT be present on SOAPResponse"); - TestUtil - .logMsg("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - port7a.echo("Echo from AppClient on port7a", testName); - TestUtil - .logMsg("Addressing Headers DO NOT EXIST in SOAPResponse (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - TestUtil.logErr("Addressing Headers EXIST in SOAPResponse (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil - .logErr("Addressing Headers EXIST in SOAPResponse (Unexpected)"); - } else - TestUtil.logMsg( - "Addressing Headers DO NOT EXIST in SOAPResponse (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - TestUtil.logErr("Addressing Headers EXIST in SOAPResponse (Unexpected)"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"; - boolean passEjb = ejbclient.echo("Echo from EjbClient on port7a", - testName); - if (!passEjb) { - pass = false; - TestUtil - .logErr("Addressing Headers EXIST in SOAPResponse (Unexpected)"); - } else - TestUtil.logMsg( - "Addressing Headers DO NOT EXIST in SOAPResponse (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Exception: " + e); - TestUtil.logErr("Addressing Headers EXIST in SOAPResponse (Unexpected)"); - pass = false; - } - if (!pass) - throw new Fault( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest failed"); - } - - /* - * @testName: afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest - * - * @assertion_ids: WS4EE:SPEC:3002; WS4EE:SPEC:3003; WS4EE:SPEC:3005; - * WS4EE:SPEC:4000; WS4EE:SPEC:4002; WS4EE:SPEC:4015; WS4EE:SPEC:4020; - * WS4EE:SPEC:4021; - * - * @test_Strategy: Test RespectBinding Feature. Addressing Client - * Enabled/Required, Server NotEnabled; RespectBinding Server Enabled, Client - * Enabled. This scenario MUST throw back a WebServiceException. - */ - public void afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() - throws Fault { - boolean pass = true; - - TestUtil.logMsg("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService echo() method"); - TestUtil.logMsg("Expect a WebServiceException to be thrown back"); - TestUtil - .logMsg("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - port8a.echo("Echo from AppClient on port8a", testName); - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest (Unexpected)"); - } else - TestUtil.logMsg( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - String testName = "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"; - pass = ejbclient.echo("Echo from EjbClient on port8a", testName); - if (!pass) - TestUtil.logErr( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest (Unexpected)"); - else - TestUtil.logMsg( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest (Expected)"); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - pass = false; - } - if (!pass) - throw new Fault( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest failed"); - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/ClientSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/ClientSOAPHandler.java deleted file mode 100644 index 32003f4e45..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/ClientSOAPHandler.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ClientSOAPHandler.java 52501 2009-04-15 02:29:49Z adf $ - */ -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsi.constants.SOAPConstants; -import com.sun.ts.tests.jaxws.wsa.common.MapRequiredException; -import com.sun.ts.tests.jaxws.wsa.common.MapException; -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.handler.MessageContext; -import jakarta.xml.soap.SOAPMessage; -import jakarta.xml.soap.SOAPBody; -import jakarta.xml.soap.SOAPException; -import java.util.Iterator; -import jakarta.xml.ws.handler.soap.SOAPHandler; -import jakarta.xml.soap.SOAPHeader; -import jakarta.xml.soap.SOAPElement; -import jakarta.xml.soap.Text; - -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; - -public class ClientSOAPHandler extends WsaBaseSOAPHandler { - - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ClientSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - checkAddressingHeadersExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) { - checkAddressingHeadersDoNotExist(context, action); - } - } - - private void verifyAction(String action) { - if (!action.equals(TestConstants.ECHO_OUTPUT_ACTION)) { - throw new ActionNotSupportedException("Expected:" - + TestConstants.ECHO_OUTPUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - verifyAction(action); - checkInboundToExist(context); - checkInboundRelatesToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundRelatesToDoesNotExist(context); - } - - private void handleMessageInboundCheckAddressingHeadersDoNotExist( - SOAPMessageContext context) { - String headerValue = null; - String whichHeaders = null; - try { - headerValue = getTo(context); - whichHeaders = whichHeaders + "wsa:To, "; - } catch (Exception e) { - } - try { - headerValue = getReplyTo(context); - whichHeaders = whichHeaders + "wsa:ReplyTo, "; - } catch (Exception e) { - } - try { - headerValue = getMessageId(context); - whichHeaders = whichHeaders + "wsa:MessageId, "; - } catch (Exception e) { - } - try { - headerValue = getRelationship(context); - whichHeaders = whichHeaders + "wsa:Relationship, "; - } catch (Exception e) { - } - try { - headerValue = getAction(context); - whichHeaders = whichHeaders + "wsa:Action"; - } catch (Exception e) { - } - if (whichHeaders != null) { - throw new AddressingPropertyException( - "ERROR: The following addressing headers exist in soap message: [" - + whichHeaders + "]"); - } - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ClientSOAPHandler.getAction(): testName=" + testName); - if (testName == null) - return super.getAction(context); - else if (testName - .equals("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) - return super.getAction(context); - else if (testName - .equals("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) - return super.getActionDoesNotExist(context); - else - return null; - } - - protected String whichHandler() { - return "ClientSOAPHandler"; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/Echo2Impl.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/Echo2Impl.java deleted file mode 100644 index fb1cf7c172..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/Echo2Impl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.RespectBinding; - -@WebService(portName = "Echo2Port", serviceName = "EchoService", targetNamespace = "http://Echo.org", wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2") - -// Impl overrides WSDL to turn addressing off -@Addressing(enabled = false) -@RespectBinding(enabled = true) - -public class Echo2Impl { - - public String echo(String string, Holder testName) { - return string; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/EchoImpl.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/EchoImpl.java deleted file mode 100644 index afa862f835..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/EchoImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs; - -import jakarta.jws.WebService; -import jakarta.xml.ws.soap.Addressing; -import jakarta.xml.ws.Holder; -import jakarta.xml.ws.RespectBinding; - -@WebService(portName = "EchoPort", serviceName = "EchoService", targetNamespace = "http://Echo.org", wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl", endpointInterface = "com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo") - -@RespectBinding(enabled = true) - -public class EchoImpl { - - public String echo(String string, Holder testName) { - return string; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/EchoService.wsdl b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/EchoService.wsdl deleted file mode 100644 index 06f745f2fb..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/EchoService.wsdl +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/EjbClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/EjbClient.java deleted file mode 100644 index afbc67df4e..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/EjbClient.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.ejb.EJBException; -import jakarta.ejb.Remote; -import jakarta.ejb.Stateless; -import jakarta.ejb.SessionContext; -import jakarta.annotation.Resource; -import jakarta.annotation.PostConstruct; -import javax.naming.InitialContext; - -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -@Stateless(name = "WSRespBindAndAddressingTestUsingDDsClntBean") -@Remote({ EjbClientIF.class }) -public class EjbClient implements EjbClientIF { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - // Port variables used by test - Echo port4a = null; - - Echo port5a = null; - - Echo port6a = null; - - Echo2 port7a = null; - - Echo2 port8a = null; - - @PostConstruct - public void postConstruct() { - try { - System.out.println("EjbClient:postConstruct()"); - - InitialContext ctx = new InitialContext(); - System.out.println( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport4a"); - port4a = (Echo) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport4a"); - System.out.println( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport5a"); - port5a = (Echo) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport5a"); - System.out.println( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport6a"); - port6a = (Echo) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport6a"); - System.out.println( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport7a"); - port7a = (Echo2) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport7a"); - System.out.println( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport8a"); - port8a = (Echo2) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport8a"); - - } catch (Exception e) { - System.err.println("EjbClient:postConstruct() Exception: " + e); - e.printStackTrace(); - } - - System.out.println("Ejbclient DEBUG: port4a=" + port4a); - System.out.println("Ejbclient DEBUG: port5a=" + port5a); - System.out.println("Ejbclient DEBUG: port6a=" + port6a); - System.out.println("Ejbclient DEBUG: port7a=" + port7a); - System.out.println("Ejbclient DEBUG: port8a=" + port8a); - - if (port4a == null || port5a == null || port6a == null || port7a == null - || port8a == null) { - throw new EJBException( - "postConstruct failed: injection or JNDI lookup failure"); - } - } - - public void init(Properties p) { - harnessProps = p; - try { - TestUtil.init(p); - } catch (RemoteLoggingInitException e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } - } - - public boolean echo(String string, String testName) { - if (testName - .equals("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) - return afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest(); - else if (testName - .equals("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest")) - return afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest(); - else if (testName - .equals("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) - return afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest(); - else if (testName - .equals("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) - return afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest(); - else - return false; - } - - private boolean afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST be present on the SOAPRequest and SOAPResponse"); - TestUtil - .logMsg("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - port5a.echo("Echo from EjbClient on port5a", testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest() { - boolean pass = true; - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg("This scenario MUST throw back a SOAPFault"); - TestUtil - .logMsg("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest()"); - Holder testName = new Holder( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest()"); - port6a.echo("Echo from EjbClient on port6a", testName); - TestUtil.logErr("SOAPFaultException was not thrown back"); - pass = false; - } catch (SOAPFaultException sfe) { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - try { - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() { - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest but MUST NOT be present on SOAPResponse"); - TestUtil - .logMsg("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - port7a.echo("Echo from EjbClient on port7a", testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() { - boolean pass = true; - try { - TestUtil.logMsg("EjbClient invoking EchoService echo() method"); - TestUtil.logMsg("This scenario MUST throw back a WebServiceException"); - TestUtil - .logMsg("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest()"); - Holder testName = new Holder( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest()"); - port8a.echo("Echo from EjbClient on port8a", testName); - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/EjbClientIF.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/EjbClientIF.java deleted file mode 100644 index 824d1c99a1..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/EjbClientIF.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs; - -public interface EjbClientIF { - - public void init(java.util.Properties p); - - public boolean echo(String string, String testName); -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/ServerSOAPHandler.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/ServerSOAPHandler.java deleted file mode 100644 index cd74365291..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/ServerSOAPHandler.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServerSOAPHandler.java 52501 2009-04-15 02:29:49Z adf $ - */ -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jaxws.common.*; - -import com.sun.ts.tests.jaxws.wsa.common.WsaBaseSOAPHandler; -import com.sun.ts.tests.jaxws.wsa.common.ActionNotSupportedException; -import com.sun.ts.tests.jaxws.wsa.common.AddressingPropertyException; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.MapException; -import com.sun.ts.tests.jaxws.wsa.common.MapRequiredException; -import jakarta.xml.ws.handler.soap.SOAPMessageContext; -import jakarta.xml.ws.WebServiceException; -import jakarta.xml.ws.wsaddressing.W3CEndpointReference; -import jakarta.xml.soap.SOAPException; - -public class ServerSOAPHandler extends WsaBaseSOAPHandler { - protected void checkInboundAction(SOAPMessageContext context, String oper, - String action) { - TestUtil.logMsg("ServerSOAPHandler.checkInboundAction: [operation=" + oper - + ", input action=" + action + "]"); - System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" - + oper + ", input action=" + action + "]"); - if (Handler_Util.checkForMsg(context, - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - checkAddressingHeadersExist(context, action); - } else if (Handler_Util.checkForMsg(context, - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) { - // checkAddressingHeadersExist(context, action); Don't check wsa headers - // for addressing optional - } - } - - private void verifyAction(String action) { - if (!action.equals(TestConstants.ECHO_INPUT_ACTION)) { - throw new ActionNotSupportedException( - "Expected:" + TestConstants.ECHO_INPUT_ACTION + ", Actual:" + action); - } - } - - private void checkAddressingHeadersExist(SOAPMessageContext context, - String action) { - verifyAction(action); - checkInboundToExist(context); - checkInboundMessageIdExist(context); - checkInboundReplyToExist(context); - } - - private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, - String action) { - checkActionDoesNotExist(action); - checkInboundToDoesNotExist(context); - checkInboundMessageIdDoesNotExist(context); - checkInboundReplyToDoesNotExist(context); - } - - protected String getAction(SOAPMessageContext context) throws SOAPException { - String testName = (String) context.get("test.name"); - TestUtil.logMsg("ServerSOAPHandler.getAction(): testName=" + testName); - System.out.println("ServerSOAPHandler.getAction(): testName=" + testName); - if (testName == null) - return super.getAction(context); - else if (testName - .equals("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest") - || testName.equals( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) - return super.getAction(context); - else - return null; - } - - protected String whichHandler() { - return "ServerSOAPHandler"; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/ServletClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/ServletClient.java deleted file mode 100644 index 464a665a41..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/ServletClient.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServletClient.java 52684 2009-04-15 04:30:10Z adf $ - */ - -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; -import com.sun.ts.tests.jaxws.wsa.common.W3CAddressingConstants; -import com.sun.ts.tests.jaxws.wsa.common.WsaSOAPUtils; - -import java.io.*; -import java.sql.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.naming.InitialContext; - -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - // Port variables used by test - Echo port4a = null; - - Echo port5a = null; - - Echo port6a = null; - - Echo2 port7a = null; - - Echo2 port8a = null; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - try { - System.out.println("DEBUG ServletClient:init()"); - - InitialContext ctx = new InitialContext(); - System.out.println( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport4a"); - port4a = (Echo) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport4a"); - System.out.println( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport5a"); - port5a = (Echo) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport5a"); - System.out.println( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport6a"); - port6a = (Echo) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport6a"); - System.out.println( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport7a"); - port7a = (Echo2) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport7a"); - System.out.println( - "JNDI lookup java:comp/env/service/wsrespbindandaddrtestusingddsport8a"); - port8a = (Echo2) ctx - .lookup("java:comp/env/service/wsrespbindandaddrtestusingddsport8a"); - - } catch (Exception e) { - System.err.println("ServletClient:init() Exception: " + e); - e.printStackTrace(); - } - - System.out.println("ServletClient DEBUG: port4a=" + port4a); - System.out.println("ServletClient DEBUG: port5a=" + port5a); - System.out.println("ServletClient DEBUG: port6a=" + port6a); - System.out.println("ServletClient DEBUG: port7a=" + port7a); - System.out.println("ServletClient DEBUG: port8a=" + port8a); - - if (port4a == null || port5a == null || port6a == null || port7a == null - || port8a == null) { - throw new ServletException( - "init() failed: port injection or JNDI lookup failed"); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - try { - String test = harnessProps.getProperty("TEST"); - System.out.println("doGet: test to execute is: " + test); - if (test - .equals("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - if (afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test - .equals("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest")) { - if (afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test.equals( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) { - if (afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } else if (test - .equals("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest")) { - if (afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } - p.list(out); - } catch (Exception e) { - TestUtil.logErr("doGet: Exception: " + e); - e.printStackTrace(out); - System.out.println("doGet: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - if (debug) { - System.out.println("Remote logging intialized for Servlet"); - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - System.out.println("doPost: Exception: " + e); - e.printStackTrace(); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } - - private boolean afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MUST be present on the SOAPRequest and SOAPResponse"); - TestUtil - .logMsg("afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledREQSvrEnabledREQrbfSvrEnabledCltEnabledTest"); - port5a.echo("Echo from ServletClient on port5a", testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest() { - boolean pass = true; - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg("This scenario MUST throw back a SOAPFault"); - TestUtil - .logMsg("afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest()"); - Holder testName = new Holder( - "afCltNotEnabledSvrEnabledREQrbfSvrEnabledCltEnabledTest()"); - port6a.echo("Echo from ServletClient on port6a", testName); - TestUtil.logErr("SOAPFaultException was not thrown back"); - pass = false; - } catch (SOAPFaultException sfe) { - TestUtil - .logMsg("Caught expected SOAPFaultException: " + sfe.getMessage()); - try { - TestUtil.logMsg("FaultCode=" + WsaSOAPUtils.getFaultCode(sfe)); - TestUtil.logMsg("FaultString=" + WsaSOAPUtils.getFaultString(sfe)); - if (WsaSOAPUtils.isMessageAddressingHeaderRequiredFaultCode(sfe)) { - TestUtil.logMsg( - "SOAPFault contains expected faultcode MessageAddressingHeaderRequired"); - } else { - String faultcode = WsaSOAPUtils.getFaultCode(sfe); - TestUtil.logErr("SOAPFault contains unexpected faultcode got: " - + faultcode + ", expected: MessageAddressingHeaderRequired"); - pass = false; - } - if (WsaSOAPUtils.getFaultString(sfe) == null) { - TestUtil - .logErr("The faultstring element MUST EXIST for SOAP 1.1 Faults"); - pass = false; - } - if (WsaSOAPUtils.getFaultDetail(sfe) != null) { - TestUtil.logErr("The faultdetail element MUST NOT EXIST for SOAP 1.1 " - + "Faults related to header entries"); - pass = false; - } - } catch (Exception e2) { - TestUtil.logErr("Caught unexpected exception: " + e2.getMessage()); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Caught Exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - - private boolean afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() { - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg( - "Addressing headers MAY be present on the SOAPRequest but MUST NOT be present on SOAPResponse"); - TestUtil - .logMsg("afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - Holder testName = new Holder( - "afCltEnabledNotREQSvrNotEnabledrbfSvrEnabledCltEnabledTest"); - port7a.echo("Echo from ServletClient on port7a", testName); - return true; - } catch (Exception e) { - return false; - } - } - - private boolean afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest() { - boolean pass = true; - try { - TestUtil.logMsg("ServletClient invoking EchoService echo() method"); - TestUtil.logMsg("This scenario MUST throw back a WebServiceException"); - TestUtil - .logMsg("afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest()"); - Holder testName = new Holder( - "afCltEnabledREQSvrNotEnabledrbfSvrEnabledCltEnabledTest()"); - port8a.echo("Echo from ServletClient on port8a", testName); - TestUtil.logErr("WebServiceException was not thrown back"); - pass = false; - } catch (WebServiceException e) { - TestUtil.logMsg("Caught expected WebServiceException: " + e.getMessage()); - } catch (Exception e) { - TestUtil.logErr("Caught unexpected exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/TestConstants.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/TestConstants.java deleted file mode 100644 index 42ad4122ef..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/TestConstants.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestConstants.java 52501 2009-04-15 02:29:49Z adf $ - */ -package com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs; - -public class TestConstants { - public static final String ECHO_INPUT_ACTION = "EchoInputAction"; - - public static final String ECHO_OUTPUT_ACTION = "EchoOutputAction"; -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_client.jar.sun-application-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_client.jar.sun-application-client.xml deleted file mode 100644 index e0e48b8bc0..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - service/wsrespbindandaddrtestusingddsport4a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingddsport5a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingddsport6a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingddsport7a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo2?WSDL - - - - service/wsrespbindandaddrtestusingddsport8a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo2?WSDL - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_client.xml deleted file mode 100644 index ba38cd25fe..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_client.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - AppClient - WSRespBindAndAddressingTestUsingDDsClnt_client - - service/wsrespbindandaddrtestusingddsport4a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - true - false - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsrespbindandaddrtestusingddsport5a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - true - true - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsrespbindandaddrtestusingddsport6a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - false - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsrespbindandaddrtestusingddsport7a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - true - false - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsrespbindandaddrtestusingddsport8a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - true - true - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_ejb.jar.sun-ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index 1e2f199fa5..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - 0 - - WSRespBindAndAddressingTestUsingDDsClntBean - WSRespBindAndAddressingTestUsingDDsClntBean - - - service/wsrespbindandaddrtestusingddsport4a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingddsport5a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingddsport6a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingddsport7a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo2?WSDL - - - - service/wsrespbindandaddrtestusingddsport8a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo2?WSDL - - - false - false - -1 - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_ejb.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_ejb.xml deleted file mode 100644 index 799b487072..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_ejb.xml +++ /dev/null @@ -1,179 +0,0 @@ - - - - - EjbClient - - - WSRespBindAndAddressingTestUsingDDsClntBean - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EjbClient - Stateless - Container - - service/wsrespbindandaddrtestusingddsport4a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - true - false - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsrespbindandaddrtestusingddsport5a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - true - true - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsrespbindandaddrtestusingddsport6a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - false - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsrespbindandaddrtestusingddsport7a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - true - false - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsrespbindandaddrtestusingddsport8a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - true - true - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - - - - - - - WSRespBindAndAddressingTestUsingDDsClntBean - Remote - echo - - Supports - - - - WSRespBindAndAddressingTestUsingDDsClntBean - Remote - init - - Supports - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_web.war.sun-web.xml deleted file mode 100644 index f09287fe44..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_web.war.sun-web.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - service/wsrespbindandaddrtestusingddsport4a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingddsport5a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingddsport6a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - http://Echo.org - EchoPort - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo?WSDL - - - - service/wsrespbindandaddrtestusingddsport7a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo2?WSDL - - - - service/wsrespbindandaddrtestusingddsport8a - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - http://Echo.org - Echo2Port - - - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo2?WSDL - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_web.xml deleted file mode 100644 index 0fb0282c68..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDsClnt_web.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - ServletClient - - ServletClient - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ServletClient - - - ServletClient - /ServletTest - - - 54 - - - - service/wsrespbindandaddrtestusingddsport4a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - true - false - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsrespbindandaddrtestusingddsport5a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - true - true - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsrespbindandaddrtestusingddsport6a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - false - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsrespbindandaddrtestusingddsport7a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - true - false - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - - - service/wsrespbindandaddrtestusingddsport8a - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoService - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - true - true - - - true - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDs_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDs_web.war.sun-web.xml deleted file mode 100644 index 8a9217ae8b..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDs_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - EchoService - http://webServerHost.1:webServerPort.1/WSRespBindAndAddressingTestUsingDDs_web/jaxws/Echo?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDs_web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDs_web.xml deleted file mode 100644 index 761fd311b4..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/WSRespBindAndAddressingTestUsingDDs_web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - WSRespBindAndAddressingTestUsingDDs - - EchoImpl - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.EchoImpl - 0 - - - Echo2Impl - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2Impl - 0 - - - EchoImpl - /jaxws/Echo - - - Echo2Impl - /jaxws/Echo2 - - - 54 - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/application.xml.clientear b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/application.xml.clientear deleted file mode 100644 index 60c53af265..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/application.xml.clientear +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Application description - WSRespBindAndAddressingTestUsingDDsClnt - - WSRespBindAndAddressingTestUsingDDsClnt_client.jar - - - - WSRespBindAndAddressingTestUsingDDsClnt_web.war - WSRespBindAndAddressingTestUsingDDsClnt_web - - - - WSRespBindAndAddressingTestUsingDDsClnt_ejb.jar - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/build.xml deleted file mode 100644 index 34807bbbe7..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/build.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/custom-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/custom-client.xml deleted file mode 100644 index e6fc4b2ec4..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/custom-client.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - ClientSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ClientSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/custom-server.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/custom-server.xml deleted file mode 100644 index e7540323b4..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/custom-server.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - ServerSOAPHandler - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.ServerSOAPHandler - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/webservices.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/webservices.xml deleted file mode 100644 index 23720ead98..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSRespBindAndAddressingTestUsingDDs/webservices.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - EchoService - WEB-INF/wsdl/EchoService.wsdl - - EchoImpl - wsdl:EchoPort - - true - true - - - true - - ##SOAP11_HTTP - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo - - EchoImpl - - - - Echo2Impl - wsdl:Echo2Port - - false - false - - - true - - ##SOAP11_HTTP - com.sun.ts.tests.webservices13.servlet.WSRespBindAndAddressingTestUsingDDs.Echo2 - - Echo2Impl - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/build.xml deleted file mode 100644 index 38404d9ef2..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/Client.java deleted file mode 100644 index d57f20701a..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/Client.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 53493 2009-05-22 17:06:35Z adf $ - */ - -package com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookup.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.rmi.*; - -import jakarta.ejb.EJB; -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; - -import java.util.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import javax.naming.InitialContext; - -public class Client extends EETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private static final String PKG_NAME = "com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookup.client."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wswsreflookup.endpoint.1"; - - private static final String WSDLLOC_URL = "wswsreflookup.wsdlloc.1"; - - private String urlString = null; - - private URL wsdlurl = null; - - // ServiceName and PortName mapping configuration going java-to-wsdl - private static final String SERVICE_NAME = "EchoService"; - - private static final String PORT_NAME = "EchoPort"; - - private static final String NAMESPACEURI = "http://echo.org/wsdl"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - // URL properties used by the test - private URL url = null; - - private URLConnection urlConn = null; - - private Properties props = null; - - private String SERVLET = "/WSWSRefLookupClnt2_web/ServletTest"; - - @WebServiceRef(name = "service/wswsreflookupservice") - static EchoService service = null; - - Echo port = null; - - @WebServiceRef(lookup = "java:comp/env/service/wswsreflookupservice") - static EchoService service2 = null; - - Echo port2 = null; - - @EJB(name = "ejb/WSWebServiceRefLookupClntBean") - static EjbClientIF ejbclient; - - private void getPort() throws Exception { - getTestURLs(); - TestUtil.logMsg("AppClient DEBUG: service=" + service); - port = (Echo) service.getPort(Echo.class); - TestUtil.logMsg("AppClient DEBUG: Obtained port"); - TestUtil.logMsg("AppClient DEBUG: port=" + port); - getTargetEndpointAddress(port); - TestUtil.logMsg("AppClient DEBUG: service2=" + service2); - TestUtil.logMsg("AppClient DEBUG: Obtained port"); - port2 = (Echo) service2.getPort(Echo.class); - TestUtil.logMsg("AppClient DEBUG: port2=" + port2); - JAXWS_Util.setTargetEndpointAddress(port2, urlString); - getTargetEndpointAddress(port2); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + urlString); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String urlString = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + urlString); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - props = p; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - getPort(); - - TestUtil.logMsg("AppClient DEBUG: ejbclient=" + ejbclient); - TestUtil.logMsg("AppClient DEBUG: service=" + service); - TestUtil.logMsg("AppClient DEBUG: port=" + port); - TestUtil.logMsg("AppClient DEBUG: service2=" + service2); - TestUtil.logMsg("AppClient DEBUG: port2=" + port2); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (service == null || service2 == null || port == null || port2 == null) { - throw new Fault("setup failed: injection failure"); - } - - TestUtil.logMsg("setup() Endpoint urlString=" + urlString); - p.setProperty("ENDPOINTURL", urlString); - ejbclient.init(p); - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: testwsreflookup - * - * @assertion_ids: WS4EE:SPEC:4022; - * - * @test_Strategy: Test @WebServiceRef(lookup) method - * - * Description - */ - public void testwsreflookup() throws Fault { - TestUtil.logMsg("testwsreflookup"); - boolean pass = true; - - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService stringTest() method"); - if (!stringTest()) { - pass = false; - TestUtil.logErr("Failed in appclient"); - } else - TestUtil.logMsg("Passed in appclient"); - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "testwsreflookup"); - TestUtil.logMsg("Endpoint urlString=" + urlString); - props.setProperty("ENDPOINTURL", urlString); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Failed in servletclient"); - } else - TestUtil.logMsg("Passed in servletclient"); - } catch (Exception e) { - // e.printStackTrace(); - TestUtil.logErr("Failed on servletclient invocation"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - boolean passEjb = ejbclient.testwsreflookup(); - if (!passEjb) { - pass = false; - TestUtil.logErr("Failed in ejbclient"); - } else { - TestUtil.logMsg("Passed in ejbclient"); - } - } catch (Exception e) { - // TestUtil.printStackTrace(e); - TestUtil.logErr("Failed on ejbclient invocation"); - pass = false; - } - - if (!pass) - throw new Fault("testwsreflookup failed"); - } - - public boolean stringTest() throws Fault { - TestUtil.logMsg("stringTest"); - boolean pass = true; - String request = "Mary"; - - try { - String response = port2.echoString(request); - if (!JAXWS_Data.compareValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("stringTest failed", e); - } - return pass; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/EjbClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/EjbClient.java deleted file mode 100644 index 30388a90c0..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/EjbClient.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookup.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.ejb.EJBException; -import jakarta.ejb.Remote; -import jakarta.ejb.Stateful; -import jakarta.ejb.SessionContext; -import jakarta.annotation.Resource; -import jakarta.annotation.PostConstruct; - -import com.sun.ts.tests.jaxws.common.*; - -@Stateful(name = "WSWebServiceRefLookupClntBean") -@Remote({ EjbClientIF.class }) -public class EjbClient implements EjbClientIF { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - private String urlString; - - @WebServiceRef(name = "service/wswsreflookupservice") - EchoService service = null; - - Echo port = null; - - @WebServiceRef(lookup = "java:comp/env/service/wswsreflookupservice") - EchoService service2 = null; - - Echo port2 = null; - - private void getPort() throws Exception { - TestUtil.logMsg("EjbClient DEBUG: service=" + service); - port = (Echo) service.getPort(Echo.class); - TestUtil.logMsg("EjbClient DEBUG: Obtained port"); - TestUtil.logMsg("EjbClient DEBUG: port=" + port); - getTargetEndpointAddress(port); - TestUtil.logMsg("EjbClient DEBUG: service2=" + service2); - TestUtil.logMsg("EjbClient DEBUG: Obtained port"); - port2 = (Echo) service2.getPort(Echo.class); - TestUtil.logMsg("EjbClient DEBUG: port2=" + port2); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String urlString = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + urlString); - } - - @PostConstruct - public void postConstruct() { - try { - getPort(); - } catch (Exception e) { - } - System.out.println("DEBUG postConstruct()"); - System.out.println("EjbClient DEBUG: service=" + service); - System.out.println("EjbClient DEBUG: port=" + port); - System.out.println("EjbClient DEBUG: service2=" + service2); - System.out.println("EjbClient DEBUG: port2=" + port2); - if (service == null || service2 == null || port == null || port2 == null) { - throw new EJBException("postConstruct failed: injection failure"); - } - } - - public void init(Properties p) { - harnessProps = p; - try { - TestUtil.init(p); - urlString = harnessProps.getProperty("ENDPOINTURL"); - JAXWS_Util.setTargetEndpointAddress(port2, urlString); - getTargetEndpointAddress(port2); - } catch (RemoteLoggingInitException e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } - } - - public boolean testwsreflookup() { - TestUtil.logMsg("testwsreflookup"); - boolean pass = true; - return stringTest(); - } - - private boolean stringTest() { - TestUtil.logMsg("stringTest"); - boolean pass = true; - String request = "Mary"; - - try { - String response = port2.echoString(request); - if (!JAXWS_Data.compareValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/EjbClientIF.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/EjbClientIF.java deleted file mode 100644 index 4b3e53ff4f..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/EjbClientIF.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookup.client; - -public interface EjbClientIF { - - public void init(java.util.Properties p); - - public boolean testwsreflookup(); -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/ServletClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/ServletClient.java deleted file mode 100644 index a44e284a66..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/ServletClient.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServletClient.java 52684 2009-04-15 04:30:10Z adf $ - */ - -package com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookup.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; - -import java.io.*; -import java.sql.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import jakarta.servlet.annotation.WebServlet; -import java.util.*; -import java.net.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; - -@WebServlet("/ServletTest") -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - private String urlString; - - @WebServiceRef(name = "service/wswsreflookupservice") - transient EchoService service = null; - - Echo port = null; - - @WebServiceRef(lookup = "java:comp/env/service/wswsreflookupservice") - transient EchoService service2 = null; - - Echo port2 = null; - - private void getPort() throws Exception { - TestUtil.logMsg("ServletClient DEBUG: service=" + service); - port = (Echo) service.getPort(Echo.class); - TestUtil.logMsg("ServletClient DEBUG: Obtained port"); - TestUtil.logMsg("ServletClient DEBUG: port=" + port); - getTargetEndpointAddress(port); - TestUtil.logMsg("ServletClient DEBUG: service2=" + service2); - TestUtil.logMsg("ServletClient DEBUG: Obtained port"); - port2 = (Echo) service2.getPort(Echo.class); - TestUtil.logMsg("ServletClient DEBUG: port2=" + port2); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String urlString = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + urlString); - } - - public void init(ServletConfig config) throws ServletException { - super.init(config); - try { - getPort(); - } catch (Exception e) { - } - System.out.println("DEBUG ServletClient:init()"); - System.out.println("ServletClient DEBUG: service=" + service); - System.out.println("ServletClient DEBUG: port=" + port); - System.out.println("ServletClient DEBUG: service2=" + service2); - System.out.println("ServletClient DEBUG: port2=" + port2); - if (service == null || service2 == null || port == null || port2 == null) { - throw new ServletException("init() failed: port injection failed"); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - try { - String test = harnessProps.getProperty("TEST"); - urlString = harnessProps.getProperty("ENDPOINTURL"); - JAXWS_Util.setTargetEndpointAddress(port2, urlString); - getTargetEndpointAddress(port2); - System.out.println("doGet: test to execute is: " + test); - if (test.equals("testwsreflookup")) { - if (testwsreflookup()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } - p.list(out); - } catch (Exception e) { - TestUtil.logErr("doGet: Exception: " + e); - e.printStackTrace(out); - System.out.println("doGet: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - if (debug) { - System.out.println("Remote logging intialized for Servlet"); - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - System.out.println("doPost: Exception: " + e); - e.printStackTrace(); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } - - private boolean testwsreflookup() { - TestUtil.logMsg("testwsreflookup"); - boolean pass = true; - return stringTest(); - } - - private boolean stringTest() { - TestUtil.logMsg("stringTest"); - boolean pass = true; - String request = "Mary"; - - try { - String response = port2.echoString(request); - if (!JAXWS_Data.compareValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/application.xml.clientear b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/application.xml.clientear deleted file mode 100644 index fa73f2571a..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/application.xml.clientear +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Application description - WSWSRefLookupClnt - - WSWSRefLookupClnt_client.jar - - - WSWSRefLookupClnt_ejb.jar - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/build.xml deleted file mode 100644 index cc6bad7ba0..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/build.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/customfile.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/customfile.xml deleted file mode 100644 index 6860a0281a..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/customfile.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/customfile2.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/customfile2.xml deleted file mode 100644 index 884bedb9c0..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/jakartaEE.tokens b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/jakartaEE.tokens deleted file mode 100644 index 98866c934d..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/client/jakartaEE.tokens +++ /dev/null @@ -1,3 +0,0 @@ -WSRAnn=@WebServiceRef(name="service/wswsreflookupservice") -SERVICE=com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookup.client.EchoService -URLALIAS=/jaxws/Echo diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/server/EchoImpl.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/server/EchoImpl.java deleted file mode 100644 index 951405bc78..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/server/EchoImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: EchoImpl.java 52492 2007-01-24 00:59:57Z adf $ - */ - -package com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookup.server; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; - -@WebService(name = "Echo", serviceName = "EchoService", targetNamespace = "http://echo.org/wsdl") -public class EchoImpl { - @WebMethod - public String echoString(String str) { - return str; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/server/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/server/build.xml deleted file mode 100644 index b43a89b316..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/server/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/server/jakartaEE.tokens b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/server/jakartaEE.tokens deleted file mode 100644 index 2689d6489d..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/server/jakartaEE.tokens +++ /dev/null @@ -1,4 +0,0 @@ -IMPL=com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookup.server.EchoImpl -URLALIAS=/jaxws/Echo -SERVLETNAME=com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookup.server.EchoImpl -WEBSERVICEDESCRIPTION=EchoService diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/server/jakartaEE.web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/server/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookup/server/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/build.xml deleted file mode 100644 index 248acaa418..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/Client.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/Client.java deleted file mode 100644 index 801374fa82..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/Client.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 53493 2009-05-22 17:06:35Z adf $ - */ - -package com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.harness.*; - -import java.io.*; -import java.net.*; -import java.rmi.*; - -import jakarta.ejb.EJB; -import jakarta.xml.ws.*; -import javax.xml.namespace.QName; - -import java.util.*; - -import com.sun.javatest.Status; - -import com.sun.ts.tests.jaxws.common.*; - -import javax.naming.InitialContext; - -public class Client extends EETest { - // The webserver defaults (overidden by harness properties) - private static final String PROTOCOL = "http"; - - private static final String HOSTNAME = "localhost"; - - private static final int PORTNUM = 8000; - - // The webserver host and port property names (harness properties) - private static final String WEBSERVERHOSTPROP = "webServerHost"; - - private static final String WEBSERVERPORTPROP = "webServerPort"; - - private static final String MODEPROP = "platform.mode"; - - private static final String PKG_NAME = "com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client."; - - private TSURL ctsurl = new TSURL(); - - private String hostname = HOSTNAME; - - private int portnum = PORTNUM; - - // URL properties used by the test - private static final String ENDPOINT_URL = "wswsreflookupdds.endpoint.1"; - - private static final String WSDLLOC_URL = "wswsreflookupdds.wsdlloc.1"; - - private String urlString = null; - - private URL wsdlurl = null; - - // ServiceName and PortName mapping configuration going java-to-wsdl - private static final String SERVICE_NAME = "EchoService"; - - private static final String PORT_NAME = "EchoPort"; - - private static final String NAMESPACEURI = "http://echo.org/wsdl"; - - private QName SERVICE_QNAME = new QName(NAMESPACEURI, SERVICE_NAME); - - private QName PORT_QNAME = new QName(NAMESPACEURI, PORT_NAME); - - // URL properties used by the test - private URL url = null; - - private URLConnection urlConn = null; - - private Properties props = null; - - private String SERVLET = "/WSWSRefLookupDDsClnt2_web/ServletTest"; - - static EchoService service = null; - - Echo port = null; - - @WebServiceRef(lookup = "bogus") - static EchoService service2 = null; - - Echo port2 = null; - - @EJB(name = "ejb/WSWebServiceRefLookupDDsClntBean") - static EjbClientIF ejbclient; - - private void getPort() throws Exception { - getTestURLs(); - InitialContext ctx = new InitialContext(); - TestUtil - .logMsg("JNDI lookup java:comp/env/service/wswsreflookupddsservice"); - service = (EchoService) ctx - .lookup("java:comp/env/service/wswsreflookupddsservice"); - TestUtil.logMsg("AppClient DEBUG: service=" + service); - port = (Echo) service.getPort(Echo.class); - TestUtil.logMsg("AppClient DEBUG: Obtained port"); - TestUtil.logMsg("AppClient DEBUG: port=" + port); - getTargetEndpointAddress(port); - TestUtil.logMsg("AppClient DEBUG: service2=" + service2); - TestUtil.logMsg("AppClient DEBUG: Obtained port"); - port2 = (Echo) service2.getPort(Echo.class); - TestUtil.logMsg("AppClient DEBUG: port2=" + port2); - JAXWS_Util.setTargetEndpointAddress(port2, urlString); - getTargetEndpointAddress(port2); - } - - private void getTestURLs() throws Exception { - TestUtil.logMsg("Get URL's used by the test"); - String file = JAXWS_Util.getURLFromProp(ENDPOINT_URL); - urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum, file); - file = JAXWS_Util.getURLFromProp(WSDLLOC_URL); - wsdlurl = ctsurl.getURL(PROTOCOL, hostname, portnum, file); - TestUtil.logMsg("Service Endpoint URL: " + urlString); - TestUtil.logMsg("WSDL Location URL: " + wsdlurl); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String urlString = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + urlString); - } - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - /* Test setup */ - - /* - * @class.testArgs: -ap webservices-url-props.dat - * - * @class.setup_props: webServerHost; webServerPort; - */ - - public void setup(String[] args, Properties p) throws Fault { - boolean pass = true; - - props = p; - - try { - hostname = p.getProperty(WEBSERVERHOSTPROP); - if (hostname == null) - pass = false; - else if (hostname.equals("")) - pass = false; - try { - portnum = Integer.parseInt(p.getProperty(WEBSERVERPORTPROP)); - } catch (Exception e) { - TestUtil.printStackTrace(e); - pass = false; - } - - getPort(); - - TestUtil.logMsg("AppClient DEBUG: ejbclient=" + ejbclient); - TestUtil.logMsg("AppClient DEBUG: service=" + service); - TestUtil.logMsg("AppClient DEBUG: port=" + port); - TestUtil.logMsg("AppClient DEBUG: service2=" + service2); - TestUtil.logMsg("AppClient DEBUG: port2=" + port2); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new Fault("setup failed:", e); - } - - if (service == null || service2 == null || port == null || port2 == null) { - throw new Fault("setup failed: injection failure"); - } - - TestUtil.logMsg("setup() Endpoint urlString=" + urlString); - p.setProperty("ENDPOINTURL", urlString); - // when @Statefull ejbclient.init(p); here - - if (!pass) { - TestUtil.logErr( - "Please specify host & port of web server " + "in config properties: " - + WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); - throw new Fault("setup failed:"); - } - logMsg("setup ok"); - } - - public void cleanup() throws Fault { - logMsg("cleanup ok"); - } - - /* - * @testName: testwsreflookup - * - * @assertion_ids: WS4EE:SPEC:4022; - * - * @test_Strategy: Test @WebServiceRef(lookup) method - * - * Description - */ - public void testwsreflookup() throws Fault { - TestUtil.logMsg("testwsreflookup"); - boolean pass = true; - - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test appclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("AppClient invoking EchoService stringTest() method"); - if (!stringTest()) { - pass = false; - TestUtil.logErr("Failed in appclient"); - } else - TestUtil.logMsg("Passed in appclient"); - try { - TestUtil.logMsg("-----------------------------------"); - TestUtil.logMsg("Test servletclient invocation ....."); - TestUtil.logMsg("-----------------------------------"); - url = ctsurl.getURL("http", hostname, portnum, SERVLET); - TestUtil.logMsg("Servlet URL: " + url); - props.setProperty("TEST", "testwsreflookup"); - TestUtil.logMsg("Endpoint urlString=" + urlString); - props.setProperty("ENDPOINTURL", urlString); - urlConn = TestUtil.sendPostData(props, url); - Properties p = TestUtil.getResponseProperties(urlConn); - String passStr = p.getProperty("TESTRESULT"); - if (passStr.equals("fail")) { - pass = false; - TestUtil.logErr("Failed in servletclient"); - } else - TestUtil.logMsg("Passed in servletclient"); - } catch (Exception e) { - // e.printStackTrace(); - TestUtil.logErr("Failed on servletclient invocation"); - pass = false; - } - try { - TestUtil.logMsg("-------------------------------"); - TestUtil.logMsg("Test ejbclient invocation ....."); - TestUtil.logMsg("-------------------------------"); - boolean passEjb = ejbclient.testwsreflookup(props); - if (!passEjb) { - pass = false; - TestUtil.logErr("Failed in ejbclient"); - } else { - TestUtil.logMsg("Passed in ejbclient"); - } - } catch (Exception e) { - // TestUtil.printStackTrace(e); - TestUtil.logErr("Failed on ejbclient invocation"); - pass = false; - } - - if (!pass) - throw new Fault("testwsreflookup failed"); - } - - public boolean stringTest() throws Fault { - TestUtil.logMsg("stringTest"); - boolean pass = true; - String request = "Mary"; - - try { - String response = port2.echoString(request); - if (!JAXWS_Data.compareValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - throw new Fault("stringTest failed", e); - } - return pass; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/EjbClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/EjbClient.java deleted file mode 100644 index d3c0da98fa..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/EjbClient.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; - -import java.util.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import jakarta.ejb.EJBException; -import jakarta.ejb.Remote; -import jakarta.ejb.Stateless; -import jakarta.ejb.SessionContext; -import jakarta.annotation.Resource; -import jakarta.annotation.PostConstruct; -import javax.naming.InitialContext; - -import com.sun.ts.tests.jaxws.common.*; - -@Stateless(name = "WSWebServiceRefLookupDDsClntBean") -@Remote({ EjbClientIF.class }) -public class EjbClient implements EjbClientIF { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - private String urlString; - - EchoService service = null; - - Echo port = null; - - @WebServiceRef(lookup = "bogus") - EchoService service2 = null; - - Echo port2 = null; - - private void getPort() throws Exception { - TestUtil.logMsg("EjbClient DEBUG: service=" + service); - port = (Echo) service.getPort(Echo.class); - TestUtil.logMsg("EjbClient DEBUG: Obtained port"); - TestUtil.logMsg("EjbClient DEBUG: port=" + port); - getTargetEndpointAddress(port); - TestUtil.logMsg("EjbClient DEBUG: service2=" + service2); - TestUtil.logMsg("EjbClient DEBUG: Obtained port"); - port2 = (Echo) service2.getPort(Echo.class); - TestUtil.logMsg("EjbClient DEBUG: port2=" + port2); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String urlString = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + urlString); - } - - // To have the bean @Stateless, put @PostConstruct, init, and test invocation - // into a single request - // @PostConstruct - public void postConstruct() { - System.out.println("EjbClient:postConstruct()"); - try { - InitialContext ctx = new InitialContext(); - TestUtil - .logMsg("JNDI lookup java:comp/env/service/wswsreflookupddsservice"); - service = (EchoService) ctx - .lookup("java:comp/env/service/wswsreflookupddsservice"); - getPort(); - } catch (Exception e) { - System.err.println("EjbClient:postConstruct() Exception: " + e); - e.printStackTrace(); - } - if (service == null || service2 == null || port == null || port2 == null) { - throw new EJBException("postConstruct failed: injection failure"); - } - } - - // separate init() for possible @Statefull - public void init(Properties p) { - harnessProps = p; - try { - TestUtil.init(p); - urlString = harnessProps.getProperty("ENDPOINTURL"); - JAXWS_Util.setTargetEndpointAddress(port2, urlString); - getTargetEndpointAddress(port2); - } catch (RemoteLoggingInitException e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("init: failed"); - } - } - - // Single Request invokes postConstruct() and init() as well as test - public boolean testwsreflookup(Properties p) { - postConstruct(); - init(p); - TestUtil.logMsg("testwsreflookup"); - boolean pass = true; - return stringTest(); - } - - private boolean stringTest() { - TestUtil.logMsg("stringTest"); - boolean pass = true; - String request = "Mary"; - - try { - String response = port2.echoString(request); - if (!JAXWS_Data.compareValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/EjbClientIF.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/EjbClientIF.java deleted file mode 100644 index f5741f2f6b..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/EjbClientIF.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client; - -public interface EjbClientIF { - - public void init(java.util.Properties p); - - public boolean testwsreflookup(java.util.Properties p); -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/ServletClient.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/ServletClient.java deleted file mode 100644 index fd2c646453..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/ServletClient.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ServletClient.java 52684 2009-04-15 04:30:10Z adf $ - */ - -package com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client; - -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.tests.jaxws.common.*; - -import java.io.*; -import java.sql.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import jakarta.servlet.annotation.WebServlet; -import java.util.*; -import java.net.*; -import jakarta.xml.ws.*; -import jakarta.xml.ws.soap.*; -import javax.naming.InitialContext; - -public class ServletClient extends HttpServlet { - - private Properties harnessProps = null; - - private static final boolean debug = false; - - private String urlString; - - transient EchoService service = null; - - Echo port = null; - - @WebServiceRef(name = "service/mylookupddsfromservlet", lookup = "bogus") - transient EchoService service2 = null; - - Echo port2 = null; - - private void getPort() throws Exception { - TestUtil.logMsg("ServletClient DEBUG: service=" + service); - port = (Echo) service.getPort(Echo.class); - TestUtil.logMsg("ServletClient DEBUG: Obtained port"); - TestUtil.logMsg("ServletClient DEBUG: port=" + port); - getTargetEndpointAddress(port); - TestUtil.logMsg("ServletClient DEBUG: service2=" + service2); - TestUtil.logMsg("ServletClient DEBUG: Obtained port"); - port2 = (Echo) service2.getPort(Echo.class); - TestUtil.logMsg("ServletClient DEBUG: port2=" + port2); - } - - private void getTargetEndpointAddress(Object port) throws Exception { - TestUtil.logMsg("Get Target Endpoint Address for port=" + port); - String urlString = JAXWS_Util.getTargetEndpointAddress(port); - TestUtil.logMsg("Target Endpoint Address=" + urlString); - } - - public void init(ServletConfig config) throws ServletException { - super.init(config); - try { - System.out.println("ServletClient:init()"); - InitialContext ctx = new InitialContext(); - TestUtil - .logMsg("JNDI lookup java:comp/env/service/wswsreflookupddsservice"); - service = (EchoService) ctx - .lookup("java:comp/env/service/wswsreflookupddsservice"); - getPort(); - } catch (Exception e) { - System.err.println("ServletClient:init() Exception: " + e); - e.printStackTrace(); - } - if (service == null || service2 == null || port == null || port2 == null) { - throw new ServletException("init() failed: injection failure"); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - boolean pass = true; - Properties p = new Properties(); - res.setContentType("text/plain"); - PrintWriter out = res.getWriter(); - - try { - String test = harnessProps.getProperty("TEST"); - urlString = harnessProps.getProperty("ENDPOINTURL"); - JAXWS_Util.setTargetEndpointAddress(port2, urlString); - getTargetEndpointAddress(port2); - System.out.println("doGet: test to execute is: " + test); - if (test.equals("testwsreflookup")) { - if (testwsreflookup()) - p.setProperty("TESTRESULT", "pass"); - else - p.setProperty("TESTRESULT", "fail"); - } - p.list(out); - } catch (Exception e) { - TestUtil.logErr("doGet: Exception: " + e); - e.printStackTrace(out); - System.out.println("doGet: Exception: " + e); - e.printStackTrace(); - p.setProperty("TESTRESULT", "fail"); - p.list(out); - } - out.close(); - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - harnessProps = new Properties(); - Enumeration enumlist = req.getParameterNames(); - while (enumlist.hasMoreElements()) { - String name = (String) enumlist.nextElement(); - String value = req.getParameter(name); - harnessProps.setProperty(name, value); - } - - try { - TestUtil.init(harnessProps); - if (debug) { - System.out.println("Remote logging intialized for Servlet"); - System.out.println("Here are the harness props"); - harnessProps.list(System.out); - } - } catch (Exception e) { - System.out.println("doPost: Exception: " + e); - e.printStackTrace(); - throw new ServletException("unable to initialize remote logging"); - } - doGet(req, res); - harnessProps = null; - } - - private boolean testwsreflookup() { - TestUtil.logMsg("testwsreflookup"); - boolean pass = true; - return stringTest(); - } - - private boolean stringTest() { - TestUtil.logMsg("stringTest"); - boolean pass = true; - String request = "Mary"; - - try { - String response = port2.echoString(request); - if (!JAXWS_Data.compareValues(request, response, "String")) - pass = false; - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - TestUtil.printStackTrace(e); - pass = false; - } - return pass; - } - -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt2_web.war.sun-web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt2_web.war.sun-web.xml deleted file mode 100644 index 7835b7b676..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt2_web.war.sun-web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wswsreflookupddsservice - http://webServerHost.1:webServerPort.1/WSWSRefLookupDDs_web/jaxws/Echo?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt2_web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt2_web.xml deleted file mode 100644 index d37bf3257e..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt2_web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - ServletClient - - ServletClient - com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client.ServletClient - - - ServletClient - /ServletTest - - - 54 - - - - service/wswsreflookupddsservice - com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client.EchoService - WEB-INF/wsdl/EchoService.wsdl - servicens:EchoService - - - service/mylookupddsfromservlet - com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client.EchoService - java:comp/env/service/wswsreflookupddsservice - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt_client.jar.sun-application-client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt_client.jar.sun-application-client.xml deleted file mode 100644 index 38213bd6e3..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt_client.jar.sun-application-client.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - service/wswsreflookupddsservice - http://webServerHost.1:webServerPort.1/WSWSRefLookupDDs_web/jaxws/Echo?WSDL - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt_client.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt_client.xml deleted file mode 100644 index 5c271f0802..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt_client.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - AppClient - WSWSRefLookupDDsClnt_client - - service/wswsreflookupddsservice - com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client.EchoService - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - - com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client.Client/service2 - com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client.EchoService - java:comp/env/service/wswsreflookupddsservice - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt_ejb.jar.sun-ejb-jar.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt_ejb.jar.sun-ejb-jar.xml deleted file mode 100644 index c0b5ca8744..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt_ejb.jar.sun-ejb-jar.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - 0 - - WSWebServiceRefLookupDDsClntBean - WSWebServiceRefLookupDDsClntBean - - service/wswsreflookupddsservice - http://webServerHost.1:webServerPort.1/WSWSRefLookupDDs_web/jaxws/Echo?WSDL - - false - false - -1 - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt_ejb.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt_ejb.xml deleted file mode 100644 index a9bef73848..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/WSWSRefLookupDDsClnt_ejb.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - EjbClient - - - WSWebServiceRefLookupDDsClntBean - com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client.EjbClient - Stateless - Container - - service/wswsreflookupddsservice - com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client.EchoService - META-INF/wsdl/EchoService.wsdl - servicens:EchoService - - - com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client.EjbClient/service2 - com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.client.EchoService - java:comp/env/service/wswsreflookupddsservice - - - - - - - - - - WSWebServiceRefLookupDDsClntBean - Remote - init - - Supports - - - - WSWebServiceRefLookupDDsClntBean - Remote - testwsreflookup - - Supports - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/application.xml.clientear b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/application.xml.clientear deleted file mode 100644 index a50e01abb1..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/application.xml.clientear +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Application description - WSWSRefLookupDDsClnt - - WSWSRefLookupDDsClnt_client.jar - - - WSWSRefLookupDDsClnt_ejb.jar - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/build.xml deleted file mode 100644 index 154d7f9bdc..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/build.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/customfile.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/customfile.xml deleted file mode 100644 index a480c31391..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/customfile.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/customfile2.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/customfile2.xml deleted file mode 100644 index 1478c7000d..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/client/customfile2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/server/EchoImpl.java b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/server/EchoImpl.java deleted file mode 100644 index b5859ba3fb..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/server/EchoImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: EchoImpl.java 52492 2007-01-24 00:59:57Z adf $ - */ - -package com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.server; - -import jakarta.jws.WebService; -import jakarta.jws.WebMethod; - -@WebService(name = "Echo", serviceName = "EchoService", targetNamespace = "http://echo.org/wsdl") -public class EchoImpl { - @WebMethod - public String echoString(String str) { - return str; - } -} diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/server/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/server/build.xml deleted file mode 100644 index b69965cb4d..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/server/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/server/jakartaEE.tokens b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/server/jakartaEE.tokens deleted file mode 100644 index 6a4a41b358..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/server/jakartaEE.tokens +++ /dev/null @@ -1,4 +0,0 @@ -IMPL=com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.server.EchoImpl -URLALIAS=/jaxws/Echo -SERVLETNAME=com.sun.ts.tests.webservices13.servlet.WSWebServiceRefLookupDDs.server.EchoImpl -WEBSERVICEDESCRIPTION=EchoService diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/server/jakartaEE.web.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/server/jakartaEE.web.xml deleted file mode 100644 index fd0414c821..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/WSWebServiceRefLookupDDs/server/jakartaEE.web.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - @APPNAME@ - - @SERVLETNAME@ - @IMPL@ - 0 - - - @SERVLETNAME@ - @URLALIAS@ - - - 54 - - - diff --git a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/build.xml b/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/build.xml deleted file mode 100644 index 48e41f338d..0000000000 --- a/webservices13/src/test/java/com/sun/ts/tests/webservices13/servlet/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - -